{"version":3,"sources":["node_modules/ts-invariant/lib/invariant.js","node_modules/@apollo/client/version.js","node_modules/@apollo/client/utilities/globals/maybe.js","node_modules/@apollo/client/utilities/globals/global.js","node_modules/@apollo/client/utilities/common/makeUniqueId.js","node_modules/@apollo/client/utilities/common/stringifyForDisplay.js","node_modules/@apollo/client/utilities/globals/invariantWrappers.js","node_modules/@apollo/client/utilities/globals/index.js","node_modules/graphql/version.mjs","node_modules/graphql/jsutils/devAssert.mjs","node_modules/graphql/jsutils/isPromise.mjs","node_modules/graphql/jsutils/isObjectLike.mjs","node_modules/graphql/jsutils/invariant.mjs","node_modules/graphql/language/location.mjs","node_modules/graphql/language/printLocation.mjs","node_modules/graphql/error/GraphQLError.mjs","node_modules/graphql/error/syntaxError.mjs","node_modules/graphql/language/ast.mjs","node_modules/graphql/language/directiveLocation.mjs","node_modules/graphql/language/kinds.mjs","node_modules/graphql/language/characterClasses.mjs","node_modules/graphql/language/blockString.mjs","node_modules/graphql/language/tokenKind.mjs","node_modules/graphql/language/lexer.mjs","node_modules/graphql/jsutils/inspect.mjs","node_modules/graphql/jsutils/instanceOf.mjs","node_modules/graphql/language/source.mjs","node_modules/graphql/language/parser.mjs","node_modules/graphql/jsutils/didYouMean.mjs","node_modules/graphql/jsutils/identityFunc.mjs","node_modules/graphql/jsutils/keyMap.mjs","node_modules/graphql/jsutils/keyValMap.mjs","node_modules/graphql/jsutils/mapValue.mjs","node_modules/graphql/jsutils/naturalCompare.mjs","node_modules/graphql/jsutils/suggestionList.mjs","node_modules/graphql/jsutils/toObjMap.mjs","node_modules/graphql/language/printString.mjs","node_modules/graphql/language/visitor.mjs","node_modules/graphql/language/printer.mjs","node_modules/graphql/utilities/valueFromASTUntyped.mjs","node_modules/graphql/type/assertName.mjs","node_modules/graphql/type/definition.mjs","node_modules/graphql/utilities/typeComparators.mjs","node_modules/graphql/type/scalars.mjs","node_modules/graphql/type/directives.mjs","node_modules/graphql/jsutils/isIterableObject.mjs","node_modules/graphql/utilities/astFromValue.mjs","node_modules/graphql/type/introspection.mjs","node_modules/graphql/type/schema.mjs","node_modules/graphql/type/validate.mjs","node_modules/graphql/utilities/typeFromAST.mjs","node_modules/graphql/utilities/TypeInfo.mjs","node_modules/graphql/language/predicates.mjs","node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs","node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs","node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs","node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs","node_modules/graphql/validation/rules/KnownDirectivesRule.mjs","node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs","node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs","node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs","node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs","node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs","node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs","node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs","node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs","node_modules/graphql/utilities/sortValueNode.mjs","node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs","node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs","node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs","node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs","node_modules/graphql/validation/rules/ScalarLeafsRule.mjs","node_modules/graphql/jsutils/printPathArray.mjs","node_modules/graphql/jsutils/Path.mjs","node_modules/graphql/utilities/coerceInputValue.mjs","node_modules/graphql/utilities/valueFromAST.mjs","node_modules/graphql/execution/values.mjs","node_modules/graphql/execution/collectFields.mjs","node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs","node_modules/graphql/jsutils/groupBy.mjs","node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs","node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs","node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs","node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs","node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs","node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs","node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs","node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs","node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs","node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs","node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs","node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs","node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs","node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs","node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs","node_modules/graphql/validation/specifiedRules.mjs","node_modules/graphql/validation/ValidationContext.mjs","node_modules/graphql/validation/validate.mjs","node_modules/graphql/jsutils/memoize3.mjs","node_modules/graphql/jsutils/promiseForObject.mjs","node_modules/graphql/jsutils/promiseReduce.mjs","node_modules/graphql/jsutils/toError.mjs","node_modules/graphql/error/locatedError.mjs","node_modules/graphql/execution/execute.mjs","node_modules/graphql/graphql.mjs","node_modules/graphql/type/index.mjs","node_modules/graphql/language/index.mjs","node_modules/graphql/jsutils/isAsyncIterable.mjs","node_modules/graphql/execution/mapAsyncIterator.mjs","node_modules/graphql/execution/subscribe.mjs","node_modules/graphql/execution/index.mjs","node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs","node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs","node_modules/graphql/validation/index.mjs","node_modules/graphql/error/index.mjs","node_modules/graphql/utilities/getIntrospectionQuery.mjs","node_modules/graphql/utilities/getOperationAST.mjs","node_modules/graphql/utilities/getOperationRootType.mjs","node_modules/graphql/utilities/introspectionFromSchema.mjs","node_modules/graphql/utilities/buildClientSchema.mjs","node_modules/graphql/utilities/extendSchema.mjs","node_modules/graphql/utilities/buildASTSchema.mjs","node_modules/graphql/utilities/lexicographicSortSchema.mjs","node_modules/graphql/utilities/printSchema.mjs","node_modules/graphql/utilities/concatAST.mjs","node_modules/graphql/utilities/separateOperations.mjs","node_modules/graphql/utilities/stripIgnoredCharacters.mjs","node_modules/graphql/utilities/assertValidName.mjs","node_modules/graphql/utilities/findBreakingChanges.mjs","node_modules/graphql/utilities/index.mjs","node_modules/graphql/index.mjs","node_modules/@apollo/client/utilities/graphql/directives.js","node_modules/@wry/trie/lib/index.js","node_modules/@apollo/client/utilities/common/canUse.js","node_modules/@apollo/client/utilities/common/objects.js","node_modules/@apollo/client/utilities/graphql/fragments.js","node_modules/@apollo/client/utilities/graphql/storeUtils.js","node_modules/@apollo/client/utilities/graphql/getFromAST.js","node_modules/@apollo/client/utilities/graphql/DocumentTransform.js","node_modules/@apollo/client/utilities/graphql/print.js","node_modules/@apollo/client/utilities/common/arrays.js","node_modules/@apollo/client/utilities/graphql/transform.js","node_modules/@apollo/client/utilities/graphql/operations.js","node_modules/@apollo/client/utilities/common/mergeDeep.js","node_modules/@apollo/client/utilities/policies/pagination.js","node_modules/zen-observable-ts/module.js","node_modules/symbol-observable/es/ponyfill.js","node_modules/symbol-observable/es/index.js","node_modules/@apollo/client/utilities/observables/Observable.js","node_modules/@apollo/client/utilities/promises/decoration.js","node_modules/@apollo/client/utilities/common/cloneDeep.js","node_modules/@apollo/client/utilities/common/maybeDeepFreeze.js","node_modules/@apollo/client/utilities/observables/iteration.js","node_modules/@apollo/client/utilities/observables/asyncMap.js","node_modules/@apollo/client/utilities/observables/subclassing.js","node_modules/@apollo/client/utilities/observables/Concast.js","node_modules/@apollo/client/utilities/common/incrementalResult.js","node_modules/@apollo/client/utilities/common/errorHandling.js","node_modules/@apollo/client/utilities/common/compact.js","node_modules/@apollo/client/utilities/common/mergeOptions.js","node_modules/@apollo/client/utilities/common/omitDeep.js","node_modules/@apollo/client/utilities/common/stripTypename.js","node_modules/@apollo/client/utilities/types/IsStrictlyAny.js","node_modules/@apollo/client/utilities/index.js","node_modules/@apollo/client/link/utils/fromError.js","node_modules/@apollo/client/link/utils/toPromise.js","node_modules/@apollo/client/link/utils/fromPromise.js","node_modules/@apollo/client/link/utils/throwServerError.js","node_modules/@apollo/client/link/utils/validateOperation.js","node_modules/@apollo/client/link/utils/createOperation.js","node_modules/@apollo/client/link/utils/transformOperation.js","node_modules/@apollo/client/link/utils/filterOperationVariables.js","node_modules/@apollo/client/link/utils/index.js","node_modules/zod/lib/helpers/util.js","node_modules/zod/lib/ZodError.js","node_modules/zod/lib/locales/en.js","node_modules/zod/lib/errors.js","node_modules/zod/lib/helpers/parseUtil.js","node_modules/zod/lib/helpers/typeAliases.js","node_modules/zod/lib/helpers/errorUtil.js","node_modules/zod/lib/types.js","node_modules/zod/lib/external.js","node_modules/zod/lib/index.js","node_modules/@shure/application-apollo-link-web/dist/src/electron-ipc-renderer.js","node_modules/@apollo/client/link/core/core.cjs","node_modules/@shure/application-apollo-link-web/dist/src/import-apollo-client.js","node_modules/@shure/application-apollo-link-web/node_modules/zen-observable-ts/module.js","node_modules/@shure/application-apollo-link-web/dist/src/message-port-link.js","node_modules/ix/asynciterable/asyncsink.mjs","node_modules/ix/util/bindcallback.mjs","node_modules/ix/util/identity.mjs","node_modules/ix/util/isiterable.mjs","node_modules/ix/util/tointeger.mjs","node_modules/ix/util/tolength.mjs","node_modules/ix/aborterror.mjs","node_modules/ix/asynciterable/asynciterablex.mjs","node_modules/ix/iterable/operators/_refcountlist.mjs","node_modules/ix/asynciterable/create.mjs","node_modules/ix/asynciterable/operators/memoize.mjs","node_modules/ix/asynciterable/asyncifyerrback.mjs","node_modules/ix/asynciterable/asyncify.mjs","node_modules/ix/asynciterable/operators/withabort.mjs","node_modules/ix/asynciterable/average.mjs","node_modules/ix/util/returniterator.mjs","node_modules/ix/asynciterable/catcherror.mjs","node_modules/ix/util/safeRace.mjs","node_modules/ix/asynciterable/combinelatest.mjs","node_modules/ix/asynciterable/concat.mjs","node_modules/ix/asynciterable/count.mjs","node_modules/ix/asynciterable/defer.mjs","node_modules/ix/asynciterable/elementat.mjs","node_modules/ix/asynciterable/empty.mjs","node_modules/ix/asynciterable/every.mjs","node_modules/ix/asynciterable/findindex.mjs","node_modules/ix/asynciterable/find.mjs","node_modules/ix/asynciterable/first.mjs","node_modules/ix/asynciterable/forkjoin.mjs","node_modules/ix/asynciterable/fromdomstream.mjs","node_modules/ix/asynciterable/fromeventpattern.mjs","node_modules/ix/asynciterable/fromevent.mjs","node_modules/ix/asynciterable/generate.mjs","node_modules/ix/asynciterable/_sleep.mjs","node_modules/ix/asynciterable/generatetime.mjs","node_modules/ix/asynciterable/iif.mjs","node_modules/ix/util/comparer.mjs","node_modules/ix/asynciterable/includes.mjs","node_modules/ix/asynciterable/interval.mjs","node_modules/ix/asynciterable/isempty.mjs","node_modules/ix/asynciterable/last.mjs","node_modules/ix/asynciterable/max.mjs","node_modules/ix/asynciterable/_extremaby.mjs","node_modules/ix/asynciterable/maxby.mjs","node_modules/ix/asynciterable/merge.mjs","node_modules/ix/asynciterable/min.mjs","node_modules/ix/asynciterable/minby.mjs","node_modules/ix/asynciterable/never.mjs","node_modules/ix/asynciterable/of.mjs","node_modules/ix/asynciterable/onerrorresumenext.mjs","node_modules/ix/asynciterable/race.mjs","node_modules/ix/asynciterable/range.mjs","node_modules/ix/asynciterable/toarray.mjs","node_modules/ix/asynciterable/reduceright.mjs","node_modules/ix/asynciterable/reduce.mjs","node_modules/ix/asynciterable/repeatvalue.mjs","node_modules/ix/asynciterable/sequenceequal.mjs","node_modules/ix/asynciterable/single.mjs","node_modules/ix/asynciterable/some.mjs","node_modules/ix/asynciterable/sum.mjs","node_modules/ix/asynciterable/throwerrror.mjs","node_modules/ix/asynciterable/operators/publish.mjs","node_modules/ix/asynciterable/todomstream.mjs","node_modules/ix/asynciterable/tomap.mjs","node_modules/ix/util/toobserver.mjs","node_modules/ix/observer.mjs","node_modules/ix/asynciterable/toobservable.mjs","node_modules/ix/asynciterable/toset.mjs","node_modules/ix/asynciterable/whiledo.mjs","node_modules/ix/asynciterable/zip.mjs","node_modules/ix/asynciterable/index.mjs","node_modules/@shure/application-apollo-link-web/dist/src/application-link.js","node_modules/@shure/application-apollo-link-web/dist/src/browser.js","libs/cloud/device-management/devices/data-access/src/lib/api/device-claiming-api.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api/inventory-devices-api.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api/system.service.ts","node_modules/@apollo/client/core/ApolloClient.js","node_modules/@apollo/client/link/core/index.js","node_modules/@apollo/client/link/core/ApolloLink.js","node_modules/@apollo/client/link/core/from.js","node_modules/@apollo/client/link/core/split.js","node_modules/@apollo/client/link/core/execute.js","node_modules/@apollo/client/link/http/index.js","node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js","node_modules/@apollo/client/link/http/responseIterator.js","node_modules/@apollo/client/link/http/iterators/async.js","node_modules/@apollo/client/link/http/iterators/nodeStream.js","node_modules/@apollo/client/link/http/iterators/promise.js","node_modules/@apollo/client/link/http/iterators/reader.js","node_modules/@apollo/client/errors/index.js","node_modules/@apollo/client/link/http/serializeFetchParameter.js","node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js","node_modules/@apollo/client/link/http/checkFetcher.js","node_modules/@apollo/client/link/http/selectURI.js","node_modules/@apollo/client/link/http/createHttpLink.js","node_modules/@apollo/client/link/http/rewriteURIForGET.js","node_modules/@apollo/client/link/http/HttpLink.js","node_modules/@apollo/client/core/QueryManager.js","node_modules/@wry/equality/lib/index.js","node_modules/@apollo/client/cache/index.js","node_modules/@apollo/client/cache/core/cache.js","node_modules/optimism/node_modules/@wry/trie/lib/index.js","node_modules/@wry/caches/lib/strong.js","node_modules/@wry/context/lib/slot.js","node_modules/@wry/context/lib/index.js","node_modules/optimism/lib/context.js","node_modules/optimism/lib/helpers.js","node_modules/optimism/lib/entry.js","node_modules/optimism/lib/dep.js","node_modules/optimism/lib/index.js","node_modules/@apollo/client/cache/core/types/common.js","node_modules/@apollo/client/cache/inmemory/entityStore.js","node_modules/@apollo/client/cache/inmemory/helpers.js","node_modules/@apollo/client/cache/inmemory/inMemoryCache.js","node_modules/@apollo/client/cache/inmemory/readFromStore.js","node_modules/@apollo/client/cache/inmemory/object-canon.js","node_modules/@apollo/client/cache/inmemory/writeToStore.js","node_modules/@apollo/client/cache/inmemory/policies.js","node_modules/@apollo/client/cache/inmemory/reactiveVars.js","node_modules/@apollo/client/cache/inmemory/key-extractor.js","node_modules/@apollo/client/core/ObservableQuery.js","node_modules/@apollo/client/core/networkStatus.js","node_modules/@apollo/client/core/equalByQuery.js","node_modules/@apollo/client/core/LocalState.js","node_modules/@apollo/client/core/QueryInfo.js","node_modules/@apollo/client/core/index.js","node_modules/graphql-tag/lib/index.js","node_modules/apollo-angular/fesm2022/ngApollo.mjs","libs/cloud/shared/apollo/src/lib/services/apollo-cache-manager.service.ts","libs/cloud/shared/apollo/src/lib/services/apollo-type-policy.provider.ts","libs/cloud/shared/apollo/src/lib/services/sys-api/sys-api.type-policy-provider.ts","libs/cloud/shared/apollo/src/lib/services/apollo-sys-api-cloud.module.ts","node_modules/@apollo/client/link/context/index.js","node_modules/@apollo/client/link/error/index.js","node_modules/@apollo/client/link/retry/retryLink.js","node_modules/@apollo/client/link/retry/delayFunction.js","node_modules/@apollo/client/link/retry/retryFunction.js","node_modules/@apollo/client/link/subscriptions/index.js","libs/cloud/shared/apollo/src/lib/services/apollo-connection.service.ts","node_modules/graphql-ws/lib/utils.mjs","node_modules/graphql-ws/lib/common.mjs","node_modules/graphql-ws/lib/client.mjs","libs/cloud/shared/apollo/src/lib/services/apollo-cache-factory.service.ts","libs/cloud/shared/apollo/src/lib/utils/subscription-manager/subscription-manager.ts","libs/cloud/device-management/devices/data-access/src/lib/api/cloud-device-api.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api/detection-token-api.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api/device-claiming-discovery-api.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api/device-discovery-api.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api/device-relationship.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api/device-status.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api/device-property-panel-api.service.ts","libs/cloud/shared/models/http/src/lib/response.models.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/graphql/generated/cloud-sys-api.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/sys-api-cloud-device-api.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/sys-api-connection.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/sys-api-detection-token-api.service.ts","libs/shared/angular/data-access/system-api/core/src/lib/generated/system-api.generated.ts","libs/shared/angular/data-access/system-api/core/src/lib/services/apollo-cache-factory.service.ts","libs/shared/angular/data-access/system-api/core/src/lib/services/apollo-cache-manager.service.ts","libs/shared/angular/data-access/system-api/core/src/lib/services/apollo-type-policy.provider.ts","libs/shared/angular/data-access/system-api/core/src/lib/services/apollo-link.provider.ts","libs/shared/angular/data-access/system-api/core/src/lib/services/message-port-apollo-connection.service.ts","libs/shared/angular/data-access/system-api/core/src/lib/services/apollo-connection.service.ts","libs/shared/angular/data-access/system-api/core/src/lib/services/sys-api-message-port-connection.service.ts","libs/shared/angular/data-access/system-api/core/src/lib/services/http-apollo-connection.service.ts","libs/shared/angular/data-access/system-api/core/src/lib/services/sys-api-http-connection.service.ts","libs/shared/angular/data-access/system-api/core/src/lib/type-policy/sys-api.type-policy-provider.ts","libs/shared/angular/data-access/system-api/core/src/lib/type-policy/deep-merge-reconciler.ts","libs/shared/angular/data-access/system-api/core/src/lib/system-api-core.module.ts","libs/shared/angular/data-access/system-api/core/src/lib/decoration/decoration.provider.ts","libs/shared/angular/data-access/system-api/core/src/lib/decoration/decoration.service.ts","libs/shared/angular/data-access/system-api/core/src/lib/utils/subscription-manager/subscription-manager.ts","libs/shared/angular/data-access/system-api/core/src/lib/utils/subscription-manager/combining-subscription-manager.ts","libs/shared/angular/data-access/system-api/core/src/lib/utils/subscription-manager/gql-subscription-parser.ts","libs/shared/angular/data-access/system-api/core/src/lib/utils/subscription-manager/subscription-manager-service.ts","libs/shared/angular/data-access/system-api/core/src/lib/utils/apollo-query-error-mapper/apollo-query-error-mapper.ts","libs/shared/angular/data-access/system-api/core/src/index.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/mappers/gql.utils.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/sys-api-device-claiming-api.service.ts","node_modules/ts-luxon/dist/ts-luxon.es6.js","libs/cloud/shared/services/mdns-query/src/lib/mdns-query.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/sys-api-device-claiming-discovery-api.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/sys-api-device-discovery-api.service.ts","libs/shared/angular/data-access/system-api/mappers/src/lib/duration.mapper.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/mappers/map-battery-state.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/mappers/map-firmware-packages.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/mappers/map-license-info.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/mappers/map-mic-status.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/mappers/map-proxied-transmitter.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/mappers/utils.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/mappers/map-property-panel-device.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/sys-api-device-property-panel-api.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/sys-api-device-relationship.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/mappers/map-inventory-device.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/sys-api-inventory-devices-api.service.ts","libs/cloud/device-management/devices/data-access/src/lib/api-instance-sys-api/sys-api-devices-data-access.module.ts"],"sourcesContent":["import { __extends } from \"tslib\";\nvar genericMessage = \"Invariant Violation\";\nvar _a = Object.setPrototypeOf, setPrototypeOf = _a === void 0 ? function (obj, proto) {\n obj.__proto__ = proto;\n return obj;\n} : _a;\nvar InvariantError = /** @class */ (function (_super) {\n __extends(InvariantError, _super);\n function InvariantError(message) {\n if (message === void 0) { message = genericMessage; }\n var _this = _super.call(this, typeof message === \"number\"\n ? genericMessage + \": \" + message + \" (see https://github.com/apollographql/invariant-packages)\"\n : message) || this;\n _this.framesToPop = 1;\n _this.name = genericMessage;\n setPrototypeOf(_this, InvariantError.prototype);\n return _this;\n }\n return InvariantError;\n}(Error));\nexport { InvariantError };\nexport function invariant(condition, message) {\n if (!condition) {\n throw new InvariantError(message);\n }\n}\nvar verbosityLevels = [\"debug\", \"log\", \"warn\", \"error\", \"silent\"];\nvar verbosityLevel = verbosityLevels.indexOf(\"log\");\nfunction wrapConsoleMethod(name) {\n return function () {\n if (verbosityLevels.indexOf(name) >= verbosityLevel) {\n // Default to console.log if this host environment happens not to provide\n // all the console.* methods we need.\n var method = console[name] || console.log;\n return method.apply(console, arguments);\n }\n };\n}\n(function (invariant) {\n invariant.debug = wrapConsoleMethod(\"debug\");\n invariant.log = wrapConsoleMethod(\"log\");\n invariant.warn = wrapConsoleMethod(\"warn\");\n invariant.error = wrapConsoleMethod(\"error\");\n})(invariant || (invariant = {}));\nexport function setVerbosity(level) {\n var old = verbosityLevels[verbosityLevel];\n verbosityLevel = Math.max(0, verbosityLevels.indexOf(level));\n return old;\n}\nexport default invariant;\n","export var version = \"3.8.10\";\n","export function maybe(thunk) {\n try {\n return thunk();\n }\n catch (_a) { }\n}\n","import { maybe } from \"./maybe.js\";\nexport default (maybe(function () { return globalThis; }) ||\n maybe(function () { return window; }) ||\n maybe(function () { return self; }) ||\n maybe(function () { return global; }) || // We don't expect the Function constructor ever to be invoked at runtime, as\n// long as at least one of globalThis, window, self, or global is defined, so\n// we are under no obligation to make it easy for static analysis tools to\n// detect syntactic usage of the Function constructor. If you think you can\n// improve your static analysis to detect this obfuscation, think again. This\n// is an arms race you cannot win, at least not in JavaScript.\nmaybe(function () {\n return maybe.constructor(\"return this\")();\n}));\n","var prefixCounts = new Map();\n// These IDs won't be globally unique, but they will be unique within this\n// process, thanks to the counter, and unguessable thanks to the random suffix.\nexport function makeUniqueId(prefix) {\n var count = prefixCounts.get(prefix) || 1;\n prefixCounts.set(prefix, count + 1);\n return \"\".concat(prefix, \":\").concat(count, \":\").concat(Math.random().toString(36).slice(2));\n}\n","import { makeUniqueId } from \"./makeUniqueId.js\";\nexport function stringifyForDisplay(value, space) {\n if (space === void 0) { space = 0; }\n var undefId = makeUniqueId(\"stringifyForDisplay\");\n return JSON.stringify(value, function (key, value) {\n return value === void 0 ? undefId : value;\n }, space)\n .split(JSON.stringify(undefId))\n .join(\"\");\n}\n","import { invariant as originalInvariant, InvariantError } from \"ts-invariant\";\nimport { version } from \"../../version.js\";\nimport global from \"./global.js\";\nimport { stringifyForDisplay } from \"../common/stringifyForDisplay.js\";\nfunction wrap(fn) {\n return function (message) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof message === \"number\") {\n var arg0 = message;\n message = getHandledErrorMsg(arg0);\n if (!message) {\n message = getFallbackErrorMsg(arg0, args);\n args = [];\n }\n }\n fn.apply(void 0, [message].concat(args));\n };\n}\nvar invariant = Object.assign(function invariant(condition, message) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n if (!condition) {\n originalInvariant(condition, getHandledErrorMsg(message, args) || getFallbackErrorMsg(message, args));\n }\n}, {\n debug: wrap(originalInvariant.debug),\n log: wrap(originalInvariant.log),\n warn: wrap(originalInvariant.warn),\n error: wrap(originalInvariant.error),\n});\n/**\n * Returns an InvariantError.\n *\n * `message` can only be a string, a concatenation of strings, or a ternary statement\n * that results in a string. This will be enforced on build, where the message will\n * be replaced with a message number.\n * String substitutions with %s are supported and will also return\n * pretty-stringified objects.\n * Excess `optionalParams` will be swallowed.\n */\nfunction newInvariantError(message) {\n var optionalParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n optionalParams[_i - 1] = arguments[_i];\n }\n return new InvariantError(getHandledErrorMsg(message, optionalParams) ||\n getFallbackErrorMsg(message, optionalParams));\n}\nvar ApolloErrorMessageHandler = Symbol.for(\"ApolloErrorMessageHandler_\" + version);\nfunction stringify(arg) {\n return typeof arg == \"string\" ? arg : (stringifyForDisplay(arg, 2).slice(0, 1000));\n}\nfunction getHandledErrorMsg(message, messageArgs) {\n if (messageArgs === void 0) { messageArgs = []; }\n if (!message)\n return;\n return (global[ApolloErrorMessageHandler] &&\n global[ApolloErrorMessageHandler](message, messageArgs.map(stringify)));\n}\nfunction getFallbackErrorMsg(message, messageArgs) {\n if (messageArgs === void 0) { messageArgs = []; }\n if (!message)\n return;\n return \"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#\".concat(encodeURIComponent(JSON.stringify({\n version: version,\n message: message,\n args: messageArgs.map(stringify),\n })));\n}\nexport { invariant, InvariantError, newInvariantError, ApolloErrorMessageHandler, };\n","import { invariant, newInvariantError, InvariantError, } from \"./invariantWrappers.js\";\nexport { maybe } from \"./maybe.js\";\nexport { default as global } from \"./global.js\";\nexport { invariant, newInvariantError, InvariantError };\n/**\n * @deprecated we do not use this internally anymore,\n * it is just exported for backwards compatibility\n */\n// this file is extempt from automatic `__DEV__` replacement\n// so we have to write it out here\n// @ts-ignore\nexport var DEV = globalThis.__DEV__ !== false;\nexport { DEV as __DEV__ };\n","// Note: This file is autogenerated using \"resources/gen-version.js\" script and\n// automatically updated by \"npm version\" command.\n\n/**\n * A string containing the version of the GraphQL.js library\n */\nexport const version = '16.8.2';\n/**\n * An object containing the components of the GraphQL.js version string\n */\n\nexport const versionInfo = Object.freeze({\n major: 16,\n minor: 8,\n patch: 2,\n preReleaseTag: null,\n});\n","export function devAssert(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n","/**\n * Returns true if the value acts like a Promise, i.e. has a \"then\" function,\n * otherwise returns false.\n */\nexport function isPromise(value) {\n return (\n typeof (value === null || value === void 0 ? void 0 : value.then) ===\n 'function'\n );\n}\n","/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n */\nexport function isObjectLike(value) {\n return typeof value == 'object' && value !== null;\n}\n","export function invariant(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(\n message != null ? message : 'Unexpected invariant triggered.',\n );\n }\n}\n","import { invariant } from '../jsutils/invariant.mjs';\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n */\nexport function getLocation(source, position) {\n let lastLineStart = 0;\n let line = 1;\n\n for (const match of source.body.matchAll(LineRegExp)) {\n typeof match.index === 'number' || invariant(false);\n\n if (match.index >= position) {\n break;\n }\n\n lastLineStart = match.index + match[0].length;\n line += 1;\n }\n\n return {\n line,\n column: position + 1 - lastLineStart,\n };\n}\n","import { getLocation } from './location.mjs';\n\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\nexport function printLocation(location) {\n return printSourceLocation(\n location.source,\n getLocation(location.source, location.start),\n );\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printSourceLocation(source, sourceLocation) {\n const firstLineColumnOffset = source.locationOffset.column - 1;\n const body = ''.padStart(firstLineColumnOffset) + source.body;\n const lineIndex = sourceLocation.line - 1;\n const lineOffset = source.locationOffset.line - 1;\n const lineNum = sourceLocation.line + lineOffset;\n const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n const columnNum = sourceLocation.column + columnOffset;\n const locationStr = `${source.name}:${lineNum}:${columnNum}\\n`;\n const lines = body.split(/\\r\\n|[\\n\\r]/g);\n const locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n const subLineIndex = Math.floor(columnNum / 80);\n const subLineColumnNum = columnNum % 80;\n const subLines = [];\n\n for (let i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return (\n locationStr +\n printPrefixedLines([\n [`${lineNum} |`, subLines[0]],\n ...subLines.slice(1, subLineIndex + 1).map((subLine) => ['|', subLine]),\n ['|', '^'.padStart(subLineColumnNum)],\n ['|', subLines[subLineIndex + 1]],\n ])\n );\n }\n\n return (\n locationStr +\n printPrefixedLines([\n // Lines specified like this: [\"prefix\", \"string\"],\n [`${lineNum - 1} |`, lines[lineIndex - 1]],\n [`${lineNum} |`, locationLine],\n ['|', '^'.padStart(columnNum)],\n [`${lineNum + 1} |`, lines[lineIndex + 1]],\n ])\n );\n}\n\nfunction printPrefixedLines(lines) {\n const existingLines = lines.filter(([_, line]) => line !== undefined);\n const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));\n return existingLines\n .map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : ''))\n .join('\\n');\n}\n","import { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { getLocation } from '../language/location.mjs';\nimport {\n printLocation,\n printSourceLocation,\n} from '../language/printLocation.mjs';\n\nfunction toNormalizedOptions(args) {\n const firstArg = args[0];\n\n if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {\n return {\n nodes: firstArg,\n source: args[1],\n positions: args[2],\n path: args[3],\n originalError: args[4],\n extensions: args[5],\n };\n }\n\n return firstArg;\n}\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport class GraphQLError extends Error {\n /**\n * An array of `{ line, column }` locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n\n /**\n * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.\n */\n constructor(message, ...rawArgs) {\n var _this$nodes, _nodeLocations$, _ref;\n\n const { nodes, source, positions, path, originalError, extensions } =\n toNormalizedOptions(rawArgs);\n super(message);\n this.name = 'GraphQLError';\n this.path = path !== null && path !== void 0 ? path : undefined;\n this.originalError =\n originalError !== null && originalError !== void 0\n ? originalError\n : undefined; // Compute list of blame nodes.\n\n this.nodes = undefinedIfEmpty(\n Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined,\n );\n const nodeLocations = undefinedIfEmpty(\n (_this$nodes = this.nodes) === null || _this$nodes === void 0\n ? void 0\n : _this$nodes.map((node) => node.loc).filter((loc) => loc != null),\n ); // Compute locations in the source for the given nodes/positions.\n\n this.source =\n source !== null && source !== void 0\n ? source\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : (_nodeLocations$ = nodeLocations[0]) === null ||\n _nodeLocations$ === void 0\n ? void 0\n : _nodeLocations$.source;\n this.positions =\n positions !== null && positions !== void 0\n ? positions\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => loc.start);\n this.locations =\n positions && source\n ? positions.map((pos) => getLocation(source, pos))\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => getLocation(loc.source, loc.start));\n const originalExtensions = isObjectLike(\n originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions,\n )\n ? originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions\n : undefined;\n this.extensions =\n (_ref =\n extensions !== null && extensions !== void 0\n ? extensions\n : originalExtensions) !== null && _ref !== void 0\n ? _ref\n : Object.create(null); // Only properties prescribed by the spec should be enumerable.\n // Keep the rest as non-enumerable.\n\n Object.defineProperties(this, {\n message: {\n writable: true,\n enumerable: true,\n },\n name: {\n enumerable: false,\n },\n nodes: {\n enumerable: false,\n },\n source: {\n enumerable: false,\n },\n positions: {\n enumerable: false,\n },\n originalError: {\n enumerable: false,\n },\n }); // Include (non-enumerable) stack trace.\n\n /* c8 ignore start */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n\n if (\n originalError !== null &&\n originalError !== void 0 &&\n originalError.stack\n ) {\n Object.defineProperty(this, 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true,\n });\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, GraphQLError);\n } else {\n Object.defineProperty(this, 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true,\n });\n }\n /* c8 ignore stop */\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLError';\n }\n\n toString() {\n let output = this.message;\n\n if (this.nodes) {\n for (const node of this.nodes) {\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (this.source && this.locations) {\n for (const location of this.locations) {\n output += '\\n\\n' + printSourceLocation(this.source, location);\n }\n }\n\n return output;\n }\n\n toJSON() {\n const formattedError = {\n message: this.message,\n };\n\n if (this.locations != null) {\n formattedError.locations = this.locations;\n }\n\n if (this.path != null) {\n formattedError.path = this.path;\n }\n\n if (this.extensions != null && Object.keys(this.extensions).length > 0) {\n formattedError.extensions = this.extensions;\n }\n\n return formattedError;\n }\n}\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/**\n * See: https://spec.graphql.org/draft/#sec-Errors\n */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\n *\n * @deprecated Please use `error.toString` instead. Will be removed in v17\n */\nexport function printError(error) {\n return error.toString();\n}\n/**\n * Given a GraphQLError, format it according to the rules described by the\n * Response Format, Errors section of the GraphQL Specification.\n *\n * @deprecated Please use `error.toJSON` instead. Will be removed in v17\n */\n\nexport function formatError(error) {\n return error.toJSON();\n}\n","import { GraphQLError } from './GraphQLError.mjs';\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n */\n\nexport function syntaxError(source, position, description) {\n return new GraphQLError(`Syntax Error: ${description}`, {\n source,\n positions: [position],\n });\n}\n","/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport class Location {\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\n */\n constructor(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n\n get [Symbol.toStringTag]() {\n return 'Location';\n }\n\n toJSON() {\n return {\n start: this.start,\n end: this.end,\n };\n }\n}\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport class Token {\n /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n *\n * Note: is undefined for punctuation tokens, but typed as string for\n * convenience in the parser.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. is always the first node and \n * the last.\n */\n constructor(kind, start, end, line, column, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n this.value = value;\n this.prev = null;\n this.next = null;\n }\n\n get [Symbol.toStringTag]() {\n return 'Token';\n }\n\n toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column,\n };\n }\n}\n/**\n * The list of all possible AST node types.\n */\n\n/**\n * @internal\n */\nexport const QueryDocumentKeys = {\n Name: [],\n Document: ['definitions'],\n OperationDefinition: [\n 'name',\n 'variableDefinitions',\n 'directives',\n 'selectionSet',\n ],\n VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],\n Variable: ['name'],\n SelectionSet: ['selections'],\n Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n Argument: ['name', 'value'],\n FragmentSpread: ['name', 'directives'],\n InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n FragmentDefinition: [\n 'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0\n 'variableDefinitions',\n 'typeCondition',\n 'directives',\n 'selectionSet',\n ],\n IntValue: [],\n FloatValue: [],\n StringValue: [],\n BooleanValue: [],\n NullValue: [],\n EnumValue: [],\n ListValue: ['values'],\n ObjectValue: ['fields'],\n ObjectField: ['name', 'value'],\n Directive: ['name', 'arguments'],\n NamedType: ['name'],\n ListType: ['type'],\n NonNullType: ['type'],\n SchemaDefinition: ['description', 'directives', 'operationTypes'],\n OperationTypeDefinition: ['type'],\n ScalarTypeDefinition: ['description', 'name', 'directives'],\n ObjectTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n InputValueDefinition: [\n 'description',\n 'name',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n InterfaceTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n EnumValueDefinition: ['description', 'name', 'directives'],\n InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],\n SchemaExtension: ['directives', 'operationTypes'],\n ScalarTypeExtension: ['name', 'directives'],\n ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n UnionTypeExtension: ['name', 'directives', 'types'],\n EnumTypeExtension: ['name', 'directives', 'values'],\n InputObjectTypeExtension: ['name', 'directives', 'fields'],\n};\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\n/**\n * @internal\n */\n\nexport function isNode(maybeNode) {\n const maybeKind =\n maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;\n return typeof maybeKind === 'string' && kindValues.has(maybeKind);\n}\n/** Name */\n\nvar OperationTypeNode;\n\n(function (OperationTypeNode) {\n OperationTypeNode['QUERY'] = 'query';\n OperationTypeNode['MUTATION'] = 'mutation';\n OperationTypeNode['SUBSCRIPTION'] = 'subscription';\n})(OperationTypeNode || (OperationTypeNode = {}));\n\nexport { OperationTypeNode };\n","/**\n * The set of allowed directive location values.\n */\nvar DirectiveLocation;\n\n(function (DirectiveLocation) {\n DirectiveLocation['QUERY'] = 'QUERY';\n DirectiveLocation['MUTATION'] = 'MUTATION';\n DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION';\n DirectiveLocation['FIELD'] = 'FIELD';\n DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION';\n DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD';\n DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT';\n DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION';\n DirectiveLocation['SCHEMA'] = 'SCHEMA';\n DirectiveLocation['SCALAR'] = 'SCALAR';\n DirectiveLocation['OBJECT'] = 'OBJECT';\n DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION';\n DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION';\n DirectiveLocation['INTERFACE'] = 'INTERFACE';\n DirectiveLocation['UNION'] = 'UNION';\n DirectiveLocation['ENUM'] = 'ENUM';\n DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE';\n DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';\n DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';\n})(DirectiveLocation || (DirectiveLocation = {}));\n\nexport { DirectiveLocation };\n/**\n * The enum type representing the directive location values.\n *\n * @deprecated Please use `DirectiveLocation`. Will be remove in v17.\n */\n","/**\n * The set of allowed kind values for AST nodes.\n */\nvar Kind;\n\n(function (Kind) {\n Kind['NAME'] = 'Name';\n Kind['DOCUMENT'] = 'Document';\n Kind['OPERATION_DEFINITION'] = 'OperationDefinition';\n Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';\n Kind['SELECTION_SET'] = 'SelectionSet';\n Kind['FIELD'] = 'Field';\n Kind['ARGUMENT'] = 'Argument';\n Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';\n Kind['INLINE_FRAGMENT'] = 'InlineFragment';\n Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';\n Kind['VARIABLE'] = 'Variable';\n Kind['INT'] = 'IntValue';\n Kind['FLOAT'] = 'FloatValue';\n Kind['STRING'] = 'StringValue';\n Kind['BOOLEAN'] = 'BooleanValue';\n Kind['NULL'] = 'NullValue';\n Kind['ENUM'] = 'EnumValue';\n Kind['LIST'] = 'ListValue';\n Kind['OBJECT'] = 'ObjectValue';\n Kind['OBJECT_FIELD'] = 'ObjectField';\n Kind['DIRECTIVE'] = 'Directive';\n Kind['NAMED_TYPE'] = 'NamedType';\n Kind['LIST_TYPE'] = 'ListType';\n Kind['NON_NULL_TYPE'] = 'NonNullType';\n Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';\n Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';\n Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';\n Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';\n Kind['FIELD_DEFINITION'] = 'FieldDefinition';\n Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';\n Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';\n Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';\n Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';\n Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';\n Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';\n Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';\n Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';\n Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';\n Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';\n Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';\n Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';\n Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';\n Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';\n})(Kind || (Kind = {}));\n\nexport { Kind };\n/**\n * The enum type representing the possible kind values of AST nodes.\n *\n * @deprecated Please use `Kind`. Will be remove in v17.\n */\n","/**\n * ```\n * WhiteSpace ::\n * - \"Horizontal Tab (U+0009)\"\n * - \"Space (U+0020)\"\n * ```\n * @internal\n */\nexport function isWhiteSpace(code) {\n return code === 0x0009 || code === 0x0020;\n}\n/**\n * ```\n * Digit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * ```\n * @internal\n */\n\nexport function isDigit(code) {\n return code >= 0x0030 && code <= 0x0039;\n}\n/**\n * ```\n * Letter :: one of\n * - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`\n * - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`\n * - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`\n * - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`\n * ```\n * @internal\n */\n\nexport function isLetter(code) {\n return (\n (code >= 0x0061 && code <= 0x007a) || // A-Z\n (code >= 0x0041 && code <= 0x005a) // a-z\n );\n}\n/**\n * ```\n * NameStart ::\n * - Letter\n * - `_`\n * ```\n * @internal\n */\n\nexport function isNameStart(code) {\n return isLetter(code) || code === 0x005f;\n}\n/**\n * ```\n * NameContinue ::\n * - Letter\n * - Digit\n * - `_`\n * ```\n * @internal\n */\n\nexport function isNameContinue(code) {\n return isLetter(code) || isDigit(code) || code === 0x005f;\n}\n","import { isWhiteSpace } from './characterClasses.mjs';\n/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\n\nexport function dedentBlockStringLines(lines) {\n var _firstNonEmptyLine2;\n\n let commonIndent = Number.MAX_SAFE_INTEGER;\n let firstNonEmptyLine = null;\n let lastNonEmptyLine = -1;\n\n for (let i = 0; i < lines.length; ++i) {\n var _firstNonEmptyLine;\n\n const line = lines[i];\n const indent = leadingWhitespace(line);\n\n if (indent === line.length) {\n continue; // skip empty lines\n }\n\n firstNonEmptyLine =\n (_firstNonEmptyLine = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine !== void 0\n ? _firstNonEmptyLine\n : i;\n lastNonEmptyLine = i;\n\n if (i !== 0 && indent < commonIndent) {\n commonIndent = indent;\n }\n }\n\n return lines // Remove common indentation from all lines but first.\n .map((line, i) => (i === 0 ? line : line.slice(commonIndent))) // Remove leading and trailing blank lines.\n .slice(\n (_firstNonEmptyLine2 = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine2 !== void 0\n ? _firstNonEmptyLine2\n : 0,\n lastNonEmptyLine + 1,\n );\n}\n\nfunction leadingWhitespace(str) {\n let i = 0;\n\n while (i < str.length && isWhiteSpace(str.charCodeAt(i))) {\n ++i;\n }\n\n return i;\n}\n/**\n * @internal\n */\n\nexport function isPrintableAsBlockString(value) {\n if (value === '') {\n return true; // empty string is printable\n }\n\n let isEmptyLine = true;\n let hasIndent = false;\n let hasCommonIndent = true;\n let seenNonEmptyLine = false;\n\n for (let i = 0; i < value.length; ++i) {\n switch (value.codePointAt(i)) {\n case 0x0000:\n case 0x0001:\n case 0x0002:\n case 0x0003:\n case 0x0004:\n case 0x0005:\n case 0x0006:\n case 0x0007:\n case 0x0008:\n case 0x000b:\n case 0x000c:\n case 0x000e:\n case 0x000f:\n return false;\n // Has non-printable characters\n\n case 0x000d:\n // \\r\n return false;\n // Has \\r or \\r\\n which will be replaced as \\n\n\n case 10:\n // \\n\n if (isEmptyLine && !seenNonEmptyLine) {\n return false; // Has leading new line\n }\n\n seenNonEmptyLine = true;\n isEmptyLine = true;\n hasIndent = false;\n break;\n\n case 9: // \\t\n\n case 32:\n // \n hasIndent || (hasIndent = isEmptyLine);\n break;\n\n default:\n hasCommonIndent && (hasCommonIndent = hasIndent);\n isEmptyLine = false;\n }\n }\n\n if (isEmptyLine) {\n return false; // Has trailing empty lines\n }\n\n if (hasCommonIndent && seenNonEmptyLine) {\n return false; // Has internal indent\n }\n\n return true;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nexport function printBlockString(value, options) {\n const escapedValue = value.replace(/\"\"\"/g, '\\\\\"\"\"'); // Expand a block string's raw value into independent lines.\n\n const lines = escapedValue.split(/\\r\\n|[\\n\\r]/g);\n const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line\n\n const forceLeadingNewLine =\n lines.length > 1 &&\n lines\n .slice(1)\n .every((line) => line.length === 0 || isWhiteSpace(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line\n\n const hasTrailingTripleQuotes = escapedValue.endsWith('\\\\\"\"\"'); // Trailing quote (single or double) or slash forces trailing new line\n\n const hasTrailingQuote = value.endsWith('\"') && !hasTrailingTripleQuotes;\n const hasTrailingSlash = value.endsWith('\\\\');\n const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;\n const printAsMultipleLines =\n !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability\n (!isSingleLine ||\n value.length > 70 ||\n forceTrailingNewline ||\n forceLeadingNewLine ||\n hasTrailingTripleQuotes);\n let result = ''; // Format a multi-line block quote to account for leading space.\n\n const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0));\n\n if ((printAsMultipleLines && !skipLeadingNewLine) || forceLeadingNewLine) {\n result += '\\n';\n }\n\n result += escapedValue;\n\n if (printAsMultipleLines || forceTrailingNewline) {\n result += '\\n';\n }\n\n return '\"\"\"' + result + '\"\"\"';\n}\n","/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nvar TokenKind;\n\n(function (TokenKind) {\n TokenKind['SOF'] = '';\n TokenKind['EOF'] = '';\n TokenKind['BANG'] = '!';\n TokenKind['DOLLAR'] = '$';\n TokenKind['AMP'] = '&';\n TokenKind['PAREN_L'] = '(';\n TokenKind['PAREN_R'] = ')';\n TokenKind['SPREAD'] = '...';\n TokenKind['COLON'] = ':';\n TokenKind['EQUALS'] = '=';\n TokenKind['AT'] = '@';\n TokenKind['BRACKET_L'] = '[';\n TokenKind['BRACKET_R'] = ']';\n TokenKind['BRACE_L'] = '{';\n TokenKind['PIPE'] = '|';\n TokenKind['BRACE_R'] = '}';\n TokenKind['NAME'] = 'Name';\n TokenKind['INT'] = 'Int';\n TokenKind['FLOAT'] = 'Float';\n TokenKind['STRING'] = 'String';\n TokenKind['BLOCK_STRING'] = 'BlockString';\n TokenKind['COMMENT'] = 'Comment';\n})(TokenKind || (TokenKind = {}));\n\nexport { TokenKind };\n/**\n * The enum type representing the token kinds values.\n *\n * @deprecated Please use `TokenKind`. Will be remove in v17.\n */\n","import { syntaxError } from '../error/syntaxError.mjs';\nimport { Token } from './ast.mjs';\nimport { dedentBlockStringLines } from './blockString.mjs';\nimport { isDigit, isNameContinue, isNameStart } from './characterClasses.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\n\nexport class Lexer {\n /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\n */\n constructor(source) {\n const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n\n get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\n */\n\n advance() {\n this.lastToken = this.token;\n const token = (this.token = this.lookahead());\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n */\n\n lookahead() {\n let token = this.token;\n\n if (token.kind !== TokenKind.EOF) {\n do {\n if (token.next) {\n token = token.next;\n } else {\n // Read the next token and form a link in the token linked-list.\n const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.\n\n token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.\n\n nextToken.prev = token;\n token = nextToken;\n }\n } while (token.kind === TokenKind.COMMENT);\n }\n\n return token;\n }\n}\n/**\n * @internal\n */\n\nexport function isPunctuatorTokenKind(kind) {\n return (\n kind === TokenKind.BANG ||\n kind === TokenKind.DOLLAR ||\n kind === TokenKind.AMP ||\n kind === TokenKind.PAREN_L ||\n kind === TokenKind.PAREN_R ||\n kind === TokenKind.SPREAD ||\n kind === TokenKind.COLON ||\n kind === TokenKind.EQUALS ||\n kind === TokenKind.AT ||\n kind === TokenKind.BRACKET_L ||\n kind === TokenKind.BRACKET_R ||\n kind === TokenKind.BRACE_L ||\n kind === TokenKind.PIPE ||\n kind === TokenKind.BRACE_R\n );\n}\n/**\n * A Unicode scalar value is any Unicode code point except surrogate code\n * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and\n * 0xE000 to 0x10FFFF.\n *\n * SourceCharacter ::\n * - \"Any Unicode scalar value\"\n */\n\nfunction isUnicodeScalarValue(code) {\n return (\n (code >= 0x0000 && code <= 0xd7ff) || (code >= 0xe000 && code <= 0x10ffff)\n );\n}\n/**\n * The GraphQL specification defines source text as a sequence of unicode scalar\n * values (which Unicode defines to exclude surrogate code points). However\n * JavaScript defines strings as a sequence of UTF-16 code units which may\n * include surrogates. A surrogate pair is a valid source character as it\n * encodes a supplementary code point (above U+FFFF), but unpaired surrogate\n * code points are not valid source characters.\n */\n\nfunction isSupplementaryCodePoint(body, location) {\n return (\n isLeadingSurrogate(body.charCodeAt(location)) &&\n isTrailingSurrogate(body.charCodeAt(location + 1))\n );\n}\n\nfunction isLeadingSurrogate(code) {\n return code >= 0xd800 && code <= 0xdbff;\n}\n\nfunction isTrailingSurrogate(code) {\n return code >= 0xdc00 && code <= 0xdfff;\n}\n/**\n * Prints the code point (or end of file reference) at a given location in a\n * source for use in error messages.\n *\n * Printable ASCII is printed quoted, while other points are printed in Unicode\n * code point form (ie. U+1234).\n */\n\nfunction printCodePointAt(lexer, location) {\n const code = lexer.source.body.codePointAt(location);\n\n if (code === undefined) {\n return TokenKind.EOF;\n } else if (code >= 0x0020 && code <= 0x007e) {\n // Printable ASCII\n const char = String.fromCodePoint(code);\n return char === '\"' ? \"'\\\"'\" : `\"${char}\"`;\n } // Unicode code point\n\n return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');\n}\n/**\n * Create a token with line and column location information.\n */\n\nfunction createToken(lexer, kind, start, end, value) {\n const line = lexer.line;\n const col = 1 + start - lexer.lineStart;\n return new Token(kind, start, end, line, col, value);\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n */\n\nfunction readNextToken(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // SourceCharacter\n\n switch (code) {\n // Ignored ::\n // - UnicodeBOM\n // - WhiteSpace\n // - LineTerminator\n // - Comment\n // - Comma\n //\n // UnicodeBOM :: \"Byte Order Mark (U+FEFF)\"\n //\n // WhiteSpace ::\n // - \"Horizontal Tab (U+0009)\"\n // - \"Space (U+0020)\"\n //\n // Comma :: ,\n case 0xfeff: // \n\n case 0x0009: // \\t\n\n case 0x0020: // \n\n case 0x002c:\n // ,\n ++position;\n continue;\n // LineTerminator ::\n // - \"New Line (U+000A)\"\n // - \"Carriage Return (U+000D)\" [lookahead != \"New Line (U+000A)\"]\n // - \"Carriage Return (U+000D)\" \"New Line (U+000A)\"\n\n case 0x000a:\n // \\n\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n\n case 0x000d:\n // \\r\n if (body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n // Comment\n\n case 0x0023:\n // #\n return readComment(lexer, position);\n // Token ::\n // - Punctuator\n // - Name\n // - IntValue\n // - FloatValue\n // - StringValue\n //\n // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }\n\n case 0x0021:\n // !\n return createToken(lexer, TokenKind.BANG, position, position + 1);\n\n case 0x0024:\n // $\n return createToken(lexer, TokenKind.DOLLAR, position, position + 1);\n\n case 0x0026:\n // &\n return createToken(lexer, TokenKind.AMP, position, position + 1);\n\n case 0x0028:\n // (\n return createToken(lexer, TokenKind.PAREN_L, position, position + 1);\n\n case 0x0029:\n // )\n return createToken(lexer, TokenKind.PAREN_R, position, position + 1);\n\n case 0x002e:\n // .\n if (\n body.charCodeAt(position + 1) === 0x002e &&\n body.charCodeAt(position + 2) === 0x002e\n ) {\n return createToken(lexer, TokenKind.SPREAD, position, position + 3);\n }\n\n break;\n\n case 0x003a:\n // :\n return createToken(lexer, TokenKind.COLON, position, position + 1);\n\n case 0x003d:\n // =\n return createToken(lexer, TokenKind.EQUALS, position, position + 1);\n\n case 0x0040:\n // @\n return createToken(lexer, TokenKind.AT, position, position + 1);\n\n case 0x005b:\n // [\n return createToken(lexer, TokenKind.BRACKET_L, position, position + 1);\n\n case 0x005d:\n // ]\n return createToken(lexer, TokenKind.BRACKET_R, position, position + 1);\n\n case 0x007b:\n // {\n return createToken(lexer, TokenKind.BRACE_L, position, position + 1);\n\n case 0x007c:\n // |\n return createToken(lexer, TokenKind.PIPE, position, position + 1);\n\n case 0x007d:\n // }\n return createToken(lexer, TokenKind.BRACE_R, position, position + 1);\n // StringValue\n\n case 0x0022:\n // \"\n if (\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n return readBlockString(lexer, position);\n }\n\n return readString(lexer, position);\n } // IntValue | FloatValue (Digit | -)\n\n if (isDigit(code) || code === 0x002d) {\n return readNumber(lexer, position, code);\n } // Name\n\n if (isNameStart(code)) {\n return readName(lexer, position);\n }\n\n throw syntaxError(\n lexer.source,\n position,\n code === 0x0027\n ? 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?'\n : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position)\n ? `Unexpected character: ${printCodePointAt(lexer, position)}.`\n : `Invalid character: ${printCodePointAt(lexer, position)}.`,\n );\n }\n\n return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);\n}\n/**\n * Reads a comment token from the source file.\n *\n * ```\n * Comment :: # CommentChar* [lookahead != CommentChar]\n *\n * CommentChar :: SourceCharacter but not LineTerminator\n * ```\n */\n\nfunction readComment(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.COMMENT,\n start,\n position,\n body.slice(start + 1, position),\n );\n}\n/**\n * Reads a number token from the source file, either a FloatValue or an IntValue\n * depending on whether a FractionalPart or ExponentPart is encountered.\n *\n * ```\n * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]\n *\n * IntegerPart ::\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit Digit*\n *\n * NegativeSign :: -\n *\n * NonZeroDigit :: Digit but not `0`\n *\n * FloatValue ::\n * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n *\n * FractionalPart :: . Digit+\n *\n * ExponentPart :: ExponentIndicator Sign? Digit+\n *\n * ExponentIndicator :: one of `e` `E`\n *\n * Sign :: one of + -\n * ```\n */\n\nfunction readNumber(lexer, start, firstCode) {\n const body = lexer.source.body;\n let position = start;\n let code = firstCode;\n let isFloat = false; // NegativeSign (-)\n\n if (code === 0x002d) {\n code = body.charCodeAt(++position);\n } // Zero (0)\n\n if (code === 0x0030) {\n code = body.charCodeAt(++position);\n\n if (isDigit(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, unexpected digit after 0: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n } else {\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Full stop (.)\n\n if (code === 0x002e) {\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // E e\n\n if (code === 0x0045 || code === 0x0065) {\n isFloat = true;\n code = body.charCodeAt(++position); // + -\n\n if (code === 0x002b || code === 0x002d) {\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n if (code === 0x002e || isNameStart(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n\n return createToken(\n lexer,\n isFloat ? TokenKind.FLOAT : TokenKind.INT,\n start,\n position,\n body.slice(start, position),\n );\n}\n/**\n * Returns the new position in the source after reading one or more digits.\n */\n\nfunction readDigits(lexer, start, firstCode) {\n if (!isDigit(firstCode)) {\n throw syntaxError(\n lexer.source,\n start,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n start,\n )}.`,\n );\n }\n\n const body = lexer.source.body;\n let position = start + 1; // +1 to skip first firstCode\n\n while (isDigit(body.charCodeAt(position))) {\n ++position;\n }\n\n return position;\n}\n/**\n * Reads a single-quote string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"` [lookahead != `\"`]\n * - `\"` StringCharacter+ `\"`\n *\n * StringCharacter ::\n * - SourceCharacter but not `\"` or `\\` or LineTerminator\n * - `\\u` EscapedUnicode\n * - `\\` EscapedCharacter\n *\n * EscapedUnicode ::\n * - `{` HexDigit+ `}`\n * - HexDigit HexDigit HexDigit HexDigit\n *\n * EscapedCharacter :: one of `\"` `\\` `/` `b` `f` `n` `r` `t`\n * ```\n */\n\nfunction readString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n let chunkStart = position;\n let value = '';\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Quote (\")\n\n if (code === 0x0022) {\n value += body.slice(chunkStart, position);\n return createToken(lexer, TokenKind.STRING, start, position + 1, value);\n } // Escape Sequence (\\)\n\n if (code === 0x005c) {\n value += body.slice(chunkStart, position);\n const escape =\n body.charCodeAt(position + 1) === 0x0075 // u\n ? body.charCodeAt(position + 2) === 0x007b // {\n ? readEscapedUnicodeVariableWidth(lexer, position)\n : readEscapedUnicodeFixedWidth(lexer, position)\n : readEscapedCharacter(lexer, position);\n value += escape.value;\n position += escape.size;\n chunkStart = position;\n continue;\n } // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n} // The string value and lexed size of an escape sequence.\n\nfunction readEscapedUnicodeVariableWidth(lexer, position) {\n const body = lexer.source.body;\n let point = 0;\n let size = 3; // Cannot be larger than 12 chars (\\u{00000000}).\n\n while (size < 12) {\n const code = body.charCodeAt(position + size++); // Closing Brace (})\n\n if (code === 0x007d) {\n // Must be at least 5 chars (\\u{0}) and encode a Unicode scalar value.\n if (size < 5 || !isUnicodeScalarValue(point)) {\n break;\n }\n\n return {\n value: String.fromCodePoint(point),\n size,\n };\n } // Append this hex digit to the code point.\n\n point = (point << 4) | readHexDigit(code);\n\n if (point < 0) {\n break;\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(\n position,\n position + size,\n )}\".`,\n );\n}\n\nfunction readEscapedUnicodeFixedWidth(lexer, position) {\n const body = lexer.source.body;\n const code = read16BitHexCode(body, position + 2);\n\n if (isUnicodeScalarValue(code)) {\n return {\n value: String.fromCodePoint(code),\n size: 6,\n };\n } // GraphQL allows JSON-style surrogate pair escape sequences, but only when\n // a valid pair is formed.\n\n if (isLeadingSurrogate(code)) {\n // \\u\n if (\n body.charCodeAt(position + 6) === 0x005c &&\n body.charCodeAt(position + 7) === 0x0075\n ) {\n const trailingCode = read16BitHexCode(body, position + 8);\n\n if (isTrailingSurrogate(trailingCode)) {\n // JavaScript defines strings as a sequence of UTF-16 code units and\n // encodes Unicode code points above U+FFFF using a surrogate pair of\n // code units. Since this is a surrogate pair escape sequence, just\n // include both codes into the JavaScript string value. Had JavaScript\n // not been internally based on UTF-16, then this surrogate pair would\n // be decoded to retrieve the supplementary code point.\n return {\n value: String.fromCodePoint(code, trailingCode),\n size: 12,\n };\n }\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(position, position + 6)}\".`,\n );\n}\n/**\n * Reads four hexadecimal characters and returns the positive integer that 16bit\n * hexadecimal string represents. For example, \"000f\" will return 15, and \"dead\"\n * will return 57005.\n *\n * Returns a negative number if any char was not a valid hexadecimal digit.\n */\n\nfunction read16BitHexCode(body, position) {\n // readHexDigit() returns -1 on error. ORing a negative value with any other\n // value always produces a negative value.\n return (\n (readHexDigit(body.charCodeAt(position)) << 12) |\n (readHexDigit(body.charCodeAt(position + 1)) << 8) |\n (readHexDigit(body.charCodeAt(position + 2)) << 4) |\n readHexDigit(body.charCodeAt(position + 3))\n );\n}\n/**\n * Reads a hexadecimal character and returns its positive integer value (0-15).\n *\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 if the provided character code was not a valid hexadecimal digit.\n *\n * HexDigit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * - `A` `B` `C` `D` `E` `F`\n * - `a` `b` `c` `d` `e` `f`\n */\n\nfunction readHexDigit(code) {\n return code >= 0x0030 && code <= 0x0039 // 0-9\n ? code - 0x0030\n : code >= 0x0041 && code <= 0x0046 // A-F\n ? code - 0x0037\n : code >= 0x0061 && code <= 0x0066 // a-f\n ? code - 0x0057\n : -1;\n}\n/**\n * | Escaped Character | Code Point | Character Name |\n * | ----------------- | ---------- | ---------------------------- |\n * | `\"` | U+0022 | double quote |\n * | `\\` | U+005C | reverse solidus (back slash) |\n * | `/` | U+002F | solidus (forward slash) |\n * | `b` | U+0008 | backspace |\n * | `f` | U+000C | form feed |\n * | `n` | U+000A | line feed (new line) |\n * | `r` | U+000D | carriage return |\n * | `t` | U+0009 | horizontal tab |\n */\n\nfunction readEscapedCharacter(lexer, position) {\n const body = lexer.source.body;\n const code = body.charCodeAt(position + 1);\n\n switch (code) {\n case 0x0022:\n // \"\n return {\n value: '\\u0022',\n size: 2,\n };\n\n case 0x005c:\n // \\\n return {\n value: '\\u005c',\n size: 2,\n };\n\n case 0x002f:\n // /\n return {\n value: '\\u002f',\n size: 2,\n };\n\n case 0x0062:\n // b\n return {\n value: '\\u0008',\n size: 2,\n };\n\n case 0x0066:\n // f\n return {\n value: '\\u000c',\n size: 2,\n };\n\n case 0x006e:\n // n\n return {\n value: '\\u000a',\n size: 2,\n };\n\n case 0x0072:\n // r\n return {\n value: '\\u000d',\n size: 2,\n };\n\n case 0x0074:\n // t\n return {\n value: '\\u0009',\n size: 2,\n };\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character escape sequence: \"${body.slice(\n position,\n position + 2,\n )}\".`,\n );\n}\n/**\n * Reads a block string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"\"` BlockStringCharacter* `\"\"\"`\n *\n * BlockStringCharacter ::\n * - SourceCharacter but not `\"\"\"` or `\\\"\"\"`\n * - `\\\"\"\"`\n * ```\n */\n\nfunction readBlockString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let lineStart = lexer.lineStart;\n let position = start + 3;\n let chunkStart = position;\n let currentLine = '';\n const blockLines = [];\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Triple-Quote (\"\"\")\n\n if (\n code === 0x0022 &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n const token = createToken(\n lexer,\n TokenKind.BLOCK_STRING,\n start,\n position + 3, // Return a string of the lines joined with U+000A.\n dedentBlockStringLines(blockLines).join('\\n'),\n );\n lexer.line += blockLines.length - 1;\n lexer.lineStart = lineStart;\n return token;\n } // Escaped Triple-Quote (\\\"\"\")\n\n if (\n code === 0x005c &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022 &&\n body.charCodeAt(position + 3) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n chunkStart = position + 1; // skip only slash\n\n position += 4;\n continue;\n } // LineTerminator\n\n if (code === 0x000a || code === 0x000d) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n\n if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n currentLine = '';\n chunkStart = position;\n lineStart = position;\n continue;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * ```\n * Name ::\n * - NameStart NameContinue* [lookahead != NameContinue]\n * ```\n */\n\nfunction readName(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n if (isNameContinue(code)) {\n ++position;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.NAME,\n start,\n position,\n body.slice(start, position),\n );\n}\n","const MAX_ARRAY_LENGTH = 10;\nconst MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n */\n\nexport function inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (typeof value) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? `[function ${value.name}]` : '[function]';\n\n case 'object':\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (value === null) {\n return 'null';\n }\n\n if (previouslySeenValues.includes(value)) {\n return '[Circular]';\n }\n\n const seenValues = [...previouslySeenValues, value];\n\n if (isJSONable(value)) {\n const jsonValue = value.toJSON(); // check for infinite recursion\n\n if (jsonValue !== value) {\n return typeof jsonValue === 'string'\n ? jsonValue\n : formatValue(jsonValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction isJSONable(value) {\n return typeof value.toJSON === 'function';\n}\n\nfunction formatObject(object, seenValues) {\n const entries = Object.entries(object);\n\n if (entries.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n const properties = entries.map(\n ([key, value]) => key + ': ' + formatValue(value, seenValues),\n );\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n const len = Math.min(MAX_ARRAY_LENGTH, array.length);\n const remaining = array.length - len;\n const items = [];\n\n for (let i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(`... ${remaining} more items`);\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getObjectTag(object) {\n const tag = Object.prototype.toString\n .call(object)\n .replace(/^\\[object /, '')\n .replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n const name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n","import { inspect } from './inspect.mjs';\n/* c8 ignore next 3 */\n\nconst isProduction =\n globalThis.process && // eslint-disable-next-line no-undef\n process.env.NODE_ENV === 'production';\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n * See: https://webpack.js.org/guides/production/\n */\n\nexport const instanceOf =\n /* c8 ignore next 6 */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n isProduction\n ? function instanceOf(value, constructor) {\n return value instanceof constructor;\n }\n : function instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (typeof value === 'object' && value !== null) {\n var _value$constructor;\n\n // Prefer Symbol.toStringTag since it is immune to minification.\n const className = constructor.prototype[Symbol.toStringTag];\n const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009\n ? value[Symbol.toStringTag]\n : (_value$constructor = value.constructor) === null ||\n _value$constructor === void 0\n ? void 0\n : _value$constructor.name;\n\n if (className === valueClassName) {\n const stringifiedValue = inspect(value);\n throw new Error(`Cannot use ${className} \"${stringifiedValue}\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`);\n }\n }\n\n return false;\n };\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { instanceOf } from '../jsutils/instanceOf.mjs';\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport class Source {\n constructor(\n body,\n name = 'GraphQL request',\n locationOffset = {\n line: 1,\n column: 1,\n },\n ) {\n typeof body === 'string' ||\n devAssert(false, `Body must be a string. Received: ${inspect(body)}.`);\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 ||\n devAssert(\n false,\n 'line in locationOffset is 1-indexed and must be positive.',\n );\n this.locationOffset.column > 0 ||\n devAssert(\n false,\n 'column in locationOffset is 1-indexed and must be positive.',\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'Source';\n }\n}\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\nexport function isSource(source) {\n return instanceOf(source, Source);\n}\n","import { syntaxError } from '../error/syntaxError.mjs';\nimport { Location, OperationTypeNode } from './ast.mjs';\nimport { DirectiveLocation } from './directiveLocation.mjs';\nimport { Kind } from './kinds.mjs';\nimport { isPunctuatorTokenKind, Lexer } from './lexer.mjs';\nimport { isSource, Source } from './source.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n */\nexport function parse(source, options) {\n const parser = new Parser(source, options);\n return parser.parseDocument();\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n */\n\nexport function parseValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseValueLiteral(false);\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Similar to parseValue(), but raises a parse error if it encounters a\n * variable. The return type will be a constant value.\n */\n\nexport function parseConstValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseConstValueLiteral();\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n */\n\nexport function parseType(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const type = parser.parseTypeReference();\n parser.expectToken(TokenKind.EOF);\n return type;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nexport class Parser {\n constructor(source, options = {}) {\n const sourceObj = isSource(source) ? source : new Source(source);\n this._lexer = new Lexer(sourceObj);\n this._options = options;\n this._tokenCounter = 0;\n }\n /**\n * Converts a name lex token into a name parse node.\n */\n\n parseName() {\n const token = this.expectToken(TokenKind.NAME);\n return this.node(token, {\n kind: Kind.NAME,\n value: token.value,\n });\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n */\n\n parseDocument() {\n return this.node(this._lexer.token, {\n kind: Kind.DOCUMENT,\n definitions: this.many(\n TokenKind.SOF,\n this.parseDefinition,\n TokenKind.EOF,\n ),\n });\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n *\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n */\n\n parseDefinition() {\n if (this.peek(TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } // Many definitions begin with a description and require a lookahead.\n\n const hasDescription = this.peekDescription();\n const keywordToken = hasDescription\n ? this._lexer.lookahead()\n : this._lexer.token;\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n\n if (hasDescription) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n 'Unexpected description, descriptions are supported only on type definitions.',\n );\n }\n\n switch (keywordToken.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n */\n\n parseOperationDefinition() {\n const start = this._lexer.token;\n\n if (this.peek(TokenKind.BRACE_L)) {\n return this.node(start, {\n kind: Kind.OPERATION_DEFINITION,\n operation: OperationTypeNode.QUERY,\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n const operation = this.parseOperationType();\n let name;\n\n if (this.peek(TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return this.node(start, {\n kind: Kind.OPERATION_DEFINITION,\n operation,\n name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * OperationType : one of query mutation subscription\n */\n\n parseOperationType() {\n const operationToken = this.expectToken(TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return OperationTypeNode.QUERY;\n\n case 'mutation':\n return OperationTypeNode.MUTATION;\n\n case 'subscription':\n return OperationTypeNode.SUBSCRIPTION;\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n */\n\n parseVariableDefinitions() {\n return this.optionalMany(\n TokenKind.PAREN_L,\n this.parseVariableDefinition,\n TokenKind.PAREN_R,\n );\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n */\n\n parseVariableDefinition() {\n return this.node(this._lexer.token, {\n kind: Kind.VARIABLE_DEFINITION,\n variable: this.parseVariable(),\n type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(TokenKind.EQUALS)\n ? this.parseConstValueLiteral()\n : undefined,\n directives: this.parseConstDirectives(),\n });\n }\n /**\n * Variable : $ Name\n */\n\n parseVariable() {\n const start = this._lexer.token;\n this.expectToken(TokenKind.DOLLAR);\n return this.node(start, {\n kind: Kind.VARIABLE,\n name: this.parseName(),\n });\n }\n /**\n * ```\n * SelectionSet : { Selection+ }\n * ```\n */\n\n parseSelectionSet() {\n return this.node(this._lexer.token, {\n kind: Kind.SELECTION_SET,\n selections: this.many(\n TokenKind.BRACE_L,\n this.parseSelection,\n TokenKind.BRACE_R,\n ),\n });\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n */\n\n parseSelection() {\n return this.peek(TokenKind.SPREAD)\n ? this.parseFragment()\n : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n */\n\n parseField() {\n const start = this._lexer.token;\n const nameOrAlias = this.parseName();\n let alias;\n let name;\n\n if (this.expectOptionalToken(TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return this.node(start, {\n kind: Kind.FIELD,\n alias,\n name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(TokenKind.BRACE_L)\n ? this.parseSelectionSet()\n : undefined,\n });\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n */\n\n parseArguments(isConst) {\n const item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n */\n\n parseArgument(isConst = false) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return this.node(start, {\n kind: Kind.ARGUMENT,\n name,\n value: this.parseValueLiteral(isConst),\n });\n }\n\n parseConstArgument() {\n return this.parseArgument(true);\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n */\n\n parseFragment() {\n const start = this._lexer.token;\n this.expectToken(TokenKind.SPREAD);\n const hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(TokenKind.NAME)) {\n return this.node(start, {\n kind: Kind.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n });\n }\n\n return this.node(start, {\n kind: Kind.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n */\n\n parseFragmentDefinition() {\n const start = this._lexer.token;\n this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (this._options.allowLegacyFragmentVariables === true) {\n return this.node(start, {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n return this.node(start, {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentName : Name but not `on`\n */\n\n parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseValueLiteral(isConst) {\n const token = this._lexer.token;\n\n switch (token.kind) {\n case TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case TokenKind.INT:\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.INT,\n value: token.value,\n });\n\n case TokenKind.FLOAT:\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.FLOAT,\n value: token.value,\n });\n\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case TokenKind.NAME:\n this.advanceLexer();\n\n switch (token.value) {\n case 'true':\n return this.node(token, {\n kind: Kind.BOOLEAN,\n value: true,\n });\n\n case 'false':\n return this.node(token, {\n kind: Kind.BOOLEAN,\n value: false,\n });\n\n case 'null':\n return this.node(token, {\n kind: Kind.NULL,\n });\n\n default:\n return this.node(token, {\n kind: Kind.ENUM,\n value: token.value,\n });\n }\n\n case TokenKind.DOLLAR:\n if (isConst) {\n this.expectToken(TokenKind.DOLLAR);\n\n if (this._lexer.token.kind === TokenKind.NAME) {\n const varName = this._lexer.token.value;\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected variable \"$${varName}\" in constant value.`,\n );\n } else {\n throw this.unexpected(token);\n }\n }\n\n return this.parseVariable();\n\n default:\n throw this.unexpected();\n }\n }\n\n parseConstValueLiteral() {\n return this.parseValueLiteral(true);\n }\n\n parseStringLiteral() {\n const token = this._lexer.token;\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.STRING,\n value: token.value,\n block: token.kind === TokenKind.BLOCK_STRING,\n });\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n */\n\n parseList(isConst) {\n const item = () => this.parseValueLiteral(isConst);\n\n return this.node(this._lexer.token, {\n kind: Kind.LIST,\n values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),\n });\n }\n /**\n * ```\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n * ```\n */\n\n parseObject(isConst) {\n const item = () => this.parseObjectField(isConst);\n\n return this.node(this._lexer.token, {\n kind: Kind.OBJECT,\n fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),\n });\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n */\n\n parseObjectField(isConst) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return this.node(start, {\n kind: Kind.OBJECT_FIELD,\n name,\n value: this.parseValueLiteral(isConst),\n });\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n */\n\n parseDirectives(isConst) {\n const directives = [];\n\n while (this.peek(TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n\n parseConstDirectives() {\n return this.parseDirectives(true);\n }\n /**\n * ```\n * Directive[Const] : @ Name Arguments[?Const]?\n * ```\n */\n\n parseDirective(isConst) {\n const start = this._lexer.token;\n this.expectToken(TokenKind.AT);\n return this.node(start, {\n kind: Kind.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n });\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n */\n\n parseTypeReference() {\n const start = this._lexer.token;\n let type;\n\n if (this.expectOptionalToken(TokenKind.BRACKET_L)) {\n const innerType = this.parseTypeReference();\n this.expectToken(TokenKind.BRACKET_R);\n type = this.node(start, {\n kind: Kind.LIST_TYPE,\n type: innerType,\n });\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(TokenKind.BANG)) {\n return this.node(start, {\n kind: Kind.NON_NULL_TYPE,\n type,\n });\n }\n\n return type;\n }\n /**\n * NamedType : Name\n */\n\n parseNamedType() {\n return this.node(this._lexer.token, {\n kind: Kind.NAMED_TYPE,\n name: this.parseName(),\n });\n } // Implements the parsing rules in the Type Definition section.\n\n peekDescription() {\n return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);\n }\n /**\n * Description : StringValue\n */\n\n parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * ```\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n * ```\n */\n\n parseSchemaDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.many(\n TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n TokenKind.BRACE_R,\n );\n return this.node(start, {\n kind: Kind.SCHEMA_DEFINITION,\n description,\n directives,\n operationTypes,\n });\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n */\n\n parseOperationTypeDefinition() {\n const start = this._lexer.token;\n const operation = this.parseOperationType();\n this.expectToken(TokenKind.COLON);\n const type = this.parseNamedType();\n return this.node(start, {\n kind: Kind.OPERATION_TYPE_DEFINITION,\n operation,\n type,\n });\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n */\n\n parseScalarTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.SCALAR_TYPE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n */\n\n parseObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: Kind.OBJECT_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n */\n\n parseImplementsInterfaces() {\n return this.expectOptionalKeyword('implements')\n ? this.delimitedMany(TokenKind.AMP, this.parseNamedType)\n : [];\n }\n /**\n * ```\n * FieldsDefinition : { FieldDefinition+ }\n * ```\n */\n\n parseFieldsDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseFieldDefinition,\n TokenKind.BRACE_R,\n );\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n */\n\n parseFieldDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n this.expectToken(TokenKind.COLON);\n const type = this.parseTypeReference();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.FIELD_DEFINITION,\n description,\n name,\n arguments: args,\n type,\n directives,\n });\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n */\n\n parseArgumentDefs() {\n return this.optionalMany(\n TokenKind.PAREN_L,\n this.parseInputValueDef,\n TokenKind.PAREN_R,\n );\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n */\n\n parseInputValueDef() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n const type = this.parseTypeReference();\n let defaultValue;\n\n if (this.expectOptionalToken(TokenKind.EQUALS)) {\n defaultValue = this.parseConstValueLiteral();\n }\n\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.INPUT_VALUE_DEFINITION,\n description,\n name,\n type,\n defaultValue,\n directives,\n });\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n */\n\n parseInterfaceTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: Kind.INTERFACE_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n */\n\n parseUnionTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n return this.node(start, {\n kind: Kind.UNION_TYPE_DEFINITION,\n description,\n name,\n directives,\n types,\n });\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n */\n\n parseUnionMemberTypes() {\n return this.expectOptionalToken(TokenKind.EQUALS)\n ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType)\n : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n */\n\n parseEnumTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n return this.node(start, {\n kind: Kind.ENUM_TYPE_DEFINITION,\n description,\n name,\n directives,\n values,\n });\n }\n /**\n * ```\n * EnumValuesDefinition : { EnumValueDefinition+ }\n * ```\n */\n\n parseEnumValuesDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseEnumValueDefinition,\n TokenKind.BRACE_R,\n );\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n */\n\n parseEnumValueDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseEnumValueName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.ENUM_VALUE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseEnumValueName() {\n if (\n this._lexer.token.value === 'true' ||\n this._lexer.token.value === 'false' ||\n this._lexer.token.value === 'null'\n ) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n `${getTokenDesc(\n this._lexer.token,\n )} is reserved and cannot be used for an enum value.`,\n );\n }\n\n return this.parseName();\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n */\n\n parseInputObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n return this.node(start, {\n kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,\n description,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * InputFieldsDefinition : { InputValueDefinition+ }\n * ```\n */\n\n parseInputFieldsDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseInputValueDef,\n TokenKind.BRACE_R,\n );\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n */\n\n parseTypeSystemExtension() {\n const keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * ```\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n * ```\n */\n\n parseSchemaExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.optionalMany(\n TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n TokenKind.BRACE_R,\n );\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.SCHEMA_EXTENSION,\n directives,\n operationTypes,\n });\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n */\n\n parseScalarTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.SCALAR_TYPE_EXTENSION,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n */\n\n parseObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.OBJECT_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n */\n\n parseInterfaceTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.INTERFACE_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n */\n\n parseUnionTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.UNION_TYPE_EXTENSION,\n name,\n directives,\n types,\n });\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n */\n\n parseEnumTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.ENUM_TYPE_EXTENSION,\n name,\n directives,\n values,\n });\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n */\n\n parseInputObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n * ```\n */\n\n parseDirectiveDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(TokenKind.AT);\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n const repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n const locations = this.parseDirectiveLocations();\n return this.node(start, {\n kind: Kind.DIRECTIVE_DEFINITION,\n description,\n name,\n arguments: args,\n repeatable,\n locations,\n });\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n */\n\n parseDirectiveLocations() {\n return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n */\n\n parseDirectiveLocation() {\n const start = this._lexer.token;\n const name = this.parseName();\n\n if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Core parsing utility functions\n\n /**\n * Returns a node that, if configured to do so, sets a \"loc\" field as a\n * location object, used to identify the place in the source that created a\n * given parsed object.\n */\n\n node(startToken, node) {\n if (this._options.noLocation !== true) {\n node.loc = new Location(\n startToken,\n this._lexer.lastToken,\n this._lexer.source,\n );\n }\n\n return node;\n }\n /**\n * Determines if the next token is of a given kind\n */\n\n peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return token;\n }\n\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`,\n );\n }\n /**\n * If the next token is of the given kind, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n } else {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected \"${value}\", found ${getTokenDesc(token)}.`,\n );\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n */\n\n unexpected(atToken) {\n const token =\n atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected ${getTokenDesc(token)}.`,\n );\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n */\n\n delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n }\n\n advanceLexer() {\n const { maxTokens } = this._options;\n\n const token = this._lexer.advance();\n\n if (maxTokens !== undefined && token.kind !== TokenKind.EOF) {\n ++this._tokenCounter;\n\n if (this._tokenCounter > maxTokens) {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Document contains more that ${maxTokens} tokens. Parsing aborted.`,\n );\n }\n }\n }\n}\n/**\n * A helper function to describe a token as a string for debugging.\n */\n\nfunction getTokenDesc(token) {\n const value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? ` \"${value}\"` : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n */\n\nfunction getTokenKindDesc(kind) {\n return isPunctuatorTokenKind(kind) ? `\"${kind}\"` : kind;\n}\n","const MAX_SUGGESTIONS = 5;\n/**\n * Given [ A, B, C ] return ' Did you mean A, B, or C?'.\n */\n\nexport function didYouMean(firstArg, secondArg) {\n const [subMessage, suggestionsArg] = secondArg\n ? [firstArg, secondArg]\n : [undefined, firstArg];\n let message = ' Did you mean ';\n\n if (subMessage) {\n message += subMessage + ' ';\n }\n\n const suggestions = suggestionsArg.map((x) => `\"${x}\"`);\n\n switch (suggestions.length) {\n case 0:\n return '';\n\n case 1:\n return message + suggestions[0] + '?';\n\n case 2:\n return message + suggestions[0] + ' or ' + suggestions[1] + '?';\n }\n\n const selected = suggestions.slice(0, MAX_SUGGESTIONS);\n const lastItem = selected.pop();\n return message + selected.join(', ') + ', or ' + lastItem + '?';\n}\n","/**\n * Returns the first argument it receives.\n */\nexport function identityFunc(x) {\n return x;\n}\n","/**\n * Creates a keyed JS object from an array, given a function to produce the keys\n * for each value in the array.\n *\n * This provides a convenient lookup for the array items if the key function\n * produces unique results.\n * ```ts\n * const phoneBook = [\n * { name: 'Jon', num: '555-1234' },\n * { name: 'Jenny', num: '867-5309' }\n * ]\n *\n * const entriesByName = keyMap(\n * phoneBook,\n * entry => entry.name\n * )\n *\n * // {\n * // Jon: { name: 'Jon', num: '555-1234' },\n * // Jenny: { name: 'Jenny', num: '867-5309' }\n * // }\n *\n * const jennyEntry = entriesByName['Jenny']\n *\n * // { name: 'Jenny', num: '857-6309' }\n * ```\n */\nexport function keyMap(list, keyFn) {\n const result = Object.create(null);\n\n for (const item of list) {\n result[keyFn(item)] = item;\n }\n\n return result;\n}\n","/**\n * Creates a keyed JS object from an array, given a function to produce the keys\n * and a function to produce the values from each item in the array.\n * ```ts\n * const phoneBook = [\n * { name: 'Jon', num: '555-1234' },\n * { name: 'Jenny', num: '867-5309' }\n * ]\n *\n * // { Jon: '555-1234', Jenny: '867-5309' }\n * const phonesByName = keyValMap(\n * phoneBook,\n * entry => entry.name,\n * entry => entry.num\n * )\n * ```\n */\nexport function keyValMap(list, keyFn, valFn) {\n const result = Object.create(null);\n\n for (const item of list) {\n result[keyFn(item)] = valFn(item);\n }\n\n return result;\n}\n","/**\n * Creates an object map with the same keys as `map` and values generated by\n * running each value of `map` thru `fn`.\n */\nexport function mapValue(map, fn) {\n const result = Object.create(null);\n\n for (const key of Object.keys(map)) {\n result[key] = fn(map[key], key);\n }\n\n return result;\n}\n","/**\n * Returns a number indicating whether a reference string comes before, or after,\n * or is the same as the given string in natural sort order.\n *\n * See: https://en.wikipedia.org/wiki/Natural_sort_order\n *\n */\nexport function naturalCompare(aStr, bStr) {\n let aIndex = 0;\n let bIndex = 0;\n\n while (aIndex < aStr.length && bIndex < bStr.length) {\n let aChar = aStr.charCodeAt(aIndex);\n let bChar = bStr.charCodeAt(bIndex);\n\n if (isDigit(aChar) && isDigit(bChar)) {\n let aNum = 0;\n\n do {\n ++aIndex;\n aNum = aNum * 10 + aChar - DIGIT_0;\n aChar = aStr.charCodeAt(aIndex);\n } while (isDigit(aChar) && aNum > 0);\n\n let bNum = 0;\n\n do {\n ++bIndex;\n bNum = bNum * 10 + bChar - DIGIT_0;\n bChar = bStr.charCodeAt(bIndex);\n } while (isDigit(bChar) && bNum > 0);\n\n if (aNum < bNum) {\n return -1;\n }\n\n if (aNum > bNum) {\n return 1;\n }\n } else {\n if (aChar < bChar) {\n return -1;\n }\n\n if (aChar > bChar) {\n return 1;\n }\n\n ++aIndex;\n ++bIndex;\n }\n }\n\n return aStr.length - bStr.length;\n}\nconst DIGIT_0 = 48;\nconst DIGIT_9 = 57;\n\nfunction isDigit(code) {\n return !isNaN(code) && DIGIT_0 <= code && code <= DIGIT_9;\n}\n","import { naturalCompare } from './naturalCompare.mjs';\n/**\n * Given an invalid input string and a list of valid options, returns a filtered\n * list of valid options sorted based on their similarity with the input.\n */\n\nexport function suggestionList(input, options) {\n const optionsByDistance = Object.create(null);\n const lexicalDistance = new LexicalDistance(input);\n const threshold = Math.floor(input.length * 0.4) + 1;\n\n for (const option of options) {\n const distance = lexicalDistance.measure(option, threshold);\n\n if (distance !== undefined) {\n optionsByDistance[option] = distance;\n }\n }\n\n return Object.keys(optionsByDistance).sort((a, b) => {\n const distanceDiff = optionsByDistance[a] - optionsByDistance[b];\n return distanceDiff !== 0 ? distanceDiff : naturalCompare(a, b);\n });\n}\n/**\n * Computes the lexical distance between strings A and B.\n *\n * The \"distance\" between two strings is given by counting the minimum number\n * of edits needed to transform string A into string B. An edit can be an\n * insertion, deletion, or substitution of a single character, or a swap of two\n * adjacent characters.\n *\n * Includes a custom alteration from Damerau-Levenshtein to treat case changes\n * as a single edit which helps identify mis-cased values with an edit distance\n * of 1.\n *\n * This distance can be useful for detecting typos in input or sorting\n */\n\nclass LexicalDistance {\n constructor(input) {\n this._input = input;\n this._inputLowerCase = input.toLowerCase();\n this._inputArray = stringToArray(this._inputLowerCase);\n this._rows = [\n new Array(input.length + 1).fill(0),\n new Array(input.length + 1).fill(0),\n new Array(input.length + 1).fill(0),\n ];\n }\n\n measure(option, threshold) {\n if (this._input === option) {\n return 0;\n }\n\n const optionLowerCase = option.toLowerCase(); // Any case change counts as a single edit\n\n if (this._inputLowerCase === optionLowerCase) {\n return 1;\n }\n\n let a = stringToArray(optionLowerCase);\n let b = this._inputArray;\n\n if (a.length < b.length) {\n const tmp = a;\n a = b;\n b = tmp;\n }\n\n const aLength = a.length;\n const bLength = b.length;\n\n if (aLength - bLength > threshold) {\n return undefined;\n }\n\n const rows = this._rows;\n\n for (let j = 0; j <= bLength; j++) {\n rows[0][j] = j;\n }\n\n for (let i = 1; i <= aLength; i++) {\n const upRow = rows[(i - 1) % 3];\n const currentRow = rows[i % 3];\n let smallestCell = (currentRow[0] = i);\n\n for (let j = 1; j <= bLength; j++) {\n const cost = a[i - 1] === b[j - 1] ? 0 : 1;\n let currentCell = Math.min(\n upRow[j] + 1, // delete\n currentRow[j - 1] + 1, // insert\n upRow[j - 1] + cost, // substitute\n );\n\n if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {\n // transposition\n const doubleDiagonalCell = rows[(i - 2) % 3][j - 2];\n currentCell = Math.min(currentCell, doubleDiagonalCell + 1);\n }\n\n if (currentCell < smallestCell) {\n smallestCell = currentCell;\n }\n\n currentRow[j] = currentCell;\n } // Early exit, since distance can't go smaller than smallest element of the previous row.\n\n if (smallestCell > threshold) {\n return undefined;\n }\n }\n\n const distance = rows[aLength % 3][bLength];\n return distance <= threshold ? distance : undefined;\n }\n}\n\nfunction stringToArray(str) {\n const strLength = str.length;\n const array = new Array(strLength);\n\n for (let i = 0; i < strLength; ++i) {\n array[i] = str.charCodeAt(i);\n }\n\n return array;\n}\n","export function toObjMap(obj) {\n if (obj == null) {\n return Object.create(null);\n }\n\n if (Object.getPrototypeOf(obj) === null) {\n return obj;\n }\n\n const map = Object.create(null);\n\n for (const [key, value] of Object.entries(obj)) {\n map[key] = value;\n }\n\n return map;\n}\n","/**\n * Prints a string as a GraphQL StringValue literal. Replaces control characters\n * and excluded characters (\" U+0022 and \\\\ U+005C) with escape sequences.\n */\nexport function printString(str) {\n return `\"${str.replace(escapedRegExp, escapedReplacer)}\"`;\n} // eslint-disable-next-line no-control-regex\n\nconst escapedRegExp = /[\\x00-\\x1f\\x22\\x5c\\x7f-\\x9f]/g;\n\nfunction escapedReplacer(str) {\n return escapeSequences[str.charCodeAt(0)];\n} // prettier-ignore\n\nconst escapeSequences = [\n '\\\\u0000',\n '\\\\u0001',\n '\\\\u0002',\n '\\\\u0003',\n '\\\\u0004',\n '\\\\u0005',\n '\\\\u0006',\n '\\\\u0007',\n '\\\\b',\n '\\\\t',\n '\\\\n',\n '\\\\u000B',\n '\\\\f',\n '\\\\r',\n '\\\\u000E',\n '\\\\u000F',\n '\\\\u0010',\n '\\\\u0011',\n '\\\\u0012',\n '\\\\u0013',\n '\\\\u0014',\n '\\\\u0015',\n '\\\\u0016',\n '\\\\u0017',\n '\\\\u0018',\n '\\\\u0019',\n '\\\\u001A',\n '\\\\u001B',\n '\\\\u001C',\n '\\\\u001D',\n '\\\\u001E',\n '\\\\u001F',\n '',\n '',\n '\\\\\"',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 2F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 3F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 4F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\\\\\',\n '',\n '',\n '', // 5F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 6F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\u007F',\n '\\\\u0080',\n '\\\\u0081',\n '\\\\u0082',\n '\\\\u0083',\n '\\\\u0084',\n '\\\\u0085',\n '\\\\u0086',\n '\\\\u0087',\n '\\\\u0088',\n '\\\\u0089',\n '\\\\u008A',\n '\\\\u008B',\n '\\\\u008C',\n '\\\\u008D',\n '\\\\u008E',\n '\\\\u008F',\n '\\\\u0090',\n '\\\\u0091',\n '\\\\u0092',\n '\\\\u0093',\n '\\\\u0094',\n '\\\\u0095',\n '\\\\u0096',\n '\\\\u0097',\n '\\\\u0098',\n '\\\\u0099',\n '\\\\u009A',\n '\\\\u009B',\n '\\\\u009C',\n '\\\\u009D',\n '\\\\u009E',\n '\\\\u009F',\n];\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { isNode, QueryDocumentKeys } from './ast.mjs';\nimport { Kind } from './kinds.mjs';\n/**\n * A visitor is provided to visit, it contains the collection of\n * relevant functions to be called during the visitor's traversal.\n */\n\nexport const BREAK = Object.freeze({});\n/**\n * visit() will walk through an AST using a depth-first traversal, calling\n * the visitor's enter function at each node in the traversal, and calling the\n * leave function after visiting that node and all of its child nodes.\n *\n * By returning different values from the enter and leave functions, the\n * behavior of the visitor can be altered, including skipping over a sub-tree of\n * the AST (by returning false), editing the AST by returning a value or null\n * to remove the value, or to stop the whole traversal by returning BREAK.\n *\n * When using visit() to edit an AST, the original AST will not be modified, and\n * a new version of the AST with the changes applied will be returned from the\n * visit function.\n *\n * ```ts\n * const editedAST = visit(ast, {\n * enter(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: skip visiting this node\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * },\n * leave(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: no action\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * }\n * });\n * ```\n *\n * Alternatively to providing enter() and leave() functions, a visitor can\n * instead provide functions named the same as the kinds of AST nodes, or\n * enter/leave visitors at a named key, leading to three permutations of the\n * visitor API:\n *\n * 1) Named visitors triggered when entering a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind(node) {\n * // enter the \"Kind\" node\n * }\n * })\n * ```\n *\n * 2) Named visitors that trigger upon entering and leaving a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind: {\n * enter(node) {\n * // enter the \"Kind\" node\n * }\n * leave(node) {\n * // leave the \"Kind\" node\n * }\n * }\n * })\n * ```\n *\n * 3) Generic visitors that trigger upon entering and leaving any node.\n *\n * ```ts\n * visit(ast, {\n * enter(node) {\n * // enter any node\n * },\n * leave(node) {\n * // leave any node\n * }\n * })\n * ```\n */\n\nexport function visit(root, visitor, visitorKeys = QueryDocumentKeys) {\n const enterLeaveMap = new Map();\n\n for (const kind of Object.values(Kind)) {\n enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));\n }\n /* eslint-disable no-undef-init */\n\n let stack = undefined;\n let inArray = Array.isArray(root);\n let keys = [root];\n let index = -1;\n let edits = [];\n let node = root;\n let key = undefined;\n let parent = undefined;\n const path = [];\n const ancestors = [];\n /* eslint-enable no-undef-init */\n\n do {\n index++;\n const isLeaving = index === keys.length;\n const isEdited = isLeaving && edits.length !== 0;\n\n if (isLeaving) {\n key = ancestors.length === 0 ? undefined : path[path.length - 1];\n node = parent;\n parent = ancestors.pop();\n\n if (isEdited) {\n if (inArray) {\n node = node.slice();\n let editOffset = 0;\n\n for (const [editKey, editValue] of edits) {\n const arrayKey = editKey - editOffset;\n\n if (editValue === null) {\n node.splice(arrayKey, 1);\n editOffset++;\n } else {\n node[arrayKey] = editValue;\n }\n }\n } else {\n node = Object.defineProperties(\n {},\n Object.getOwnPropertyDescriptors(node),\n );\n\n for (const [editKey, editValue] of edits) {\n node[editKey] = editValue;\n }\n }\n }\n\n index = stack.index;\n keys = stack.keys;\n edits = stack.edits;\n inArray = stack.inArray;\n stack = stack.prev;\n } else if (parent) {\n key = inArray ? index : keys[index];\n node = parent[key];\n\n if (node === null || node === undefined) {\n continue;\n }\n\n path.push(key);\n }\n\n let result;\n\n if (!Array.isArray(node)) {\n var _enterLeaveMap$get, _enterLeaveMap$get2;\n\n isNode(node) || devAssert(false, `Invalid AST Node: ${inspect(node)}.`);\n const visitFn = isLeaving\n ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get === void 0\n ? void 0\n : _enterLeaveMap$get.leave\n : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get2 === void 0\n ? void 0\n : _enterLeaveMap$get2.enter;\n result =\n visitFn === null || visitFn === void 0\n ? void 0\n : visitFn.call(visitor, node, key, parent, path, ancestors);\n\n if (result === BREAK) {\n break;\n }\n\n if (result === false) {\n if (!isLeaving) {\n path.pop();\n continue;\n }\n } else if (result !== undefined) {\n edits.push([key, result]);\n\n if (!isLeaving) {\n if (isNode(result)) {\n node = result;\n } else {\n path.pop();\n continue;\n }\n }\n }\n }\n\n if (result === undefined && isEdited) {\n edits.push([key, node]);\n }\n\n if (isLeaving) {\n path.pop();\n } else {\n var _node$kind;\n\n stack = {\n inArray,\n index,\n keys,\n edits,\n prev: stack,\n };\n inArray = Array.isArray(node);\n keys = inArray\n ? node\n : (_node$kind = visitorKeys[node.kind]) !== null &&\n _node$kind !== void 0\n ? _node$kind\n : [];\n index = -1;\n edits = [];\n\n if (parent) {\n ancestors.push(parent);\n }\n\n parent = node;\n }\n } while (stack !== undefined);\n\n if (edits.length !== 0) {\n // New root\n return edits[edits.length - 1][1];\n }\n\n return root;\n}\n/**\n * Creates a new visitor instance which delegates to many visitors to run in\n * parallel. Each visitor will be visited for each node before moving on.\n *\n * If a prior visitor edits a node, no following visitors will see that node.\n */\n\nexport function visitInParallel(visitors) {\n const skipping = new Array(visitors.length).fill(null);\n const mergedVisitor = Object.create(null);\n\n for (const kind of Object.values(Kind)) {\n let hasVisitor = false;\n const enterList = new Array(visitors.length).fill(undefined);\n const leaveList = new Array(visitors.length).fill(undefined);\n\n for (let i = 0; i < visitors.length; ++i) {\n const { enter, leave } = getEnterLeaveForKind(visitors[i], kind);\n hasVisitor || (hasVisitor = enter != null || leave != null);\n enterList[i] = enter;\n leaveList[i] = leave;\n }\n\n if (!hasVisitor) {\n continue;\n }\n\n const mergedEnterLeave = {\n enter(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _enterList$i;\n\n const result =\n (_enterList$i = enterList[i]) === null || _enterList$i === void 0\n ? void 0\n : _enterList$i.apply(visitors[i], args);\n\n if (result === false) {\n skipping[i] = node;\n } else if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined) {\n return result;\n }\n }\n }\n },\n\n leave(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _leaveList$i;\n\n const result =\n (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0\n ? void 0\n : _leaveList$i.apply(visitors[i], args);\n\n if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined && result !== false) {\n return result;\n }\n } else if (skipping[i] === node) {\n skipping[i] = null;\n }\n }\n },\n };\n mergedVisitor[kind] = mergedEnterLeave;\n }\n\n return mergedVisitor;\n}\n/**\n * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind.\n */\n\nexport function getEnterLeaveForKind(visitor, kind) {\n const kindVisitor = visitor[kind];\n\n if (typeof kindVisitor === 'object') {\n // { Kind: { enter() {}, leave() {} } }\n return kindVisitor;\n } else if (typeof kindVisitor === 'function') {\n // { Kind() {} }\n return {\n enter: kindVisitor,\n leave: undefined,\n };\n } // { enter() {}, leave() {} }\n\n return {\n enter: visitor.enter,\n leave: visitor.leave,\n };\n}\n/**\n * Given a visitor instance, if it is leaving or not, and a node kind, return\n * the function the visitor runtime should call.\n *\n * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17\n */\n\n/* c8 ignore next 8 */\n\nexport function getVisitFn(visitor, kind, isLeaving) {\n const { enter, leave } = getEnterLeaveForKind(visitor, kind);\n return isLeaving ? leave : enter;\n}\n","import { printBlockString } from './blockString.mjs';\nimport { printString } from './printString.mjs';\nimport { visit } from './visitor.mjs';\n/**\n * Converts an AST into a string, using one set of reasonable\n * formatting rules.\n */\n\nexport function print(ast) {\n return visit(ast, printDocASTReducer);\n}\nconst MAX_LINE_LENGTH = 80;\nconst printDocASTReducer = {\n Name: {\n leave: (node) => node.value,\n },\n Variable: {\n leave: (node) => '$' + node.name,\n },\n // Document\n Document: {\n leave: (node) => join(node.definitions, '\\n\\n'),\n },\n OperationDefinition: {\n leave(node) {\n const varDefs = wrap('(', join(node.variableDefinitions, ', '), ')');\n const prefix = join(\n [\n node.operation,\n join([node.name, varDefs]),\n join(node.directives, ' '),\n ],\n ' ',\n ); // Anonymous queries with no directives or variable definitions can use\n // the query short form.\n\n return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet;\n },\n },\n VariableDefinition: {\n leave: ({ variable, type, defaultValue, directives }) =>\n variable +\n ': ' +\n type +\n wrap(' = ', defaultValue) +\n wrap(' ', join(directives, ' ')),\n },\n SelectionSet: {\n leave: ({ selections }) => block(selections),\n },\n Field: {\n leave({ alias, name, arguments: args, directives, selectionSet }) {\n const prefix = wrap('', alias, ': ') + name;\n let argsLine = prefix + wrap('(', join(args, ', '), ')');\n\n if (argsLine.length > MAX_LINE_LENGTH) {\n argsLine = prefix + wrap('(\\n', indent(join(args, '\\n')), '\\n)');\n }\n\n return join([argsLine, join(directives, ' '), selectionSet], ' ');\n },\n },\n Argument: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Fragments\n FragmentSpread: {\n leave: ({ name, directives }) =>\n '...' + name + wrap(' ', join(directives, ' ')),\n },\n InlineFragment: {\n leave: ({ typeCondition, directives, selectionSet }) =>\n join(\n [\n '...',\n wrap('on ', typeCondition),\n join(directives, ' '),\n selectionSet,\n ],\n ' ',\n ),\n },\n FragmentDefinition: {\n leave: (\n { name, typeCondition, variableDefinitions, directives, selectionSet }, // Note: fragment variable definitions are experimental and may be changed\n ) =>\n // or removed in the future.\n `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` +\n `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` +\n selectionSet,\n },\n // Value\n IntValue: {\n leave: ({ value }) => value,\n },\n FloatValue: {\n leave: ({ value }) => value,\n },\n StringValue: {\n leave: ({ value, block: isBlockString }) =>\n isBlockString ? printBlockString(value) : printString(value),\n },\n BooleanValue: {\n leave: ({ value }) => (value ? 'true' : 'false'),\n },\n NullValue: {\n leave: () => 'null',\n },\n EnumValue: {\n leave: ({ value }) => value,\n },\n ListValue: {\n leave: ({ values }) => '[' + join(values, ', ') + ']',\n },\n ObjectValue: {\n leave: ({ fields }) => '{' + join(fields, ', ') + '}',\n },\n ObjectField: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Directive\n Directive: {\n leave: ({ name, arguments: args }) =>\n '@' + name + wrap('(', join(args, ', '), ')'),\n },\n // Type\n NamedType: {\n leave: ({ name }) => name,\n },\n ListType: {\n leave: ({ type }) => '[' + type + ']',\n },\n NonNullType: {\n leave: ({ type }) => type + '!',\n },\n // Type System Definitions\n SchemaDefinition: {\n leave: ({ description, directives, operationTypes }) =>\n wrap('', description, '\\n') +\n join(['schema', join(directives, ' '), block(operationTypes)], ' '),\n },\n OperationTypeDefinition: {\n leave: ({ operation, type }) => operation + ': ' + type,\n },\n ScalarTypeDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') +\n join(['scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n FieldDefinition: {\n leave: ({ description, name, arguments: args, type, directives }) =>\n wrap('', description, '\\n') +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n ': ' +\n type +\n wrap(' ', join(directives, ' ')),\n },\n InputValueDefinition: {\n leave: ({ description, name, type, defaultValue, directives }) =>\n wrap('', description, '\\n') +\n join(\n [name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')],\n ' ',\n ),\n },\n InterfaceTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeDefinition: {\n leave: ({ description, name, directives, types }) =>\n wrap('', description, '\\n') +\n join(\n ['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))],\n ' ',\n ),\n },\n EnumTypeDefinition: {\n leave: ({ description, name, directives, values }) =>\n wrap('', description, '\\n') +\n join(['enum', name, join(directives, ' '), block(values)], ' '),\n },\n EnumValueDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') + join([name, join(directives, ' ')], ' '),\n },\n InputObjectTypeDefinition: {\n leave: ({ description, name, directives, fields }) =>\n wrap('', description, '\\n') +\n join(['input', name, join(directives, ' '), block(fields)], ' '),\n },\n DirectiveDefinition: {\n leave: ({ description, name, arguments: args, repeatable, locations }) =>\n wrap('', description, '\\n') +\n 'directive @' +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n (repeatable ? ' repeatable' : '') +\n ' on ' +\n join(locations, ' | '),\n },\n SchemaExtension: {\n leave: ({ directives, operationTypes }) =>\n join(\n ['extend schema', join(directives, ' '), block(operationTypes)],\n ' ',\n ),\n },\n ScalarTypeExtension: {\n leave: ({ name, directives }) =>\n join(['extend scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n InterfaceTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeExtension: {\n leave: ({ name, directives, types }) =>\n join(\n [\n 'extend union',\n name,\n join(directives, ' '),\n wrap('= ', join(types, ' | ')),\n ],\n ' ',\n ),\n },\n EnumTypeExtension: {\n leave: ({ name, directives, values }) =>\n join(['extend enum', name, join(directives, ' '), block(values)], ' '),\n },\n InputObjectTypeExtension: {\n leave: ({ name, directives, fields }) =>\n join(['extend input', name, join(directives, ' '), block(fields)], ' '),\n },\n};\n/**\n * Given maybeArray, print an empty string if it is null or empty, otherwise\n * print all items together separated by separator if provided\n */\n\nfunction join(maybeArray, separator = '') {\n var _maybeArray$filter$jo;\n\n return (_maybeArray$filter$jo =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.filter((x) => x).join(separator)) !== null &&\n _maybeArray$filter$jo !== void 0\n ? _maybeArray$filter$jo\n : '';\n}\n/**\n * Given array, print each item on its own line, wrapped in an indented `{ }` block.\n */\n\nfunction block(array) {\n return wrap('{\\n', indent(join(array, '\\n')), '\\n}');\n}\n/**\n * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.\n */\n\nfunction wrap(start, maybeString, end = '') {\n return maybeString != null && maybeString !== ''\n ? start + maybeString + end\n : '';\n}\n\nfunction indent(str) {\n return wrap(' ', str.replace(/\\n/g, '\\n '));\n}\n\nfunction hasMultilineItems(maybeArray) {\n var _maybeArray$some;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n return (_maybeArray$some =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.some((str) => str.includes('\\n'))) !== null &&\n _maybeArray$some !== void 0\n ? _maybeArray$some\n : false;\n}\n","import { keyValMap } from '../jsutils/keyValMap.mjs';\nimport { Kind } from '../language/kinds.mjs';\n/**\n * Produces a JavaScript value given a GraphQL Value AST.\n *\n * Unlike `valueFromAST()`, no type is provided. The resulting JavaScript value\n * will reflect the provided GraphQL value AST.\n *\n * | GraphQL Value | JavaScript Value |\n * | -------------------- | ---------------- |\n * | Input Object | Object |\n * | List | Array |\n * | Boolean | Boolean |\n * | String / Enum | String |\n * | Int / Float | Number |\n * | Null | null |\n *\n */\n\nexport function valueFromASTUntyped(valueNode, variables) {\n switch (valueNode.kind) {\n case Kind.NULL:\n return null;\n\n case Kind.INT:\n return parseInt(valueNode.value, 10);\n\n case Kind.FLOAT:\n return parseFloat(valueNode.value);\n\n case Kind.STRING:\n case Kind.ENUM:\n case Kind.BOOLEAN:\n return valueNode.value;\n\n case Kind.LIST:\n return valueNode.values.map((node) =>\n valueFromASTUntyped(node, variables),\n );\n\n case Kind.OBJECT:\n return keyValMap(\n valueNode.fields,\n (field) => field.name.value,\n (field) => valueFromASTUntyped(field.value, variables),\n );\n\n case Kind.VARIABLE:\n return variables === null || variables === void 0\n ? void 0\n : variables[valueNode.name.value];\n }\n}\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { GraphQLError } from '../error/GraphQLError.mjs';\nimport { isNameContinue, isNameStart } from '../language/characterClasses.mjs';\n/**\n * Upholds the spec rules about naming.\n */\n\nexport function assertName(name) {\n name != null || devAssert(false, 'Must provide name.');\n typeof name === 'string' || devAssert(false, 'Expected name to be a string.');\n\n if (name.length === 0) {\n throw new GraphQLError('Expected name to be a non-empty string.');\n }\n\n for (let i = 1; i < name.length; ++i) {\n if (!isNameContinue(name.charCodeAt(i))) {\n throw new GraphQLError(\n `Names must only contain [_a-zA-Z0-9] but \"${name}\" does not.`,\n );\n }\n }\n\n if (!isNameStart(name.charCodeAt(0))) {\n throw new GraphQLError(\n `Names must start with [_a-zA-Z] but \"${name}\" does not.`,\n );\n }\n\n return name;\n}\n/**\n * Upholds the spec rules about naming enum values.\n *\n * @internal\n */\n\nexport function assertEnumValueName(name) {\n if (name === 'true' || name === 'false' || name === 'null') {\n throw new GraphQLError(`Enum values cannot be named: ${name}`);\n }\n\n return assertName(name);\n}\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { didYouMean } from '../jsutils/didYouMean.mjs';\nimport { identityFunc } from '../jsutils/identityFunc.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { instanceOf } from '../jsutils/instanceOf.mjs';\nimport { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { keyMap } from '../jsutils/keyMap.mjs';\nimport { keyValMap } from '../jsutils/keyValMap.mjs';\nimport { mapValue } from '../jsutils/mapValue.mjs';\nimport { suggestionList } from '../jsutils/suggestionList.mjs';\nimport { toObjMap } from '../jsutils/toObjMap.mjs';\nimport { GraphQLError } from '../error/GraphQLError.mjs';\nimport { Kind } from '../language/kinds.mjs';\nimport { print } from '../language/printer.mjs';\nimport { valueFromASTUntyped } from '../utilities/valueFromASTUntyped.mjs';\nimport { assertEnumValueName, assertName } from './assertName.mjs';\nexport function isType(type) {\n return (\n isScalarType(type) ||\n isObjectType(type) ||\n isInterfaceType(type) ||\n isUnionType(type) ||\n isEnumType(type) ||\n isInputObjectType(type) ||\n isListType(type) ||\n isNonNullType(type)\n );\n}\nexport function assertType(type) {\n if (!isType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL type.`);\n }\n\n return type;\n}\n/**\n * There are predicates for each kind of GraphQL type.\n */\n\nexport function isScalarType(type) {\n return instanceOf(type, GraphQLScalarType);\n}\nexport function assertScalarType(type) {\n if (!isScalarType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL Scalar type.`);\n }\n\n return type;\n}\nexport function isObjectType(type) {\n return instanceOf(type, GraphQLObjectType);\n}\nexport function assertObjectType(type) {\n if (!isObjectType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL Object type.`);\n }\n\n return type;\n}\nexport function isInterfaceType(type) {\n return instanceOf(type, GraphQLInterfaceType);\n}\nexport function assertInterfaceType(type) {\n if (!isInterfaceType(type)) {\n throw new Error(\n `Expected ${inspect(type)} to be a GraphQL Interface type.`,\n );\n }\n\n return type;\n}\nexport function isUnionType(type) {\n return instanceOf(type, GraphQLUnionType);\n}\nexport function assertUnionType(type) {\n if (!isUnionType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL Union type.`);\n }\n\n return type;\n}\nexport function isEnumType(type) {\n return instanceOf(type, GraphQLEnumType);\n}\nexport function assertEnumType(type) {\n if (!isEnumType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL Enum type.`);\n }\n\n return type;\n}\nexport function isInputObjectType(type) {\n return instanceOf(type, GraphQLInputObjectType);\n}\nexport function assertInputObjectType(type) {\n if (!isInputObjectType(type)) {\n throw new Error(\n `Expected ${inspect(type)} to be a GraphQL Input Object type.`,\n );\n }\n\n return type;\n}\nexport function isListType(type) {\n return instanceOf(type, GraphQLList);\n}\nexport function assertListType(type) {\n if (!isListType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL List type.`);\n }\n\n return type;\n}\nexport function isNonNullType(type) {\n return instanceOf(type, GraphQLNonNull);\n}\nexport function assertNonNullType(type) {\n if (!isNonNullType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL Non-Null type.`);\n }\n\n return type;\n}\n/**\n * These types may be used as input types for arguments and directives.\n */\n\nexport function isInputType(type) {\n return (\n isScalarType(type) ||\n isEnumType(type) ||\n isInputObjectType(type) ||\n (isWrappingType(type) && isInputType(type.ofType))\n );\n}\nexport function assertInputType(type) {\n if (!isInputType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL input type.`);\n }\n\n return type;\n}\n/**\n * These types may be used as output types as the result of fields.\n */\n\nexport function isOutputType(type) {\n return (\n isScalarType(type) ||\n isObjectType(type) ||\n isInterfaceType(type) ||\n isUnionType(type) ||\n isEnumType(type) ||\n (isWrappingType(type) && isOutputType(type.ofType))\n );\n}\nexport function assertOutputType(type) {\n if (!isOutputType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL output type.`);\n }\n\n return type;\n}\n/**\n * These types may describe types which may be leaf values.\n */\n\nexport function isLeafType(type) {\n return isScalarType(type) || isEnumType(type);\n}\nexport function assertLeafType(type) {\n if (!isLeafType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL leaf type.`);\n }\n\n return type;\n}\n/**\n * These types may describe the parent context of a selection set.\n */\n\nexport function isCompositeType(type) {\n return isObjectType(type) || isInterfaceType(type) || isUnionType(type);\n}\nexport function assertCompositeType(type) {\n if (!isCompositeType(type)) {\n throw new Error(\n `Expected ${inspect(type)} to be a GraphQL composite type.`,\n );\n }\n\n return type;\n}\n/**\n * These types may describe the parent context of a selection set.\n */\n\nexport function isAbstractType(type) {\n return isInterfaceType(type) || isUnionType(type);\n}\nexport function assertAbstractType(type) {\n if (!isAbstractType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL abstract type.`);\n }\n\n return type;\n}\n/**\n * List Type Wrapper\n *\n * A list is a wrapping type which points to another type.\n * Lists are often created within the context of defining the fields of\n * an object type.\n *\n * Example:\n *\n * ```ts\n * const PersonType = new GraphQLObjectType({\n * name: 'Person',\n * fields: () => ({\n * parents: { type: new GraphQLList(PersonType) },\n * children: { type: new GraphQLList(PersonType) },\n * })\n * })\n * ```\n */\n\nexport class GraphQLList {\n constructor(ofType) {\n isType(ofType) ||\n devAssert(false, `Expected ${inspect(ofType)} to be a GraphQL type.`);\n this.ofType = ofType;\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLList';\n }\n\n toString() {\n return '[' + String(this.ofType) + ']';\n }\n\n toJSON() {\n return this.toString();\n }\n}\n/**\n * Non-Null Type Wrapper\n *\n * A non-null is a wrapping type which points to another type.\n * Non-null types enforce that their values are never null and can ensure\n * an error is raised if this ever occurs during a request. It is useful for\n * fields which you can make a strong guarantee on non-nullability, for example\n * usually the id field of a database row will never be null.\n *\n * Example:\n *\n * ```ts\n * const RowType = new GraphQLObjectType({\n * name: 'Row',\n * fields: () => ({\n * id: { type: new GraphQLNonNull(GraphQLString) },\n * })\n * })\n * ```\n * Note: the enforcement of non-nullability occurs within the executor.\n */\n\nexport class GraphQLNonNull {\n constructor(ofType) {\n isNullableType(ofType) ||\n devAssert(\n false,\n `Expected ${inspect(ofType)} to be a GraphQL nullable type.`,\n );\n this.ofType = ofType;\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLNonNull';\n }\n\n toString() {\n return String(this.ofType) + '!';\n }\n\n toJSON() {\n return this.toString();\n }\n}\n/**\n * These types wrap and modify other types\n */\n\nexport function isWrappingType(type) {\n return isListType(type) || isNonNullType(type);\n}\nexport function assertWrappingType(type) {\n if (!isWrappingType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL wrapping type.`);\n }\n\n return type;\n}\n/**\n * These types can all accept null as a value.\n */\n\nexport function isNullableType(type) {\n return isType(type) && !isNonNullType(type);\n}\nexport function assertNullableType(type) {\n if (!isNullableType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL nullable type.`);\n }\n\n return type;\n}\nexport function getNullableType(type) {\n if (type) {\n return isNonNullType(type) ? type.ofType : type;\n }\n}\n/**\n * These named types do not include modifiers like List or NonNull.\n */\n\nexport function isNamedType(type) {\n return (\n isScalarType(type) ||\n isObjectType(type) ||\n isInterfaceType(type) ||\n isUnionType(type) ||\n isEnumType(type) ||\n isInputObjectType(type)\n );\n}\nexport function assertNamedType(type) {\n if (!isNamedType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL named type.`);\n }\n\n return type;\n}\nexport function getNamedType(type) {\n if (type) {\n let unwrappedType = type;\n\n while (isWrappingType(unwrappedType)) {\n unwrappedType = unwrappedType.ofType;\n }\n\n return unwrappedType;\n }\n}\n/**\n * Used while defining GraphQL types to allow for circular references in\n * otherwise immutable type definitions.\n */\n\nexport function resolveReadonlyArrayThunk(thunk) {\n return typeof thunk === 'function' ? thunk() : thunk;\n}\nexport function resolveObjMapThunk(thunk) {\n return typeof thunk === 'function' ? thunk() : thunk;\n}\n/**\n * Custom extensions\n *\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\n\n/**\n * Scalar Type Definition\n *\n * The leaf values of any request and input values to arguments are\n * Scalars (or Enums) and are defined with a name and a series of functions\n * used to parse input from ast or variables and to ensure validity.\n *\n * If a type's serialize function returns `null` or does not return a value\n * (i.e. it returns `undefined`) then an error will be raised and a `null`\n * value will be returned in the response. It is always better to validate\n *\n * Example:\n *\n * ```ts\n * const OddType = new GraphQLScalarType({\n * name: 'Odd',\n * serialize(value) {\n * if (!Number.isFinite(value)) {\n * throw new Error(\n * `Scalar \"Odd\" cannot represent \"${value}\" since it is not a finite number.`,\n * );\n * }\n *\n * if (value % 2 === 0) {\n * throw new Error(`Scalar \"Odd\" cannot represent \"${value}\" since it is even.`);\n * }\n * return value;\n * }\n * });\n * ```\n */\nexport class GraphQLScalarType {\n constructor(config) {\n var _config$parseValue,\n _config$serialize,\n _config$parseLiteral,\n _config$extensionASTN;\n\n const parseValue =\n (_config$parseValue = config.parseValue) !== null &&\n _config$parseValue !== void 0\n ? _config$parseValue\n : identityFunc;\n this.name = assertName(config.name);\n this.description = config.description;\n this.specifiedByURL = config.specifiedByURL;\n this.serialize =\n (_config$serialize = config.serialize) !== null &&\n _config$serialize !== void 0\n ? _config$serialize\n : identityFunc;\n this.parseValue = parseValue;\n this.parseLiteral =\n (_config$parseLiteral = config.parseLiteral) !== null &&\n _config$parseLiteral !== void 0\n ? _config$parseLiteral\n : (node, variables) => parseValue(valueFromASTUntyped(node, variables));\n this.extensions = toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN = config.extensionASTNodes) !== null &&\n _config$extensionASTN !== void 0\n ? _config$extensionASTN\n : [];\n config.specifiedByURL == null ||\n typeof config.specifiedByURL === 'string' ||\n devAssert(\n false,\n `${this.name} must provide \"specifiedByURL\" as a string, ` +\n `but got: ${inspect(config.specifiedByURL)}.`,\n );\n config.serialize == null ||\n typeof config.serialize === 'function' ||\n devAssert(\n false,\n `${this.name} must provide \"serialize\" function. If this custom Scalar is also used as an input type, ensure \"parseValue\" and \"parseLiteral\" functions are also provided.`,\n );\n\n if (config.parseLiteral) {\n (typeof config.parseValue === 'function' &&\n typeof config.parseLiteral === 'function') ||\n devAssert(\n false,\n `${this.name} must provide both \"parseValue\" and \"parseLiteral\" functions.`,\n );\n }\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLScalarType';\n }\n\n toConfig() {\n return {\n name: this.name,\n description: this.description,\n specifiedByURL: this.specifiedByURL,\n serialize: this.serialize,\n parseValue: this.parseValue,\n parseLiteral: this.parseLiteral,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n toString() {\n return this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\n/**\n * Object Type Definition\n *\n * Almost all of the GraphQL types you define will be object types. Object types\n * have a name, but most importantly describe their fields.\n *\n * Example:\n *\n * ```ts\n * const AddressType = new GraphQLObjectType({\n * name: 'Address',\n * fields: {\n * street: { type: GraphQLString },\n * number: { type: GraphQLInt },\n * formatted: {\n * type: GraphQLString,\n * resolve(obj) {\n * return obj.number + ' ' + obj.street\n * }\n * }\n * }\n * });\n * ```\n *\n * When two types need to refer to each other, or a type needs to refer to\n * itself in a field, you can use a function expression (aka a closure or a\n * thunk) to supply the fields lazily.\n *\n * Example:\n *\n * ```ts\n * const PersonType = new GraphQLObjectType({\n * name: 'Person',\n * fields: () => ({\n * name: { type: GraphQLString },\n * bestFriend: { type: PersonType },\n * })\n * });\n * ```\n */\nexport class GraphQLObjectType {\n constructor(config) {\n var _config$extensionASTN2;\n\n this.name = assertName(config.name);\n this.description = config.description;\n this.isTypeOf = config.isTypeOf;\n this.extensions = toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN2 = config.extensionASTNodes) !== null &&\n _config$extensionASTN2 !== void 0\n ? _config$extensionASTN2\n : [];\n\n this._fields = () => defineFieldMap(config);\n\n this._interfaces = () => defineInterfaces(config);\n\n config.isTypeOf == null ||\n typeof config.isTypeOf === 'function' ||\n devAssert(\n false,\n `${this.name} must provide \"isTypeOf\" as a function, ` +\n `but got: ${inspect(config.isTypeOf)}.`,\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLObjectType';\n }\n\n getFields() {\n if (typeof this._fields === 'function') {\n this._fields = this._fields();\n }\n\n return this._fields;\n }\n\n getInterfaces() {\n if (typeof this._interfaces === 'function') {\n this._interfaces = this._interfaces();\n }\n\n return this._interfaces;\n }\n\n toConfig() {\n return {\n name: this.name,\n description: this.description,\n interfaces: this.getInterfaces(),\n fields: fieldsToFieldsConfig(this.getFields()),\n isTypeOf: this.isTypeOf,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n toString() {\n return this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\nfunction defineInterfaces(config) {\n var _config$interfaces;\n\n const interfaces = resolveReadonlyArrayThunk(\n (_config$interfaces = config.interfaces) !== null &&\n _config$interfaces !== void 0\n ? _config$interfaces\n : [],\n );\n Array.isArray(interfaces) ||\n devAssert(\n false,\n `${config.name} interfaces must be an Array or a function which returns an Array.`,\n );\n return interfaces;\n}\n\nfunction defineFieldMap(config) {\n const fieldMap = resolveObjMapThunk(config.fields);\n isPlainObj(fieldMap) ||\n devAssert(\n false,\n `${config.name} fields must be an object with field names as keys or a function which returns such an object.`,\n );\n return mapValue(fieldMap, (fieldConfig, fieldName) => {\n var _fieldConfig$args;\n\n isPlainObj(fieldConfig) ||\n devAssert(\n false,\n `${config.name}.${fieldName} field config must be an object.`,\n );\n fieldConfig.resolve == null ||\n typeof fieldConfig.resolve === 'function' ||\n devAssert(\n false,\n `${config.name}.${fieldName} field resolver must be a function if ` +\n `provided, but got: ${inspect(fieldConfig.resolve)}.`,\n );\n const argsConfig =\n (_fieldConfig$args = fieldConfig.args) !== null &&\n _fieldConfig$args !== void 0\n ? _fieldConfig$args\n : {};\n isPlainObj(argsConfig) ||\n devAssert(\n false,\n `${config.name}.${fieldName} args must be an object with argument names as keys.`,\n );\n return {\n name: assertName(fieldName),\n description: fieldConfig.description,\n type: fieldConfig.type,\n args: defineArguments(argsConfig),\n resolve: fieldConfig.resolve,\n subscribe: fieldConfig.subscribe,\n deprecationReason: fieldConfig.deprecationReason,\n extensions: toObjMap(fieldConfig.extensions),\n astNode: fieldConfig.astNode,\n };\n });\n}\n\nexport function defineArguments(config) {\n return Object.entries(config).map(([argName, argConfig]) => ({\n name: assertName(argName),\n description: argConfig.description,\n type: argConfig.type,\n defaultValue: argConfig.defaultValue,\n deprecationReason: argConfig.deprecationReason,\n extensions: toObjMap(argConfig.extensions),\n astNode: argConfig.astNode,\n }));\n}\n\nfunction isPlainObj(obj) {\n return isObjectLike(obj) && !Array.isArray(obj);\n}\n\nfunction fieldsToFieldsConfig(fields) {\n return mapValue(fields, (field) => ({\n description: field.description,\n type: field.type,\n args: argsToArgsConfig(field.args),\n resolve: field.resolve,\n subscribe: field.subscribe,\n deprecationReason: field.deprecationReason,\n extensions: field.extensions,\n astNode: field.astNode,\n }));\n}\n/**\n * @internal\n */\n\nexport function argsToArgsConfig(args) {\n return keyValMap(\n args,\n (arg) => arg.name,\n (arg) => ({\n description: arg.description,\n type: arg.type,\n defaultValue: arg.defaultValue,\n deprecationReason: arg.deprecationReason,\n extensions: arg.extensions,\n astNode: arg.astNode,\n }),\n );\n}\nexport function isRequiredArgument(arg) {\n return isNonNullType(arg.type) && arg.defaultValue === undefined;\n}\n\n/**\n * Interface Type Definition\n *\n * When a field can return one of a heterogeneous set of types, a Interface type\n * is used to describe what types are possible, what fields are in common across\n * all types, as well as a function to determine which type is actually used\n * when the field is resolved.\n *\n * Example:\n *\n * ```ts\n * const EntityType = new GraphQLInterfaceType({\n * name: 'Entity',\n * fields: {\n * name: { type: GraphQLString }\n * }\n * });\n * ```\n */\nexport class GraphQLInterfaceType {\n constructor(config) {\n var _config$extensionASTN3;\n\n this.name = assertName(config.name);\n this.description = config.description;\n this.resolveType = config.resolveType;\n this.extensions = toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN3 = config.extensionASTNodes) !== null &&\n _config$extensionASTN3 !== void 0\n ? _config$extensionASTN3\n : [];\n this._fields = defineFieldMap.bind(undefined, config);\n this._interfaces = defineInterfaces.bind(undefined, config);\n config.resolveType == null ||\n typeof config.resolveType === 'function' ||\n devAssert(\n false,\n `${this.name} must provide \"resolveType\" as a function, ` +\n `but got: ${inspect(config.resolveType)}.`,\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLInterfaceType';\n }\n\n getFields() {\n if (typeof this._fields === 'function') {\n this._fields = this._fields();\n }\n\n return this._fields;\n }\n\n getInterfaces() {\n if (typeof this._interfaces === 'function') {\n this._interfaces = this._interfaces();\n }\n\n return this._interfaces;\n }\n\n toConfig() {\n return {\n name: this.name,\n description: this.description,\n interfaces: this.getInterfaces(),\n fields: fieldsToFieldsConfig(this.getFields()),\n resolveType: this.resolveType,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n toString() {\n return this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\n/**\n * Union Type Definition\n *\n * When a field can return one of a heterogeneous set of types, a Union type\n * is used to describe what types are possible as well as providing a function\n * to determine which type is actually used when the field is resolved.\n *\n * Example:\n *\n * ```ts\n * const PetType = new GraphQLUnionType({\n * name: 'Pet',\n * types: [ DogType, CatType ],\n * resolveType(value) {\n * if (value instanceof Dog) {\n * return DogType;\n * }\n * if (value instanceof Cat) {\n * return CatType;\n * }\n * }\n * });\n * ```\n */\nexport class GraphQLUnionType {\n constructor(config) {\n var _config$extensionASTN4;\n\n this.name = assertName(config.name);\n this.description = config.description;\n this.resolveType = config.resolveType;\n this.extensions = toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN4 = config.extensionASTNodes) !== null &&\n _config$extensionASTN4 !== void 0\n ? _config$extensionASTN4\n : [];\n this._types = defineTypes.bind(undefined, config);\n config.resolveType == null ||\n typeof config.resolveType === 'function' ||\n devAssert(\n false,\n `${this.name} must provide \"resolveType\" as a function, ` +\n `but got: ${inspect(config.resolveType)}.`,\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLUnionType';\n }\n\n getTypes() {\n if (typeof this._types === 'function') {\n this._types = this._types();\n }\n\n return this._types;\n }\n\n toConfig() {\n return {\n name: this.name,\n description: this.description,\n types: this.getTypes(),\n resolveType: this.resolveType,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n toString() {\n return this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\nfunction defineTypes(config) {\n const types = resolveReadonlyArrayThunk(config.types);\n Array.isArray(types) ||\n devAssert(\n false,\n `Must provide Array of types or a function which returns such an array for Union ${config.name}.`,\n );\n return types;\n}\n\n/**\n * Enum Type Definition\n *\n * Some leaf values of requests and input values are Enums. GraphQL serializes\n * Enum values as strings, however internally Enums can be represented by any\n * kind of type, often integers.\n *\n * Example:\n *\n * ```ts\n * const RGBType = new GraphQLEnumType({\n * name: 'RGB',\n * values: {\n * RED: { value: 0 },\n * GREEN: { value: 1 },\n * BLUE: { value: 2 }\n * }\n * });\n * ```\n *\n * Note: If a value is not provided in a definition, the name of the enum value\n * will be used as its internal value.\n */\nexport class GraphQLEnumType {\n /* */\n constructor(config) {\n var _config$extensionASTN5;\n\n this.name = assertName(config.name);\n this.description = config.description;\n this.extensions = toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN5 = config.extensionASTNodes) !== null &&\n _config$extensionASTN5 !== void 0\n ? _config$extensionASTN5\n : [];\n this._values = defineEnumValues(this.name, config.values);\n this._valueLookup = new Map(\n this._values.map((enumValue) => [enumValue.value, enumValue]),\n );\n this._nameLookup = keyMap(this._values, (value) => value.name);\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLEnumType';\n }\n\n getValues() {\n return this._values;\n }\n\n getValue(name) {\n return this._nameLookup[name];\n }\n\n serialize(outputValue) {\n const enumValue = this._valueLookup.get(outputValue);\n\n if (enumValue === undefined) {\n throw new GraphQLError(\n `Enum \"${this.name}\" cannot represent value: ${inspect(outputValue)}`,\n );\n }\n\n return enumValue.name;\n }\n\n parseValue(inputValue) /* T */\n {\n if (typeof inputValue !== 'string') {\n const valueStr = inspect(inputValue);\n throw new GraphQLError(\n `Enum \"${this.name}\" cannot represent non-string value: ${valueStr}.` +\n didYouMeanEnumValue(this, valueStr),\n );\n }\n\n const enumValue = this.getValue(inputValue);\n\n if (enumValue == null) {\n throw new GraphQLError(\n `Value \"${inputValue}\" does not exist in \"${this.name}\" enum.` +\n didYouMeanEnumValue(this, inputValue),\n );\n }\n\n return enumValue.value;\n }\n\n parseLiteral(valueNode, _variables) /* T */\n {\n // Note: variables will be resolved to a value before calling this function.\n if (valueNode.kind !== Kind.ENUM) {\n const valueStr = print(valueNode);\n throw new GraphQLError(\n `Enum \"${this.name}\" cannot represent non-enum value: ${valueStr}.` +\n didYouMeanEnumValue(this, valueStr),\n {\n nodes: valueNode,\n },\n );\n }\n\n const enumValue = this.getValue(valueNode.value);\n\n if (enumValue == null) {\n const valueStr = print(valueNode);\n throw new GraphQLError(\n `Value \"${valueStr}\" does not exist in \"${this.name}\" enum.` +\n didYouMeanEnumValue(this, valueStr),\n {\n nodes: valueNode,\n },\n );\n }\n\n return enumValue.value;\n }\n\n toConfig() {\n const values = keyValMap(\n this.getValues(),\n (value) => value.name,\n (value) => ({\n description: value.description,\n value: value.value,\n deprecationReason: value.deprecationReason,\n extensions: value.extensions,\n astNode: value.astNode,\n }),\n );\n return {\n name: this.name,\n description: this.description,\n values,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n toString() {\n return this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\nfunction didYouMeanEnumValue(enumType, unknownValueStr) {\n const allNames = enumType.getValues().map((value) => value.name);\n const suggestedValues = suggestionList(unknownValueStr, allNames);\n return didYouMean('the enum value', suggestedValues);\n}\n\nfunction defineEnumValues(typeName, valueMap) {\n isPlainObj(valueMap) ||\n devAssert(\n false,\n `${typeName} values must be an object with value names as keys.`,\n );\n return Object.entries(valueMap).map(([valueName, valueConfig]) => {\n isPlainObj(valueConfig) ||\n devAssert(\n false,\n `${typeName}.${valueName} must refer to an object with a \"value\" key ` +\n `representing an internal value but got: ${inspect(valueConfig)}.`,\n );\n return {\n name: assertEnumValueName(valueName),\n description: valueConfig.description,\n value: valueConfig.value !== undefined ? valueConfig.value : valueName,\n deprecationReason: valueConfig.deprecationReason,\n extensions: toObjMap(valueConfig.extensions),\n astNode: valueConfig.astNode,\n };\n });\n}\n\n/**\n * Input Object Type Definition\n *\n * An input object defines a structured collection of fields which may be\n * supplied to a field argument.\n *\n * Using `NonNull` will ensure that a value must be provided by the query\n *\n * Example:\n *\n * ```ts\n * const GeoPoint = new GraphQLInputObjectType({\n * name: 'GeoPoint',\n * fields: {\n * lat: { type: new GraphQLNonNull(GraphQLFloat) },\n * lon: { type: new GraphQLNonNull(GraphQLFloat) },\n * alt: { type: GraphQLFloat, defaultValue: 0 },\n * }\n * });\n * ```\n */\nexport class GraphQLInputObjectType {\n constructor(config) {\n var _config$extensionASTN6;\n\n this.name = assertName(config.name);\n this.description = config.description;\n this.extensions = toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN6 = config.extensionASTNodes) !== null &&\n _config$extensionASTN6 !== void 0\n ? _config$extensionASTN6\n : [];\n this._fields = defineInputFieldMap.bind(undefined, config);\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLInputObjectType';\n }\n\n getFields() {\n if (typeof this._fields === 'function') {\n this._fields = this._fields();\n }\n\n return this._fields;\n }\n\n toConfig() {\n const fields = mapValue(this.getFields(), (field) => ({\n description: field.description,\n type: field.type,\n defaultValue: field.defaultValue,\n deprecationReason: field.deprecationReason,\n extensions: field.extensions,\n astNode: field.astNode,\n }));\n return {\n name: this.name,\n description: this.description,\n fields,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n toString() {\n return this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\nfunction defineInputFieldMap(config) {\n const fieldMap = resolveObjMapThunk(config.fields);\n isPlainObj(fieldMap) ||\n devAssert(\n false,\n `${config.name} fields must be an object with field names as keys or a function which returns such an object.`,\n );\n return mapValue(fieldMap, (fieldConfig, fieldName) => {\n !('resolve' in fieldConfig) ||\n devAssert(\n false,\n `${config.name}.${fieldName} field has a resolve property, but Input Types cannot define resolvers.`,\n );\n return {\n name: assertName(fieldName),\n description: fieldConfig.description,\n type: fieldConfig.type,\n defaultValue: fieldConfig.defaultValue,\n deprecationReason: fieldConfig.deprecationReason,\n extensions: toObjMap(fieldConfig.extensions),\n astNode: fieldConfig.astNode,\n };\n });\n}\n\nexport function isRequiredInputField(field) {\n return isNonNullType(field.type) && field.defaultValue === undefined;\n}\n","import {\n isAbstractType,\n isInterfaceType,\n isListType,\n isNonNullType,\n isObjectType,\n} from '../type/definition.mjs';\n\n/**\n * Provided two types, return true if the types are equal (invariant).\n */\nexport function isEqualType(typeA, typeB) {\n // Equivalent types are equal.\n if (typeA === typeB) {\n return true;\n } // If either type is non-null, the other must also be non-null.\n\n if (isNonNullType(typeA) && isNonNullType(typeB)) {\n return isEqualType(typeA.ofType, typeB.ofType);\n } // If either type is a list, the other must also be a list.\n\n if (isListType(typeA) && isListType(typeB)) {\n return isEqualType(typeA.ofType, typeB.ofType);\n } // Otherwise the types are not equal.\n\n return false;\n}\n/**\n * Provided a type and a super type, return true if the first type is either\n * equal or a subset of the second super type (covariant).\n */\n\nexport function isTypeSubTypeOf(schema, maybeSubType, superType) {\n // Equivalent type is a valid subtype\n if (maybeSubType === superType) {\n return true;\n } // If superType is non-null, maybeSubType must also be non-null.\n\n if (isNonNullType(superType)) {\n if (isNonNullType(maybeSubType)) {\n return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);\n }\n\n return false;\n }\n\n if (isNonNullType(maybeSubType)) {\n // If superType is nullable, maybeSubType may be non-null or nullable.\n return isTypeSubTypeOf(schema, maybeSubType.ofType, superType);\n } // If superType type is a list, maybeSubType type must also be a list.\n\n if (isListType(superType)) {\n if (isListType(maybeSubType)) {\n return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);\n }\n\n return false;\n }\n\n if (isListType(maybeSubType)) {\n // If superType is not a list, maybeSubType must also be not a list.\n return false;\n } // If superType type is an abstract type, check if it is super type of maybeSubType.\n // Otherwise, the child type is not a valid subtype of the parent type.\n\n return (\n isAbstractType(superType) &&\n (isInterfaceType(maybeSubType) || isObjectType(maybeSubType)) &&\n schema.isSubType(superType, maybeSubType)\n );\n}\n/**\n * Provided two composite types, determine if they \"overlap\". Two composite\n * types overlap when the Sets of possible concrete types for each intersect.\n *\n * This is often used to determine if a fragment of a given type could possibly\n * be visited in a context of another type.\n *\n * This function is commutative.\n */\n\nexport function doTypesOverlap(schema, typeA, typeB) {\n // Equivalent types overlap\n if (typeA === typeB) {\n return true;\n }\n\n if (isAbstractType(typeA)) {\n if (isAbstractType(typeB)) {\n // If both types are abstract, then determine if there is any intersection\n // between possible concrete types of each.\n return schema\n .getPossibleTypes(typeA)\n .some((type) => schema.isSubType(typeB, type));\n } // Determine if the latter type is a possible concrete type of the former.\n\n return schema.isSubType(typeA, typeB);\n }\n\n if (isAbstractType(typeB)) {\n // Determine if the former type is a possible concrete type of the latter.\n return schema.isSubType(typeB, typeA);\n } // Otherwise the types do not overlap.\n\n return false;\n}\n","import { inspect } from '../jsutils/inspect.mjs';\nimport { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { GraphQLError } from '../error/GraphQLError.mjs';\nimport { Kind } from '../language/kinds.mjs';\nimport { print } from '../language/printer.mjs';\nimport { GraphQLScalarType } from './definition.mjs';\n/**\n * Maximum possible Int value as per GraphQL Spec (32-bit signed integer).\n * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe up-to 2^53 - 1\n * */\n\nexport const GRAPHQL_MAX_INT = 2147483647;\n/**\n * Minimum possible Int value as per GraphQL Spec (32-bit signed integer).\n * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe starting at -(2^53 - 1)\n * */\n\nexport const GRAPHQL_MIN_INT = -2147483648;\nexport const GraphQLInt = new GraphQLScalarType({\n name: 'Int',\n description:\n 'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.',\n\n serialize(outputValue) {\n const coercedValue = serializeObject(outputValue);\n\n if (typeof coercedValue === 'boolean') {\n return coercedValue ? 1 : 0;\n }\n\n let num = coercedValue;\n\n if (typeof coercedValue === 'string' && coercedValue !== '') {\n num = Number(coercedValue);\n }\n\n if (typeof num !== 'number' || !Number.isInteger(num)) {\n throw new GraphQLError(\n `Int cannot represent non-integer value: ${inspect(coercedValue)}`,\n );\n }\n\n if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {\n throw new GraphQLError(\n 'Int cannot represent non 32-bit signed integer value: ' +\n inspect(coercedValue),\n );\n }\n\n return num;\n },\n\n parseValue(inputValue) {\n if (typeof inputValue !== 'number' || !Number.isInteger(inputValue)) {\n throw new GraphQLError(\n `Int cannot represent non-integer value: ${inspect(inputValue)}`,\n );\n }\n\n if (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) {\n throw new GraphQLError(\n `Int cannot represent non 32-bit signed integer value: ${inputValue}`,\n );\n }\n\n return inputValue;\n },\n\n parseLiteral(valueNode) {\n if (valueNode.kind !== Kind.INT) {\n throw new GraphQLError(\n `Int cannot represent non-integer value: ${print(valueNode)}`,\n {\n nodes: valueNode,\n },\n );\n }\n\n const num = parseInt(valueNode.value, 10);\n\n if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {\n throw new GraphQLError(\n `Int cannot represent non 32-bit signed integer value: ${valueNode.value}`,\n {\n nodes: valueNode,\n },\n );\n }\n\n return num;\n },\n});\nexport const GraphQLFloat = new GraphQLScalarType({\n name: 'Float',\n description:\n 'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).',\n\n serialize(outputValue) {\n const coercedValue = serializeObject(outputValue);\n\n if (typeof coercedValue === 'boolean') {\n return coercedValue ? 1 : 0;\n }\n\n let num = coercedValue;\n\n if (typeof coercedValue === 'string' && coercedValue !== '') {\n num = Number(coercedValue);\n }\n\n if (typeof num !== 'number' || !Number.isFinite(num)) {\n throw new GraphQLError(\n `Float cannot represent non numeric value: ${inspect(coercedValue)}`,\n );\n }\n\n return num;\n },\n\n parseValue(inputValue) {\n if (typeof inputValue !== 'number' || !Number.isFinite(inputValue)) {\n throw new GraphQLError(\n `Float cannot represent non numeric value: ${inspect(inputValue)}`,\n );\n }\n\n return inputValue;\n },\n\n parseLiteral(valueNode) {\n if (valueNode.kind !== Kind.FLOAT && valueNode.kind !== Kind.INT) {\n throw new GraphQLError(\n `Float cannot represent non numeric value: ${print(valueNode)}`,\n valueNode,\n );\n }\n\n return parseFloat(valueNode.value);\n },\n});\nexport const GraphQLString = new GraphQLScalarType({\n name: 'String',\n description:\n 'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.',\n\n serialize(outputValue) {\n const coercedValue = serializeObject(outputValue); // Serialize string, boolean and number values to a string, but do not\n // attempt to coerce object, function, symbol, or other types as strings.\n\n if (typeof coercedValue === 'string') {\n return coercedValue;\n }\n\n if (typeof coercedValue === 'boolean') {\n return coercedValue ? 'true' : 'false';\n }\n\n if (typeof coercedValue === 'number' && Number.isFinite(coercedValue)) {\n return coercedValue.toString();\n }\n\n throw new GraphQLError(\n `String cannot represent value: ${inspect(outputValue)}`,\n );\n },\n\n parseValue(inputValue) {\n if (typeof inputValue !== 'string') {\n throw new GraphQLError(\n `String cannot represent a non string value: ${inspect(inputValue)}`,\n );\n }\n\n return inputValue;\n },\n\n parseLiteral(valueNode) {\n if (valueNode.kind !== Kind.STRING) {\n throw new GraphQLError(\n `String cannot represent a non string value: ${print(valueNode)}`,\n {\n nodes: valueNode,\n },\n );\n }\n\n return valueNode.value;\n },\n});\nexport const GraphQLBoolean = new GraphQLScalarType({\n name: 'Boolean',\n description: 'The `Boolean` scalar type represents `true` or `false`.',\n\n serialize(outputValue) {\n const coercedValue = serializeObject(outputValue);\n\n if (typeof coercedValue === 'boolean') {\n return coercedValue;\n }\n\n if (Number.isFinite(coercedValue)) {\n return coercedValue !== 0;\n }\n\n throw new GraphQLError(\n `Boolean cannot represent a non boolean value: ${inspect(coercedValue)}`,\n );\n },\n\n parseValue(inputValue) {\n if (typeof inputValue !== 'boolean') {\n throw new GraphQLError(\n `Boolean cannot represent a non boolean value: ${inspect(inputValue)}`,\n );\n }\n\n return inputValue;\n },\n\n parseLiteral(valueNode) {\n if (valueNode.kind !== Kind.BOOLEAN) {\n throw new GraphQLError(\n `Boolean cannot represent a non boolean value: ${print(valueNode)}`,\n {\n nodes: valueNode,\n },\n );\n }\n\n return valueNode.value;\n },\n});\nexport const GraphQLID = new GraphQLScalarType({\n name: 'ID',\n description:\n 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.',\n\n serialize(outputValue) {\n const coercedValue = serializeObject(outputValue);\n\n if (typeof coercedValue === 'string') {\n return coercedValue;\n }\n\n if (Number.isInteger(coercedValue)) {\n return String(coercedValue);\n }\n\n throw new GraphQLError(\n `ID cannot represent value: ${inspect(outputValue)}`,\n );\n },\n\n parseValue(inputValue) {\n if (typeof inputValue === 'string') {\n return inputValue;\n }\n\n if (typeof inputValue === 'number' && Number.isInteger(inputValue)) {\n return inputValue.toString();\n }\n\n throw new GraphQLError(`ID cannot represent value: ${inspect(inputValue)}`);\n },\n\n parseLiteral(valueNode) {\n if (valueNode.kind !== Kind.STRING && valueNode.kind !== Kind.INT) {\n throw new GraphQLError(\n 'ID cannot represent a non-string and non-integer value: ' +\n print(valueNode),\n {\n nodes: valueNode,\n },\n );\n }\n\n return valueNode.value;\n },\n});\nexport const specifiedScalarTypes = Object.freeze([\n GraphQLString,\n GraphQLInt,\n GraphQLFloat,\n GraphQLBoolean,\n GraphQLID,\n]);\nexport function isSpecifiedScalarType(type) {\n return specifiedScalarTypes.some(({ name }) => type.name === name);\n} // Support serializing objects with custom valueOf() or toJSON() functions -\n// a common way to represent a complex value which can be represented as\n// a string (ex: MongoDB id objects).\n\nfunction serializeObject(outputValue) {\n if (isObjectLike(outputValue)) {\n if (typeof outputValue.valueOf === 'function') {\n const valueOfResult = outputValue.valueOf();\n\n if (!isObjectLike(valueOfResult)) {\n return valueOfResult;\n }\n }\n\n if (typeof outputValue.toJSON === 'function') {\n return outputValue.toJSON();\n }\n }\n\n return outputValue;\n}\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { instanceOf } from '../jsutils/instanceOf.mjs';\nimport { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { toObjMap } from '../jsutils/toObjMap.mjs';\nimport { DirectiveLocation } from '../language/directiveLocation.mjs';\nimport { assertName } from './assertName.mjs';\nimport {\n argsToArgsConfig,\n defineArguments,\n GraphQLNonNull,\n} from './definition.mjs';\nimport { GraphQLBoolean, GraphQLString } from './scalars.mjs';\n/**\n * Test if the given value is a GraphQL directive.\n */\n\nexport function isDirective(directive) {\n return instanceOf(directive, GraphQLDirective);\n}\nexport function assertDirective(directive) {\n if (!isDirective(directive)) {\n throw new Error(\n `Expected ${inspect(directive)} to be a GraphQL directive.`,\n );\n }\n\n return directive;\n}\n/**\n * Custom extensions\n *\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\n\n/**\n * Directives are used by the GraphQL runtime as a way of modifying execution\n * behavior. Type system creators will usually not create these directly.\n */\nexport class GraphQLDirective {\n constructor(config) {\n var _config$isRepeatable, _config$args;\n\n this.name = assertName(config.name);\n this.description = config.description;\n this.locations = config.locations;\n this.isRepeatable =\n (_config$isRepeatable = config.isRepeatable) !== null &&\n _config$isRepeatable !== void 0\n ? _config$isRepeatable\n : false;\n this.extensions = toObjMap(config.extensions);\n this.astNode = config.astNode;\n Array.isArray(config.locations) ||\n devAssert(false, `@${config.name} locations must be an Array.`);\n const args =\n (_config$args = config.args) !== null && _config$args !== void 0\n ? _config$args\n : {};\n (isObjectLike(args) && !Array.isArray(args)) ||\n devAssert(\n false,\n `@${config.name} args must be an object with argument names as keys.`,\n );\n this.args = defineArguments(args);\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLDirective';\n }\n\n toConfig() {\n return {\n name: this.name,\n description: this.description,\n locations: this.locations,\n args: argsToArgsConfig(this.args),\n isRepeatable: this.isRepeatable,\n extensions: this.extensions,\n astNode: this.astNode,\n };\n }\n\n toString() {\n return '@' + this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\n/**\n * Used to conditionally include fields or fragments.\n */\nexport const GraphQLIncludeDirective = new GraphQLDirective({\n name: 'include',\n description:\n 'Directs the executor to include this field or fragment only when the `if` argument is true.',\n locations: [\n DirectiveLocation.FIELD,\n DirectiveLocation.FRAGMENT_SPREAD,\n DirectiveLocation.INLINE_FRAGMENT,\n ],\n args: {\n if: {\n type: new GraphQLNonNull(GraphQLBoolean),\n description: 'Included when true.',\n },\n },\n});\n/**\n * Used to conditionally skip (exclude) fields or fragments.\n */\n\nexport const GraphQLSkipDirective = new GraphQLDirective({\n name: 'skip',\n description:\n 'Directs the executor to skip this field or fragment when the `if` argument is true.',\n locations: [\n DirectiveLocation.FIELD,\n DirectiveLocation.FRAGMENT_SPREAD,\n DirectiveLocation.INLINE_FRAGMENT,\n ],\n args: {\n if: {\n type: new GraphQLNonNull(GraphQLBoolean),\n description: 'Skipped when true.',\n },\n },\n});\n/**\n * Constant string used for default reason for a deprecation.\n */\n\nexport const DEFAULT_DEPRECATION_REASON = 'No longer supported';\n/**\n * Used to declare element of a GraphQL schema as deprecated.\n */\n\nexport const GraphQLDeprecatedDirective = new GraphQLDirective({\n name: 'deprecated',\n description: 'Marks an element of a GraphQL schema as no longer supported.',\n locations: [\n DirectiveLocation.FIELD_DEFINITION,\n DirectiveLocation.ARGUMENT_DEFINITION,\n DirectiveLocation.INPUT_FIELD_DEFINITION,\n DirectiveLocation.ENUM_VALUE,\n ],\n args: {\n reason: {\n type: GraphQLString,\n description:\n 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).',\n defaultValue: DEFAULT_DEPRECATION_REASON,\n },\n },\n});\n/**\n * Used to provide a URL for specifying the behavior of custom scalar definitions.\n */\n\nexport const GraphQLSpecifiedByDirective = new GraphQLDirective({\n name: 'specifiedBy',\n description: 'Exposes a URL that specifies the behavior of this scalar.',\n locations: [DirectiveLocation.SCALAR],\n args: {\n url: {\n type: new GraphQLNonNull(GraphQLString),\n description: 'The URL that specifies the behavior of this scalar.',\n },\n },\n});\n/**\n * The full list of specified directives.\n */\n\nexport const specifiedDirectives = Object.freeze([\n GraphQLIncludeDirective,\n GraphQLSkipDirective,\n GraphQLDeprecatedDirective,\n GraphQLSpecifiedByDirective,\n]);\nexport function isSpecifiedDirective(directive) {\n return specifiedDirectives.some(({ name }) => name === directive.name);\n}\n","/**\n * Returns true if the provided object is an Object (i.e. not a string literal)\n * and implements the Iterator protocol.\n *\n * This may be used in place of [Array.isArray()][isArray] to determine if\n * an object should be iterated-over e.g. Array, Map, Set, Int8Array,\n * TypedArray, etc. but excludes string literals.\n *\n * @example\n * ```ts\n * isIterableObject([ 1, 2, 3 ]) // true\n * isIterableObject(new Map()) // true\n * isIterableObject('ABC') // false\n * isIterableObject({ key: 'value' }) // false\n * isIterableObject({ length: 1, 0: 'Alpha' }) // false\n * ```\n */\nexport function isIterableObject(maybeIterable) {\n return (\n typeof maybeIterable === 'object' &&\n typeof (maybeIterable === null || maybeIterable === void 0\n ? void 0\n : maybeIterable[Symbol.iterator]) === 'function'\n );\n}\n","import { inspect } from '../jsutils/inspect.mjs';\nimport { invariant } from '../jsutils/invariant.mjs';\nimport { isIterableObject } from '../jsutils/isIterableObject.mjs';\nimport { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { Kind } from '../language/kinds.mjs';\nimport {\n isEnumType,\n isInputObjectType,\n isLeafType,\n isListType,\n isNonNullType,\n} from '../type/definition.mjs';\nimport { GraphQLID } from '../type/scalars.mjs';\n/**\n * Produces a GraphQL Value AST given a JavaScript object.\n * Function will match JavaScript/JSON values to GraphQL AST schema format\n * by using suggested GraphQLInputType. For example:\n *\n * astFromValue(\"value\", GraphQLString)\n *\n * A GraphQL type must be provided, which will be used to interpret different\n * JavaScript values.\n *\n * | JSON Value | GraphQL Value |\n * | ------------- | -------------------- |\n * | Object | Input Object |\n * | Array | List |\n * | Boolean | Boolean |\n * | String | String / Enum Value |\n * | Number | Int / Float |\n * | Unknown | Enum Value |\n * | null | NullValue |\n *\n */\n\nexport function astFromValue(value, type) {\n if (isNonNullType(type)) {\n const astValue = astFromValue(value, type.ofType);\n\n if (\n (astValue === null || astValue === void 0 ? void 0 : astValue.kind) ===\n Kind.NULL\n ) {\n return null;\n }\n\n return astValue;\n } // only explicit null, not undefined, NaN\n\n if (value === null) {\n return {\n kind: Kind.NULL,\n };\n } // undefined\n\n if (value === undefined) {\n return null;\n } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n\n if (isListType(type)) {\n const itemType = type.ofType;\n\n if (isIterableObject(value)) {\n const valuesNodes = [];\n\n for (const item of value) {\n const itemNode = astFromValue(item, itemType);\n\n if (itemNode != null) {\n valuesNodes.push(itemNode);\n }\n }\n\n return {\n kind: Kind.LIST,\n values: valuesNodes,\n };\n }\n\n return astFromValue(value, itemType);\n } // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object according to the fields in the input type.\n\n if (isInputObjectType(type)) {\n if (!isObjectLike(value)) {\n return null;\n }\n\n const fieldNodes = [];\n\n for (const field of Object.values(type.getFields())) {\n const fieldValue = astFromValue(value[field.name], field.type);\n\n if (fieldValue) {\n fieldNodes.push({\n kind: Kind.OBJECT_FIELD,\n name: {\n kind: Kind.NAME,\n value: field.name,\n },\n value: fieldValue,\n });\n }\n }\n\n return {\n kind: Kind.OBJECT,\n fields: fieldNodes,\n };\n }\n\n if (isLeafType(type)) {\n // Since value is an internally represented value, it must be serialized\n // to an externally represented value before converting into an AST.\n const serialized = type.serialize(value);\n\n if (serialized == null) {\n return null;\n } // Others serialize based on their corresponding JavaScript scalar types.\n\n if (typeof serialized === 'boolean') {\n return {\n kind: Kind.BOOLEAN,\n value: serialized,\n };\n } // JavaScript numbers can be Int or Float values.\n\n if (typeof serialized === 'number' && Number.isFinite(serialized)) {\n const stringNum = String(serialized);\n return integerStringRegExp.test(stringNum)\n ? {\n kind: Kind.INT,\n value: stringNum,\n }\n : {\n kind: Kind.FLOAT,\n value: stringNum,\n };\n }\n\n if (typeof serialized === 'string') {\n // Enum types use Enum literals.\n if (isEnumType(type)) {\n return {\n kind: Kind.ENUM,\n value: serialized,\n };\n } // ID types can use Int literals.\n\n if (type === GraphQLID && integerStringRegExp.test(serialized)) {\n return {\n kind: Kind.INT,\n value: serialized,\n };\n }\n\n return {\n kind: Kind.STRING,\n value: serialized,\n };\n }\n\n throw new TypeError(`Cannot convert value to AST: ${inspect(serialized)}.`);\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible types have been considered.\n\n false || invariant(false, 'Unexpected input type: ' + inspect(type));\n}\n/**\n * IntValue:\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit ( Digit+ )?\n */\n\nconst integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/;\n","import { inspect } from '../jsutils/inspect.mjs';\nimport { invariant } from '../jsutils/invariant.mjs';\nimport { DirectiveLocation } from '../language/directiveLocation.mjs';\nimport { print } from '../language/printer.mjs';\nimport { astFromValue } from '../utilities/astFromValue.mjs';\nimport {\n GraphQLEnumType,\n GraphQLList,\n GraphQLNonNull,\n GraphQLObjectType,\n isAbstractType,\n isEnumType,\n isInputObjectType,\n isInterfaceType,\n isListType,\n isNonNullType,\n isObjectType,\n isScalarType,\n isUnionType,\n} from './definition.mjs';\nimport { GraphQLBoolean, GraphQLString } from './scalars.mjs';\nexport const __Schema = new GraphQLObjectType({\n name: '__Schema',\n description:\n 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.',\n fields: () => ({\n description: {\n type: GraphQLString,\n resolve: (schema) => schema.description,\n },\n types: {\n description: 'A list of all types supported by this server.',\n type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Type))),\n\n resolve(schema) {\n return Object.values(schema.getTypeMap());\n },\n },\n queryType: {\n description: 'The type that query operations will be rooted at.',\n type: new GraphQLNonNull(__Type),\n resolve: (schema) => schema.getQueryType(),\n },\n mutationType: {\n description:\n 'If this server supports mutation, the type that mutation operations will be rooted at.',\n type: __Type,\n resolve: (schema) => schema.getMutationType(),\n },\n subscriptionType: {\n description:\n 'If this server support subscription, the type that subscription operations will be rooted at.',\n type: __Type,\n resolve: (schema) => schema.getSubscriptionType(),\n },\n directives: {\n description: 'A list of all directives supported by this server.',\n type: new GraphQLNonNull(\n new GraphQLList(new GraphQLNonNull(__Directive)),\n ),\n resolve: (schema) => schema.getDirectives(),\n },\n }),\n});\nexport const __Directive = new GraphQLObjectType({\n name: '__Directive',\n description:\n \"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\\n\\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.\",\n fields: () => ({\n name: {\n type: new GraphQLNonNull(GraphQLString),\n resolve: (directive) => directive.name,\n },\n description: {\n type: GraphQLString,\n resolve: (directive) => directive.description,\n },\n isRepeatable: {\n type: new GraphQLNonNull(GraphQLBoolean),\n resolve: (directive) => directive.isRepeatable,\n },\n locations: {\n type: new GraphQLNonNull(\n new GraphQLList(new GraphQLNonNull(__DirectiveLocation)),\n ),\n resolve: (directive) => directive.locations,\n },\n args: {\n type: new GraphQLNonNull(\n new GraphQLList(new GraphQLNonNull(__InputValue)),\n ),\n args: {\n includeDeprecated: {\n type: GraphQLBoolean,\n defaultValue: false,\n },\n },\n\n resolve(field, { includeDeprecated }) {\n return includeDeprecated\n ? field.args\n : field.args.filter((arg) => arg.deprecationReason == null);\n },\n },\n }),\n});\nexport const __DirectiveLocation = new GraphQLEnumType({\n name: '__DirectiveLocation',\n description:\n 'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.',\n values: {\n QUERY: {\n value: DirectiveLocation.QUERY,\n description: 'Location adjacent to a query operation.',\n },\n MUTATION: {\n value: DirectiveLocation.MUTATION,\n description: 'Location adjacent to a mutation operation.',\n },\n SUBSCRIPTION: {\n value: DirectiveLocation.SUBSCRIPTION,\n description: 'Location adjacent to a subscription operation.',\n },\n FIELD: {\n value: DirectiveLocation.FIELD,\n description: 'Location adjacent to a field.',\n },\n FRAGMENT_DEFINITION: {\n value: DirectiveLocation.FRAGMENT_DEFINITION,\n description: 'Location adjacent to a fragment definition.',\n },\n FRAGMENT_SPREAD: {\n value: DirectiveLocation.FRAGMENT_SPREAD,\n description: 'Location adjacent to a fragment spread.',\n },\n INLINE_FRAGMENT: {\n value: DirectiveLocation.INLINE_FRAGMENT,\n description: 'Location adjacent to an inline fragment.',\n },\n VARIABLE_DEFINITION: {\n value: DirectiveLocation.VARIABLE_DEFINITION,\n description: 'Location adjacent to a variable definition.',\n },\n SCHEMA: {\n value: DirectiveLocation.SCHEMA,\n description: 'Location adjacent to a schema definition.',\n },\n SCALAR: {\n value: DirectiveLocation.SCALAR,\n description: 'Location adjacent to a scalar definition.',\n },\n OBJECT: {\n value: DirectiveLocation.OBJECT,\n description: 'Location adjacent to an object type definition.',\n },\n FIELD_DEFINITION: {\n value: DirectiveLocation.FIELD_DEFINITION,\n description: 'Location adjacent to a field definition.',\n },\n ARGUMENT_DEFINITION: {\n value: DirectiveLocation.ARGUMENT_DEFINITION,\n description: 'Location adjacent to an argument definition.',\n },\n INTERFACE: {\n value: DirectiveLocation.INTERFACE,\n description: 'Location adjacent to an interface definition.',\n },\n UNION: {\n value: DirectiveLocation.UNION,\n description: 'Location adjacent to a union definition.',\n },\n ENUM: {\n value: DirectiveLocation.ENUM,\n description: 'Location adjacent to an enum definition.',\n },\n ENUM_VALUE: {\n value: DirectiveLocation.ENUM_VALUE,\n description: 'Location adjacent to an enum value definition.',\n },\n INPUT_OBJECT: {\n value: DirectiveLocation.INPUT_OBJECT,\n description: 'Location adjacent to an input object type definition.',\n },\n INPUT_FIELD_DEFINITION: {\n value: DirectiveLocation.INPUT_FIELD_DEFINITION,\n description: 'Location adjacent to an input object field definition.',\n },\n },\n});\nexport const __Type = new GraphQLObjectType({\n name: '__Type',\n description:\n 'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\\n\\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.',\n fields: () => ({\n kind: {\n type: new GraphQLNonNull(__TypeKind),\n\n resolve(type) {\n if (isScalarType(type)) {\n return TypeKind.SCALAR;\n }\n\n if (isObjectType(type)) {\n return TypeKind.OBJECT;\n }\n\n if (isInterfaceType(type)) {\n return TypeKind.INTERFACE;\n }\n\n if (isUnionType(type)) {\n return TypeKind.UNION;\n }\n\n if (isEnumType(type)) {\n return TypeKind.ENUM;\n }\n\n if (isInputObjectType(type)) {\n return TypeKind.INPUT_OBJECT;\n }\n\n if (isListType(type)) {\n return TypeKind.LIST;\n }\n\n if (isNonNullType(type)) {\n return TypeKind.NON_NULL;\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible types have been considered)\n\n false || invariant(false, `Unexpected type: \"${inspect(type)}\".`);\n },\n },\n name: {\n type: GraphQLString,\n resolve: (type) => ('name' in type ? type.name : undefined),\n },\n description: {\n type: GraphQLString,\n resolve: (\n type, // FIXME: add test case\n ) =>\n /* c8 ignore next */\n 'description' in type ? type.description : undefined,\n },\n specifiedByURL: {\n type: GraphQLString,\n resolve: (obj) =>\n 'specifiedByURL' in obj ? obj.specifiedByURL : undefined,\n },\n fields: {\n type: new GraphQLList(new GraphQLNonNull(__Field)),\n args: {\n includeDeprecated: {\n type: GraphQLBoolean,\n defaultValue: false,\n },\n },\n\n resolve(type, { includeDeprecated }) {\n if (isObjectType(type) || isInterfaceType(type)) {\n const fields = Object.values(type.getFields());\n return includeDeprecated\n ? fields\n : fields.filter((field) => field.deprecationReason == null);\n }\n },\n },\n interfaces: {\n type: new GraphQLList(new GraphQLNonNull(__Type)),\n\n resolve(type) {\n if (isObjectType(type) || isInterfaceType(type)) {\n return type.getInterfaces();\n }\n },\n },\n possibleTypes: {\n type: new GraphQLList(new GraphQLNonNull(__Type)),\n\n resolve(type, _args, _context, { schema }) {\n if (isAbstractType(type)) {\n return schema.getPossibleTypes(type);\n }\n },\n },\n enumValues: {\n type: new GraphQLList(new GraphQLNonNull(__EnumValue)),\n args: {\n includeDeprecated: {\n type: GraphQLBoolean,\n defaultValue: false,\n },\n },\n\n resolve(type, { includeDeprecated }) {\n if (isEnumType(type)) {\n const values = type.getValues();\n return includeDeprecated\n ? values\n : values.filter((field) => field.deprecationReason == null);\n }\n },\n },\n inputFields: {\n type: new GraphQLList(new GraphQLNonNull(__InputValue)),\n args: {\n includeDeprecated: {\n type: GraphQLBoolean,\n defaultValue: false,\n },\n },\n\n resolve(type, { includeDeprecated }) {\n if (isInputObjectType(type)) {\n const values = Object.values(type.getFields());\n return includeDeprecated\n ? values\n : values.filter((field) => field.deprecationReason == null);\n }\n },\n },\n ofType: {\n type: __Type,\n resolve: (type) => ('ofType' in type ? type.ofType : undefined),\n },\n }),\n});\nexport const __Field = new GraphQLObjectType({\n name: '__Field',\n description:\n 'Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.',\n fields: () => ({\n name: {\n type: new GraphQLNonNull(GraphQLString),\n resolve: (field) => field.name,\n },\n description: {\n type: GraphQLString,\n resolve: (field) => field.description,\n },\n args: {\n type: new GraphQLNonNull(\n new GraphQLList(new GraphQLNonNull(__InputValue)),\n ),\n args: {\n includeDeprecated: {\n type: GraphQLBoolean,\n defaultValue: false,\n },\n },\n\n resolve(field, { includeDeprecated }) {\n return includeDeprecated\n ? field.args\n : field.args.filter((arg) => arg.deprecationReason == null);\n },\n },\n type: {\n type: new GraphQLNonNull(__Type),\n resolve: (field) => field.type,\n },\n isDeprecated: {\n type: new GraphQLNonNull(GraphQLBoolean),\n resolve: (field) => field.deprecationReason != null,\n },\n deprecationReason: {\n type: GraphQLString,\n resolve: (field) => field.deprecationReason,\n },\n }),\n});\nexport const __InputValue = new GraphQLObjectType({\n name: '__InputValue',\n description:\n 'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.',\n fields: () => ({\n name: {\n type: new GraphQLNonNull(GraphQLString),\n resolve: (inputValue) => inputValue.name,\n },\n description: {\n type: GraphQLString,\n resolve: (inputValue) => inputValue.description,\n },\n type: {\n type: new GraphQLNonNull(__Type),\n resolve: (inputValue) => inputValue.type,\n },\n defaultValue: {\n type: GraphQLString,\n description:\n 'A GraphQL-formatted string representing the default value for this input value.',\n\n resolve(inputValue) {\n const { type, defaultValue } = inputValue;\n const valueAST = astFromValue(defaultValue, type);\n return valueAST ? print(valueAST) : null;\n },\n },\n isDeprecated: {\n type: new GraphQLNonNull(GraphQLBoolean),\n resolve: (field) => field.deprecationReason != null,\n },\n deprecationReason: {\n type: GraphQLString,\n resolve: (obj) => obj.deprecationReason,\n },\n }),\n});\nexport const __EnumValue = new GraphQLObjectType({\n name: '__EnumValue',\n description:\n 'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.',\n fields: () => ({\n name: {\n type: new GraphQLNonNull(GraphQLString),\n resolve: (enumValue) => enumValue.name,\n },\n description: {\n type: GraphQLString,\n resolve: (enumValue) => enumValue.description,\n },\n isDeprecated: {\n type: new GraphQLNonNull(GraphQLBoolean),\n resolve: (enumValue) => enumValue.deprecationReason != null,\n },\n deprecationReason: {\n type: GraphQLString,\n resolve: (enumValue) => enumValue.deprecationReason,\n },\n }),\n});\nvar TypeKind;\n\n(function (TypeKind) {\n TypeKind['SCALAR'] = 'SCALAR';\n TypeKind['OBJECT'] = 'OBJECT';\n TypeKind['INTERFACE'] = 'INTERFACE';\n TypeKind['UNION'] = 'UNION';\n TypeKind['ENUM'] = 'ENUM';\n TypeKind['INPUT_OBJECT'] = 'INPUT_OBJECT';\n TypeKind['LIST'] = 'LIST';\n TypeKind['NON_NULL'] = 'NON_NULL';\n})(TypeKind || (TypeKind = {}));\n\nexport { TypeKind };\nexport const __TypeKind = new GraphQLEnumType({\n name: '__TypeKind',\n description: 'An enum describing what kind of type a given `__Type` is.',\n values: {\n SCALAR: {\n value: TypeKind.SCALAR,\n description: 'Indicates this type is a scalar.',\n },\n OBJECT: {\n value: TypeKind.OBJECT,\n description:\n 'Indicates this type is an object. `fields` and `interfaces` are valid fields.',\n },\n INTERFACE: {\n value: TypeKind.INTERFACE,\n description:\n 'Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.',\n },\n UNION: {\n value: TypeKind.UNION,\n description:\n 'Indicates this type is a union. `possibleTypes` is a valid field.',\n },\n ENUM: {\n value: TypeKind.ENUM,\n description:\n 'Indicates this type is an enum. `enumValues` is a valid field.',\n },\n INPUT_OBJECT: {\n value: TypeKind.INPUT_OBJECT,\n description:\n 'Indicates this type is an input object. `inputFields` is a valid field.',\n },\n LIST: {\n value: TypeKind.LIST,\n description: 'Indicates this type is a list. `ofType` is a valid field.',\n },\n NON_NULL: {\n value: TypeKind.NON_NULL,\n description:\n 'Indicates this type is a non-null. `ofType` is a valid field.',\n },\n },\n});\n/**\n * Note that these are GraphQLField and not GraphQLFieldConfig,\n * so the format for args is different.\n */\n\nexport const SchemaMetaFieldDef = {\n name: '__schema',\n type: new GraphQLNonNull(__Schema),\n description: 'Access the current type schema of this server.',\n args: [],\n resolve: (_source, _args, _context, { schema }) => schema,\n deprecationReason: undefined,\n extensions: Object.create(null),\n astNode: undefined,\n};\nexport const TypeMetaFieldDef = {\n name: '__type',\n type: __Type,\n description: 'Request the type information of a single type.',\n args: [\n {\n name: 'name',\n description: undefined,\n type: new GraphQLNonNull(GraphQLString),\n defaultValue: undefined,\n deprecationReason: undefined,\n extensions: Object.create(null),\n astNode: undefined,\n },\n ],\n resolve: (_source, { name }, _context, { schema }) => schema.getType(name),\n deprecationReason: undefined,\n extensions: Object.create(null),\n astNode: undefined,\n};\nexport const TypeNameMetaFieldDef = {\n name: '__typename',\n type: new GraphQLNonNull(GraphQLString),\n description: 'The name of the current Object type at runtime.',\n args: [],\n resolve: (_source, _args, _context, { parentType }) => parentType.name,\n deprecationReason: undefined,\n extensions: Object.create(null),\n astNode: undefined,\n};\nexport const introspectionTypes = Object.freeze([\n __Schema,\n __Directive,\n __DirectiveLocation,\n __Type,\n __Field,\n __InputValue,\n __EnumValue,\n __TypeKind,\n]);\nexport function isIntrospectionType(type) {\n return introspectionTypes.some(({ name }) => type.name === name);\n}\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { instanceOf } from '../jsutils/instanceOf.mjs';\nimport { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { toObjMap } from '../jsutils/toObjMap.mjs';\nimport { OperationTypeNode } from '../language/ast.mjs';\nimport {\n getNamedType,\n isInputObjectType,\n isInterfaceType,\n isObjectType,\n isUnionType,\n} from './definition.mjs';\nimport { isDirective, specifiedDirectives } from './directives.mjs';\nimport { __Schema } from './introspection.mjs';\n/**\n * Test if the given value is a GraphQL schema.\n */\n\nexport function isSchema(schema) {\n return instanceOf(schema, GraphQLSchema);\n}\nexport function assertSchema(schema) {\n if (!isSchema(schema)) {\n throw new Error(`Expected ${inspect(schema)} to be a GraphQL schema.`);\n }\n\n return schema;\n}\n/**\n * Custom extensions\n *\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\n\n/**\n * Schema Definition\n *\n * A Schema is created by supplying the root types of each type of operation,\n * query and mutation (optional). A schema definition is then supplied to the\n * validator and executor.\n *\n * Example:\n *\n * ```ts\n * const MyAppSchema = new GraphQLSchema({\n * query: MyAppQueryRootType,\n * mutation: MyAppMutationRootType,\n * })\n * ```\n *\n * Note: When the schema is constructed, by default only the types that are\n * reachable by traversing the root types are included, other types must be\n * explicitly referenced.\n *\n * Example:\n *\n * ```ts\n * const characterInterface = new GraphQLInterfaceType({\n * name: 'Character',\n * ...\n * });\n *\n * const humanType = new GraphQLObjectType({\n * name: 'Human',\n * interfaces: [characterInterface],\n * ...\n * });\n *\n * const droidType = new GraphQLObjectType({\n * name: 'Droid',\n * interfaces: [characterInterface],\n * ...\n * });\n *\n * const schema = new GraphQLSchema({\n * query: new GraphQLObjectType({\n * name: 'Query',\n * fields: {\n * hero: { type: characterInterface, ... },\n * }\n * }),\n * ...\n * // Since this schema references only the `Character` interface it's\n * // necessary to explicitly list the types that implement it if\n * // you want them to be included in the final schema.\n * types: [humanType, droidType],\n * })\n * ```\n *\n * Note: If an array of `directives` are provided to GraphQLSchema, that will be\n * the exact list of directives represented and allowed. If `directives` is not\n * provided then a default set of the specified directives (e.g. `@include` and\n * `@skip`) will be used. If you wish to provide *additional* directives to these\n * specified directives, you must explicitly declare them. Example:\n *\n * ```ts\n * const MyAppSchema = new GraphQLSchema({\n * ...\n * directives: specifiedDirectives.concat([ myCustomDirective ]),\n * })\n * ```\n */\nexport class GraphQLSchema {\n // Used as a cache for validateSchema().\n constructor(config) {\n var _config$extensionASTN, _config$directives;\n\n // If this schema was built from a source known to be valid, then it may be\n // marked with assumeValid to avoid an additional type system validation.\n this.__validationErrors = config.assumeValid === true ? [] : undefined; // Check for common mistakes during construction to produce early errors.\n\n isObjectLike(config) ||\n devAssert(false, 'Must provide configuration object.');\n !config.types ||\n Array.isArray(config.types) ||\n devAssert(\n false,\n `\"types\" must be Array if provided but got: ${inspect(config.types)}.`,\n );\n !config.directives ||\n Array.isArray(config.directives) ||\n devAssert(\n false,\n '\"directives\" must be Array if provided but got: ' +\n `${inspect(config.directives)}.`,\n );\n this.description = config.description;\n this.extensions = toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN = config.extensionASTNodes) !== null &&\n _config$extensionASTN !== void 0\n ? _config$extensionASTN\n : [];\n this._queryType = config.query;\n this._mutationType = config.mutation;\n this._subscriptionType = config.subscription; // Provide specified directives (e.g. @include and @skip) by default.\n\n this._directives =\n (_config$directives = config.directives) !== null &&\n _config$directives !== void 0\n ? _config$directives\n : specifiedDirectives; // To preserve order of user-provided types, we add first to add them to\n // the set of \"collected\" types, so `collectReferencedTypes` ignore them.\n\n const allReferencedTypes = new Set(config.types);\n\n if (config.types != null) {\n for (const type of config.types) {\n // When we ready to process this type, we remove it from \"collected\" types\n // and then add it together with all dependent types in the correct position.\n allReferencedTypes.delete(type);\n collectReferencedTypes(type, allReferencedTypes);\n }\n }\n\n if (this._queryType != null) {\n collectReferencedTypes(this._queryType, allReferencedTypes);\n }\n\n if (this._mutationType != null) {\n collectReferencedTypes(this._mutationType, allReferencedTypes);\n }\n\n if (this._subscriptionType != null) {\n collectReferencedTypes(this._subscriptionType, allReferencedTypes);\n }\n\n for (const directive of this._directives) {\n // Directives are not validated until validateSchema() is called.\n if (isDirective(directive)) {\n for (const arg of directive.args) {\n collectReferencedTypes(arg.type, allReferencedTypes);\n }\n }\n }\n\n collectReferencedTypes(__Schema, allReferencedTypes); // Storing the resulting map for reference by the schema.\n\n this._typeMap = Object.create(null);\n this._subTypeMap = Object.create(null); // Keep track of all implementations by interface name.\n\n this._implementationsMap = Object.create(null);\n\n for (const namedType of allReferencedTypes) {\n if (namedType == null) {\n continue;\n }\n\n const typeName = namedType.name;\n typeName ||\n devAssert(\n false,\n 'One of the provided types for building the Schema is missing a name.',\n );\n\n if (this._typeMap[typeName] !== undefined) {\n throw new Error(\n `Schema must contain uniquely named types but contains multiple types named \"${typeName}\".`,\n );\n }\n\n this._typeMap[typeName] = namedType;\n\n if (isInterfaceType(namedType)) {\n // Store implementations by interface.\n for (const iface of namedType.getInterfaces()) {\n if (isInterfaceType(iface)) {\n let implementations = this._implementationsMap[iface.name];\n\n if (implementations === undefined) {\n implementations = this._implementationsMap[iface.name] = {\n objects: [],\n interfaces: [],\n };\n }\n\n implementations.interfaces.push(namedType);\n }\n }\n } else if (isObjectType(namedType)) {\n // Store implementations by objects.\n for (const iface of namedType.getInterfaces()) {\n if (isInterfaceType(iface)) {\n let implementations = this._implementationsMap[iface.name];\n\n if (implementations === undefined) {\n implementations = this._implementationsMap[iface.name] = {\n objects: [],\n interfaces: [],\n };\n }\n\n implementations.objects.push(namedType);\n }\n }\n }\n }\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLSchema';\n }\n\n getQueryType() {\n return this._queryType;\n }\n\n getMutationType() {\n return this._mutationType;\n }\n\n getSubscriptionType() {\n return this._subscriptionType;\n }\n\n getRootType(operation) {\n switch (operation) {\n case OperationTypeNode.QUERY:\n return this.getQueryType();\n\n case OperationTypeNode.MUTATION:\n return this.getMutationType();\n\n case OperationTypeNode.SUBSCRIPTION:\n return this.getSubscriptionType();\n }\n }\n\n getTypeMap() {\n return this._typeMap;\n }\n\n getType(name) {\n return this.getTypeMap()[name];\n }\n\n getPossibleTypes(abstractType) {\n return isUnionType(abstractType)\n ? abstractType.getTypes()\n : this.getImplementations(abstractType).objects;\n }\n\n getImplementations(interfaceType) {\n const implementations = this._implementationsMap[interfaceType.name];\n return implementations !== null && implementations !== void 0\n ? implementations\n : {\n objects: [],\n interfaces: [],\n };\n }\n\n isSubType(abstractType, maybeSubType) {\n let map = this._subTypeMap[abstractType.name];\n\n if (map === undefined) {\n map = Object.create(null);\n\n if (isUnionType(abstractType)) {\n for (const type of abstractType.getTypes()) {\n map[type.name] = true;\n }\n } else {\n const implementations = this.getImplementations(abstractType);\n\n for (const type of implementations.objects) {\n map[type.name] = true;\n }\n\n for (const type of implementations.interfaces) {\n map[type.name] = true;\n }\n }\n\n this._subTypeMap[abstractType.name] = map;\n }\n\n return map[maybeSubType.name] !== undefined;\n }\n\n getDirectives() {\n return this._directives;\n }\n\n getDirective(name) {\n return this.getDirectives().find((directive) => directive.name === name);\n }\n\n toConfig() {\n return {\n description: this.description,\n query: this.getQueryType(),\n mutation: this.getMutationType(),\n subscription: this.getSubscriptionType(),\n types: Object.values(this.getTypeMap()),\n directives: this.getDirectives(),\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n assumeValid: this.__validationErrors !== undefined,\n };\n }\n}\n\nfunction collectReferencedTypes(type, typeSet) {\n const namedType = getNamedType(type);\n\n if (!typeSet.has(namedType)) {\n typeSet.add(namedType);\n\n if (isUnionType(namedType)) {\n for (const memberType of namedType.getTypes()) {\n collectReferencedTypes(memberType, typeSet);\n }\n } else if (isObjectType(namedType) || isInterfaceType(namedType)) {\n for (const interfaceType of namedType.getInterfaces()) {\n collectReferencedTypes(interfaceType, typeSet);\n }\n\n for (const field of Object.values(namedType.getFields())) {\n collectReferencedTypes(field.type, typeSet);\n\n for (const arg of field.args) {\n collectReferencedTypes(arg.type, typeSet);\n }\n }\n } else if (isInputObjectType(namedType)) {\n for (const field of Object.values(namedType.getFields())) {\n collectReferencedTypes(field.type, typeSet);\n }\n }\n }\n\n return typeSet;\n}\n","import { inspect } from '../jsutils/inspect.mjs';\nimport { GraphQLError } from '../error/GraphQLError.mjs';\nimport { OperationTypeNode } from '../language/ast.mjs';\nimport { isEqualType, isTypeSubTypeOf } from '../utilities/typeComparators.mjs';\nimport {\n isEnumType,\n isInputObjectType,\n isInputType,\n isInterfaceType,\n isNamedType,\n isNonNullType,\n isObjectType,\n isOutputType,\n isRequiredArgument,\n isRequiredInputField,\n isUnionType,\n} from './definition.mjs';\nimport { GraphQLDeprecatedDirective, isDirective } from './directives.mjs';\nimport { isIntrospectionType } from './introspection.mjs';\nimport { assertSchema } from './schema.mjs';\n/**\n * Implements the \"Type Validation\" sub-sections of the specification's\n * \"Type System\" section.\n *\n * Validation runs synchronously, returning an array of encountered errors, or\n * an empty array if no errors were encountered and the Schema is valid.\n */\n\nexport function validateSchema(schema) {\n // First check to ensure the provided value is in fact a GraphQLSchema.\n assertSchema(schema); // If this Schema has already been validated, return the previous results.\n\n if (schema.__validationErrors) {\n return schema.__validationErrors;\n } // Validate the schema, producing a list of errors.\n\n const context = new SchemaValidationContext(schema);\n validateRootTypes(context);\n validateDirectives(context);\n validateTypes(context); // Persist the results of validation before returning to ensure validation\n // does not run multiple times for this schema.\n\n const errors = context.getErrors();\n schema.__validationErrors = errors;\n return errors;\n}\n/**\n * Utility function which asserts a schema is valid by throwing an error if\n * it is invalid.\n */\n\nexport function assertValidSchema(schema) {\n const errors = validateSchema(schema);\n\n if (errors.length !== 0) {\n throw new Error(errors.map((error) => error.message).join('\\n\\n'));\n }\n}\n\nclass SchemaValidationContext {\n constructor(schema) {\n this._errors = [];\n this.schema = schema;\n }\n\n reportError(message, nodes) {\n const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes;\n\n this._errors.push(\n new GraphQLError(message, {\n nodes: _nodes,\n }),\n );\n }\n\n getErrors() {\n return this._errors;\n }\n}\n\nfunction validateRootTypes(context) {\n const schema = context.schema;\n const queryType = schema.getQueryType();\n\n if (!queryType) {\n context.reportError('Query root type must be provided.', schema.astNode);\n } else if (!isObjectType(queryType)) {\n var _getOperationTypeNode;\n\n context.reportError(\n `Query root type must be Object type, it cannot be ${inspect(\n queryType,\n )}.`,\n (_getOperationTypeNode = getOperationTypeNode(\n schema,\n OperationTypeNode.QUERY,\n )) !== null && _getOperationTypeNode !== void 0\n ? _getOperationTypeNode\n : queryType.astNode,\n );\n }\n\n const mutationType = schema.getMutationType();\n\n if (mutationType && !isObjectType(mutationType)) {\n var _getOperationTypeNode2;\n\n context.reportError(\n 'Mutation root type must be Object type if provided, it cannot be ' +\n `${inspect(mutationType)}.`,\n (_getOperationTypeNode2 = getOperationTypeNode(\n schema,\n OperationTypeNode.MUTATION,\n )) !== null && _getOperationTypeNode2 !== void 0\n ? _getOperationTypeNode2\n : mutationType.astNode,\n );\n }\n\n const subscriptionType = schema.getSubscriptionType();\n\n if (subscriptionType && !isObjectType(subscriptionType)) {\n var _getOperationTypeNode3;\n\n context.reportError(\n 'Subscription root type must be Object type if provided, it cannot be ' +\n `${inspect(subscriptionType)}.`,\n (_getOperationTypeNode3 = getOperationTypeNode(\n schema,\n OperationTypeNode.SUBSCRIPTION,\n )) !== null && _getOperationTypeNode3 !== void 0\n ? _getOperationTypeNode3\n : subscriptionType.astNode,\n );\n }\n}\n\nfunction getOperationTypeNode(schema, operation) {\n var _flatMap$find;\n\n return (_flatMap$find = [schema.astNode, ...schema.extensionASTNodes]\n .flatMap(\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n (schemaNode) => {\n var _schemaNode$operation;\n\n return (\n /* c8 ignore next */\n (_schemaNode$operation =\n schemaNode === null || schemaNode === void 0\n ? void 0\n : schemaNode.operationTypes) !== null &&\n _schemaNode$operation !== void 0\n ? _schemaNode$operation\n : []\n );\n },\n )\n .find((operationNode) => operationNode.operation === operation)) === null ||\n _flatMap$find === void 0\n ? void 0\n : _flatMap$find.type;\n}\n\nfunction validateDirectives(context) {\n for (const directive of context.schema.getDirectives()) {\n // Ensure all directives are in fact GraphQL directives.\n if (!isDirective(directive)) {\n context.reportError(\n `Expected directive but got: ${inspect(directive)}.`,\n directive === null || directive === void 0 ? void 0 : directive.astNode,\n );\n continue;\n } // Ensure they are named correctly.\n\n validateName(context, directive); // TODO: Ensure proper locations.\n // Ensure the arguments are valid.\n\n for (const arg of directive.args) {\n // Ensure they are named correctly.\n validateName(context, arg); // Ensure the type is an input type.\n\n if (!isInputType(arg.type)) {\n context.reportError(\n `The type of @${directive.name}(${arg.name}:) must be Input Type ` +\n `but got: ${inspect(arg.type)}.`,\n arg.astNode,\n );\n }\n\n if (isRequiredArgument(arg) && arg.deprecationReason != null) {\n var _arg$astNode;\n\n context.reportError(\n `Required argument @${directive.name}(${arg.name}:) cannot be deprecated.`,\n [\n getDeprecatedDirectiveNode(arg.astNode),\n (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0\n ? void 0\n : _arg$astNode.type,\n ],\n );\n }\n }\n }\n}\n\nfunction validateName(context, node) {\n // Ensure names are valid, however introspection types opt out.\n if (node.name.startsWith('__')) {\n context.reportError(\n `Name \"${node.name}\" must not begin with \"__\", which is reserved by GraphQL introspection.`,\n node.astNode,\n );\n }\n}\n\nfunction validateTypes(context) {\n const validateInputObjectCircularRefs =\n createInputObjectCircularRefsValidator(context);\n const typeMap = context.schema.getTypeMap();\n\n for (const type of Object.values(typeMap)) {\n // Ensure all provided types are in fact GraphQL type.\n if (!isNamedType(type)) {\n context.reportError(\n `Expected GraphQL named type but got: ${inspect(type)}.`,\n type.astNode,\n );\n continue;\n } // Ensure it is named correctly (excluding introspection types).\n\n if (!isIntrospectionType(type)) {\n validateName(context, type);\n }\n\n if (isObjectType(type)) {\n // Ensure fields are valid\n validateFields(context, type); // Ensure objects implement the interfaces they claim to.\n\n validateInterfaces(context, type);\n } else if (isInterfaceType(type)) {\n // Ensure fields are valid.\n validateFields(context, type); // Ensure interfaces implement the interfaces they claim to.\n\n validateInterfaces(context, type);\n } else if (isUnionType(type)) {\n // Ensure Unions include valid member types.\n validateUnionMembers(context, type);\n } else if (isEnumType(type)) {\n // Ensure Enums have valid values.\n validateEnumValues(context, type);\n } else if (isInputObjectType(type)) {\n // Ensure Input Object fields are valid.\n validateInputFields(context, type); // Ensure Input Objects do not contain non-nullable circular references\n\n validateInputObjectCircularRefs(type);\n }\n }\n}\n\nfunction validateFields(context, type) {\n const fields = Object.values(type.getFields()); // Objects and Interfaces both must define one or more fields.\n\n if (fields.length === 0) {\n context.reportError(`Type ${type.name} must define one or more fields.`, [\n type.astNode,\n ...type.extensionASTNodes,\n ]);\n }\n\n for (const field of fields) {\n // Ensure they are named correctly.\n validateName(context, field); // Ensure the type is an output type\n\n if (!isOutputType(field.type)) {\n var _field$astNode;\n\n context.reportError(\n `The type of ${type.name}.${field.name} must be Output Type ` +\n `but got: ${inspect(field.type)}.`,\n (_field$astNode = field.astNode) === null || _field$astNode === void 0\n ? void 0\n : _field$astNode.type,\n );\n } // Ensure the arguments are valid\n\n for (const arg of field.args) {\n const argName = arg.name; // Ensure they are named correctly.\n\n validateName(context, arg); // Ensure the type is an input type\n\n if (!isInputType(arg.type)) {\n var _arg$astNode2;\n\n context.reportError(\n `The type of ${type.name}.${field.name}(${argName}:) must be Input ` +\n `Type but got: ${inspect(arg.type)}.`,\n (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0\n ? void 0\n : _arg$astNode2.type,\n );\n }\n\n if (isRequiredArgument(arg) && arg.deprecationReason != null) {\n var _arg$astNode3;\n\n context.reportError(\n `Required argument ${type.name}.${field.name}(${argName}:) cannot be deprecated.`,\n [\n getDeprecatedDirectiveNode(arg.astNode),\n (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0\n ? void 0\n : _arg$astNode3.type,\n ],\n );\n }\n }\n }\n}\n\nfunction validateInterfaces(context, type) {\n const ifaceTypeNames = Object.create(null);\n\n for (const iface of type.getInterfaces()) {\n if (!isInterfaceType(iface)) {\n context.reportError(\n `Type ${inspect(type)} must only implement Interface types, ` +\n `it cannot implement ${inspect(iface)}.`,\n getAllImplementsInterfaceNodes(type, iface),\n );\n continue;\n }\n\n if (type === iface) {\n context.reportError(\n `Type ${type.name} cannot implement itself because it would create a circular reference.`,\n getAllImplementsInterfaceNodes(type, iface),\n );\n continue;\n }\n\n if (ifaceTypeNames[iface.name]) {\n context.reportError(\n `Type ${type.name} can only implement ${iface.name} once.`,\n getAllImplementsInterfaceNodes(type, iface),\n );\n continue;\n }\n\n ifaceTypeNames[iface.name] = true;\n validateTypeImplementsAncestors(context, type, iface);\n validateTypeImplementsInterface(context, type, iface);\n }\n}\n\nfunction validateTypeImplementsInterface(context, type, iface) {\n const typeFieldMap = type.getFields(); // Assert each interface field is implemented.\n\n for (const ifaceField of Object.values(iface.getFields())) {\n const fieldName = ifaceField.name;\n const typeField = typeFieldMap[fieldName]; // Assert interface field exists on type.\n\n if (!typeField) {\n context.reportError(\n `Interface field ${iface.name}.${fieldName} expected but ${type.name} does not provide it.`,\n [ifaceField.astNode, type.astNode, ...type.extensionASTNodes],\n );\n continue;\n } // Assert interface field type is satisfied by type field type, by being\n // a valid subtype. (covariant)\n\n if (!isTypeSubTypeOf(context.schema, typeField.type, ifaceField.type)) {\n var _ifaceField$astNode, _typeField$astNode;\n\n context.reportError(\n `Interface field ${iface.name}.${fieldName} expects type ` +\n `${inspect(ifaceField.type)} but ${type.name}.${fieldName} ` +\n `is type ${inspect(typeField.type)}.`,\n [\n (_ifaceField$astNode = ifaceField.astNode) === null ||\n _ifaceField$astNode === void 0\n ? void 0\n : _ifaceField$astNode.type,\n (_typeField$astNode = typeField.astNode) === null ||\n _typeField$astNode === void 0\n ? void 0\n : _typeField$astNode.type,\n ],\n );\n } // Assert each interface field arg is implemented.\n\n for (const ifaceArg of ifaceField.args) {\n const argName = ifaceArg.name;\n const typeArg = typeField.args.find((arg) => arg.name === argName); // Assert interface field arg exists on object field.\n\n if (!typeArg) {\n context.reportError(\n `Interface field argument ${iface.name}.${fieldName}(${argName}:) expected but ${type.name}.${fieldName} does not provide it.`,\n [ifaceArg.astNode, typeField.astNode],\n );\n continue;\n } // Assert interface field arg type matches object field arg type.\n // (invariant)\n // TODO: change to contravariant?\n\n if (!isEqualType(ifaceArg.type, typeArg.type)) {\n var _ifaceArg$astNode, _typeArg$astNode;\n\n context.reportError(\n `Interface field argument ${iface.name}.${fieldName}(${argName}:) ` +\n `expects type ${inspect(ifaceArg.type)} but ` +\n `${type.name}.${fieldName}(${argName}:) is type ` +\n `${inspect(typeArg.type)}.`,\n [\n (_ifaceArg$astNode = ifaceArg.astNode) === null ||\n _ifaceArg$astNode === void 0\n ? void 0\n : _ifaceArg$astNode.type,\n (_typeArg$astNode = typeArg.astNode) === null ||\n _typeArg$astNode === void 0\n ? void 0\n : _typeArg$astNode.type,\n ],\n );\n } // TODO: validate default values?\n } // Assert additional arguments must not be required.\n\n for (const typeArg of typeField.args) {\n const argName = typeArg.name;\n const ifaceArg = ifaceField.args.find((arg) => arg.name === argName);\n\n if (!ifaceArg && isRequiredArgument(typeArg)) {\n context.reportError(\n `Object field ${type.name}.${fieldName} includes required argument ${argName} that is missing from the Interface field ${iface.name}.${fieldName}.`,\n [typeArg.astNode, ifaceField.astNode],\n );\n }\n }\n }\n}\n\nfunction validateTypeImplementsAncestors(context, type, iface) {\n const ifaceInterfaces = type.getInterfaces();\n\n for (const transitive of iface.getInterfaces()) {\n if (!ifaceInterfaces.includes(transitive)) {\n context.reportError(\n transitive === type\n ? `Type ${type.name} cannot implement ${iface.name} because it would create a circular reference.`\n : `Type ${type.name} must implement ${transitive.name} because it is implemented by ${iface.name}.`,\n [\n ...getAllImplementsInterfaceNodes(iface, transitive),\n ...getAllImplementsInterfaceNodes(type, iface),\n ],\n );\n }\n }\n}\n\nfunction validateUnionMembers(context, union) {\n const memberTypes = union.getTypes();\n\n if (memberTypes.length === 0) {\n context.reportError(\n `Union type ${union.name} must define one or more member types.`,\n [union.astNode, ...union.extensionASTNodes],\n );\n }\n\n const includedTypeNames = Object.create(null);\n\n for (const memberType of memberTypes) {\n if (includedTypeNames[memberType.name]) {\n context.reportError(\n `Union type ${union.name} can only include type ${memberType.name} once.`,\n getUnionMemberTypeNodes(union, memberType.name),\n );\n continue;\n }\n\n includedTypeNames[memberType.name] = true;\n\n if (!isObjectType(memberType)) {\n context.reportError(\n `Union type ${union.name} can only include Object types, ` +\n `it cannot include ${inspect(memberType)}.`,\n getUnionMemberTypeNodes(union, String(memberType)),\n );\n }\n }\n}\n\nfunction validateEnumValues(context, enumType) {\n const enumValues = enumType.getValues();\n\n if (enumValues.length === 0) {\n context.reportError(\n `Enum type ${enumType.name} must define one or more values.`,\n [enumType.astNode, ...enumType.extensionASTNodes],\n );\n }\n\n for (const enumValue of enumValues) {\n // Ensure valid name.\n validateName(context, enumValue);\n }\n}\n\nfunction validateInputFields(context, inputObj) {\n const fields = Object.values(inputObj.getFields());\n\n if (fields.length === 0) {\n context.reportError(\n `Input Object type ${inputObj.name} must define one or more fields.`,\n [inputObj.astNode, ...inputObj.extensionASTNodes],\n );\n } // Ensure the arguments are valid\n\n for (const field of fields) {\n // Ensure they are named correctly.\n validateName(context, field); // Ensure the type is an input type\n\n if (!isInputType(field.type)) {\n var _field$astNode2;\n\n context.reportError(\n `The type of ${inputObj.name}.${field.name} must be Input Type ` +\n `but got: ${inspect(field.type)}.`,\n (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0\n ? void 0\n : _field$astNode2.type,\n );\n }\n\n if (isRequiredInputField(field) && field.deprecationReason != null) {\n var _field$astNode3;\n\n context.reportError(\n `Required input field ${inputObj.name}.${field.name} cannot be deprecated.`,\n [\n getDeprecatedDirectiveNode(field.astNode),\n (_field$astNode3 = field.astNode) === null ||\n _field$astNode3 === void 0\n ? void 0\n : _field$astNode3.type,\n ],\n );\n }\n }\n}\n\nfunction createInputObjectCircularRefsValidator(context) {\n // Modified copy of algorithm from 'src/validation/rules/NoFragmentCycles.js'.\n // Tracks already visited types to maintain O(N) and to ensure that cycles\n // are not redundantly reported.\n const visitedTypes = Object.create(null); // Array of types nodes used to produce meaningful errors\n\n const fieldPath = []; // Position in the type path\n\n const fieldPathIndexByTypeName = Object.create(null);\n return detectCycleRecursive; // This does a straight-forward DFS to find cycles.\n // It does not terminate when a cycle was found but continues to explore\n // the graph to find all possible cycles.\n\n function detectCycleRecursive(inputObj) {\n if (visitedTypes[inputObj.name]) {\n return;\n }\n\n visitedTypes[inputObj.name] = true;\n fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;\n const fields = Object.values(inputObj.getFields());\n\n for (const field of fields) {\n if (isNonNullType(field.type) && isInputObjectType(field.type.ofType)) {\n const fieldType = field.type.ofType;\n const cycleIndex = fieldPathIndexByTypeName[fieldType.name];\n fieldPath.push(field);\n\n if (cycleIndex === undefined) {\n detectCycleRecursive(fieldType);\n } else {\n const cyclePath = fieldPath.slice(cycleIndex);\n const pathStr = cyclePath.map((fieldObj) => fieldObj.name).join('.');\n context.reportError(\n `Cannot reference Input Object \"${fieldType.name}\" within itself through a series of non-null fields: \"${pathStr}\".`,\n cyclePath.map((fieldObj) => fieldObj.astNode),\n );\n }\n\n fieldPath.pop();\n }\n }\n\n fieldPathIndexByTypeName[inputObj.name] = undefined;\n }\n}\n\nfunction getAllImplementsInterfaceNodes(type, iface) {\n const { astNode, extensionASTNodes } = type;\n const nodes =\n astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n return nodes\n .flatMap((typeNode) => {\n var _typeNode$interfaces;\n\n return (\n /* c8 ignore next */\n (_typeNode$interfaces = typeNode.interfaces) !== null &&\n _typeNode$interfaces !== void 0\n ? _typeNode$interfaces\n : []\n );\n })\n .filter((ifaceNode) => ifaceNode.name.value === iface.name);\n}\n\nfunction getUnionMemberTypeNodes(union, typeName) {\n const { astNode, extensionASTNodes } = union;\n const nodes =\n astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n return nodes\n .flatMap((unionNode) => {\n var _unionNode$types;\n\n return (\n /* c8 ignore next */\n (_unionNode$types = unionNode.types) !== null &&\n _unionNode$types !== void 0\n ? _unionNode$types\n : []\n );\n })\n .filter((typeNode) => typeNode.name.value === typeName);\n}\n\nfunction getDeprecatedDirectiveNode(definitionNode) {\n var _definitionNode$direc;\n\n return definitionNode === null || definitionNode === void 0\n ? void 0\n : (_definitionNode$direc = definitionNode.directives) === null ||\n _definitionNode$direc === void 0\n ? void 0\n : _definitionNode$direc.find(\n (node) => node.name.value === GraphQLDeprecatedDirective.name,\n );\n}\n","import { Kind } from '../language/kinds.mjs';\nimport { GraphQLList, GraphQLNonNull } from '../type/definition.mjs';\nexport function typeFromAST(schema, typeNode) {\n switch (typeNode.kind) {\n case Kind.LIST_TYPE: {\n const innerType = typeFromAST(schema, typeNode.type);\n return innerType && new GraphQLList(innerType);\n }\n\n case Kind.NON_NULL_TYPE: {\n const innerType = typeFromAST(schema, typeNode.type);\n return innerType && new GraphQLNonNull(innerType);\n }\n\n case Kind.NAMED_TYPE:\n return schema.getType(typeNode.name.value);\n }\n}\n","import { isNode } from '../language/ast.mjs';\nimport { Kind } from '../language/kinds.mjs';\nimport { getEnterLeaveForKind } from '../language/visitor.mjs';\nimport {\n getNamedType,\n getNullableType,\n isCompositeType,\n isEnumType,\n isInputObjectType,\n isInputType,\n isInterfaceType,\n isListType,\n isObjectType,\n isOutputType,\n} from '../type/definition.mjs';\nimport {\n SchemaMetaFieldDef,\n TypeMetaFieldDef,\n TypeNameMetaFieldDef,\n} from '../type/introspection.mjs';\nimport { typeFromAST } from './typeFromAST.mjs';\n/**\n * TypeInfo is a utility class which, given a GraphQL schema, can keep track\n * of the current field and type definitions at any point in a GraphQL document\n * AST during a recursive descent by calling `enter(node)` and `leave(node)`.\n */\n\nexport class TypeInfo {\n constructor(\n schema,\n /**\n * Initial type may be provided in rare cases to facilitate traversals\n * beginning somewhere other than documents.\n */\n initialType,\n /** @deprecated will be removed in 17.0.0 */\n getFieldDefFn,\n ) {\n this._schema = schema;\n this._typeStack = [];\n this._parentTypeStack = [];\n this._inputTypeStack = [];\n this._fieldDefStack = [];\n this._defaultValueStack = [];\n this._directive = null;\n this._argument = null;\n this._enumValue = null;\n this._getFieldDef =\n getFieldDefFn !== null && getFieldDefFn !== void 0\n ? getFieldDefFn\n : getFieldDef;\n\n if (initialType) {\n if (isInputType(initialType)) {\n this._inputTypeStack.push(initialType);\n }\n\n if (isCompositeType(initialType)) {\n this._parentTypeStack.push(initialType);\n }\n\n if (isOutputType(initialType)) {\n this._typeStack.push(initialType);\n }\n }\n }\n\n get [Symbol.toStringTag]() {\n return 'TypeInfo';\n }\n\n getType() {\n if (this._typeStack.length > 0) {\n return this._typeStack[this._typeStack.length - 1];\n }\n }\n\n getParentType() {\n if (this._parentTypeStack.length > 0) {\n return this._parentTypeStack[this._parentTypeStack.length - 1];\n }\n }\n\n getInputType() {\n if (this._inputTypeStack.length > 0) {\n return this._inputTypeStack[this._inputTypeStack.length - 1];\n }\n }\n\n getParentInputType() {\n if (this._inputTypeStack.length > 1) {\n return this._inputTypeStack[this._inputTypeStack.length - 2];\n }\n }\n\n getFieldDef() {\n if (this._fieldDefStack.length > 0) {\n return this._fieldDefStack[this._fieldDefStack.length - 1];\n }\n }\n\n getDefaultValue() {\n if (this._defaultValueStack.length > 0) {\n return this._defaultValueStack[this._defaultValueStack.length - 1];\n }\n }\n\n getDirective() {\n return this._directive;\n }\n\n getArgument() {\n return this._argument;\n }\n\n getEnumValue() {\n return this._enumValue;\n }\n\n enter(node) {\n const schema = this._schema; // Note: many of the types below are explicitly typed as \"unknown\" to drop\n // any assumptions of a valid schema to ensure runtime types are properly\n // checked before continuing since TypeInfo is used as part of validation\n // which occurs before guarantees of schema and document validity.\n\n switch (node.kind) {\n case Kind.SELECTION_SET: {\n const namedType = getNamedType(this.getType());\n\n this._parentTypeStack.push(\n isCompositeType(namedType) ? namedType : undefined,\n );\n\n break;\n }\n\n case Kind.FIELD: {\n const parentType = this.getParentType();\n let fieldDef;\n let fieldType;\n\n if (parentType) {\n fieldDef = this._getFieldDef(schema, parentType, node);\n\n if (fieldDef) {\n fieldType = fieldDef.type;\n }\n }\n\n this._fieldDefStack.push(fieldDef);\n\n this._typeStack.push(isOutputType(fieldType) ? fieldType : undefined);\n\n break;\n }\n\n case Kind.DIRECTIVE:\n this._directive = schema.getDirective(node.name.value);\n break;\n\n case Kind.OPERATION_DEFINITION: {\n const rootType = schema.getRootType(node.operation);\n\n this._typeStack.push(isObjectType(rootType) ? rootType : undefined);\n\n break;\n }\n\n case Kind.INLINE_FRAGMENT:\n case Kind.FRAGMENT_DEFINITION: {\n const typeConditionAST = node.typeCondition;\n const outputType = typeConditionAST\n ? typeFromAST(schema, typeConditionAST)\n : getNamedType(this.getType());\n\n this._typeStack.push(isOutputType(outputType) ? outputType : undefined);\n\n break;\n }\n\n case Kind.VARIABLE_DEFINITION: {\n const inputType = typeFromAST(schema, node.type);\n\n this._inputTypeStack.push(\n isInputType(inputType) ? inputType : undefined,\n );\n\n break;\n }\n\n case Kind.ARGUMENT: {\n var _this$getDirective;\n\n let argDef;\n let argType;\n const fieldOrDirective =\n (_this$getDirective = this.getDirective()) !== null &&\n _this$getDirective !== void 0\n ? _this$getDirective\n : this.getFieldDef();\n\n if (fieldOrDirective) {\n argDef = fieldOrDirective.args.find(\n (arg) => arg.name === node.name.value,\n );\n\n if (argDef) {\n argType = argDef.type;\n }\n }\n\n this._argument = argDef;\n\n this._defaultValueStack.push(argDef ? argDef.defaultValue : undefined);\n\n this._inputTypeStack.push(isInputType(argType) ? argType : undefined);\n\n break;\n }\n\n case Kind.LIST: {\n const listType = getNullableType(this.getInputType());\n const itemType = isListType(listType) ? listType.ofType : listType; // List positions never have a default value.\n\n this._defaultValueStack.push(undefined);\n\n this._inputTypeStack.push(isInputType(itemType) ? itemType : undefined);\n\n break;\n }\n\n case Kind.OBJECT_FIELD: {\n const objectType = getNamedType(this.getInputType());\n let inputFieldType;\n let inputField;\n\n if (isInputObjectType(objectType)) {\n inputField = objectType.getFields()[node.name.value];\n\n if (inputField) {\n inputFieldType = inputField.type;\n }\n }\n\n this._defaultValueStack.push(\n inputField ? inputField.defaultValue : undefined,\n );\n\n this._inputTypeStack.push(\n isInputType(inputFieldType) ? inputFieldType : undefined,\n );\n\n break;\n }\n\n case Kind.ENUM: {\n const enumType = getNamedType(this.getInputType());\n let enumValue;\n\n if (isEnumType(enumType)) {\n enumValue = enumType.getValue(node.value);\n }\n\n this._enumValue = enumValue;\n break;\n }\n\n default: // Ignore other nodes\n }\n }\n\n leave(node) {\n switch (node.kind) {\n case Kind.SELECTION_SET:\n this._parentTypeStack.pop();\n\n break;\n\n case Kind.FIELD:\n this._fieldDefStack.pop();\n\n this._typeStack.pop();\n\n break;\n\n case Kind.DIRECTIVE:\n this._directive = null;\n break;\n\n case Kind.OPERATION_DEFINITION:\n case Kind.INLINE_FRAGMENT:\n case Kind.FRAGMENT_DEFINITION:\n this._typeStack.pop();\n\n break;\n\n case Kind.VARIABLE_DEFINITION:\n this._inputTypeStack.pop();\n\n break;\n\n case Kind.ARGUMENT:\n this._argument = null;\n\n this._defaultValueStack.pop();\n\n this._inputTypeStack.pop();\n\n break;\n\n case Kind.LIST:\n case Kind.OBJECT_FIELD:\n this._defaultValueStack.pop();\n\n this._inputTypeStack.pop();\n\n break;\n\n case Kind.ENUM:\n this._enumValue = null;\n break;\n\n default: // Ignore other nodes\n }\n }\n}\n\n/**\n * Not exactly the same as the executor's definition of getFieldDef, in this\n * statically evaluated environment we do not always have an Object type,\n * and need to handle Interface and Union types.\n */\nfunction getFieldDef(schema, parentType, fieldNode) {\n const name = fieldNode.name.value;\n\n if (\n name === SchemaMetaFieldDef.name &&\n schema.getQueryType() === parentType\n ) {\n return SchemaMetaFieldDef;\n }\n\n if (name === TypeMetaFieldDef.name && schema.getQueryType() === parentType) {\n return TypeMetaFieldDef;\n }\n\n if (name === TypeNameMetaFieldDef.name && isCompositeType(parentType)) {\n return TypeNameMetaFieldDef;\n }\n\n if (isObjectType(parentType) || isInterfaceType(parentType)) {\n return parentType.getFields()[name];\n }\n}\n/**\n * Creates a new visitor instance which maintains a provided TypeInfo instance\n * along with visiting visitor.\n */\n\nexport function visitWithTypeInfo(typeInfo, visitor) {\n return {\n enter(...args) {\n const node = args[0];\n typeInfo.enter(node);\n const fn = getEnterLeaveForKind(visitor, node.kind).enter;\n\n if (fn) {\n const result = fn.apply(visitor, args);\n\n if (result !== undefined) {\n typeInfo.leave(node);\n\n if (isNode(result)) {\n typeInfo.enter(result);\n }\n }\n\n return result;\n }\n },\n\n leave(...args) {\n const node = args[0];\n const fn = getEnterLeaveForKind(visitor, node.kind).leave;\n let result;\n\n if (fn) {\n result = fn.apply(visitor, args);\n }\n\n typeInfo.leave(node);\n return result;\n },\n };\n}\n","import { Kind } from './kinds.mjs';\nexport function isDefinitionNode(node) {\n return (\n isExecutableDefinitionNode(node) ||\n isTypeSystemDefinitionNode(node) ||\n isTypeSystemExtensionNode(node)\n );\n}\nexport function isExecutableDefinitionNode(node) {\n return (\n node.kind === Kind.OPERATION_DEFINITION ||\n node.kind === Kind.FRAGMENT_DEFINITION\n );\n}\nexport function isSelectionNode(node) {\n return (\n node.kind === Kind.FIELD ||\n node.kind === Kind.FRAGMENT_SPREAD ||\n node.kind === Kind.INLINE_FRAGMENT\n );\n}\nexport function isValueNode(node) {\n return (\n node.kind === Kind.VARIABLE ||\n node.kind === Kind.INT ||\n node.kind === Kind.FLOAT ||\n node.kind === Kind.STRING ||\n node.kind === Kind.BOOLEAN ||\n node.kind === Kind.NULL ||\n node.kind === Kind.ENUM ||\n node.kind === Kind.LIST ||\n node.kind === Kind.OBJECT\n );\n}\nexport function isConstValueNode(node) {\n return (\n isValueNode(node) &&\n (node.kind === Kind.LIST\n ? node.values.some(isConstValueNode)\n : node.kind === Kind.OBJECT\n ? node.fields.some((field) => isConstValueNode(field.value))\n : node.kind !== Kind.VARIABLE)\n );\n}\nexport function isTypeNode(node) {\n return (\n node.kind === Kind.NAMED_TYPE ||\n node.kind === Kind.LIST_TYPE ||\n node.kind === Kind.NON_NULL_TYPE\n );\n}\nexport function isTypeSystemDefinitionNode(node) {\n return (\n node.kind === Kind.SCHEMA_DEFINITION ||\n isTypeDefinitionNode(node) ||\n node.kind === Kind.DIRECTIVE_DEFINITION\n );\n}\nexport function isTypeDefinitionNode(node) {\n return (\n node.kind === Kind.SCALAR_TYPE_DEFINITION ||\n node.kind === Kind.OBJECT_TYPE_DEFINITION ||\n node.kind === Kind.INTERFACE_TYPE_DEFINITION ||\n node.kind === Kind.UNION_TYPE_DEFINITION ||\n node.kind === Kind.ENUM_TYPE_DEFINITION ||\n node.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION\n );\n}\nexport function isTypeSystemExtensionNode(node) {\n return node.kind === Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node);\n}\nexport function isTypeExtensionNode(node) {\n return (\n node.kind === Kind.SCALAR_TYPE_EXTENSION ||\n node.kind === Kind.OBJECT_TYPE_EXTENSION ||\n node.kind === Kind.INTERFACE_TYPE_EXTENSION ||\n node.kind === Kind.UNION_TYPE_EXTENSION ||\n node.kind === Kind.ENUM_TYPE_EXTENSION ||\n node.kind === Kind.INPUT_OBJECT_TYPE_EXTENSION\n );\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { Kind } from '../../language/kinds.mjs';\nimport { isExecutableDefinitionNode } from '../../language/predicates.mjs';\n\n/**\n * Executable definitions\n *\n * A GraphQL document is only valid for execution if all definitions are either\n * operation or fragment definitions.\n *\n * See https://spec.graphql.org/draft/#sec-Executable-Definitions\n */\nexport function ExecutableDefinitionsRule(context) {\n return {\n Document(node) {\n for (const definition of node.definitions) {\n if (!isExecutableDefinitionNode(definition)) {\n const defName =\n definition.kind === Kind.SCHEMA_DEFINITION ||\n definition.kind === Kind.SCHEMA_EXTENSION\n ? 'schema'\n : '\"' + definition.name.value + '\"';\n context.reportError(\n new GraphQLError(`The ${defName} definition is not executable.`, {\n nodes: definition,\n }),\n );\n }\n }\n\n return false;\n },\n };\n}\n","import { didYouMean } from '../../jsutils/didYouMean.mjs';\nimport { naturalCompare } from '../../jsutils/naturalCompare.mjs';\nimport { suggestionList } from '../../jsutils/suggestionList.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\nimport {\n isAbstractType,\n isInterfaceType,\n isObjectType,\n} from '../../type/definition.mjs';\n\n/**\n * Fields on correct type\n *\n * A GraphQL document is only valid if all fields selected are defined by the\n * parent type, or are an allowed meta field such as __typename.\n *\n * See https://spec.graphql.org/draft/#sec-Field-Selections\n */\nexport function FieldsOnCorrectTypeRule(context) {\n return {\n Field(node) {\n const type = context.getParentType();\n\n if (type) {\n const fieldDef = context.getFieldDef();\n\n if (!fieldDef) {\n // This field doesn't exist, lets look for suggestions.\n const schema = context.getSchema();\n const fieldName = node.name.value; // First determine if there are any suggested types to condition on.\n\n let suggestion = didYouMean(\n 'to use an inline fragment on',\n getSuggestedTypeNames(schema, type, fieldName),\n ); // If there are no suggested types, then perhaps this was a typo?\n\n if (suggestion === '') {\n suggestion = didYouMean(getSuggestedFieldNames(type, fieldName));\n } // Report an error, including helpful suggestions.\n\n context.reportError(\n new GraphQLError(\n `Cannot query field \"${fieldName}\" on type \"${type.name}\".` +\n suggestion,\n {\n nodes: node,\n },\n ),\n );\n }\n }\n },\n };\n}\n/**\n * Go through all of the implementations of type, as well as the interfaces that\n * they implement. If any of those types include the provided field, suggest them,\n * sorted by how often the type is referenced.\n */\n\nfunction getSuggestedTypeNames(schema, type, fieldName) {\n if (!isAbstractType(type)) {\n // Must be an Object type, which does not have possible fields.\n return [];\n }\n\n const suggestedTypes = new Set();\n const usageCount = Object.create(null);\n\n for (const possibleType of schema.getPossibleTypes(type)) {\n if (!possibleType.getFields()[fieldName]) {\n continue;\n } // This object type defines this field.\n\n suggestedTypes.add(possibleType);\n usageCount[possibleType.name] = 1;\n\n for (const possibleInterface of possibleType.getInterfaces()) {\n var _usageCount$possibleI;\n\n if (!possibleInterface.getFields()[fieldName]) {\n continue;\n } // This interface type defines this field.\n\n suggestedTypes.add(possibleInterface);\n usageCount[possibleInterface.name] =\n ((_usageCount$possibleI = usageCount[possibleInterface.name]) !==\n null && _usageCount$possibleI !== void 0\n ? _usageCount$possibleI\n : 0) + 1;\n }\n }\n\n return [...suggestedTypes]\n .sort((typeA, typeB) => {\n // Suggest both interface and object types based on how common they are.\n const usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name];\n\n if (usageCountDiff !== 0) {\n return usageCountDiff;\n } // Suggest super types first followed by subtypes\n\n if (isInterfaceType(typeA) && schema.isSubType(typeA, typeB)) {\n return -1;\n }\n\n if (isInterfaceType(typeB) && schema.isSubType(typeB, typeA)) {\n return 1;\n }\n\n return naturalCompare(typeA.name, typeB.name);\n })\n .map((x) => x.name);\n}\n/**\n * For the field name provided, determine if there are any similar field names\n * that may be the result of a typo.\n */\n\nfunction getSuggestedFieldNames(type, fieldName) {\n if (isObjectType(type) || isInterfaceType(type)) {\n const possibleFieldNames = Object.keys(type.getFields());\n return suggestionList(fieldName, possibleFieldNames);\n } // Otherwise, must be a Union type, which does not define fields.\n\n return [];\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { print } from '../../language/printer.mjs';\nimport { isCompositeType } from '../../type/definition.mjs';\nimport { typeFromAST } from '../../utilities/typeFromAST.mjs';\n\n/**\n * Fragments on composite type\n *\n * Fragments use a type condition to determine if they apply, since fragments\n * can only be spread into a composite type (object, interface, or union), the\n * type condition must also be a composite type.\n *\n * See https://spec.graphql.org/draft/#sec-Fragments-On-Composite-Types\n */\nexport function FragmentsOnCompositeTypesRule(context) {\n return {\n InlineFragment(node) {\n const typeCondition = node.typeCondition;\n\n if (typeCondition) {\n const type = typeFromAST(context.getSchema(), typeCondition);\n\n if (type && !isCompositeType(type)) {\n const typeStr = print(typeCondition);\n context.reportError(\n new GraphQLError(\n `Fragment cannot condition on non composite type \"${typeStr}\".`,\n {\n nodes: typeCondition,\n },\n ),\n );\n }\n }\n },\n\n FragmentDefinition(node) {\n const type = typeFromAST(context.getSchema(), node.typeCondition);\n\n if (type && !isCompositeType(type)) {\n const typeStr = print(node.typeCondition);\n context.reportError(\n new GraphQLError(\n `Fragment \"${node.name.value}\" cannot condition on non composite type \"${typeStr}\".`,\n {\n nodes: node.typeCondition,\n },\n ),\n );\n }\n },\n };\n}\n","import { didYouMean } from '../../jsutils/didYouMean.mjs';\nimport { suggestionList } from '../../jsutils/suggestionList.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { Kind } from '../../language/kinds.mjs';\nimport { specifiedDirectives } from '../../type/directives.mjs';\n\n/**\n * Known argument names\n *\n * A GraphQL field is only valid if all supplied arguments are defined by\n * that field.\n *\n * See https://spec.graphql.org/draft/#sec-Argument-Names\n * See https://spec.graphql.org/draft/#sec-Directives-Are-In-Valid-Locations\n */\nexport function KnownArgumentNamesRule(context) {\n return {\n // eslint-disable-next-line new-cap\n ...KnownArgumentNamesOnDirectivesRule(context),\n\n Argument(argNode) {\n const argDef = context.getArgument();\n const fieldDef = context.getFieldDef();\n const parentType = context.getParentType();\n\n if (!argDef && fieldDef && parentType) {\n const argName = argNode.name.value;\n const knownArgsNames = fieldDef.args.map((arg) => arg.name);\n const suggestions = suggestionList(argName, knownArgsNames);\n context.reportError(\n new GraphQLError(\n `Unknown argument \"${argName}\" on field \"${parentType.name}.${fieldDef.name}\".` +\n didYouMean(suggestions),\n {\n nodes: argNode,\n },\n ),\n );\n }\n },\n };\n}\n/**\n * @internal\n */\n\nexport function KnownArgumentNamesOnDirectivesRule(context) {\n const directiveArgs = Object.create(null);\n const schema = context.getSchema();\n const definedDirectives = schema\n ? schema.getDirectives()\n : specifiedDirectives;\n\n for (const directive of definedDirectives) {\n directiveArgs[directive.name] = directive.args.map((arg) => arg.name);\n }\n\n const astDefinitions = context.getDocument().definitions;\n\n for (const def of astDefinitions) {\n if (def.kind === Kind.DIRECTIVE_DEFINITION) {\n var _def$arguments;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const argsNodes =\n (_def$arguments = def.arguments) !== null && _def$arguments !== void 0\n ? _def$arguments\n : [];\n directiveArgs[def.name.value] = argsNodes.map((arg) => arg.name.value);\n }\n }\n\n return {\n Directive(directiveNode) {\n const directiveName = directiveNode.name.value;\n const knownArgs = directiveArgs[directiveName];\n\n if (directiveNode.arguments && knownArgs) {\n for (const argNode of directiveNode.arguments) {\n const argName = argNode.name.value;\n\n if (!knownArgs.includes(argName)) {\n const suggestions = suggestionList(argName, knownArgs);\n context.reportError(\n new GraphQLError(\n `Unknown argument \"${argName}\" on directive \"@${directiveName}\".` +\n didYouMean(suggestions),\n {\n nodes: argNode,\n },\n ),\n );\n }\n }\n }\n\n return false;\n },\n };\n}\n","import { inspect } from '../../jsutils/inspect.mjs';\nimport { invariant } from '../../jsutils/invariant.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { OperationTypeNode } from '../../language/ast.mjs';\nimport { DirectiveLocation } from '../../language/directiveLocation.mjs';\nimport { Kind } from '../../language/kinds.mjs';\nimport { specifiedDirectives } from '../../type/directives.mjs';\n\n/**\n * Known directives\n *\n * A GraphQL document is only valid if all `@directives` are known by the\n * schema and legally positioned.\n *\n * See https://spec.graphql.org/draft/#sec-Directives-Are-Defined\n */\nexport function KnownDirectivesRule(context) {\n const locationsMap = Object.create(null);\n const schema = context.getSchema();\n const definedDirectives = schema\n ? schema.getDirectives()\n : specifiedDirectives;\n\n for (const directive of definedDirectives) {\n locationsMap[directive.name] = directive.locations;\n }\n\n const astDefinitions = context.getDocument().definitions;\n\n for (const def of astDefinitions) {\n if (def.kind === Kind.DIRECTIVE_DEFINITION) {\n locationsMap[def.name.value] = def.locations.map((name) => name.value);\n }\n }\n\n return {\n Directive(node, _key, _parent, _path, ancestors) {\n const name = node.name.value;\n const locations = locationsMap[name];\n\n if (!locations) {\n context.reportError(\n new GraphQLError(`Unknown directive \"@${name}\".`, {\n nodes: node,\n }),\n );\n return;\n }\n\n const candidateLocation = getDirectiveLocationForASTPath(ancestors);\n\n if (candidateLocation && !locations.includes(candidateLocation)) {\n context.reportError(\n new GraphQLError(\n `Directive \"@${name}\" may not be used on ${candidateLocation}.`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n };\n}\n\nfunction getDirectiveLocationForASTPath(ancestors) {\n const appliedTo = ancestors[ancestors.length - 1];\n 'kind' in appliedTo || invariant(false);\n\n switch (appliedTo.kind) {\n case Kind.OPERATION_DEFINITION:\n return getDirectiveLocationForOperation(appliedTo.operation);\n\n case Kind.FIELD:\n return DirectiveLocation.FIELD;\n\n case Kind.FRAGMENT_SPREAD:\n return DirectiveLocation.FRAGMENT_SPREAD;\n\n case Kind.INLINE_FRAGMENT:\n return DirectiveLocation.INLINE_FRAGMENT;\n\n case Kind.FRAGMENT_DEFINITION:\n return DirectiveLocation.FRAGMENT_DEFINITION;\n\n case Kind.VARIABLE_DEFINITION:\n return DirectiveLocation.VARIABLE_DEFINITION;\n\n case Kind.SCHEMA_DEFINITION:\n case Kind.SCHEMA_EXTENSION:\n return DirectiveLocation.SCHEMA;\n\n case Kind.SCALAR_TYPE_DEFINITION:\n case Kind.SCALAR_TYPE_EXTENSION:\n return DirectiveLocation.SCALAR;\n\n case Kind.OBJECT_TYPE_DEFINITION:\n case Kind.OBJECT_TYPE_EXTENSION:\n return DirectiveLocation.OBJECT;\n\n case Kind.FIELD_DEFINITION:\n return DirectiveLocation.FIELD_DEFINITION;\n\n case Kind.INTERFACE_TYPE_DEFINITION:\n case Kind.INTERFACE_TYPE_EXTENSION:\n return DirectiveLocation.INTERFACE;\n\n case Kind.UNION_TYPE_DEFINITION:\n case Kind.UNION_TYPE_EXTENSION:\n return DirectiveLocation.UNION;\n\n case Kind.ENUM_TYPE_DEFINITION:\n case Kind.ENUM_TYPE_EXTENSION:\n return DirectiveLocation.ENUM;\n\n case Kind.ENUM_VALUE_DEFINITION:\n return DirectiveLocation.ENUM_VALUE;\n\n case Kind.INPUT_OBJECT_TYPE_DEFINITION:\n case Kind.INPUT_OBJECT_TYPE_EXTENSION:\n return DirectiveLocation.INPUT_OBJECT;\n\n case Kind.INPUT_VALUE_DEFINITION: {\n const parentNode = ancestors[ancestors.length - 3];\n 'kind' in parentNode || invariant(false);\n return parentNode.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION\n ? DirectiveLocation.INPUT_FIELD_DEFINITION\n : DirectiveLocation.ARGUMENT_DEFINITION;\n }\n // Not reachable, all possible types have been considered.\n\n /* c8 ignore next */\n\n default:\n false || invariant(false, 'Unexpected kind: ' + inspect(appliedTo.kind));\n }\n}\n\nfunction getDirectiveLocationForOperation(operation) {\n switch (operation) {\n case OperationTypeNode.QUERY:\n return DirectiveLocation.QUERY;\n\n case OperationTypeNode.MUTATION:\n return DirectiveLocation.MUTATION;\n\n case OperationTypeNode.SUBSCRIPTION:\n return DirectiveLocation.SUBSCRIPTION;\n }\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * Known fragment names\n *\n * A GraphQL document is only valid if all `...Fragment` fragment spreads refer\n * to fragments defined in the same document.\n *\n * See https://spec.graphql.org/draft/#sec-Fragment-spread-target-defined\n */\nexport function KnownFragmentNamesRule(context) {\n return {\n FragmentSpread(node) {\n const fragmentName = node.name.value;\n const fragment = context.getFragment(fragmentName);\n\n if (!fragment) {\n context.reportError(\n new GraphQLError(`Unknown fragment \"${fragmentName}\".`, {\n nodes: node.name,\n }),\n );\n }\n },\n };\n}\n","import { didYouMean } from '../../jsutils/didYouMean.mjs';\nimport { suggestionList } from '../../jsutils/suggestionList.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\nimport {\n isTypeDefinitionNode,\n isTypeSystemDefinitionNode,\n isTypeSystemExtensionNode,\n} from '../../language/predicates.mjs';\nimport { introspectionTypes } from '../../type/introspection.mjs';\nimport { specifiedScalarTypes } from '../../type/scalars.mjs';\n\n/**\n * Known type names\n *\n * A GraphQL document is only valid if referenced types (specifically\n * variable definitions and fragment conditions) are defined by the type schema.\n *\n * See https://spec.graphql.org/draft/#sec-Fragment-Spread-Type-Existence\n */\nexport function KnownTypeNamesRule(context) {\n const schema = context.getSchema();\n const existingTypesMap = schema ? schema.getTypeMap() : Object.create(null);\n const definedTypes = Object.create(null);\n\n for (const def of context.getDocument().definitions) {\n if (isTypeDefinitionNode(def)) {\n definedTypes[def.name.value] = true;\n }\n }\n\n const typeNames = [\n ...Object.keys(existingTypesMap),\n ...Object.keys(definedTypes),\n ];\n return {\n NamedType(node, _1, parent, _2, ancestors) {\n const typeName = node.name.value;\n\n if (!existingTypesMap[typeName] && !definedTypes[typeName]) {\n var _ancestors$;\n\n const definitionNode =\n (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0\n ? _ancestors$\n : parent;\n const isSDL = definitionNode != null && isSDLNode(definitionNode);\n\n if (isSDL && standardTypeNames.includes(typeName)) {\n return;\n }\n\n const suggestedTypes = suggestionList(\n typeName,\n isSDL ? standardTypeNames.concat(typeNames) : typeNames,\n );\n context.reportError(\n new GraphQLError(\n `Unknown type \"${typeName}\".` + didYouMean(suggestedTypes),\n {\n nodes: node,\n },\n ),\n );\n }\n },\n };\n}\nconst standardTypeNames = [...specifiedScalarTypes, ...introspectionTypes].map(\n (type) => type.name,\n);\n\nfunction isSDLNode(value) {\n return (\n 'kind' in value &&\n (isTypeSystemDefinitionNode(value) || isTypeSystemExtensionNode(value))\n );\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { Kind } from '../../language/kinds.mjs';\n\n/**\n * Lone anonymous operation\n *\n * A GraphQL document is only valid if when it contains an anonymous operation\n * (the query short-hand) that it contains only that one operation definition.\n *\n * See https://spec.graphql.org/draft/#sec-Lone-Anonymous-Operation\n */\nexport function LoneAnonymousOperationRule(context) {\n let operationCount = 0;\n return {\n Document(node) {\n operationCount = node.definitions.filter(\n (definition) => definition.kind === Kind.OPERATION_DEFINITION,\n ).length;\n },\n\n OperationDefinition(node) {\n if (!node.name && operationCount > 1) {\n context.reportError(\n new GraphQLError(\n 'This anonymous operation must be the only defined operation.',\n {\n nodes: node,\n },\n ),\n );\n }\n },\n };\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * Lone Schema definition\n *\n * A GraphQL document is only valid if it contains only one schema definition.\n */\nexport function LoneSchemaDefinitionRule(context) {\n var _ref, _ref2, _oldSchema$astNode;\n\n const oldSchema = context.getSchema();\n const alreadyDefined =\n (_ref =\n (_ref2 =\n (_oldSchema$astNode =\n oldSchema === null || oldSchema === void 0\n ? void 0\n : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0\n ? _oldSchema$astNode\n : oldSchema === null || oldSchema === void 0\n ? void 0\n : oldSchema.getQueryType()) !== null && _ref2 !== void 0\n ? _ref2\n : oldSchema === null || oldSchema === void 0\n ? void 0\n : oldSchema.getMutationType()) !== null && _ref !== void 0\n ? _ref\n : oldSchema === null || oldSchema === void 0\n ? void 0\n : oldSchema.getSubscriptionType();\n let schemaDefinitionsCount = 0;\n return {\n SchemaDefinition(node) {\n if (alreadyDefined) {\n context.reportError(\n new GraphQLError(\n 'Cannot define a new schema within a schema extension.',\n {\n nodes: node,\n },\n ),\n );\n return;\n }\n\n if (schemaDefinitionsCount > 0) {\n context.reportError(\n new GraphQLError('Must provide only one schema definition.', {\n nodes: node,\n }),\n );\n }\n\n ++schemaDefinitionsCount;\n },\n };\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * No fragment cycles\n *\n * The graph of fragment spreads must not form any cycles including spreading itself.\n * Otherwise an operation could infinitely spread or infinitely execute on cycles in the underlying data.\n *\n * See https://spec.graphql.org/draft/#sec-Fragment-spreads-must-not-form-cycles\n */\nexport function NoFragmentCyclesRule(context) {\n // Tracks already visited fragments to maintain O(N) and to ensure that cycles\n // are not redundantly reported.\n const visitedFrags = Object.create(null); // Array of AST nodes used to produce meaningful errors\n\n const spreadPath = []; // Position in the spread path\n\n const spreadPathIndexByName = Object.create(null);\n return {\n OperationDefinition: () => false,\n\n FragmentDefinition(node) {\n detectCycleRecursive(node);\n return false;\n },\n }; // This does a straight-forward DFS to find cycles.\n // It does not terminate when a cycle was found but continues to explore\n // the graph to find all possible cycles.\n\n function detectCycleRecursive(fragment) {\n if (visitedFrags[fragment.name.value]) {\n return;\n }\n\n const fragmentName = fragment.name.value;\n visitedFrags[fragmentName] = true;\n const spreadNodes = context.getFragmentSpreads(fragment.selectionSet);\n\n if (spreadNodes.length === 0) {\n return;\n }\n\n spreadPathIndexByName[fragmentName] = spreadPath.length;\n\n for (const spreadNode of spreadNodes) {\n const spreadName = spreadNode.name.value;\n const cycleIndex = spreadPathIndexByName[spreadName];\n spreadPath.push(spreadNode);\n\n if (cycleIndex === undefined) {\n const spreadFragment = context.getFragment(spreadName);\n\n if (spreadFragment) {\n detectCycleRecursive(spreadFragment);\n }\n } else {\n const cyclePath = spreadPath.slice(cycleIndex);\n const viaPath = cyclePath\n .slice(0, -1)\n .map((s) => '\"' + s.name.value + '\"')\n .join(', ');\n context.reportError(\n new GraphQLError(\n `Cannot spread fragment \"${spreadName}\" within itself` +\n (viaPath !== '' ? ` via ${viaPath}.` : '.'),\n {\n nodes: cyclePath,\n },\n ),\n );\n }\n\n spreadPath.pop();\n }\n\n spreadPathIndexByName[fragmentName] = undefined;\n }\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * No undefined variables\n *\n * A GraphQL operation is only valid if all variables encountered, both directly\n * and via fragment spreads, are defined by that operation.\n *\n * See https://spec.graphql.org/draft/#sec-All-Variable-Uses-Defined\n */\nexport function NoUndefinedVariablesRule(context) {\n let variableNameDefined = Object.create(null);\n return {\n OperationDefinition: {\n enter() {\n variableNameDefined = Object.create(null);\n },\n\n leave(operation) {\n const usages = context.getRecursiveVariableUsages(operation);\n\n for (const { node } of usages) {\n const varName = node.name.value;\n\n if (variableNameDefined[varName] !== true) {\n context.reportError(\n new GraphQLError(\n operation.name\n ? `Variable \"$${varName}\" is not defined by operation \"${operation.name.value}\".`\n : `Variable \"$${varName}\" is not defined.`,\n {\n nodes: [node, operation],\n },\n ),\n );\n }\n }\n },\n },\n\n VariableDefinition(node) {\n variableNameDefined[node.variable.name.value] = true;\n },\n };\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * No unused fragments\n *\n * A GraphQL document is only valid if all fragment definitions are spread\n * within operations, or spread within other fragments spread within operations.\n *\n * See https://spec.graphql.org/draft/#sec-Fragments-Must-Be-Used\n */\nexport function NoUnusedFragmentsRule(context) {\n const operationDefs = [];\n const fragmentDefs = [];\n return {\n OperationDefinition(node) {\n operationDefs.push(node);\n return false;\n },\n\n FragmentDefinition(node) {\n fragmentDefs.push(node);\n return false;\n },\n\n Document: {\n leave() {\n const fragmentNameUsed = Object.create(null);\n\n for (const operation of operationDefs) {\n for (const fragment of context.getRecursivelyReferencedFragments(\n operation,\n )) {\n fragmentNameUsed[fragment.name.value] = true;\n }\n }\n\n for (const fragmentDef of fragmentDefs) {\n const fragName = fragmentDef.name.value;\n\n if (fragmentNameUsed[fragName] !== true) {\n context.reportError(\n new GraphQLError(`Fragment \"${fragName}\" is never used.`, {\n nodes: fragmentDef,\n }),\n );\n }\n }\n },\n },\n };\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * No unused variables\n *\n * A GraphQL operation is only valid if all variables defined by an operation\n * are used, either directly or within a spread fragment.\n *\n * See https://spec.graphql.org/draft/#sec-All-Variables-Used\n */\nexport function NoUnusedVariablesRule(context) {\n let variableDefs = [];\n return {\n OperationDefinition: {\n enter() {\n variableDefs = [];\n },\n\n leave(operation) {\n const variableNameUsed = Object.create(null);\n const usages = context.getRecursiveVariableUsages(operation);\n\n for (const { node } of usages) {\n variableNameUsed[node.name.value] = true;\n }\n\n for (const variableDef of variableDefs) {\n const variableName = variableDef.variable.name.value;\n\n if (variableNameUsed[variableName] !== true) {\n context.reportError(\n new GraphQLError(\n operation.name\n ? `Variable \"$${variableName}\" is never used in operation \"${operation.name.value}\".`\n : `Variable \"$${variableName}\" is never used.`,\n {\n nodes: variableDef,\n },\n ),\n );\n }\n }\n },\n },\n\n VariableDefinition(def) {\n variableDefs.push(def);\n },\n };\n}\n","import { naturalCompare } from '../jsutils/naturalCompare.mjs';\nimport { Kind } from '../language/kinds.mjs';\n/**\n * Sort ValueNode.\n *\n * This function returns a sorted copy of the given ValueNode.\n *\n * @internal\n */\n\nexport function sortValueNode(valueNode) {\n switch (valueNode.kind) {\n case Kind.OBJECT:\n return { ...valueNode, fields: sortFields(valueNode.fields) };\n\n case Kind.LIST:\n return { ...valueNode, values: valueNode.values.map(sortValueNode) };\n\n case Kind.INT:\n case Kind.FLOAT:\n case Kind.STRING:\n case Kind.BOOLEAN:\n case Kind.NULL:\n case Kind.ENUM:\n case Kind.VARIABLE:\n return valueNode;\n }\n}\n\nfunction sortFields(fields) {\n return fields\n .map((fieldNode) => ({\n ...fieldNode,\n value: sortValueNode(fieldNode.value),\n }))\n .sort((fieldA, fieldB) =>\n naturalCompare(fieldA.name.value, fieldB.name.value),\n );\n}\n","import { inspect } from '../../jsutils/inspect.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { Kind } from '../../language/kinds.mjs';\nimport { print } from '../../language/printer.mjs';\nimport {\n getNamedType,\n isInterfaceType,\n isLeafType,\n isListType,\n isNonNullType,\n isObjectType,\n} from '../../type/definition.mjs';\nimport { sortValueNode } from '../../utilities/sortValueNode.mjs';\nimport { typeFromAST } from '../../utilities/typeFromAST.mjs';\n\nfunction reasonMessage(reason) {\n if (Array.isArray(reason)) {\n return reason\n .map(\n ([responseName, subReason]) =>\n `subfields \"${responseName}\" conflict because ` +\n reasonMessage(subReason),\n )\n .join(' and ');\n }\n\n return reason;\n}\n/**\n * Overlapping fields can be merged\n *\n * A selection set is only valid if all fields (including spreading any\n * fragments) either correspond to distinct response names or can be merged\n * without ambiguity.\n *\n * See https://spec.graphql.org/draft/#sec-Field-Selection-Merging\n */\n\nexport function OverlappingFieldsCanBeMergedRule(context) {\n // A memoization for when two fragments are compared \"between\" each other for\n // conflicts. Two fragments may be compared many times, so memoizing this can\n // dramatically improve the performance of this validator.\n const comparedFragmentPairs = new PairSet(); // A cache for the \"field map\" and list of fragment names found in any given\n // selection set. Selection sets may be asked for this information multiple\n // times, so this improves the performance of this validator.\n\n const cachedFieldsAndFragmentNames = new Map();\n return {\n SelectionSet(selectionSet) {\n const conflicts = findConflictsWithinSelectionSet(\n context,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n context.getParentType(),\n selectionSet,\n );\n\n for (const [[responseName, reason], fields1, fields2] of conflicts) {\n const reasonMsg = reasonMessage(reason);\n context.reportError(\n new GraphQLError(\n `Fields \"${responseName}\" conflict because ${reasonMsg}. Use different aliases on the fields to fetch both if this was intentional.`,\n {\n nodes: fields1.concat(fields2),\n },\n ),\n );\n }\n },\n };\n}\n\n/**\n * Algorithm:\n *\n * Conflicts occur when two fields exist in a query which will produce the same\n * response name, but represent differing values, thus creating a conflict.\n * The algorithm below finds all conflicts via making a series of comparisons\n * between fields. In order to compare as few fields as possible, this makes\n * a series of comparisons \"within\" sets of fields and \"between\" sets of fields.\n *\n * Given any selection set, a collection produces both a set of fields by\n * also including all inline fragments, as well as a list of fragments\n * referenced by fragment spreads.\n *\n * A) Each selection set represented in the document first compares \"within\" its\n * collected set of fields, finding any conflicts between every pair of\n * overlapping fields.\n * Note: This is the *only time* that a the fields \"within\" a set are compared\n * to each other. After this only fields \"between\" sets are compared.\n *\n * B) Also, if any fragment is referenced in a selection set, then a\n * comparison is made \"between\" the original set of fields and the\n * referenced fragment.\n *\n * C) Also, if multiple fragments are referenced, then comparisons\n * are made \"between\" each referenced fragment.\n *\n * D) When comparing \"between\" a set of fields and a referenced fragment, first\n * a comparison is made between each field in the original set of fields and\n * each field in the the referenced set of fields.\n *\n * E) Also, if any fragment is referenced in the referenced selection set,\n * then a comparison is made \"between\" the original set of fields and the\n * referenced fragment (recursively referring to step D).\n *\n * F) When comparing \"between\" two fragments, first a comparison is made between\n * each field in the first referenced set of fields and each field in the the\n * second referenced set of fields.\n *\n * G) Also, any fragments referenced by the first must be compared to the\n * second, and any fragments referenced by the second must be compared to the\n * first (recursively referring to step F).\n *\n * H) When comparing two fields, if both have selection sets, then a comparison\n * is made \"between\" both selection sets, first comparing the set of fields in\n * the first selection set with the set of fields in the second.\n *\n * I) Also, if any fragment is referenced in either selection set, then a\n * comparison is made \"between\" the other set of fields and the\n * referenced fragment.\n *\n * J) Also, if two fragments are referenced in both selection sets, then a\n * comparison is made \"between\" the two fragments.\n *\n */\n// Find all conflicts found \"within\" a selection set, including those found\n// via spreading in fragments. Called when visiting each SelectionSet in the\n// GraphQL Document.\nfunction findConflictsWithinSelectionSet(\n context,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n parentType,\n selectionSet,\n) {\n const conflicts = [];\n const [fieldMap, fragmentNames] = getFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n parentType,\n selectionSet,\n ); // (A) Find find all conflicts \"within\" the fields of this selection set.\n // Note: this is the *only place* `collectConflictsWithin` is called.\n\n collectConflictsWithin(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n fieldMap,\n );\n\n if (fragmentNames.length !== 0) {\n // (B) Then collect conflicts between these fields and those represented by\n // each spread fragment name found.\n for (let i = 0; i < fragmentNames.length; i++) {\n collectConflictsBetweenFieldsAndFragment(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n false,\n fieldMap,\n fragmentNames[i],\n ); // (C) Then compare this fragment with all other fragments found in this\n // selection set to collect conflicts between fragments spread together.\n // This compares each item in the list of fragment names to every other\n // item in that same list (except for itself).\n\n for (let j = i + 1; j < fragmentNames.length; j++) {\n collectConflictsBetweenFragments(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n false,\n fragmentNames[i],\n fragmentNames[j],\n );\n }\n }\n }\n\n return conflicts;\n} // Collect all conflicts found between a set of fields and a fragment reference\n// including via spreading in any nested fragments.\n\nfunction collectConflictsBetweenFieldsAndFragment(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap,\n fragmentName,\n) {\n const fragment = context.getFragment(fragmentName);\n\n if (!fragment) {\n return;\n }\n\n const [fieldMap2, referencedFragmentNames] =\n getReferencedFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n fragment,\n ); // Do not compare a fragment's fieldMap to itself.\n\n if (fieldMap === fieldMap2) {\n return;\n } // (D) First collect any conflicts between the provided collection of fields\n // and the collection of fields represented by the given fragment.\n\n collectConflictsBetween(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap,\n fieldMap2,\n ); // (E) Then collect any conflicts between the provided collection of fields\n // and any fragment names found in the given fragment.\n\n for (const referencedFragmentName of referencedFragmentNames) {\n // Memoize so two fragments are not compared for conflicts more than once.\n if (\n comparedFragmentPairs.has(\n referencedFragmentName,\n fragmentName,\n areMutuallyExclusive,\n )\n ) {\n continue;\n }\n\n comparedFragmentPairs.add(\n referencedFragmentName,\n fragmentName,\n areMutuallyExclusive,\n );\n collectConflictsBetweenFieldsAndFragment(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap,\n referencedFragmentName,\n );\n }\n} // Collect all conflicts found between two fragments, including via spreading in\n// any nested fragments.\n\nfunction collectConflictsBetweenFragments(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fragmentName1,\n fragmentName2,\n) {\n // No need to compare a fragment to itself.\n if (fragmentName1 === fragmentName2) {\n return;\n } // Memoize so two fragments are not compared for conflicts more than once.\n\n if (\n comparedFragmentPairs.has(\n fragmentName1,\n fragmentName2,\n areMutuallyExclusive,\n )\n ) {\n return;\n }\n\n comparedFragmentPairs.add(fragmentName1, fragmentName2, areMutuallyExclusive);\n const fragment1 = context.getFragment(fragmentName1);\n const fragment2 = context.getFragment(fragmentName2);\n\n if (!fragment1 || !fragment2) {\n return;\n }\n\n const [fieldMap1, referencedFragmentNames1] =\n getReferencedFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n fragment1,\n );\n const [fieldMap2, referencedFragmentNames2] =\n getReferencedFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n fragment2,\n ); // (F) First, collect all conflicts between these two collections of fields\n // (not including any nested fragments).\n\n collectConflictsBetween(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap1,\n fieldMap2,\n ); // (G) Then collect conflicts between the first fragment and any nested\n // fragments spread in the second fragment.\n\n for (const referencedFragmentName2 of referencedFragmentNames2) {\n collectConflictsBetweenFragments(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fragmentName1,\n referencedFragmentName2,\n );\n } // (G) Then collect conflicts between the second fragment and any nested\n // fragments spread in the first fragment.\n\n for (const referencedFragmentName1 of referencedFragmentNames1) {\n collectConflictsBetweenFragments(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n referencedFragmentName1,\n fragmentName2,\n );\n }\n} // Find all conflicts found between two selection sets, including those found\n// via spreading in fragments. Called when determining if conflicts exist\n// between the sub-fields of two overlapping fields.\n\nfunction findConflictsBetweenSubSelectionSets(\n context,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n parentType1,\n selectionSet1,\n parentType2,\n selectionSet2,\n) {\n const conflicts = [];\n const [fieldMap1, fragmentNames1] = getFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n parentType1,\n selectionSet1,\n );\n const [fieldMap2, fragmentNames2] = getFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n parentType2,\n selectionSet2,\n ); // (H) First, collect all conflicts between these two collections of field.\n\n collectConflictsBetween(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap1,\n fieldMap2,\n ); // (I) Then collect conflicts between the first collection of fields and\n // those referenced by each fragment name associated with the second.\n\n for (const fragmentName2 of fragmentNames2) {\n collectConflictsBetweenFieldsAndFragment(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap1,\n fragmentName2,\n );\n } // (I) Then collect conflicts between the second collection of fields and\n // those referenced by each fragment name associated with the first.\n\n for (const fragmentName1 of fragmentNames1) {\n collectConflictsBetweenFieldsAndFragment(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap2,\n fragmentName1,\n );\n } // (J) Also collect conflicts between any fragment names by the first and\n // fragment names by the second. This compares each item in the first set of\n // names to each item in the second set of names.\n\n for (const fragmentName1 of fragmentNames1) {\n for (const fragmentName2 of fragmentNames2) {\n collectConflictsBetweenFragments(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fragmentName1,\n fragmentName2,\n );\n }\n }\n\n return conflicts;\n} // Collect all Conflicts \"within\" one collection of fields.\n\nfunction collectConflictsWithin(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n fieldMap,\n) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For every response name, if there are multiple fields, they\n // must be compared to find a potential conflict.\n for (const [responseName, fields] of Object.entries(fieldMap)) {\n // This compares every field in the list to every other field in this list\n // (except to itself). If the list only has one item, nothing needs to\n // be compared.\n if (fields.length > 1) {\n for (let i = 0; i < fields.length; i++) {\n for (let j = i + 1; j < fields.length; j++) {\n const conflict = findConflict(\n context,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n false, // within one collection is never mutually exclusive\n responseName,\n fields[i],\n fields[j],\n );\n\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n }\n} // Collect all Conflicts between two collections of fields. This is similar to,\n// but different from the `collectConflictsWithin` function above. This check\n// assumes that `collectConflictsWithin` has already been called on each\n// provided collection of fields. This is true because this validator traverses\n// each individual selection set.\n\nfunction collectConflictsBetween(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n parentFieldsAreMutuallyExclusive,\n fieldMap1,\n fieldMap2,\n) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For any response name which appears in both provided field\n // maps, each field from the first field map must be compared to every field\n // in the second field map to find potential conflicts.\n for (const [responseName, fields1] of Object.entries(fieldMap1)) {\n const fields2 = fieldMap2[responseName];\n\n if (fields2) {\n for (const field1 of fields1) {\n for (const field2 of fields2) {\n const conflict = findConflict(\n context,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n parentFieldsAreMutuallyExclusive,\n responseName,\n field1,\n field2,\n );\n\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n }\n} // Determines if there is a conflict between two particular fields, including\n// comparing their sub-fields.\n\nfunction findConflict(\n context,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n parentFieldsAreMutuallyExclusive,\n responseName,\n field1,\n field2,\n) {\n const [parentType1, node1, def1] = field1;\n const [parentType2, node2, def2] = field2; // If it is known that two fields could not possibly apply at the same\n // time, due to the parent types, then it is safe to permit them to diverge\n // in aliased field or arguments used as they will not present any ambiguity\n // by differing.\n // It is known that two parent types could never overlap if they are\n // different Object types. Interface or Union types might overlap - if not\n // in the current state of the schema, then perhaps in some future version,\n // thus may not safely diverge.\n\n const areMutuallyExclusive =\n parentFieldsAreMutuallyExclusive ||\n (parentType1 !== parentType2 &&\n isObjectType(parentType1) &&\n isObjectType(parentType2));\n\n if (!areMutuallyExclusive) {\n // Two aliases must refer to the same field.\n const name1 = node1.name.value;\n const name2 = node2.name.value;\n\n if (name1 !== name2) {\n return [\n [responseName, `\"${name1}\" and \"${name2}\" are different fields`],\n [node1],\n [node2],\n ];\n } // Two field calls must have the same arguments.\n\n if (!sameArguments(node1, node2)) {\n return [\n [responseName, 'they have differing arguments'],\n [node1],\n [node2],\n ];\n }\n } // The return type for each field.\n\n const type1 = def1 === null || def1 === void 0 ? void 0 : def1.type;\n const type2 = def2 === null || def2 === void 0 ? void 0 : def2.type;\n\n if (type1 && type2 && doTypesConflict(type1, type2)) {\n return [\n [\n responseName,\n `they return conflicting types \"${inspect(type1)}\" and \"${inspect(\n type2,\n )}\"`,\n ],\n [node1],\n [node2],\n ];\n } // Collect and compare sub-fields. Use the same \"visited fragment names\" list\n // for both collections so fields in a fragment reference are never\n // compared to themselves.\n\n const selectionSet1 = node1.selectionSet;\n const selectionSet2 = node2.selectionSet;\n\n if (selectionSet1 && selectionSet2) {\n const conflicts = findConflictsBetweenSubSelectionSets(\n context,\n cachedFieldsAndFragmentNames,\n comparedFragmentPairs,\n areMutuallyExclusive,\n getNamedType(type1),\n selectionSet1,\n getNamedType(type2),\n selectionSet2,\n );\n return subfieldConflicts(conflicts, responseName, node1, node2);\n }\n}\n\nfunction sameArguments(node1, node2) {\n const args1 = node1.arguments;\n const args2 = node2.arguments;\n\n if (args1 === undefined || args1.length === 0) {\n return args2 === undefined || args2.length === 0;\n }\n\n if (args2 === undefined || args2.length === 0) {\n return false;\n }\n /* c8 ignore next */\n\n if (args1.length !== args2.length) {\n /* c8 ignore next */\n return false;\n /* c8 ignore next */\n }\n\n const values2 = new Map(args2.map(({ name, value }) => [name.value, value]));\n return args1.every((arg1) => {\n const value1 = arg1.value;\n const value2 = values2.get(arg1.name.value);\n\n if (value2 === undefined) {\n return false;\n }\n\n return stringifyValue(value1) === stringifyValue(value2);\n });\n}\n\nfunction stringifyValue(value) {\n return print(sortValueNode(value));\n} // Two types conflict if both types could not apply to a value simultaneously.\n// Composite types are ignored as their individual field types will be compared\n// later recursively. However List and Non-Null types must match.\n\nfunction doTypesConflict(type1, type2) {\n if (isListType(type1)) {\n return isListType(type2)\n ? doTypesConflict(type1.ofType, type2.ofType)\n : true;\n }\n\n if (isListType(type2)) {\n return true;\n }\n\n if (isNonNullType(type1)) {\n return isNonNullType(type2)\n ? doTypesConflict(type1.ofType, type2.ofType)\n : true;\n }\n\n if (isNonNullType(type2)) {\n return true;\n }\n\n if (isLeafType(type1) || isLeafType(type2)) {\n return type1 !== type2;\n }\n\n return false;\n} // Given a selection set, return the collection of fields (a mapping of response\n// name to field nodes and definitions) as well as a list of fragment names\n// referenced via fragment spreads.\n\nfunction getFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n parentType,\n selectionSet,\n) {\n const cached = cachedFieldsAndFragmentNames.get(selectionSet);\n\n if (cached) {\n return cached;\n }\n\n const nodeAndDefs = Object.create(null);\n const fragmentNames = Object.create(null);\n\n _collectFieldsAndFragmentNames(\n context,\n parentType,\n selectionSet,\n nodeAndDefs,\n fragmentNames,\n );\n\n const result = [nodeAndDefs, Object.keys(fragmentNames)];\n cachedFieldsAndFragmentNames.set(selectionSet, result);\n return result;\n} // Given a reference to a fragment, return the represented collection of fields\n// as well as a list of nested fragment names referenced via fragment spreads.\n\nfunction getReferencedFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n fragment,\n) {\n // Short-circuit building a type from the node if possible.\n const cached = cachedFieldsAndFragmentNames.get(fragment.selectionSet);\n\n if (cached) {\n return cached;\n }\n\n const fragmentType = typeFromAST(context.getSchema(), fragment.typeCondition);\n return getFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n fragmentType,\n fragment.selectionSet,\n );\n}\n\nfunction _collectFieldsAndFragmentNames(\n context,\n parentType,\n selectionSet,\n nodeAndDefs,\n fragmentNames,\n) {\n for (const selection of selectionSet.selections) {\n switch (selection.kind) {\n case Kind.FIELD: {\n const fieldName = selection.name.value;\n let fieldDef;\n\n if (isObjectType(parentType) || isInterfaceType(parentType)) {\n fieldDef = parentType.getFields()[fieldName];\n }\n\n const responseName = selection.alias\n ? selection.alias.value\n : fieldName;\n\n if (!nodeAndDefs[responseName]) {\n nodeAndDefs[responseName] = [];\n }\n\n nodeAndDefs[responseName].push([parentType, selection, fieldDef]);\n break;\n }\n\n case Kind.FRAGMENT_SPREAD:\n fragmentNames[selection.name.value] = true;\n break;\n\n case Kind.INLINE_FRAGMENT: {\n const typeCondition = selection.typeCondition;\n const inlineFragmentType = typeCondition\n ? typeFromAST(context.getSchema(), typeCondition)\n : parentType;\n\n _collectFieldsAndFragmentNames(\n context,\n inlineFragmentType,\n selection.selectionSet,\n nodeAndDefs,\n fragmentNames,\n );\n\n break;\n }\n }\n }\n} // Given a series of Conflicts which occurred between two sub-fields, generate\n// a single Conflict.\n\nfunction subfieldConflicts(conflicts, responseName, node1, node2) {\n if (conflicts.length > 0) {\n return [\n [responseName, conflicts.map(([reason]) => reason)],\n [node1, ...conflicts.map(([, fields1]) => fields1).flat()],\n [node2, ...conflicts.map(([, , fields2]) => fields2).flat()],\n ];\n }\n}\n/**\n * A way to keep track of pairs of things when the ordering of the pair does not matter.\n */\n\nclass PairSet {\n constructor() {\n this._data = new Map();\n }\n\n has(a, b, areMutuallyExclusive) {\n var _this$_data$get;\n\n const [key1, key2] = a < b ? [a, b] : [b, a];\n const result =\n (_this$_data$get = this._data.get(key1)) === null ||\n _this$_data$get === void 0\n ? void 0\n : _this$_data$get.get(key2);\n\n if (result === undefined) {\n return false;\n } // areMutuallyExclusive being false is a superset of being true, hence if\n // we want to know if this PairSet \"has\" these two with no exclusivity,\n // we have to ensure it was added as such.\n\n return areMutuallyExclusive ? true : areMutuallyExclusive === result;\n }\n\n add(a, b, areMutuallyExclusive) {\n const [key1, key2] = a < b ? [a, b] : [b, a];\n\n const map = this._data.get(key1);\n\n if (map === undefined) {\n this._data.set(key1, new Map([[key2, areMutuallyExclusive]]));\n } else {\n map.set(key2, areMutuallyExclusive);\n }\n }\n}\n","import { inspect } from '../../jsutils/inspect.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { isCompositeType } from '../../type/definition.mjs';\nimport { doTypesOverlap } from '../../utilities/typeComparators.mjs';\nimport { typeFromAST } from '../../utilities/typeFromAST.mjs';\n\n/**\n * Possible fragment spread\n *\n * A fragment spread is only valid if the type condition could ever possibly\n * be true: if there is a non-empty intersection of the possible parent types,\n * and possible types which pass the type condition.\n */\nexport function PossibleFragmentSpreadsRule(context) {\n return {\n InlineFragment(node) {\n const fragType = context.getType();\n const parentType = context.getParentType();\n\n if (\n isCompositeType(fragType) &&\n isCompositeType(parentType) &&\n !doTypesOverlap(context.getSchema(), fragType, parentType)\n ) {\n const parentTypeStr = inspect(parentType);\n const fragTypeStr = inspect(fragType);\n context.reportError(\n new GraphQLError(\n `Fragment cannot be spread here as objects of type \"${parentTypeStr}\" can never be of type \"${fragTypeStr}\".`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n\n FragmentSpread(node) {\n const fragName = node.name.value;\n const fragType = getFragmentType(context, fragName);\n const parentType = context.getParentType();\n\n if (\n fragType &&\n parentType &&\n !doTypesOverlap(context.getSchema(), fragType, parentType)\n ) {\n const parentTypeStr = inspect(parentType);\n const fragTypeStr = inspect(fragType);\n context.reportError(\n new GraphQLError(\n `Fragment \"${fragName}\" cannot be spread here as objects of type \"${parentTypeStr}\" can never be of type \"${fragTypeStr}\".`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n };\n}\n\nfunction getFragmentType(context, name) {\n const frag = context.getFragment(name);\n\n if (frag) {\n const type = typeFromAST(context.getSchema(), frag.typeCondition);\n\n if (isCompositeType(type)) {\n return type;\n }\n }\n}\n","import { didYouMean } from '../../jsutils/didYouMean.mjs';\nimport { inspect } from '../../jsutils/inspect.mjs';\nimport { invariant } from '../../jsutils/invariant.mjs';\nimport { suggestionList } from '../../jsutils/suggestionList.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { Kind } from '../../language/kinds.mjs';\nimport { isTypeDefinitionNode } from '../../language/predicates.mjs';\nimport {\n isEnumType,\n isInputObjectType,\n isInterfaceType,\n isObjectType,\n isScalarType,\n isUnionType,\n} from '../../type/definition.mjs';\n\n/**\n * Possible type extension\n *\n * A type extension is only valid if the type is defined and has the same kind.\n */\nexport function PossibleTypeExtensionsRule(context) {\n const schema = context.getSchema();\n const definedTypes = Object.create(null);\n\n for (const def of context.getDocument().definitions) {\n if (isTypeDefinitionNode(def)) {\n definedTypes[def.name.value] = def;\n }\n }\n\n return {\n ScalarTypeExtension: checkExtension,\n ObjectTypeExtension: checkExtension,\n InterfaceTypeExtension: checkExtension,\n UnionTypeExtension: checkExtension,\n EnumTypeExtension: checkExtension,\n InputObjectTypeExtension: checkExtension,\n };\n\n function checkExtension(node) {\n const typeName = node.name.value;\n const defNode = definedTypes[typeName];\n const existingType =\n schema === null || schema === void 0 ? void 0 : schema.getType(typeName);\n let expectedKind;\n\n if (defNode) {\n expectedKind = defKindToExtKind[defNode.kind];\n } else if (existingType) {\n expectedKind = typeToExtKind(existingType);\n }\n\n if (expectedKind) {\n if (expectedKind !== node.kind) {\n const kindStr = extensionKindToTypeName(node.kind);\n context.reportError(\n new GraphQLError(`Cannot extend non-${kindStr} type \"${typeName}\".`, {\n nodes: defNode ? [defNode, node] : node,\n }),\n );\n }\n } else {\n const allTypeNames = Object.keys({\n ...definedTypes,\n ...(schema === null || schema === void 0\n ? void 0\n : schema.getTypeMap()),\n });\n const suggestedTypes = suggestionList(typeName, allTypeNames);\n context.reportError(\n new GraphQLError(\n `Cannot extend type \"${typeName}\" because it is not defined.` +\n didYouMean(suggestedTypes),\n {\n nodes: node.name,\n },\n ),\n );\n }\n }\n}\nconst defKindToExtKind = {\n [Kind.SCALAR_TYPE_DEFINITION]: Kind.SCALAR_TYPE_EXTENSION,\n [Kind.OBJECT_TYPE_DEFINITION]: Kind.OBJECT_TYPE_EXTENSION,\n [Kind.INTERFACE_TYPE_DEFINITION]: Kind.INTERFACE_TYPE_EXTENSION,\n [Kind.UNION_TYPE_DEFINITION]: Kind.UNION_TYPE_EXTENSION,\n [Kind.ENUM_TYPE_DEFINITION]: Kind.ENUM_TYPE_EXTENSION,\n [Kind.INPUT_OBJECT_TYPE_DEFINITION]: Kind.INPUT_OBJECT_TYPE_EXTENSION,\n};\n\nfunction typeToExtKind(type) {\n if (isScalarType(type)) {\n return Kind.SCALAR_TYPE_EXTENSION;\n }\n\n if (isObjectType(type)) {\n return Kind.OBJECT_TYPE_EXTENSION;\n }\n\n if (isInterfaceType(type)) {\n return Kind.INTERFACE_TYPE_EXTENSION;\n }\n\n if (isUnionType(type)) {\n return Kind.UNION_TYPE_EXTENSION;\n }\n\n if (isEnumType(type)) {\n return Kind.ENUM_TYPE_EXTENSION;\n }\n\n if (isInputObjectType(type)) {\n return Kind.INPUT_OBJECT_TYPE_EXTENSION;\n }\n /* c8 ignore next 3 */\n // Not reachable. All possible types have been considered\n\n false || invariant(false, 'Unexpected type: ' + inspect(type));\n}\n\nfunction extensionKindToTypeName(kind) {\n switch (kind) {\n case Kind.SCALAR_TYPE_EXTENSION:\n return 'scalar';\n\n case Kind.OBJECT_TYPE_EXTENSION:\n return 'object';\n\n case Kind.INTERFACE_TYPE_EXTENSION:\n return 'interface';\n\n case Kind.UNION_TYPE_EXTENSION:\n return 'union';\n\n case Kind.ENUM_TYPE_EXTENSION:\n return 'enum';\n\n case Kind.INPUT_OBJECT_TYPE_EXTENSION:\n return 'input object';\n // Not reachable. All possible types have been considered\n\n /* c8 ignore next */\n\n default:\n false || invariant(false, 'Unexpected kind: ' + inspect(kind));\n }\n}\n","import { inspect } from '../../jsutils/inspect.mjs';\nimport { keyMap } from '../../jsutils/keyMap.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { Kind } from '../../language/kinds.mjs';\nimport { print } from '../../language/printer.mjs';\nimport { isRequiredArgument, isType } from '../../type/definition.mjs';\nimport { specifiedDirectives } from '../../type/directives.mjs';\n\n/**\n * Provided required arguments\n *\n * A field or directive is only valid if all required (non-null without a\n * default value) field arguments have been provided.\n */\nexport function ProvidedRequiredArgumentsRule(context) {\n return {\n // eslint-disable-next-line new-cap\n ...ProvidedRequiredArgumentsOnDirectivesRule(context),\n Field: {\n // Validate on leave to allow for deeper errors to appear first.\n leave(fieldNode) {\n var _fieldNode$arguments;\n\n const fieldDef = context.getFieldDef();\n\n if (!fieldDef) {\n return false;\n }\n\n const providedArgs = new Set( // FIXME: https://github.com/graphql/graphql-js/issues/2203\n /* c8 ignore next */\n (_fieldNode$arguments = fieldNode.arguments) === null ||\n _fieldNode$arguments === void 0\n ? void 0\n : _fieldNode$arguments.map((arg) => arg.name.value),\n );\n\n for (const argDef of fieldDef.args) {\n if (!providedArgs.has(argDef.name) && isRequiredArgument(argDef)) {\n const argTypeStr = inspect(argDef.type);\n context.reportError(\n new GraphQLError(\n `Field \"${fieldDef.name}\" argument \"${argDef.name}\" of type \"${argTypeStr}\" is required, but it was not provided.`,\n {\n nodes: fieldNode,\n },\n ),\n );\n }\n }\n },\n },\n };\n}\n/**\n * @internal\n */\n\nexport function ProvidedRequiredArgumentsOnDirectivesRule(context) {\n var _schema$getDirectives;\n\n const requiredArgsMap = Object.create(null);\n const schema = context.getSchema();\n const definedDirectives =\n (_schema$getDirectives =\n schema === null || schema === void 0\n ? void 0\n : schema.getDirectives()) !== null && _schema$getDirectives !== void 0\n ? _schema$getDirectives\n : specifiedDirectives;\n\n for (const directive of definedDirectives) {\n requiredArgsMap[directive.name] = keyMap(\n directive.args.filter(isRequiredArgument),\n (arg) => arg.name,\n );\n }\n\n const astDefinitions = context.getDocument().definitions;\n\n for (const def of astDefinitions) {\n if (def.kind === Kind.DIRECTIVE_DEFINITION) {\n var _def$arguments;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const argNodes =\n (_def$arguments = def.arguments) !== null && _def$arguments !== void 0\n ? _def$arguments\n : [];\n requiredArgsMap[def.name.value] = keyMap(\n argNodes.filter(isRequiredArgumentNode),\n (arg) => arg.name.value,\n );\n }\n }\n\n return {\n Directive: {\n // Validate on leave to allow for deeper errors to appear first.\n leave(directiveNode) {\n const directiveName = directiveNode.name.value;\n const requiredArgs = requiredArgsMap[directiveName];\n\n if (requiredArgs) {\n var _directiveNode$argume;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const argNodes =\n (_directiveNode$argume = directiveNode.arguments) !== null &&\n _directiveNode$argume !== void 0\n ? _directiveNode$argume\n : [];\n const argNodeMap = new Set(argNodes.map((arg) => arg.name.value));\n\n for (const [argName, argDef] of Object.entries(requiredArgs)) {\n if (!argNodeMap.has(argName)) {\n const argType = isType(argDef.type)\n ? inspect(argDef.type)\n : print(argDef.type);\n context.reportError(\n new GraphQLError(\n `Directive \"@${directiveName}\" argument \"${argName}\" of type \"${argType}\" is required, but it was not provided.`,\n {\n nodes: directiveNode,\n },\n ),\n );\n }\n }\n }\n },\n },\n };\n}\n\nfunction isRequiredArgumentNode(arg) {\n return arg.type.kind === Kind.NON_NULL_TYPE && arg.defaultValue == null;\n}\n","import { inspect } from '../../jsutils/inspect.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { getNamedType, isLeafType } from '../../type/definition.mjs';\n\n/**\n * Scalar leafs\n *\n * A GraphQL document is valid only if all leaf fields (fields without\n * sub selections) are of scalar or enum types.\n */\nexport function ScalarLeafsRule(context) {\n return {\n Field(node) {\n const type = context.getType();\n const selectionSet = node.selectionSet;\n\n if (type) {\n if (isLeafType(getNamedType(type))) {\n if (selectionSet) {\n const fieldName = node.name.value;\n const typeStr = inspect(type);\n context.reportError(\n new GraphQLError(\n `Field \"${fieldName}\" must not have a selection since type \"${typeStr}\" has no subfields.`,\n {\n nodes: selectionSet,\n },\n ),\n );\n }\n } else if (!selectionSet) {\n const fieldName = node.name.value;\n const typeStr = inspect(type);\n context.reportError(\n new GraphQLError(\n `Field \"${fieldName}\" of type \"${typeStr}\" must have a selection of subfields. Did you mean \"${fieldName} { ... }\"?`,\n {\n nodes: node,\n },\n ),\n );\n }\n }\n },\n };\n}\n","/**\n * Build a string describing the path.\n */\nexport function printPathArray(path) {\n return path\n .map((key) =>\n typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key,\n )\n .join('');\n}\n","/**\n * Given a Path and a key, return a new Path containing the new key.\n */\nexport function addPath(prev, key, typename) {\n return {\n prev,\n key,\n typename,\n };\n}\n/**\n * Given a Path, return an Array of the path keys.\n */\n\nexport function pathToArray(path) {\n const flattened = [];\n let curr = path;\n\n while (curr) {\n flattened.push(curr.key);\n curr = curr.prev;\n }\n\n return flattened.reverse();\n}\n","import { didYouMean } from '../jsutils/didYouMean.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { invariant } from '../jsutils/invariant.mjs';\nimport { isIterableObject } from '../jsutils/isIterableObject.mjs';\nimport { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { addPath, pathToArray } from '../jsutils/Path.mjs';\nimport { printPathArray } from '../jsutils/printPathArray.mjs';\nimport { suggestionList } from '../jsutils/suggestionList.mjs';\nimport { GraphQLError } from '../error/GraphQLError.mjs';\nimport {\n isInputObjectType,\n isLeafType,\n isListType,\n isNonNullType,\n} from '../type/definition.mjs';\n\n/**\n * Coerces a JavaScript value given a GraphQL Input Type.\n */\nexport function coerceInputValue(inputValue, type, onError = defaultOnError) {\n return coerceInputValueImpl(inputValue, type, onError, undefined);\n}\n\nfunction defaultOnError(path, invalidValue, error) {\n let errorPrefix = 'Invalid value ' + inspect(invalidValue);\n\n if (path.length > 0) {\n errorPrefix += ` at \"value${printPathArray(path)}\"`;\n }\n\n error.message = errorPrefix + ': ' + error.message;\n throw error;\n}\n\nfunction coerceInputValueImpl(inputValue, type, onError, path) {\n if (isNonNullType(type)) {\n if (inputValue != null) {\n return coerceInputValueImpl(inputValue, type.ofType, onError, path);\n }\n\n onError(\n pathToArray(path),\n inputValue,\n new GraphQLError(\n `Expected non-nullable type \"${inspect(type)}\" not to be null.`,\n ),\n );\n return;\n }\n\n if (inputValue == null) {\n // Explicitly return the value null.\n return null;\n }\n\n if (isListType(type)) {\n const itemType = type.ofType;\n\n if (isIterableObject(inputValue)) {\n return Array.from(inputValue, (itemValue, index) => {\n const itemPath = addPath(path, index, undefined);\n return coerceInputValueImpl(itemValue, itemType, onError, itemPath);\n });\n } // Lists accept a non-list value as a list of one.\n\n return [coerceInputValueImpl(inputValue, itemType, onError, path)];\n }\n\n if (isInputObjectType(type)) {\n if (!isObjectLike(inputValue)) {\n onError(\n pathToArray(path),\n inputValue,\n new GraphQLError(`Expected type \"${type.name}\" to be an object.`),\n );\n return;\n }\n\n const coercedValue = {};\n const fieldDefs = type.getFields();\n\n for (const field of Object.values(fieldDefs)) {\n const fieldValue = inputValue[field.name];\n\n if (fieldValue === undefined) {\n if (field.defaultValue !== undefined) {\n coercedValue[field.name] = field.defaultValue;\n } else if (isNonNullType(field.type)) {\n const typeStr = inspect(field.type);\n onError(\n pathToArray(path),\n inputValue,\n new GraphQLError(\n `Field \"${field.name}\" of required type \"${typeStr}\" was not provided.`,\n ),\n );\n }\n\n continue;\n }\n\n coercedValue[field.name] = coerceInputValueImpl(\n fieldValue,\n field.type,\n onError,\n addPath(path, field.name, type.name),\n );\n } // Ensure every provided field is defined.\n\n for (const fieldName of Object.keys(inputValue)) {\n if (!fieldDefs[fieldName]) {\n const suggestions = suggestionList(\n fieldName,\n Object.keys(type.getFields()),\n );\n onError(\n pathToArray(path),\n inputValue,\n new GraphQLError(\n `Field \"${fieldName}\" is not defined by type \"${type.name}\".` +\n didYouMean(suggestions),\n ),\n );\n }\n }\n\n return coercedValue;\n }\n\n if (isLeafType(type)) {\n let parseResult; // Scalars and Enums determine if a input value is valid via parseValue(),\n // which can throw to indicate failure. If it throws, maintain a reference\n // to the original error.\n\n try {\n parseResult = type.parseValue(inputValue);\n } catch (error) {\n if (error instanceof GraphQLError) {\n onError(pathToArray(path), inputValue, error);\n } else {\n onError(\n pathToArray(path),\n inputValue,\n new GraphQLError(`Expected type \"${type.name}\". ` + error.message, {\n originalError: error,\n }),\n );\n }\n\n return;\n }\n\n if (parseResult === undefined) {\n onError(\n pathToArray(path),\n inputValue,\n new GraphQLError(`Expected type \"${type.name}\".`),\n );\n }\n\n return parseResult;\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible types have been considered.\n\n false || invariant(false, 'Unexpected input type: ' + inspect(type));\n}\n","import { inspect } from '../jsutils/inspect.mjs';\nimport { invariant } from '../jsutils/invariant.mjs';\nimport { keyMap } from '../jsutils/keyMap.mjs';\nimport { Kind } from '../language/kinds.mjs';\nimport {\n isInputObjectType,\n isLeafType,\n isListType,\n isNonNullType,\n} from '../type/definition.mjs';\n/**\n * Produces a JavaScript value given a GraphQL Value AST.\n *\n * A GraphQL type must be provided, which will be used to interpret different\n * GraphQL Value literals.\n *\n * Returns `undefined` when the value could not be validly coerced according to\n * the provided type.\n *\n * | GraphQL Value | JSON Value |\n * | -------------------- | ------------- |\n * | Input Object | Object |\n * | List | Array |\n * | Boolean | Boolean |\n * | String | String |\n * | Int / Float | Number |\n * | Enum Value | Unknown |\n * | NullValue | null |\n *\n */\n\nexport function valueFromAST(valueNode, type, variables) {\n if (!valueNode) {\n // When there is no node, then there is also no value.\n // Importantly, this is different from returning the value null.\n return;\n }\n\n if (valueNode.kind === Kind.VARIABLE) {\n const variableName = valueNode.name.value;\n\n if (variables == null || variables[variableName] === undefined) {\n // No valid return value.\n return;\n }\n\n const variableValue = variables[variableName];\n\n if (variableValue === null && isNonNullType(type)) {\n return; // Invalid: intentionally return no value.\n } // Note: This does no further checking that this variable is correct.\n // This assumes that this query has been validated and the variable\n // usage here is of the correct type.\n\n return variableValue;\n }\n\n if (isNonNullType(type)) {\n if (valueNode.kind === Kind.NULL) {\n return; // Invalid: intentionally return no value.\n }\n\n return valueFromAST(valueNode, type.ofType, variables);\n }\n\n if (valueNode.kind === Kind.NULL) {\n // This is explicitly returning the value null.\n return null;\n }\n\n if (isListType(type)) {\n const itemType = type.ofType;\n\n if (valueNode.kind === Kind.LIST) {\n const coercedValues = [];\n\n for (const itemNode of valueNode.values) {\n if (isMissingVariable(itemNode, variables)) {\n // If an array contains a missing variable, it is either coerced to\n // null or if the item type is non-null, it considered invalid.\n if (isNonNullType(itemType)) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedValues.push(null);\n } else {\n const itemValue = valueFromAST(itemNode, itemType, variables);\n\n if (itemValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedValues.push(itemValue);\n }\n }\n\n return coercedValues;\n }\n\n const coercedValue = valueFromAST(valueNode, itemType, variables);\n\n if (coercedValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n return [coercedValue];\n }\n\n if (isInputObjectType(type)) {\n if (valueNode.kind !== Kind.OBJECT) {\n return; // Invalid: intentionally return no value.\n }\n\n const coercedObj = Object.create(null);\n const fieldNodes = keyMap(valueNode.fields, (field) => field.name.value);\n\n for (const field of Object.values(type.getFields())) {\n const fieldNode = fieldNodes[field.name];\n\n if (!fieldNode || isMissingVariable(fieldNode.value, variables)) {\n if (field.defaultValue !== undefined) {\n coercedObj[field.name] = field.defaultValue;\n } else if (isNonNullType(field.type)) {\n return; // Invalid: intentionally return no value.\n }\n\n continue;\n }\n\n const fieldValue = valueFromAST(fieldNode.value, field.type, variables);\n\n if (fieldValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedObj[field.name] = fieldValue;\n }\n\n return coercedObj;\n }\n\n if (isLeafType(type)) {\n // Scalars and Enums fulfill parsing a literal value via parseLiteral().\n // Invalid values represent a failure to parse correctly, in which case\n // no value is returned.\n let result;\n\n try {\n result = type.parseLiteral(valueNode, variables);\n } catch (_error) {\n return; // Invalid: intentionally return no value.\n }\n\n if (result === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n return result;\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible input types have been considered.\n\n false || invariant(false, 'Unexpected input type: ' + inspect(type));\n} // Returns true if the provided valueNode is a variable which is not defined\n// in the set of variables.\n\nfunction isMissingVariable(valueNode, variables) {\n return (\n valueNode.kind === Kind.VARIABLE &&\n (variables == null || variables[valueNode.name.value] === undefined)\n );\n}\n","import { inspect } from '../jsutils/inspect.mjs';\nimport { keyMap } from '../jsutils/keyMap.mjs';\nimport { printPathArray } from '../jsutils/printPathArray.mjs';\nimport { GraphQLError } from '../error/GraphQLError.mjs';\nimport { Kind } from '../language/kinds.mjs';\nimport { print } from '../language/printer.mjs';\nimport { isInputType, isNonNullType } from '../type/definition.mjs';\nimport { coerceInputValue } from '../utilities/coerceInputValue.mjs';\nimport { typeFromAST } from '../utilities/typeFromAST.mjs';\nimport { valueFromAST } from '../utilities/valueFromAST.mjs';\n\n/**\n * Prepares an object map of variableValues of the correct type based on the\n * provided variable definitions and arbitrary input. If the input cannot be\n * parsed to match the variable definitions, a GraphQLError will be thrown.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n */\nexport function getVariableValues(schema, varDefNodes, inputs, options) {\n const errors = [];\n const maxErrors =\n options === null || options === void 0 ? void 0 : options.maxErrors;\n\n try {\n const coerced = coerceVariableValues(\n schema,\n varDefNodes,\n inputs,\n (error) => {\n if (maxErrors != null && errors.length >= maxErrors) {\n throw new GraphQLError(\n 'Too many errors processing variables, error limit reached. Execution aborted.',\n );\n }\n\n errors.push(error);\n },\n );\n\n if (errors.length === 0) {\n return {\n coerced,\n };\n }\n } catch (error) {\n errors.push(error);\n }\n\n return {\n errors,\n };\n}\n\nfunction coerceVariableValues(schema, varDefNodes, inputs, onError) {\n const coercedValues = {};\n\n for (const varDefNode of varDefNodes) {\n const varName = varDefNode.variable.name.value;\n const varType = typeFromAST(schema, varDefNode.type);\n\n if (!isInputType(varType)) {\n // Must use input types for variables. This should be caught during\n // validation, however is checked again here for safety.\n const varTypeStr = print(varDefNode.type);\n onError(\n new GraphQLError(\n `Variable \"$${varName}\" expected value of type \"${varTypeStr}\" which cannot be used as an input type.`,\n {\n nodes: varDefNode.type,\n },\n ),\n );\n continue;\n }\n\n if (!hasOwnProperty(inputs, varName)) {\n if (varDefNode.defaultValue) {\n coercedValues[varName] = valueFromAST(varDefNode.defaultValue, varType);\n } else if (isNonNullType(varType)) {\n const varTypeStr = inspect(varType);\n onError(\n new GraphQLError(\n `Variable \"$${varName}\" of required type \"${varTypeStr}\" was not provided.`,\n {\n nodes: varDefNode,\n },\n ),\n );\n }\n\n continue;\n }\n\n const value = inputs[varName];\n\n if (value === null && isNonNullType(varType)) {\n const varTypeStr = inspect(varType);\n onError(\n new GraphQLError(\n `Variable \"$${varName}\" of non-null type \"${varTypeStr}\" must not be null.`,\n {\n nodes: varDefNode,\n },\n ),\n );\n continue;\n }\n\n coercedValues[varName] = coerceInputValue(\n value,\n varType,\n (path, invalidValue, error) => {\n let prefix =\n `Variable \"$${varName}\" got invalid value ` + inspect(invalidValue);\n\n if (path.length > 0) {\n prefix += ` at \"${varName}${printPathArray(path)}\"`;\n }\n\n onError(\n new GraphQLError(prefix + '; ' + error.message, {\n nodes: varDefNode,\n originalError: error,\n }),\n );\n },\n );\n }\n\n return coercedValues;\n}\n/**\n * Prepares an object map of argument values given a list of argument\n * definitions and list of argument AST nodes.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n */\n\nexport function getArgumentValues(def, node, variableValues) {\n var _node$arguments;\n\n const coercedValues = {}; // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n\n const argumentNodes =\n (_node$arguments = node.arguments) !== null && _node$arguments !== void 0\n ? _node$arguments\n : [];\n const argNodeMap = keyMap(argumentNodes, (arg) => arg.name.value);\n\n for (const argDef of def.args) {\n const name = argDef.name;\n const argType = argDef.type;\n const argumentNode = argNodeMap[name];\n\n if (!argumentNode) {\n if (argDef.defaultValue !== undefined) {\n coercedValues[name] = argDef.defaultValue;\n } else if (isNonNullType(argType)) {\n throw new GraphQLError(\n `Argument \"${name}\" of required type \"${inspect(argType)}\" ` +\n 'was not provided.',\n {\n nodes: node,\n },\n );\n }\n\n continue;\n }\n\n const valueNode = argumentNode.value;\n let isNull = valueNode.kind === Kind.NULL;\n\n if (valueNode.kind === Kind.VARIABLE) {\n const variableName = valueNode.name.value;\n\n if (\n variableValues == null ||\n !hasOwnProperty(variableValues, variableName)\n ) {\n if (argDef.defaultValue !== undefined) {\n coercedValues[name] = argDef.defaultValue;\n } else if (isNonNullType(argType)) {\n throw new GraphQLError(\n `Argument \"${name}\" of required type \"${inspect(argType)}\" ` +\n `was provided the variable \"$${variableName}\" which was not provided a runtime value.`,\n {\n nodes: valueNode,\n },\n );\n }\n\n continue;\n }\n\n isNull = variableValues[variableName] == null;\n }\n\n if (isNull && isNonNullType(argType)) {\n throw new GraphQLError(\n `Argument \"${name}\" of non-null type \"${inspect(argType)}\" ` +\n 'must not be null.',\n {\n nodes: valueNode,\n },\n );\n }\n\n const coercedValue = valueFromAST(valueNode, argType, variableValues);\n\n if (coercedValue === undefined) {\n // Note: ValuesOfCorrectTypeRule validation should catch this before\n // execution. This is a runtime check to ensure execution does not\n // continue with an invalid argument value.\n throw new GraphQLError(\n `Argument \"${name}\" has invalid value ${print(valueNode)}.`,\n {\n nodes: valueNode,\n },\n );\n }\n\n coercedValues[name] = coercedValue;\n }\n\n return coercedValues;\n}\n/**\n * Prepares an object map of argument values given a directive definition\n * and a AST node which may contain directives. Optionally also accepts a map\n * of variable values.\n *\n * If the directive does not exist on the node, returns undefined.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n */\n\nexport function getDirectiveValues(directiveDef, node, variableValues) {\n var _node$directives;\n\n const directiveNode =\n (_node$directives = node.directives) === null || _node$directives === void 0\n ? void 0\n : _node$directives.find(\n (directive) => directive.name.value === directiveDef.name,\n );\n\n if (directiveNode) {\n return getArgumentValues(directiveDef, directiveNode, variableValues);\n }\n}\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n","import { Kind } from '../language/kinds.mjs';\nimport { isAbstractType } from '../type/definition.mjs';\nimport {\n GraphQLIncludeDirective,\n GraphQLSkipDirective,\n} from '../type/directives.mjs';\nimport { typeFromAST } from '../utilities/typeFromAST.mjs';\nimport { getDirectiveValues } from './values.mjs';\n/**\n * Given a selectionSet, collects all of the fields and returns them.\n *\n * CollectFields requires the \"runtime type\" of an object. For a field that\n * returns an Interface or Union type, the \"runtime type\" will be the actual\n * object type returned by that field.\n *\n * @internal\n */\n\nexport function collectFields(\n schema,\n fragments,\n variableValues,\n runtimeType,\n selectionSet,\n) {\n const fields = new Map();\n collectFieldsImpl(\n schema,\n fragments,\n variableValues,\n runtimeType,\n selectionSet,\n fields,\n new Set(),\n );\n return fields;\n}\n/**\n * Given an array of field nodes, collects all of the subfields of the passed\n * in fields, and returns them at the end.\n *\n * CollectSubFields requires the \"return type\" of an object. For a field that\n * returns an Interface or Union type, the \"return type\" will be the actual\n * object type returned by that field.\n *\n * @internal\n */\n\nexport function collectSubfields(\n schema,\n fragments,\n variableValues,\n returnType,\n fieldNodes,\n) {\n const subFieldNodes = new Map();\n const visitedFragmentNames = new Set();\n\n for (const node of fieldNodes) {\n if (node.selectionSet) {\n collectFieldsImpl(\n schema,\n fragments,\n variableValues,\n returnType,\n node.selectionSet,\n subFieldNodes,\n visitedFragmentNames,\n );\n }\n }\n\n return subFieldNodes;\n}\n\nfunction collectFieldsImpl(\n schema,\n fragments,\n variableValues,\n runtimeType,\n selectionSet,\n fields,\n visitedFragmentNames,\n) {\n for (const selection of selectionSet.selections) {\n switch (selection.kind) {\n case Kind.FIELD: {\n if (!shouldIncludeNode(variableValues, selection)) {\n continue;\n }\n\n const name = getFieldEntryKey(selection);\n const fieldList = fields.get(name);\n\n if (fieldList !== undefined) {\n fieldList.push(selection);\n } else {\n fields.set(name, [selection]);\n }\n\n break;\n }\n\n case Kind.INLINE_FRAGMENT: {\n if (\n !shouldIncludeNode(variableValues, selection) ||\n !doesFragmentConditionMatch(schema, selection, runtimeType)\n ) {\n continue;\n }\n\n collectFieldsImpl(\n schema,\n fragments,\n variableValues,\n runtimeType,\n selection.selectionSet,\n fields,\n visitedFragmentNames,\n );\n break;\n }\n\n case Kind.FRAGMENT_SPREAD: {\n const fragName = selection.name.value;\n\n if (\n visitedFragmentNames.has(fragName) ||\n !shouldIncludeNode(variableValues, selection)\n ) {\n continue;\n }\n\n visitedFragmentNames.add(fragName);\n const fragment = fragments[fragName];\n\n if (\n !fragment ||\n !doesFragmentConditionMatch(schema, fragment, runtimeType)\n ) {\n continue;\n }\n\n collectFieldsImpl(\n schema,\n fragments,\n variableValues,\n runtimeType,\n fragment.selectionSet,\n fields,\n visitedFragmentNames,\n );\n break;\n }\n }\n }\n}\n/**\n * Determines if a field should be included based on the `@include` and `@skip`\n * directives, where `@skip` has higher precedence than `@include`.\n */\n\nfunction shouldIncludeNode(variableValues, node) {\n const skip = getDirectiveValues(GraphQLSkipDirective, node, variableValues);\n\n if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) {\n return false;\n }\n\n const include = getDirectiveValues(\n GraphQLIncludeDirective,\n node,\n variableValues,\n );\n\n if (\n (include === null || include === void 0 ? void 0 : include.if) === false\n ) {\n return false;\n }\n\n return true;\n}\n/**\n * Determines if a fragment is applicable to the given type.\n */\n\nfunction doesFragmentConditionMatch(schema, fragment, type) {\n const typeConditionNode = fragment.typeCondition;\n\n if (!typeConditionNode) {\n return true;\n }\n\n const conditionalType = typeFromAST(schema, typeConditionNode);\n\n if (conditionalType === type) {\n return true;\n }\n\n if (isAbstractType(conditionalType)) {\n return schema.isSubType(conditionalType, type);\n }\n\n return false;\n}\n/**\n * Implements the logic to compute the key of a given field's entry\n */\n\nfunction getFieldEntryKey(node) {\n return node.alias ? node.alias.value : node.name.value;\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { Kind } from '../../language/kinds.mjs';\nimport { collectFields } from '../../execution/collectFields.mjs';\n\n/**\n * Subscriptions must only include a non-introspection field.\n *\n * A GraphQL subscription is valid only if it contains a single root field and\n * that root field is not an introspection field.\n *\n * See https://spec.graphql.org/draft/#sec-Single-root-field\n */\nexport function SingleFieldSubscriptionsRule(context) {\n return {\n OperationDefinition(node) {\n if (node.operation === 'subscription') {\n const schema = context.getSchema();\n const subscriptionType = schema.getSubscriptionType();\n\n if (subscriptionType) {\n const operationName = node.name ? node.name.value : null;\n const variableValues = Object.create(null);\n const document = context.getDocument();\n const fragments = Object.create(null);\n\n for (const definition of document.definitions) {\n if (definition.kind === Kind.FRAGMENT_DEFINITION) {\n fragments[definition.name.value] = definition;\n }\n }\n\n const fields = collectFields(\n schema,\n fragments,\n variableValues,\n subscriptionType,\n node.selectionSet,\n );\n\n if (fields.size > 1) {\n const fieldSelectionLists = [...fields.values()];\n const extraFieldSelectionLists = fieldSelectionLists.slice(1);\n const extraFieldSelections = extraFieldSelectionLists.flat();\n context.reportError(\n new GraphQLError(\n operationName != null\n ? `Subscription \"${operationName}\" must select only one top level field.`\n : 'Anonymous Subscription must select only one top level field.',\n {\n nodes: extraFieldSelections,\n },\n ),\n );\n }\n\n for (const fieldNodes of fields.values()) {\n const field = fieldNodes[0];\n const fieldName = field.name.value;\n\n if (fieldName.startsWith('__')) {\n context.reportError(\n new GraphQLError(\n operationName != null\n ? `Subscription \"${operationName}\" must not select an introspection top level field.`\n : 'Anonymous Subscription must not select an introspection top level field.',\n {\n nodes: fieldNodes,\n },\n ),\n );\n }\n }\n }\n }\n },\n };\n}\n","/**\n * Groups array items into a Map, given a function to produce grouping key.\n */\nexport function groupBy(list, keyFn) {\n const result = new Map();\n\n for (const item of list) {\n const key = keyFn(item);\n const group = result.get(key);\n\n if (group === undefined) {\n result.set(key, [item]);\n } else {\n group.push(item);\n }\n }\n\n return result;\n}\n","import { groupBy } from '../../jsutils/groupBy.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * Unique argument definition names\n *\n * A GraphQL Object or Interface type is only valid if all its fields have uniquely named arguments.\n * A GraphQL Directive is only valid if all its arguments are uniquely named.\n */\nexport function UniqueArgumentDefinitionNamesRule(context) {\n return {\n DirectiveDefinition(directiveNode) {\n var _directiveNode$argume;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const argumentNodes =\n (_directiveNode$argume = directiveNode.arguments) !== null &&\n _directiveNode$argume !== void 0\n ? _directiveNode$argume\n : [];\n return checkArgUniqueness(`@${directiveNode.name.value}`, argumentNodes);\n },\n\n InterfaceTypeDefinition: checkArgUniquenessPerField,\n InterfaceTypeExtension: checkArgUniquenessPerField,\n ObjectTypeDefinition: checkArgUniquenessPerField,\n ObjectTypeExtension: checkArgUniquenessPerField,\n };\n\n function checkArgUniquenessPerField(typeNode) {\n var _typeNode$fields;\n\n const typeName = typeNode.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n\n const fieldNodes =\n (_typeNode$fields = typeNode.fields) !== null &&\n _typeNode$fields !== void 0\n ? _typeNode$fields\n : [];\n\n for (const fieldDef of fieldNodes) {\n var _fieldDef$arguments;\n\n const fieldName = fieldDef.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n\n const argumentNodes =\n (_fieldDef$arguments = fieldDef.arguments) !== null &&\n _fieldDef$arguments !== void 0\n ? _fieldDef$arguments\n : [];\n checkArgUniqueness(`${typeName}.${fieldName}`, argumentNodes);\n }\n\n return false;\n }\n\n function checkArgUniqueness(parentName, argumentNodes) {\n const seenArgs = groupBy(argumentNodes, (arg) => arg.name.value);\n\n for (const [argName, argNodes] of seenArgs) {\n if (argNodes.length > 1) {\n context.reportError(\n new GraphQLError(\n `Argument \"${parentName}(${argName}:)\" can only be defined once.`,\n {\n nodes: argNodes.map((node) => node.name),\n },\n ),\n );\n }\n }\n\n return false;\n }\n}\n","import { groupBy } from '../../jsutils/groupBy.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * Unique argument names\n *\n * A GraphQL field or directive is only valid if all supplied arguments are\n * uniquely named.\n *\n * See https://spec.graphql.org/draft/#sec-Argument-Names\n */\nexport function UniqueArgumentNamesRule(context) {\n return {\n Field: checkArgUniqueness,\n Directive: checkArgUniqueness,\n };\n\n function checkArgUniqueness(parentNode) {\n var _parentNode$arguments;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const argumentNodes =\n (_parentNode$arguments = parentNode.arguments) !== null &&\n _parentNode$arguments !== void 0\n ? _parentNode$arguments\n : [];\n const seenArgs = groupBy(argumentNodes, (arg) => arg.name.value);\n\n for (const [argName, argNodes] of seenArgs) {\n if (argNodes.length > 1) {\n context.reportError(\n new GraphQLError(\n `There can be only one argument named \"${argName}\".`,\n {\n nodes: argNodes.map((node) => node.name),\n },\n ),\n );\n }\n }\n }\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * Unique directive names\n *\n * A GraphQL document is only valid if all defined directives have unique names.\n */\nexport function UniqueDirectiveNamesRule(context) {\n const knownDirectiveNames = Object.create(null);\n const schema = context.getSchema();\n return {\n DirectiveDefinition(node) {\n const directiveName = node.name.value;\n\n if (\n schema !== null &&\n schema !== void 0 &&\n schema.getDirective(directiveName)\n ) {\n context.reportError(\n new GraphQLError(\n `Directive \"@${directiveName}\" already exists in the schema. It cannot be redefined.`,\n {\n nodes: node.name,\n },\n ),\n );\n return;\n }\n\n if (knownDirectiveNames[directiveName]) {\n context.reportError(\n new GraphQLError(\n `There can be only one directive named \"@${directiveName}\".`,\n {\n nodes: [knownDirectiveNames[directiveName], node.name],\n },\n ),\n );\n } else {\n knownDirectiveNames[directiveName] = node.name;\n }\n\n return false;\n },\n };\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { Kind } from '../../language/kinds.mjs';\nimport {\n isTypeDefinitionNode,\n isTypeExtensionNode,\n} from '../../language/predicates.mjs';\nimport { specifiedDirectives } from '../../type/directives.mjs';\n\n/**\n * Unique directive names per location\n *\n * A GraphQL document is only valid if all non-repeatable directives at\n * a given location are uniquely named.\n *\n * See https://spec.graphql.org/draft/#sec-Directives-Are-Unique-Per-Location\n */\nexport function UniqueDirectivesPerLocationRule(context) {\n const uniqueDirectiveMap = Object.create(null);\n const schema = context.getSchema();\n const definedDirectives = schema\n ? schema.getDirectives()\n : specifiedDirectives;\n\n for (const directive of definedDirectives) {\n uniqueDirectiveMap[directive.name] = !directive.isRepeatable;\n }\n\n const astDefinitions = context.getDocument().definitions;\n\n for (const def of astDefinitions) {\n if (def.kind === Kind.DIRECTIVE_DEFINITION) {\n uniqueDirectiveMap[def.name.value] = !def.repeatable;\n }\n }\n\n const schemaDirectives = Object.create(null);\n const typeDirectivesMap = Object.create(null);\n return {\n // Many different AST nodes may contain directives. Rather than listing\n // them all, just listen for entering any node, and check to see if it\n // defines any directives.\n enter(node) {\n if (!('directives' in node) || !node.directives) {\n return;\n }\n\n let seenDirectives;\n\n if (\n node.kind === Kind.SCHEMA_DEFINITION ||\n node.kind === Kind.SCHEMA_EXTENSION\n ) {\n seenDirectives = schemaDirectives;\n } else if (isTypeDefinitionNode(node) || isTypeExtensionNode(node)) {\n const typeName = node.name.value;\n seenDirectives = typeDirectivesMap[typeName];\n\n if (seenDirectives === undefined) {\n typeDirectivesMap[typeName] = seenDirectives = Object.create(null);\n }\n } else {\n seenDirectives = Object.create(null);\n }\n\n for (const directive of node.directives) {\n const directiveName = directive.name.value;\n\n if (uniqueDirectiveMap[directiveName]) {\n if (seenDirectives[directiveName]) {\n context.reportError(\n new GraphQLError(\n `The directive \"@${directiveName}\" can only be used once at this location.`,\n {\n nodes: [seenDirectives[directiveName], directive],\n },\n ),\n );\n } else {\n seenDirectives[directiveName] = directive;\n }\n }\n }\n },\n };\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { isEnumType } from '../../type/definition.mjs';\n\n/**\n * Unique enum value names\n *\n * A GraphQL enum type is only valid if all its values are uniquely named.\n */\nexport function UniqueEnumValueNamesRule(context) {\n const schema = context.getSchema();\n const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);\n const knownValueNames = Object.create(null);\n return {\n EnumTypeDefinition: checkValueUniqueness,\n EnumTypeExtension: checkValueUniqueness,\n };\n\n function checkValueUniqueness(node) {\n var _node$values;\n\n const typeName = node.name.value;\n\n if (!knownValueNames[typeName]) {\n knownValueNames[typeName] = Object.create(null);\n } // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n\n const valueNodes =\n (_node$values = node.values) !== null && _node$values !== void 0\n ? _node$values\n : [];\n const valueNames = knownValueNames[typeName];\n\n for (const valueDef of valueNodes) {\n const valueName = valueDef.name.value;\n const existingType = existingTypeMap[typeName];\n\n if (isEnumType(existingType) && existingType.getValue(valueName)) {\n context.reportError(\n new GraphQLError(\n `Enum value \"${typeName}.${valueName}\" already exists in the schema. It cannot also be defined in this type extension.`,\n {\n nodes: valueDef.name,\n },\n ),\n );\n } else if (valueNames[valueName]) {\n context.reportError(\n new GraphQLError(\n `Enum value \"${typeName}.${valueName}\" can only be defined once.`,\n {\n nodes: [valueNames[valueName], valueDef.name],\n },\n ),\n );\n } else {\n valueNames[valueName] = valueDef.name;\n }\n }\n\n return false;\n }\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\nimport {\n isInputObjectType,\n isInterfaceType,\n isObjectType,\n} from '../../type/definition.mjs';\n\n/**\n * Unique field definition names\n *\n * A GraphQL complex type is only valid if all its fields are uniquely named.\n */\nexport function UniqueFieldDefinitionNamesRule(context) {\n const schema = context.getSchema();\n const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);\n const knownFieldNames = Object.create(null);\n return {\n InputObjectTypeDefinition: checkFieldUniqueness,\n InputObjectTypeExtension: checkFieldUniqueness,\n InterfaceTypeDefinition: checkFieldUniqueness,\n InterfaceTypeExtension: checkFieldUniqueness,\n ObjectTypeDefinition: checkFieldUniqueness,\n ObjectTypeExtension: checkFieldUniqueness,\n };\n\n function checkFieldUniqueness(node) {\n var _node$fields;\n\n const typeName = node.name.value;\n\n if (!knownFieldNames[typeName]) {\n knownFieldNames[typeName] = Object.create(null);\n } // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n\n const fieldNodes =\n (_node$fields = node.fields) !== null && _node$fields !== void 0\n ? _node$fields\n : [];\n const fieldNames = knownFieldNames[typeName];\n\n for (const fieldDef of fieldNodes) {\n const fieldName = fieldDef.name.value;\n\n if (hasField(existingTypeMap[typeName], fieldName)) {\n context.reportError(\n new GraphQLError(\n `Field \"${typeName}.${fieldName}\" already exists in the schema. It cannot also be defined in this type extension.`,\n {\n nodes: fieldDef.name,\n },\n ),\n );\n } else if (fieldNames[fieldName]) {\n context.reportError(\n new GraphQLError(\n `Field \"${typeName}.${fieldName}\" can only be defined once.`,\n {\n nodes: [fieldNames[fieldName], fieldDef.name],\n },\n ),\n );\n } else {\n fieldNames[fieldName] = fieldDef.name;\n }\n }\n\n return false;\n }\n}\n\nfunction hasField(type, fieldName) {\n if (isObjectType(type) || isInterfaceType(type) || isInputObjectType(type)) {\n return type.getFields()[fieldName] != null;\n }\n\n return false;\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * Unique fragment names\n *\n * A GraphQL document is only valid if all defined fragments have unique names.\n *\n * See https://spec.graphql.org/draft/#sec-Fragment-Name-Uniqueness\n */\nexport function UniqueFragmentNamesRule(context) {\n const knownFragmentNames = Object.create(null);\n return {\n OperationDefinition: () => false,\n\n FragmentDefinition(node) {\n const fragmentName = node.name.value;\n\n if (knownFragmentNames[fragmentName]) {\n context.reportError(\n new GraphQLError(\n `There can be only one fragment named \"${fragmentName}\".`,\n {\n nodes: [knownFragmentNames[fragmentName], node.name],\n },\n ),\n );\n } else {\n knownFragmentNames[fragmentName] = node.name;\n }\n\n return false;\n },\n };\n}\n","import { invariant } from '../../jsutils/invariant.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * Unique input field names\n *\n * A GraphQL input object value is only valid if all supplied fields are\n * uniquely named.\n *\n * See https://spec.graphql.org/draft/#sec-Input-Object-Field-Uniqueness\n */\nexport function UniqueInputFieldNamesRule(context) {\n const knownNameStack = [];\n let knownNames = Object.create(null);\n return {\n ObjectValue: {\n enter() {\n knownNameStack.push(knownNames);\n knownNames = Object.create(null);\n },\n\n leave() {\n const prevKnownNames = knownNameStack.pop();\n prevKnownNames || invariant(false);\n knownNames = prevKnownNames;\n },\n },\n\n ObjectField(node) {\n const fieldName = node.name.value;\n\n if (knownNames[fieldName]) {\n context.reportError(\n new GraphQLError(\n `There can be only one input field named \"${fieldName}\".`,\n {\n nodes: [knownNames[fieldName], node.name],\n },\n ),\n );\n } else {\n knownNames[fieldName] = node.name;\n }\n },\n };\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * Unique operation names\n *\n * A GraphQL document is only valid if all defined operations have unique names.\n *\n * See https://spec.graphql.org/draft/#sec-Operation-Name-Uniqueness\n */\nexport function UniqueOperationNamesRule(context) {\n const knownOperationNames = Object.create(null);\n return {\n OperationDefinition(node) {\n const operationName = node.name;\n\n if (operationName) {\n if (knownOperationNames[operationName.value]) {\n context.reportError(\n new GraphQLError(\n `There can be only one operation named \"${operationName.value}\".`,\n {\n nodes: [\n knownOperationNames[operationName.value],\n operationName,\n ],\n },\n ),\n );\n } else {\n knownOperationNames[operationName.value] = operationName;\n }\n }\n\n return false;\n },\n\n FragmentDefinition: () => false,\n };\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * Unique operation types\n *\n * A GraphQL document is only valid if it has only one type per operation.\n */\nexport function UniqueOperationTypesRule(context) {\n const schema = context.getSchema();\n const definedOperationTypes = Object.create(null);\n const existingOperationTypes = schema\n ? {\n query: schema.getQueryType(),\n mutation: schema.getMutationType(),\n subscription: schema.getSubscriptionType(),\n }\n : {};\n return {\n SchemaDefinition: checkOperationTypes,\n SchemaExtension: checkOperationTypes,\n };\n\n function checkOperationTypes(node) {\n var _node$operationTypes;\n\n // See: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const operationTypesNodes =\n (_node$operationTypes = node.operationTypes) !== null &&\n _node$operationTypes !== void 0\n ? _node$operationTypes\n : [];\n\n for (const operationType of operationTypesNodes) {\n const operation = operationType.operation;\n const alreadyDefinedOperationType = definedOperationTypes[operation];\n\n if (existingOperationTypes[operation]) {\n context.reportError(\n new GraphQLError(\n `Type for ${operation} already defined in the schema. It cannot be redefined.`,\n {\n nodes: operationType,\n },\n ),\n );\n } else if (alreadyDefinedOperationType) {\n context.reportError(\n new GraphQLError(\n `There can be only one ${operation} type in schema.`,\n {\n nodes: [alreadyDefinedOperationType, operationType],\n },\n ),\n );\n } else {\n definedOperationTypes[operation] = operationType;\n }\n }\n\n return false;\n }\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * Unique type names\n *\n * A GraphQL document is only valid if all defined types have unique names.\n */\nexport function UniqueTypeNamesRule(context) {\n const knownTypeNames = Object.create(null);\n const schema = context.getSchema();\n return {\n ScalarTypeDefinition: checkTypeName,\n ObjectTypeDefinition: checkTypeName,\n InterfaceTypeDefinition: checkTypeName,\n UnionTypeDefinition: checkTypeName,\n EnumTypeDefinition: checkTypeName,\n InputObjectTypeDefinition: checkTypeName,\n };\n\n function checkTypeName(node) {\n const typeName = node.name.value;\n\n if (schema !== null && schema !== void 0 && schema.getType(typeName)) {\n context.reportError(\n new GraphQLError(\n `Type \"${typeName}\" already exists in the schema. It cannot also be defined in this type definition.`,\n {\n nodes: node.name,\n },\n ),\n );\n return;\n }\n\n if (knownTypeNames[typeName]) {\n context.reportError(\n new GraphQLError(`There can be only one type named \"${typeName}\".`, {\n nodes: [knownTypeNames[typeName], node.name],\n }),\n );\n } else {\n knownTypeNames[typeName] = node.name;\n }\n\n return false;\n }\n}\n","import { groupBy } from '../../jsutils/groupBy.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\n\n/**\n * Unique variable names\n *\n * A GraphQL operation is only valid if all its variables are uniquely named.\n */\nexport function UniqueVariableNamesRule(context) {\n return {\n OperationDefinition(operationNode) {\n var _operationNode$variab;\n\n // See: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const variableDefinitions =\n (_operationNode$variab = operationNode.variableDefinitions) !== null &&\n _operationNode$variab !== void 0\n ? _operationNode$variab\n : [];\n const seenVariableDefinitions = groupBy(\n variableDefinitions,\n (node) => node.variable.name.value,\n );\n\n for (const [variableName, variableNodes] of seenVariableDefinitions) {\n if (variableNodes.length > 1) {\n context.reportError(\n new GraphQLError(\n `There can be only one variable named \"$${variableName}\".`,\n {\n nodes: variableNodes.map((node) => node.variable.name),\n },\n ),\n );\n }\n }\n },\n };\n}\n","import { didYouMean } from '../../jsutils/didYouMean.mjs';\nimport { inspect } from '../../jsutils/inspect.mjs';\nimport { keyMap } from '../../jsutils/keyMap.mjs';\nimport { suggestionList } from '../../jsutils/suggestionList.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { print } from '../../language/printer.mjs';\nimport {\n getNamedType,\n getNullableType,\n isInputObjectType,\n isLeafType,\n isListType,\n isNonNullType,\n isRequiredInputField,\n} from '../../type/definition.mjs';\n\n/**\n * Value literals of correct type\n *\n * A GraphQL document is only valid if all value literals are of the type\n * expected at their position.\n *\n * See https://spec.graphql.org/draft/#sec-Values-of-Correct-Type\n */\nexport function ValuesOfCorrectTypeRule(context) {\n return {\n ListValue(node) {\n // Note: TypeInfo will traverse into a list's item type, so look to the\n // parent input type to check if it is a list.\n const type = getNullableType(context.getParentInputType());\n\n if (!isListType(type)) {\n isValidValueNode(context, node);\n return false; // Don't traverse further.\n }\n },\n\n ObjectValue(node) {\n const type = getNamedType(context.getInputType());\n\n if (!isInputObjectType(type)) {\n isValidValueNode(context, node);\n return false; // Don't traverse further.\n } // Ensure every required field exists.\n\n const fieldNodeMap = keyMap(node.fields, (field) => field.name.value);\n\n for (const fieldDef of Object.values(type.getFields())) {\n const fieldNode = fieldNodeMap[fieldDef.name];\n\n if (!fieldNode && isRequiredInputField(fieldDef)) {\n const typeStr = inspect(fieldDef.type);\n context.reportError(\n new GraphQLError(\n `Field \"${type.name}.${fieldDef.name}\" of required type \"${typeStr}\" was not provided.`,\n {\n nodes: node,\n },\n ),\n );\n }\n }\n },\n\n ObjectField(node) {\n const parentType = getNamedType(context.getParentInputType());\n const fieldType = context.getInputType();\n\n if (!fieldType && isInputObjectType(parentType)) {\n const suggestions = suggestionList(\n node.name.value,\n Object.keys(parentType.getFields()),\n );\n context.reportError(\n new GraphQLError(\n `Field \"${node.name.value}\" is not defined by type \"${parentType.name}\".` +\n didYouMean(suggestions),\n {\n nodes: node,\n },\n ),\n );\n }\n },\n\n NullValue(node) {\n const type = context.getInputType();\n\n if (isNonNullType(type)) {\n context.reportError(\n new GraphQLError(\n `Expected value of type \"${inspect(type)}\", found ${print(node)}.`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n\n EnumValue: (node) => isValidValueNode(context, node),\n IntValue: (node) => isValidValueNode(context, node),\n FloatValue: (node) => isValidValueNode(context, node),\n StringValue: (node) => isValidValueNode(context, node),\n BooleanValue: (node) => isValidValueNode(context, node),\n };\n}\n/**\n * Any value literal may be a valid representation of a Scalar, depending on\n * that scalar type.\n */\n\nfunction isValidValueNode(context, node) {\n // Report any error at the full type expected by the location.\n const locationType = context.getInputType();\n\n if (!locationType) {\n return;\n }\n\n const type = getNamedType(locationType);\n\n if (!isLeafType(type)) {\n const typeStr = inspect(locationType);\n context.reportError(\n new GraphQLError(\n `Expected value of type \"${typeStr}\", found ${print(node)}.`,\n {\n nodes: node,\n },\n ),\n );\n return;\n } // Scalars and Enums determine if a literal value is valid via parseLiteral(),\n // which may throw or return an invalid value to indicate failure.\n\n try {\n const parseResult = type.parseLiteral(\n node,\n undefined,\n /* variables */\n );\n\n if (parseResult === undefined) {\n const typeStr = inspect(locationType);\n context.reportError(\n new GraphQLError(\n `Expected value of type \"${typeStr}\", found ${print(node)}.`,\n {\n nodes: node,\n },\n ),\n );\n }\n } catch (error) {\n const typeStr = inspect(locationType);\n\n if (error instanceof GraphQLError) {\n context.reportError(error);\n } else {\n context.reportError(\n new GraphQLError(\n `Expected value of type \"${typeStr}\", found ${print(node)}; ` +\n error.message,\n {\n nodes: node,\n originalError: error,\n },\n ),\n );\n }\n }\n}\n","import { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { print } from '../../language/printer.mjs';\nimport { isInputType } from '../../type/definition.mjs';\nimport { typeFromAST } from '../../utilities/typeFromAST.mjs';\n\n/**\n * Variables are input types\n *\n * A GraphQL operation is only valid if all the variables it defines are of\n * input types (scalar, enum, or input object).\n *\n * See https://spec.graphql.org/draft/#sec-Variables-Are-Input-Types\n */\nexport function VariablesAreInputTypesRule(context) {\n return {\n VariableDefinition(node) {\n const type = typeFromAST(context.getSchema(), node.type);\n\n if (type !== undefined && !isInputType(type)) {\n const variableName = node.variable.name.value;\n const typeName = print(node.type);\n context.reportError(\n new GraphQLError(\n `Variable \"$${variableName}\" cannot be non-input type \"${typeName}\".`,\n {\n nodes: node.type,\n },\n ),\n );\n }\n },\n };\n}\n","import { inspect } from '../../jsutils/inspect.mjs';\nimport { GraphQLError } from '../../error/GraphQLError.mjs';\nimport { Kind } from '../../language/kinds.mjs';\nimport { isNonNullType } from '../../type/definition.mjs';\nimport { isTypeSubTypeOf } from '../../utilities/typeComparators.mjs';\nimport { typeFromAST } from '../../utilities/typeFromAST.mjs';\n\n/**\n * Variables in allowed position\n *\n * Variable usages must be compatible with the arguments they are passed to.\n *\n * See https://spec.graphql.org/draft/#sec-All-Variable-Usages-are-Allowed\n */\nexport function VariablesInAllowedPositionRule(context) {\n let varDefMap = Object.create(null);\n return {\n OperationDefinition: {\n enter() {\n varDefMap = Object.create(null);\n },\n\n leave(operation) {\n const usages = context.getRecursiveVariableUsages(operation);\n\n for (const { node, type, defaultValue } of usages) {\n const varName = node.name.value;\n const varDef = varDefMap[varName];\n\n if (varDef && type) {\n // A var type is allowed if it is the same or more strict (e.g. is\n // a subtype of) than the expected type. It can be more strict if\n // the variable type is non-null when the expected type is nullable.\n // If both are list types, the variable item type can be more strict\n // than the expected item type (contravariant).\n const schema = context.getSchema();\n const varType = typeFromAST(schema, varDef.type);\n\n if (\n varType &&\n !allowedVariableUsage(\n schema,\n varType,\n varDef.defaultValue,\n type,\n defaultValue,\n )\n ) {\n const varTypeStr = inspect(varType);\n const typeStr = inspect(type);\n context.reportError(\n new GraphQLError(\n `Variable \"$${varName}\" of type \"${varTypeStr}\" used in position expecting type \"${typeStr}\".`,\n {\n nodes: [varDef, node],\n },\n ),\n );\n }\n }\n }\n },\n },\n\n VariableDefinition(node) {\n varDefMap[node.variable.name.value] = node;\n },\n };\n}\n/**\n * Returns true if the variable is allowed in the location it was found,\n * which includes considering if default values exist for either the variable\n * or the location at which it is located.\n */\n\nfunction allowedVariableUsage(\n schema,\n varType,\n varDefaultValue,\n locationType,\n locationDefaultValue,\n) {\n if (isNonNullType(locationType) && !isNonNullType(varType)) {\n const hasNonNullVariableDefaultValue =\n varDefaultValue != null && varDefaultValue.kind !== Kind.NULL;\n const hasLocationDefaultValue = locationDefaultValue !== undefined;\n\n if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {\n return false;\n }\n\n const nullableLocationType = locationType.ofType;\n return isTypeSubTypeOf(schema, varType, nullableLocationType);\n }\n\n return isTypeSubTypeOf(schema, varType, locationType);\n}\n","// Spec Section: \"Executable Definitions\"\nimport { ExecutableDefinitionsRule } from './rules/ExecutableDefinitionsRule.mjs'; // Spec Section: \"Field Selections on Objects, Interfaces, and Unions Types\"\n\nimport { FieldsOnCorrectTypeRule } from './rules/FieldsOnCorrectTypeRule.mjs'; // Spec Section: \"Fragments on Composite Types\"\n\nimport { FragmentsOnCompositeTypesRule } from './rules/FragmentsOnCompositeTypesRule.mjs'; // Spec Section: \"Argument Names\"\n\nimport {\n KnownArgumentNamesOnDirectivesRule,\n KnownArgumentNamesRule,\n} from './rules/KnownArgumentNamesRule.mjs'; // Spec Section: \"Directives Are Defined\"\n\nimport { KnownDirectivesRule } from './rules/KnownDirectivesRule.mjs'; // Spec Section: \"Fragment spread target defined\"\n\nimport { KnownFragmentNamesRule } from './rules/KnownFragmentNamesRule.mjs'; // Spec Section: \"Fragment Spread Type Existence\"\n\nimport { KnownTypeNamesRule } from './rules/KnownTypeNamesRule.mjs'; // Spec Section: \"Lone Anonymous Operation\"\n\nimport { LoneAnonymousOperationRule } from './rules/LoneAnonymousOperationRule.mjs'; // SDL-specific validation rules\n\nimport { LoneSchemaDefinitionRule } from './rules/LoneSchemaDefinitionRule.mjs'; // Spec Section: \"Fragments must not form cycles\"\n\nimport { NoFragmentCyclesRule } from './rules/NoFragmentCyclesRule.mjs'; // Spec Section: \"All Variable Used Defined\"\n\nimport { NoUndefinedVariablesRule } from './rules/NoUndefinedVariablesRule.mjs'; // Spec Section: \"Fragments must be used\"\n\nimport { NoUnusedFragmentsRule } from './rules/NoUnusedFragmentsRule.mjs'; // Spec Section: \"All Variables Used\"\n\nimport { NoUnusedVariablesRule } from './rules/NoUnusedVariablesRule.mjs'; // Spec Section: \"Field Selection Merging\"\n\nimport { OverlappingFieldsCanBeMergedRule } from './rules/OverlappingFieldsCanBeMergedRule.mjs'; // Spec Section: \"Fragment spread is possible\"\n\nimport { PossibleFragmentSpreadsRule } from './rules/PossibleFragmentSpreadsRule.mjs';\nimport { PossibleTypeExtensionsRule } from './rules/PossibleTypeExtensionsRule.mjs'; // Spec Section: \"Argument Optionality\"\n\nimport {\n ProvidedRequiredArgumentsOnDirectivesRule,\n ProvidedRequiredArgumentsRule,\n} from './rules/ProvidedRequiredArgumentsRule.mjs'; // Spec Section: \"Leaf Field Selections\"\n\nimport { ScalarLeafsRule } from './rules/ScalarLeafsRule.mjs'; // Spec Section: \"Subscriptions with Single Root Field\"\n\nimport { SingleFieldSubscriptionsRule } from './rules/SingleFieldSubscriptionsRule.mjs';\nimport { UniqueArgumentDefinitionNamesRule } from './rules/UniqueArgumentDefinitionNamesRule.mjs'; // Spec Section: \"Argument Uniqueness\"\n\nimport { UniqueArgumentNamesRule } from './rules/UniqueArgumentNamesRule.mjs';\nimport { UniqueDirectiveNamesRule } from './rules/UniqueDirectiveNamesRule.mjs'; // Spec Section: \"Directives Are Unique Per Location\"\n\nimport { UniqueDirectivesPerLocationRule } from './rules/UniqueDirectivesPerLocationRule.mjs';\nimport { UniqueEnumValueNamesRule } from './rules/UniqueEnumValueNamesRule.mjs';\nimport { UniqueFieldDefinitionNamesRule } from './rules/UniqueFieldDefinitionNamesRule.mjs'; // Spec Section: \"Fragment Name Uniqueness\"\n\nimport { UniqueFragmentNamesRule } from './rules/UniqueFragmentNamesRule.mjs'; // Spec Section: \"Input Object Field Uniqueness\"\n\nimport { UniqueInputFieldNamesRule } from './rules/UniqueInputFieldNamesRule.mjs'; // Spec Section: \"Operation Name Uniqueness\"\n\nimport { UniqueOperationNamesRule } from './rules/UniqueOperationNamesRule.mjs';\nimport { UniqueOperationTypesRule } from './rules/UniqueOperationTypesRule.mjs';\nimport { UniqueTypeNamesRule } from './rules/UniqueTypeNamesRule.mjs'; // Spec Section: \"Variable Uniqueness\"\n\nimport { UniqueVariableNamesRule } from './rules/UniqueVariableNamesRule.mjs'; // Spec Section: \"Value Type Correctness\"\n\nimport { ValuesOfCorrectTypeRule } from './rules/ValuesOfCorrectTypeRule.mjs'; // Spec Section: \"Variables are Input Types\"\n\nimport { VariablesAreInputTypesRule } from './rules/VariablesAreInputTypesRule.mjs'; // Spec Section: \"All Variable Usages Are Allowed\"\n\nimport { VariablesInAllowedPositionRule } from './rules/VariablesInAllowedPositionRule.mjs';\n\n/**\n * This set includes all validation rules defined by the GraphQL spec.\n *\n * The order of the rules in this list has been adjusted to lead to the\n * most clear output when encountering multiple validation errors.\n */\nexport const specifiedRules = Object.freeze([\n ExecutableDefinitionsRule,\n UniqueOperationNamesRule,\n LoneAnonymousOperationRule,\n SingleFieldSubscriptionsRule,\n KnownTypeNamesRule,\n FragmentsOnCompositeTypesRule,\n VariablesAreInputTypesRule,\n ScalarLeafsRule,\n FieldsOnCorrectTypeRule,\n UniqueFragmentNamesRule,\n KnownFragmentNamesRule,\n NoUnusedFragmentsRule,\n PossibleFragmentSpreadsRule,\n NoFragmentCyclesRule,\n UniqueVariableNamesRule,\n NoUndefinedVariablesRule,\n NoUnusedVariablesRule,\n KnownDirectivesRule,\n UniqueDirectivesPerLocationRule,\n KnownArgumentNamesRule,\n UniqueArgumentNamesRule,\n ValuesOfCorrectTypeRule,\n ProvidedRequiredArgumentsRule,\n VariablesInAllowedPositionRule,\n OverlappingFieldsCanBeMergedRule,\n UniqueInputFieldNamesRule,\n]);\n/**\n * @internal\n */\n\nexport const specifiedSDLRules = Object.freeze([\n LoneSchemaDefinitionRule,\n UniqueOperationTypesRule,\n UniqueTypeNamesRule,\n UniqueEnumValueNamesRule,\n UniqueFieldDefinitionNamesRule,\n UniqueArgumentDefinitionNamesRule,\n UniqueDirectiveNamesRule,\n KnownTypeNamesRule,\n KnownDirectivesRule,\n UniqueDirectivesPerLocationRule,\n PossibleTypeExtensionsRule,\n KnownArgumentNamesOnDirectivesRule,\n UniqueArgumentNamesRule,\n UniqueInputFieldNamesRule,\n ProvidedRequiredArgumentsOnDirectivesRule,\n]);\n","import { Kind } from '../language/kinds.mjs';\nimport { visit } from '../language/visitor.mjs';\nimport { TypeInfo, visitWithTypeInfo } from '../utilities/TypeInfo.mjs';\n\n/**\n * An instance of this class is passed as the \"this\" context to all validators,\n * allowing access to commonly useful contextual information from within a\n * validation rule.\n */\nexport class ASTValidationContext {\n constructor(ast, onError) {\n this._ast = ast;\n this._fragments = undefined;\n this._fragmentSpreads = new Map();\n this._recursivelyReferencedFragments = new Map();\n this._onError = onError;\n }\n\n get [Symbol.toStringTag]() {\n return 'ASTValidationContext';\n }\n\n reportError(error) {\n this._onError(error);\n }\n\n getDocument() {\n return this._ast;\n }\n\n getFragment(name) {\n let fragments;\n\n if (this._fragments) {\n fragments = this._fragments;\n } else {\n fragments = Object.create(null);\n\n for (const defNode of this.getDocument().definitions) {\n if (defNode.kind === Kind.FRAGMENT_DEFINITION) {\n fragments[defNode.name.value] = defNode;\n }\n }\n\n this._fragments = fragments;\n }\n\n return fragments[name];\n }\n\n getFragmentSpreads(node) {\n let spreads = this._fragmentSpreads.get(node);\n\n if (!spreads) {\n spreads = [];\n const setsToVisit = [node];\n let set;\n\n while ((set = setsToVisit.pop())) {\n for (const selection of set.selections) {\n if (selection.kind === Kind.FRAGMENT_SPREAD) {\n spreads.push(selection);\n } else if (selection.selectionSet) {\n setsToVisit.push(selection.selectionSet);\n }\n }\n }\n\n this._fragmentSpreads.set(node, spreads);\n }\n\n return spreads;\n }\n\n getRecursivelyReferencedFragments(operation) {\n let fragments = this._recursivelyReferencedFragments.get(operation);\n\n if (!fragments) {\n fragments = [];\n const collectedNames = Object.create(null);\n const nodesToVisit = [operation.selectionSet];\n let node;\n\n while ((node = nodesToVisit.pop())) {\n for (const spread of this.getFragmentSpreads(node)) {\n const fragName = spread.name.value;\n\n if (collectedNames[fragName] !== true) {\n collectedNames[fragName] = true;\n const fragment = this.getFragment(fragName);\n\n if (fragment) {\n fragments.push(fragment);\n nodesToVisit.push(fragment.selectionSet);\n }\n }\n }\n }\n\n this._recursivelyReferencedFragments.set(operation, fragments);\n }\n\n return fragments;\n }\n}\nexport class SDLValidationContext extends ASTValidationContext {\n constructor(ast, schema, onError) {\n super(ast, onError);\n this._schema = schema;\n }\n\n get [Symbol.toStringTag]() {\n return 'SDLValidationContext';\n }\n\n getSchema() {\n return this._schema;\n }\n}\nexport class ValidationContext extends ASTValidationContext {\n constructor(schema, ast, typeInfo, onError) {\n super(ast, onError);\n this._schema = schema;\n this._typeInfo = typeInfo;\n this._variableUsages = new Map();\n this._recursiveVariableUsages = new Map();\n }\n\n get [Symbol.toStringTag]() {\n return 'ValidationContext';\n }\n\n getSchema() {\n return this._schema;\n }\n\n getVariableUsages(node) {\n let usages = this._variableUsages.get(node);\n\n if (!usages) {\n const newUsages = [];\n const typeInfo = new TypeInfo(this._schema);\n visit(\n node,\n visitWithTypeInfo(typeInfo, {\n VariableDefinition: () => false,\n\n Variable(variable) {\n newUsages.push({\n node: variable,\n type: typeInfo.getInputType(),\n defaultValue: typeInfo.getDefaultValue(),\n });\n },\n }),\n );\n usages = newUsages;\n\n this._variableUsages.set(node, usages);\n }\n\n return usages;\n }\n\n getRecursiveVariableUsages(operation) {\n let usages = this._recursiveVariableUsages.get(operation);\n\n if (!usages) {\n usages = this.getVariableUsages(operation);\n\n for (const frag of this.getRecursivelyReferencedFragments(operation)) {\n usages = usages.concat(this.getVariableUsages(frag));\n }\n\n this._recursiveVariableUsages.set(operation, usages);\n }\n\n return usages;\n }\n\n getType() {\n return this._typeInfo.getType();\n }\n\n getParentType() {\n return this._typeInfo.getParentType();\n }\n\n getInputType() {\n return this._typeInfo.getInputType();\n }\n\n getParentInputType() {\n return this._typeInfo.getParentInputType();\n }\n\n getFieldDef() {\n return this._typeInfo.getFieldDef();\n }\n\n getDirective() {\n return this._typeInfo.getDirective();\n }\n\n getArgument() {\n return this._typeInfo.getArgument();\n }\n\n getEnumValue() {\n return this._typeInfo.getEnumValue();\n }\n}\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { GraphQLError } from '../error/GraphQLError.mjs';\nimport { visit, visitInParallel } from '../language/visitor.mjs';\nimport { assertValidSchema } from '../type/validate.mjs';\nimport { TypeInfo, visitWithTypeInfo } from '../utilities/TypeInfo.mjs';\nimport { specifiedRules, specifiedSDLRules } from './specifiedRules.mjs';\nimport {\n SDLValidationContext,\n ValidationContext,\n} from './ValidationContext.mjs';\n/**\n * Implements the \"Validation\" section of the spec.\n *\n * Validation runs synchronously, returning an array of encountered errors, or\n * an empty array if no errors were encountered and the document is valid.\n *\n * A list of specific validation rules may be provided. If not provided, the\n * default list of rules defined by the GraphQL specification will be used.\n *\n * Each validation rules is a function which returns a visitor\n * (see the language/visitor API). Visitor methods are expected to return\n * GraphQLErrors, or Arrays of GraphQLErrors when invalid.\n *\n * Validate will stop validation after a `maxErrors` limit has been reached.\n * Attackers can send pathologically invalid queries to induce a DoS attack,\n * so by default `maxErrors` set to 100 errors.\n *\n * Optionally a custom TypeInfo instance may be provided. If not provided, one\n * will be created from the provided schema.\n */\n\nexport function validate(\n schema,\n documentAST,\n rules = specifiedRules,\n options,\n /** @deprecated will be removed in 17.0.0 */\n typeInfo = new TypeInfo(schema),\n) {\n var _options$maxErrors;\n\n const maxErrors =\n (_options$maxErrors =\n options === null || options === void 0 ? void 0 : options.maxErrors) !==\n null && _options$maxErrors !== void 0\n ? _options$maxErrors\n : 100;\n documentAST || devAssert(false, 'Must provide document.'); // If the schema used for validation is invalid, throw an error.\n\n assertValidSchema(schema);\n const abortObj = Object.freeze({});\n const errors = [];\n const context = new ValidationContext(\n schema,\n documentAST,\n typeInfo,\n (error) => {\n if (errors.length >= maxErrors) {\n errors.push(\n new GraphQLError(\n 'Too many validation errors, error limit reached. Validation aborted.',\n ),\n ); // eslint-disable-next-line @typescript-eslint/no-throw-literal\n\n throw abortObj;\n }\n\n errors.push(error);\n },\n ); // This uses a specialized visitor which runs multiple visitors in parallel,\n // while maintaining the visitor skip and break API.\n\n const visitor = visitInParallel(rules.map((rule) => rule(context))); // Visit the whole document with each instance of all provided rules.\n\n try {\n visit(documentAST, visitWithTypeInfo(typeInfo, visitor));\n } catch (e) {\n if (e !== abortObj) {\n throw e;\n }\n }\n\n return errors;\n}\n/**\n * @internal\n */\n\nexport function validateSDL(\n documentAST,\n schemaToExtend,\n rules = specifiedSDLRules,\n) {\n const errors = [];\n const context = new SDLValidationContext(\n documentAST,\n schemaToExtend,\n (error) => {\n errors.push(error);\n },\n );\n const visitors = rules.map((rule) => rule(context));\n visit(documentAST, visitInParallel(visitors));\n return errors;\n}\n/**\n * Utility function which asserts a SDL document is valid by throwing an error\n * if it is invalid.\n *\n * @internal\n */\n\nexport function assertValidSDL(documentAST) {\n const errors = validateSDL(documentAST);\n\n if (errors.length !== 0) {\n throw new Error(errors.map((error) => error.message).join('\\n\\n'));\n }\n}\n/**\n * Utility function which asserts a SDL document is valid by throwing an error\n * if it is invalid.\n *\n * @internal\n */\n\nexport function assertValidSDLExtension(documentAST, schema) {\n const errors = validateSDL(documentAST, schema);\n\n if (errors.length !== 0) {\n throw new Error(errors.map((error) => error.message).join('\\n\\n'));\n }\n}\n","/**\n * Memoizes the provided three-argument function.\n */\nexport function memoize3(fn) {\n let cache0;\n return function memoized(a1, a2, a3) {\n if (cache0 === undefined) {\n cache0 = new WeakMap();\n }\n\n let cache1 = cache0.get(a1);\n\n if (cache1 === undefined) {\n cache1 = new WeakMap();\n cache0.set(a1, cache1);\n }\n\n let cache2 = cache1.get(a2);\n\n if (cache2 === undefined) {\n cache2 = new WeakMap();\n cache1.set(a2, cache2);\n }\n\n let fnResult = cache2.get(a3);\n\n if (fnResult === undefined) {\n fnResult = fn(a1, a2, a3);\n cache2.set(a3, fnResult);\n }\n\n return fnResult;\n };\n}\n","/**\n * This function transforms a JS object `ObjMap>` into\n * a `Promise>`\n *\n * This is akin to bluebird's `Promise.props`, but implemented only using\n * `Promise.all` so it will work with any implementation of ES6 promises.\n */\nexport function promiseForObject(object) {\n return Promise.all(Object.values(object)).then((resolvedValues) => {\n const resolvedObject = Object.create(null);\n\n for (const [i, key] of Object.keys(object).entries()) {\n resolvedObject[key] = resolvedValues[i];\n }\n\n return resolvedObject;\n });\n}\n","import { isPromise } from './isPromise.mjs';\n\n/**\n * Similar to Array.prototype.reduce(), however the reducing callback may return\n * a Promise, in which case reduction will continue after each promise resolves.\n *\n * If the callback does not return a Promise, then this function will also not\n * return a Promise.\n */\nexport function promiseReduce(values, callbackFn, initialValue) {\n let accumulator = initialValue;\n\n for (const value of values) {\n accumulator = isPromise(accumulator)\n ? accumulator.then((resolved) => callbackFn(resolved, value))\n : callbackFn(accumulator, value);\n }\n\n return accumulator;\n}\n","import { inspect } from './inspect.mjs';\n/**\n * Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface.\n */\n\nexport function toError(thrownValue) {\n return thrownValue instanceof Error\n ? thrownValue\n : new NonErrorThrown(thrownValue);\n}\n\nclass NonErrorThrown extends Error {\n constructor(thrownValue) {\n super('Unexpected error value: ' + inspect(thrownValue));\n this.name = 'NonErrorThrown';\n this.thrownValue = thrownValue;\n }\n}\n","import { toError } from '../jsutils/toError.mjs';\nimport { GraphQLError } from './GraphQLError.mjs';\n/**\n * Given an arbitrary value, presumably thrown while attempting to execute a\n * GraphQL operation, produce a new GraphQLError aware of the location in the\n * document responsible for the original Error.\n */\n\nexport function locatedError(rawOriginalError, nodes, path) {\n var _nodes;\n\n const originalError = toError(rawOriginalError); // Note: this uses a brand-check to support GraphQL errors originating from other contexts.\n\n if (isLocatedGraphQLError(originalError)) {\n return originalError;\n }\n\n return new GraphQLError(originalError.message, {\n nodes:\n (_nodes = originalError.nodes) !== null && _nodes !== void 0\n ? _nodes\n : nodes,\n source: originalError.source,\n positions: originalError.positions,\n path,\n originalError,\n });\n}\n\nfunction isLocatedGraphQLError(error) {\n return Array.isArray(error.path);\n}\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { invariant } from '../jsutils/invariant.mjs';\nimport { isIterableObject } from '../jsutils/isIterableObject.mjs';\nimport { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { isPromise } from '../jsutils/isPromise.mjs';\nimport { memoize3 } from '../jsutils/memoize3.mjs';\nimport { addPath, pathToArray } from '../jsutils/Path.mjs';\nimport { promiseForObject } from '../jsutils/promiseForObject.mjs';\nimport { promiseReduce } from '../jsutils/promiseReduce.mjs';\nimport { GraphQLError } from '../error/GraphQLError.mjs';\nimport { locatedError } from '../error/locatedError.mjs';\nimport { OperationTypeNode } from '../language/ast.mjs';\nimport { Kind } from '../language/kinds.mjs';\nimport {\n isAbstractType,\n isLeafType,\n isListType,\n isNonNullType,\n isObjectType,\n} from '../type/definition.mjs';\nimport {\n SchemaMetaFieldDef,\n TypeMetaFieldDef,\n TypeNameMetaFieldDef,\n} from '../type/introspection.mjs';\nimport { assertValidSchema } from '../type/validate.mjs';\nimport {\n collectFields,\n collectSubfields as _collectSubfields,\n} from './collectFields.mjs';\nimport { getArgumentValues, getVariableValues } from './values.mjs';\n/**\n * A memoized collection of relevant subfields with regard to the return\n * type. Memoizing ensures the subfields are not repeatedly calculated, which\n * saves overhead when resolving lists of values.\n */\n\nconst collectSubfields = memoize3((exeContext, returnType, fieldNodes) =>\n _collectSubfields(\n exeContext.schema,\n exeContext.fragments,\n exeContext.variableValues,\n returnType,\n fieldNodes,\n ),\n);\n/**\n * Terminology\n *\n * \"Definitions\" are the generic name for top-level statements in the document.\n * Examples of this include:\n * 1) Operations (such as a query)\n * 2) Fragments\n *\n * \"Operations\" are a generic name for requests in the document.\n * Examples of this include:\n * 1) query,\n * 2) mutation\n *\n * \"Selections\" are the definitions that can appear legally and at\n * single level of the query. These include:\n * 1) field references e.g `a`\n * 2) fragment \"spreads\" e.g. `...c`\n * 3) inline fragment \"spreads\" e.g. `...on Type { a }`\n */\n\n/**\n * Data that must be available at all points during query execution.\n *\n * Namely, schema of the type system that is currently executing,\n * and the fragments defined in the query document\n */\n\n/**\n * Implements the \"Executing requests\" section of the GraphQL specification.\n *\n * Returns either a synchronous ExecutionResult (if all encountered resolvers\n * are synchronous), or a Promise of an ExecutionResult that will eventually be\n * resolved and never rejected.\n *\n * If the arguments to this function do not result in a legal execution context,\n * a GraphQLError will be thrown immediately explaining the invalid input.\n */\nexport function execute(args) {\n // Temporary for v15 to v16 migration. Remove in v17\n arguments.length < 2 ||\n devAssert(\n false,\n 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.',\n );\n const { schema, document, variableValues, rootValue } = args; // If arguments are missing or incorrect, throw an error.\n\n assertValidExecutionArguments(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments,\n // a \"Response\" with only errors is returned.\n\n const exeContext = buildExecutionContext(args); // Return early errors if execution context failed.\n\n if (!('schema' in exeContext)) {\n return {\n errors: exeContext,\n };\n } // Return a Promise that will eventually resolve to the data described by\n // The \"Response\" section of the GraphQL specification.\n //\n // If errors are encountered while executing a GraphQL field, only that\n // field and its descendants will be omitted, and sibling fields will still\n // be executed. An execution which encounters errors will still result in a\n // resolved Promise.\n //\n // Errors from sub-fields of a NonNull type may propagate to the top level,\n // at which point we still log the error and null the parent field, which\n // in this case is the entire response.\n\n try {\n const { operation } = exeContext;\n const result = executeOperation(exeContext, operation, rootValue);\n\n if (isPromise(result)) {\n return result.then(\n (data) => buildResponse(data, exeContext.errors),\n (error) => {\n exeContext.errors.push(error);\n return buildResponse(null, exeContext.errors);\n },\n );\n }\n\n return buildResponse(result, exeContext.errors);\n } catch (error) {\n exeContext.errors.push(error);\n return buildResponse(null, exeContext.errors);\n }\n}\n/**\n * Also implements the \"Executing requests\" section of the GraphQL specification.\n * However, it guarantees to complete synchronously (or throw an error) assuming\n * that all field resolvers are also synchronous.\n */\n\nexport function executeSync(args) {\n const result = execute(args); // Assert that the execution was synchronous.\n\n if (isPromise(result)) {\n throw new Error('GraphQL execution failed to complete synchronously.');\n }\n\n return result;\n}\n/**\n * Given a completed execution context and data, build the `{ errors, data }`\n * response defined by the \"Response\" section of the GraphQL specification.\n */\n\nfunction buildResponse(data, errors) {\n return errors.length === 0\n ? {\n data,\n }\n : {\n errors,\n data,\n };\n}\n/**\n * Essential assertions before executing to provide developer feedback for\n * improper use of the GraphQL library.\n *\n * @internal\n */\n\nexport function assertValidExecutionArguments(\n schema,\n document,\n rawVariableValues,\n) {\n document || devAssert(false, 'Must provide document.'); // If the schema used for execution is invalid, throw an error.\n\n assertValidSchema(schema); // Variables, if provided, must be an object.\n\n rawVariableValues == null ||\n isObjectLike(rawVariableValues) ||\n devAssert(\n false,\n 'Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.',\n );\n}\n/**\n * Constructs a ExecutionContext object from the arguments passed to\n * execute, which we will pass throughout the other execution methods.\n *\n * Throws a GraphQLError if a valid execution context cannot be created.\n *\n * @internal\n */\n\nexport function buildExecutionContext(args) {\n var _definition$name, _operation$variableDe;\n\n const {\n schema,\n document,\n rootValue,\n contextValue,\n variableValues: rawVariableValues,\n operationName,\n fieldResolver,\n typeResolver,\n subscribeFieldResolver,\n } = args;\n let operation;\n const fragments = Object.create(null);\n\n for (const definition of document.definitions) {\n switch (definition.kind) {\n case Kind.OPERATION_DEFINITION:\n if (operationName == null) {\n if (operation !== undefined) {\n return [\n new GraphQLError(\n 'Must provide operation name if query contains multiple operations.',\n ),\n ];\n }\n\n operation = definition;\n } else if (\n ((_definition$name = definition.name) === null ||\n _definition$name === void 0\n ? void 0\n : _definition$name.value) === operationName\n ) {\n operation = definition;\n }\n\n break;\n\n case Kind.FRAGMENT_DEFINITION:\n fragments[definition.name.value] = definition;\n break;\n\n default: // ignore non-executable definitions\n }\n }\n\n if (!operation) {\n if (operationName != null) {\n return [new GraphQLError(`Unknown operation named \"${operationName}\".`)];\n }\n\n return [new GraphQLError('Must provide an operation.')];\n } // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n\n const variableDefinitions =\n (_operation$variableDe = operation.variableDefinitions) !== null &&\n _operation$variableDe !== void 0\n ? _operation$variableDe\n : [];\n const coercedVariableValues = getVariableValues(\n schema,\n variableDefinitions,\n rawVariableValues !== null && rawVariableValues !== void 0\n ? rawVariableValues\n : {},\n {\n maxErrors: 50,\n },\n );\n\n if (coercedVariableValues.errors) {\n return coercedVariableValues.errors;\n }\n\n return {\n schema,\n fragments,\n rootValue,\n contextValue,\n operation,\n variableValues: coercedVariableValues.coerced,\n fieldResolver:\n fieldResolver !== null && fieldResolver !== void 0\n ? fieldResolver\n : defaultFieldResolver,\n typeResolver:\n typeResolver !== null && typeResolver !== void 0\n ? typeResolver\n : defaultTypeResolver,\n subscribeFieldResolver:\n subscribeFieldResolver !== null && subscribeFieldResolver !== void 0\n ? subscribeFieldResolver\n : defaultFieldResolver,\n errors: [],\n };\n}\n/**\n * Implements the \"Executing operations\" section of the spec.\n */\n\nfunction executeOperation(exeContext, operation, rootValue) {\n const rootType = exeContext.schema.getRootType(operation.operation);\n\n if (rootType == null) {\n throw new GraphQLError(\n `Schema is not configured to execute ${operation.operation} operation.`,\n {\n nodes: operation,\n },\n );\n }\n\n const rootFields = collectFields(\n exeContext.schema,\n exeContext.fragments,\n exeContext.variableValues,\n rootType,\n operation.selectionSet,\n );\n const path = undefined;\n\n switch (operation.operation) {\n case OperationTypeNode.QUERY:\n return executeFields(exeContext, rootType, rootValue, path, rootFields);\n\n case OperationTypeNode.MUTATION:\n return executeFieldsSerially(\n exeContext,\n rootType,\n rootValue,\n path,\n rootFields,\n );\n\n case OperationTypeNode.SUBSCRIPTION:\n // TODO: deprecate `subscribe` and move all logic here\n // Temporary solution until we finish merging execute and subscribe together\n return executeFields(exeContext, rootType, rootValue, path, rootFields);\n }\n}\n/**\n * Implements the \"Executing selection sets\" section of the spec\n * for fields that must be executed serially.\n */\n\nfunction executeFieldsSerially(\n exeContext,\n parentType,\n sourceValue,\n path,\n fields,\n) {\n return promiseReduce(\n fields.entries(),\n (results, [responseName, fieldNodes]) => {\n const fieldPath = addPath(path, responseName, parentType.name);\n const result = executeField(\n exeContext,\n parentType,\n sourceValue,\n fieldNodes,\n fieldPath,\n );\n\n if (result === undefined) {\n return results;\n }\n\n if (isPromise(result)) {\n return result.then((resolvedResult) => {\n results[responseName] = resolvedResult;\n return results;\n });\n }\n\n results[responseName] = result;\n return results;\n },\n Object.create(null),\n );\n}\n/**\n * Implements the \"Executing selection sets\" section of the spec\n * for fields that may be executed in parallel.\n */\n\nfunction executeFields(exeContext, parentType, sourceValue, path, fields) {\n const results = Object.create(null);\n let containsPromise = false;\n\n try {\n for (const [responseName, fieldNodes] of fields.entries()) {\n const fieldPath = addPath(path, responseName, parentType.name);\n const result = executeField(\n exeContext,\n parentType,\n sourceValue,\n fieldNodes,\n fieldPath,\n );\n\n if (result !== undefined) {\n results[responseName] = result;\n\n if (isPromise(result)) {\n containsPromise = true;\n }\n }\n }\n } catch (error) {\n if (containsPromise) {\n // Ensure that any promises returned by other fields are handled, as they may also reject.\n return promiseForObject(results).finally(() => {\n throw error;\n });\n }\n\n throw error;\n } // If there are no promises, we can just return the object\n\n if (!containsPromise) {\n return results;\n } // Otherwise, results is a map from field name to the result of resolving that\n // field, which is possibly a promise. Return a promise that will return this\n // same map, but with any promises replaced with the values they resolved to.\n\n return promiseForObject(results);\n}\n/**\n * Implements the \"Executing fields\" section of the spec\n * In particular, this function figures out the value that the field returns by\n * calling its resolve function, then calls completeValue to complete promises,\n * serialize scalars, or execute the sub-selection-set for objects.\n */\n\nfunction executeField(exeContext, parentType, source, fieldNodes, path) {\n var _fieldDef$resolve;\n\n const fieldDef = getFieldDef(exeContext.schema, parentType, fieldNodes[0]);\n\n if (!fieldDef) {\n return;\n }\n\n const returnType = fieldDef.type;\n const resolveFn =\n (_fieldDef$resolve = fieldDef.resolve) !== null &&\n _fieldDef$resolve !== void 0\n ? _fieldDef$resolve\n : exeContext.fieldResolver;\n const info = buildResolveInfo(\n exeContext,\n fieldDef,\n fieldNodes,\n parentType,\n path,\n ); // Get the resolve function, regardless of if its result is normal or abrupt (error).\n\n try {\n // Build a JS object of arguments from the field.arguments AST, using the\n // variables scope to fulfill any variable references.\n // TODO: find a way to memoize, in case this field is within a List type.\n const args = getArgumentValues(\n fieldDef,\n fieldNodes[0],\n exeContext.variableValues,\n ); // The resolve function's optional third argument is a context value that\n // is provided to every resolve function within an execution. It is commonly\n // used to represent an authenticated user, or request-specific caches.\n\n const contextValue = exeContext.contextValue;\n const result = resolveFn(source, args, contextValue, info);\n let completed;\n\n if (isPromise(result)) {\n completed = result.then((resolved) =>\n completeValue(exeContext, returnType, fieldNodes, info, path, resolved),\n );\n } else {\n completed = completeValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n );\n }\n\n if (isPromise(completed)) {\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, (rawError) => {\n const error = locatedError(rawError, fieldNodes, pathToArray(path));\n return handleFieldError(error, returnType, exeContext);\n });\n }\n\n return completed;\n } catch (rawError) {\n const error = locatedError(rawError, fieldNodes, pathToArray(path));\n return handleFieldError(error, returnType, exeContext);\n }\n}\n/**\n * @internal\n */\n\nexport function buildResolveInfo(\n exeContext,\n fieldDef,\n fieldNodes,\n parentType,\n path,\n) {\n // The resolve function's optional fourth argument is a collection of\n // information about the current execution state.\n return {\n fieldName: fieldDef.name,\n fieldNodes,\n returnType: fieldDef.type,\n parentType,\n path,\n schema: exeContext.schema,\n fragments: exeContext.fragments,\n rootValue: exeContext.rootValue,\n operation: exeContext.operation,\n variableValues: exeContext.variableValues,\n };\n}\n\nfunction handleFieldError(error, returnType, exeContext) {\n // If the field type is non-nullable, then it is resolved without any\n // protection from errors, however it still properly locates the error.\n if (isNonNullType(returnType)) {\n throw error;\n } // Otherwise, error protection is applied, logging the error and resolving\n // a null value for this field if one is encountered.\n\n exeContext.errors.push(error);\n return null;\n}\n/**\n * Implements the instructions for completeValue as defined in the\n * \"Value Completion\" section of the spec.\n *\n * If the field type is Non-Null, then this recursively completes the value\n * for the inner type. It throws a field error if that completion returns null,\n * as per the \"Nullability\" section of the spec.\n *\n * If the field type is a List, then this recursively completes the value\n * for the inner type on each item in the list.\n *\n * If the field type is a Scalar or Enum, ensures the completed value is a legal\n * value of the type by calling the `serialize` method of GraphQL type\n * definition.\n *\n * If the field is an abstract type, determine the runtime type of the value\n * and then complete based on that type\n *\n * Otherwise, the field type expects a sub-selection set, and will complete the\n * value by executing all sub-selections.\n */\n\nfunction completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n } // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n\n if (isNonNullType(returnType)) {\n const completed = completeValue(\n exeContext,\n returnType.ofType,\n fieldNodes,\n info,\n path,\n result,\n );\n\n if (completed === null) {\n throw new Error(\n `Cannot return null for non-nullable field ${info.parentType.name}.${info.fieldName}.`,\n );\n }\n\n return completed;\n } // If result value is null or undefined then return null.\n\n if (result == null) {\n return null;\n } // If field type is List, complete each item in the list with the inner type\n\n if (isListType(returnType)) {\n return completeListValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n );\n } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n\n if (isLeafType(returnType)) {\n return completeLeafValue(returnType, result);\n } // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n\n if (isAbstractType(returnType)) {\n return completeAbstractValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n );\n } // If field type is Object, execute and complete all sub-selections.\n\n if (isObjectType(returnType)) {\n return completeObjectValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n );\n }\n /* c8 ignore next 6 */\n // Not reachable, all possible output types have been considered.\n\n false ||\n invariant(\n false,\n 'Cannot complete value of unexpected output type: ' + inspect(returnType),\n );\n}\n/**\n * Complete a list value by completing each item in the list with the\n * inner type\n */\n\nfunction completeListValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n) {\n if (!isIterableObject(result)) {\n throw new GraphQLError(\n `Expected Iterable, but did not find one for field \"${info.parentType.name}.${info.fieldName}\".`,\n );\n } // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n\n const itemType = returnType.ofType;\n let containsPromise = false;\n const completedResults = Array.from(result, (item, index) => {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n const itemPath = addPath(path, index, undefined);\n\n try {\n let completedItem;\n\n if (isPromise(item)) {\n completedItem = item.then((resolved) =>\n completeValue(\n exeContext,\n itemType,\n fieldNodes,\n info,\n itemPath,\n resolved,\n ),\n );\n } else {\n completedItem = completeValue(\n exeContext,\n itemType,\n fieldNodes,\n info,\n itemPath,\n item,\n );\n }\n\n if (isPromise(completedItem)) {\n containsPromise = true; // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n\n return completedItem.then(undefined, (rawError) => {\n const error = locatedError(\n rawError,\n fieldNodes,\n pathToArray(itemPath),\n );\n return handleFieldError(error, itemType, exeContext);\n });\n }\n\n return completedItem;\n } catch (rawError) {\n const error = locatedError(rawError, fieldNodes, pathToArray(itemPath));\n return handleFieldError(error, itemType, exeContext);\n }\n });\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}\n/**\n * Complete a Scalar or Enum by serializing to a valid value, returning\n * null if serialization is not possible.\n */\n\nfunction completeLeafValue(returnType, result) {\n const serializedResult = returnType.serialize(result);\n\n if (serializedResult == null) {\n throw new Error(\n `Expected \\`${inspect(returnType)}.serialize(${inspect(result)})\\` to ` +\n `return non-nullable value, returned: ${inspect(serializedResult)}`,\n );\n }\n\n return serializedResult;\n}\n/**\n * Complete a value of an abstract type by determining the runtime object type\n * of that value, then complete the value for that type.\n */\n\nfunction completeAbstractValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n) {\n var _returnType$resolveTy;\n\n const resolveTypeFn =\n (_returnType$resolveTy = returnType.resolveType) !== null &&\n _returnType$resolveTy !== void 0\n ? _returnType$resolveTy\n : exeContext.typeResolver;\n const contextValue = exeContext.contextValue;\n const runtimeType = resolveTypeFn(result, contextValue, info, returnType);\n\n if (isPromise(runtimeType)) {\n return runtimeType.then((resolvedRuntimeType) =>\n completeObjectValue(\n exeContext,\n ensureValidRuntimeType(\n resolvedRuntimeType,\n exeContext,\n returnType,\n fieldNodes,\n info,\n result,\n ),\n fieldNodes,\n info,\n path,\n result,\n ),\n );\n }\n\n return completeObjectValue(\n exeContext,\n ensureValidRuntimeType(\n runtimeType,\n exeContext,\n returnType,\n fieldNodes,\n info,\n result,\n ),\n fieldNodes,\n info,\n path,\n result,\n );\n}\n\nfunction ensureValidRuntimeType(\n runtimeTypeName,\n exeContext,\n returnType,\n fieldNodes,\n info,\n result,\n) {\n if (runtimeTypeName == null) {\n throw new GraphQLError(\n `Abstract type \"${returnType.name}\" must resolve to an Object type at runtime for field \"${info.parentType.name}.${info.fieldName}\". Either the \"${returnType.name}\" type should provide a \"resolveType\" function or each possible type should provide an \"isTypeOf\" function.`,\n fieldNodes,\n );\n } // releases before 16.0.0 supported returning `GraphQLObjectType` from `resolveType`\n // TODO: remove in 17.0.0 release\n\n if (isObjectType(runtimeTypeName)) {\n throw new GraphQLError(\n 'Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.',\n );\n }\n\n if (typeof runtimeTypeName !== 'string') {\n throw new GraphQLError(\n `Abstract type \"${returnType.name}\" must resolve to an Object type at runtime for field \"${info.parentType.name}.${info.fieldName}\" with ` +\n `value ${inspect(result)}, received \"${inspect(runtimeTypeName)}\".`,\n );\n }\n\n const runtimeType = exeContext.schema.getType(runtimeTypeName);\n\n if (runtimeType == null) {\n throw new GraphQLError(\n `Abstract type \"${returnType.name}\" was resolved to a type \"${runtimeTypeName}\" that does not exist inside the schema.`,\n {\n nodes: fieldNodes,\n },\n );\n }\n\n if (!isObjectType(runtimeType)) {\n throw new GraphQLError(\n `Abstract type \"${returnType.name}\" was resolved to a non-object type \"${runtimeTypeName}\".`,\n {\n nodes: fieldNodes,\n },\n );\n }\n\n if (!exeContext.schema.isSubType(returnType, runtimeType)) {\n throw new GraphQLError(\n `Runtime Object type \"${runtimeType.name}\" is not a possible type for \"${returnType.name}\".`,\n {\n nodes: fieldNodes,\n },\n );\n }\n\n return runtimeType;\n}\n/**\n * Complete an Object value by executing all sub-selections.\n */\n\nfunction completeObjectValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n) {\n // Collect sub-fields to execute to complete this value.\n const subFieldNodes = collectSubfields(exeContext, returnType, fieldNodes); // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n\n if (returnType.isTypeOf) {\n const isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if (isPromise(isTypeOf)) {\n return isTypeOf.then((resolvedIsTypeOf) => {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n\n return executeFields(\n exeContext,\n returnType,\n result,\n path,\n subFieldNodes,\n );\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return executeFields(exeContext, returnType, result, path, subFieldNodes);\n}\n\nfunction invalidReturnTypeError(returnType, result, fieldNodes) {\n return new GraphQLError(\n `Expected value of type \"${returnType.name}\" but got: ${inspect(result)}.`,\n {\n nodes: fieldNodes,\n },\n );\n}\n/**\n * If a resolveType function is not given, then a default resolve behavior is\n * used which attempts two strategies:\n *\n * First, See if the provided value has a `__typename` field defined, if so, use\n * that value as name of the resolved type.\n *\n * Otherwise, test each possible type for the abstract type by calling\n * isTypeOf for the object being coerced, returning the first type that matches.\n */\n\nexport const defaultTypeResolver = function (\n value,\n contextValue,\n info,\n abstractType,\n) {\n // First, look for `__typename`.\n if (isObjectLike(value) && typeof value.__typename === 'string') {\n return value.__typename;\n } // Otherwise, test each possible type.\n\n const possibleTypes = info.schema.getPossibleTypes(abstractType);\n const promisedIsTypeOfResults = [];\n\n for (let i = 0; i < possibleTypes.length; i++) {\n const type = possibleTypes[i];\n\n if (type.isTypeOf) {\n const isTypeOfResult = type.isTypeOf(value, contextValue, info);\n\n if (isPromise(isTypeOfResult)) {\n promisedIsTypeOfResults[i] = isTypeOfResult;\n } else if (isTypeOfResult) {\n return type.name;\n }\n }\n }\n\n if (promisedIsTypeOfResults.length) {\n return Promise.all(promisedIsTypeOfResults).then((isTypeOfResults) => {\n for (let i = 0; i < isTypeOfResults.length; i++) {\n if (isTypeOfResults[i]) {\n return possibleTypes[i].name;\n }\n }\n });\n }\n};\n/**\n * If a resolve function is not given, then a default resolve behavior is used\n * which takes the property of the source object of the same name as the field\n * and returns it as the result, or if it's a function, returns the result\n * of calling that function while passing along args and context value.\n */\n\nexport const defaultFieldResolver = function (\n source,\n args,\n contextValue,\n info,\n) {\n // ensure source is a value for which property access is acceptable.\n if (isObjectLike(source) || typeof source === 'function') {\n const property = source[info.fieldName];\n\n if (typeof property === 'function') {\n return source[info.fieldName](args, contextValue, info);\n }\n\n return property;\n }\n};\n/**\n * This method looks up the field on the given type definition.\n * It has special casing for the three introspection fields,\n * __schema, __type and __typename. __typename is special because\n * it can always be queried as a field, even in situations where no\n * other fields are allowed, like on a Union. __schema and __type\n * could get automatically added to the query type, but that would\n * require mutating type definitions, which would cause issues.\n *\n * @internal\n */\n\nexport function getFieldDef(schema, parentType, fieldNode) {\n const fieldName = fieldNode.name.value;\n\n if (\n fieldName === SchemaMetaFieldDef.name &&\n schema.getQueryType() === parentType\n ) {\n return SchemaMetaFieldDef;\n } else if (\n fieldName === TypeMetaFieldDef.name &&\n schema.getQueryType() === parentType\n ) {\n return TypeMetaFieldDef;\n } else if (fieldName === TypeNameMetaFieldDef.name) {\n return TypeNameMetaFieldDef;\n }\n\n return parentType.getFields()[fieldName];\n}\n","import { devAssert } from './jsutils/devAssert.mjs';\nimport { isPromise } from './jsutils/isPromise.mjs';\nimport { parse } from './language/parser.mjs';\nimport { validateSchema } from './type/validate.mjs';\nimport { validate } from './validation/validate.mjs';\nimport { execute } from './execution/execute.mjs';\n/**\n * This is the primary entry point function for fulfilling GraphQL operations\n * by parsing, validating, and executing a GraphQL document along side a\n * GraphQL schema.\n *\n * More sophisticated GraphQL servers, such as those which persist queries,\n * may wish to separate the validation and execution phases to a static time\n * tooling step, and a server runtime step.\n *\n * Accepts either an object with named arguments, or individual arguments:\n *\n * schema:\n * The GraphQL type system to use when validating and executing a query.\n * source:\n * A GraphQL language formatted string representing the requested operation.\n * rootValue:\n * The value provided as the first argument to resolver functions on the top\n * level type (e.g. the query object type).\n * contextValue:\n * The context value is provided as an argument to resolver functions after\n * field arguments. It is used to pass shared information useful at any point\n * during executing this query, for example the currently logged in user and\n * connections to databases or other services.\n * variableValues:\n * A mapping of variable name to runtime value to use for all variables\n * defined in the requestString.\n * operationName:\n * The name of the operation to use if requestString contains multiple\n * possible operations. Can be omitted if requestString contains only\n * one operation.\n * fieldResolver:\n * A resolver function to use when one is not provided by the schema.\n * If not provided, the default field resolver is used (which looks for a\n * value or method on the source value with the field's name).\n * typeResolver:\n * A type resolver function to use when none is provided by the schema.\n * If not provided, the default type resolver is used (which looks for a\n * `__typename` field or alternatively calls the `isTypeOf` method).\n */\n\nexport function graphql(args) {\n // Always return a Promise for a consistent API.\n return new Promise((resolve) => resolve(graphqlImpl(args)));\n}\n/**\n * The graphqlSync function also fulfills GraphQL operations by parsing,\n * validating, and executing a GraphQL document along side a GraphQL schema.\n * However, it guarantees to complete synchronously (or throw an error) assuming\n * that all field resolvers are also synchronous.\n */\n\nexport function graphqlSync(args) {\n const result = graphqlImpl(args); // Assert that the execution was synchronous.\n\n if (isPromise(result)) {\n throw new Error('GraphQL execution failed to complete synchronously.');\n }\n\n return result;\n}\n\nfunction graphqlImpl(args) {\n // Temporary for v15 to v16 migration. Remove in v17\n arguments.length < 2 ||\n devAssert(\n false,\n 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.',\n );\n const {\n schema,\n source,\n rootValue,\n contextValue,\n variableValues,\n operationName,\n fieldResolver,\n typeResolver,\n } = args; // Validate Schema\n\n const schemaValidationErrors = validateSchema(schema);\n\n if (schemaValidationErrors.length > 0) {\n return {\n errors: schemaValidationErrors,\n };\n } // Parse\n\n let document;\n\n try {\n document = parse(source);\n } catch (syntaxError) {\n return {\n errors: [syntaxError],\n };\n } // Validate\n\n const validationErrors = validate(schema, document);\n\n if (validationErrors.length > 0) {\n return {\n errors: validationErrors,\n };\n } // Execute\n\n return execute({\n schema,\n document,\n rootValue,\n contextValue,\n variableValues,\n operationName,\n fieldResolver,\n typeResolver,\n });\n}\n","export {\n // Predicate\n isSchema, // Assertion\n assertSchema, // GraphQL Schema definition\n GraphQLSchema,\n} from './schema.mjs';\nexport {\n resolveObjMapThunk,\n resolveReadonlyArrayThunk, // Predicates\n isType,\n isScalarType,\n isObjectType,\n isInterfaceType,\n isUnionType,\n isEnumType,\n isInputObjectType,\n isListType,\n isNonNullType,\n isInputType,\n isOutputType,\n isLeafType,\n isCompositeType,\n isAbstractType,\n isWrappingType,\n isNullableType,\n isNamedType,\n isRequiredArgument,\n isRequiredInputField, // Assertions\n assertType,\n assertScalarType,\n assertObjectType,\n assertInterfaceType,\n assertUnionType,\n assertEnumType,\n assertInputObjectType,\n assertListType,\n assertNonNullType,\n assertInputType,\n assertOutputType,\n assertLeafType,\n assertCompositeType,\n assertAbstractType,\n assertWrappingType,\n assertNullableType,\n assertNamedType, // Un-modifiers\n getNullableType,\n getNamedType, // Definitions\n GraphQLScalarType,\n GraphQLObjectType,\n GraphQLInterfaceType,\n GraphQLUnionType,\n GraphQLEnumType,\n GraphQLInputObjectType, // Type Wrappers\n GraphQLList,\n GraphQLNonNull,\n} from './definition.mjs';\nexport {\n // Predicate\n isDirective, // Assertion\n assertDirective, // Directives Definition\n GraphQLDirective, // Built-in Directives defined by the Spec\n isSpecifiedDirective,\n specifiedDirectives,\n GraphQLIncludeDirective,\n GraphQLSkipDirective,\n GraphQLDeprecatedDirective,\n GraphQLSpecifiedByDirective, // Constant Deprecation Reason\n DEFAULT_DEPRECATION_REASON,\n} from './directives.mjs';\n// Common built-in scalar instances.\nexport {\n // Predicate\n isSpecifiedScalarType, // Standard GraphQL Scalars\n specifiedScalarTypes,\n GraphQLInt,\n GraphQLFloat,\n GraphQLString,\n GraphQLBoolean,\n GraphQLID, // Int boundaries constants\n GRAPHQL_MAX_INT,\n GRAPHQL_MIN_INT,\n} from './scalars.mjs';\nexport {\n // Predicate\n isIntrospectionType, // GraphQL Types for introspection.\n introspectionTypes,\n __Schema,\n __Directive,\n __DirectiveLocation,\n __Type,\n __Field,\n __InputValue,\n __EnumValue,\n __TypeKind, // \"Enum\" of Type Kinds\n TypeKind, // Meta-field definitions.\n SchemaMetaFieldDef,\n TypeMetaFieldDef,\n TypeNameMetaFieldDef,\n} from './introspection.mjs'; // Validate GraphQL schema.\n\nexport { validateSchema, assertValidSchema } from './validate.mjs'; // Upholds the spec rules about naming.\n\nexport { assertName, assertEnumValueName } from './assertName.mjs';\n","export { Source } from './source.mjs';\nexport { getLocation } from './location.mjs';\nexport { printLocation, printSourceLocation } from './printLocation.mjs';\nexport { Kind } from './kinds.mjs';\nexport { TokenKind } from './tokenKind.mjs';\nexport { Lexer } from './lexer.mjs';\nexport { parse, parseValue, parseConstValue, parseType } from './parser.mjs';\nexport { print } from './printer.mjs';\nexport {\n visit,\n visitInParallel,\n getVisitFn,\n getEnterLeaveForKind,\n BREAK,\n} from './visitor.mjs';\nexport { Location, Token, OperationTypeNode } from './ast.mjs';\nexport {\n isDefinitionNode,\n isExecutableDefinitionNode,\n isSelectionNode,\n isValueNode,\n isConstValueNode,\n isTypeNode,\n isTypeSystemDefinitionNode,\n isTypeDefinitionNode,\n isTypeSystemExtensionNode,\n isTypeExtensionNode,\n} from './predicates.mjs';\nexport { DirectiveLocation } from './directiveLocation.mjs';\n","/**\n * Returns true if the provided object implements the AsyncIterator protocol via\n * implementing a `Symbol.asyncIterator` method.\n */\nexport function isAsyncIterable(maybeAsyncIterable) {\n return (\n typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0\n ? void 0\n : maybeAsyncIterable[Symbol.asyncIterator]) === 'function'\n );\n}\n","/**\n * Given an AsyncIterable and a callback function, return an AsyncIterator\n * which produces values mapped via calling the callback function.\n */\nexport function mapAsyncIterator(iterable, callback) {\n const iterator = iterable[Symbol.asyncIterator]();\n\n async function mapResult(result) {\n if (result.done) {\n return result;\n }\n\n try {\n return {\n value: await callback(result.value),\n done: false,\n };\n } catch (error) {\n /* c8 ignore start */\n // FIXME: add test case\n if (typeof iterator.return === 'function') {\n try {\n await iterator.return();\n } catch (_e) {\n /* ignore error */\n }\n }\n\n throw error;\n /* c8 ignore stop */\n }\n }\n\n return {\n async next() {\n return mapResult(await iterator.next());\n },\n\n async return() {\n // If iterator.return() does not exist, then type R must be undefined.\n return typeof iterator.return === 'function'\n ? mapResult(await iterator.return())\n : {\n value: undefined,\n done: true,\n };\n },\n\n async throw(error) {\n if (typeof iterator.throw === 'function') {\n return mapResult(await iterator.throw(error));\n }\n\n throw error;\n },\n\n [Symbol.asyncIterator]() {\n return this;\n },\n };\n}\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { isAsyncIterable } from '../jsutils/isAsyncIterable.mjs';\nimport { addPath, pathToArray } from '../jsutils/Path.mjs';\nimport { GraphQLError } from '../error/GraphQLError.mjs';\nimport { locatedError } from '../error/locatedError.mjs';\nimport { collectFields } from './collectFields.mjs';\nimport {\n assertValidExecutionArguments,\n buildExecutionContext,\n buildResolveInfo,\n execute,\n getFieldDef,\n} from './execute.mjs';\nimport { mapAsyncIterator } from './mapAsyncIterator.mjs';\nimport { getArgumentValues } from './values.mjs';\n/**\n * Implements the \"Subscribe\" algorithm described in the GraphQL specification.\n *\n * Returns a Promise which resolves to either an AsyncIterator (if successful)\n * or an ExecutionResult (error). The promise will be rejected if the schema or\n * other arguments to this function are invalid, or if the resolved event stream\n * is not an async iterable.\n *\n * If the client-provided arguments to this function do not result in a\n * compliant subscription, a GraphQL Response (ExecutionResult) with\n * descriptive errors and no data will be returned.\n *\n * If the source stream could not be created due to faulty subscription\n * resolver logic or underlying systems, the promise will resolve to a single\n * ExecutionResult containing `errors` and no `data`.\n *\n * If the operation succeeded, the promise resolves to an AsyncIterator, which\n * yields a stream of ExecutionResults representing the response stream.\n *\n * Accepts either an object with named arguments, or individual arguments.\n */\n\nexport async function subscribe(args) {\n // Temporary for v15 to v16 migration. Remove in v17\n arguments.length < 2 ||\n devAssert(\n false,\n 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.',\n );\n const resultOrStream = await createSourceEventStream(args);\n\n if (!isAsyncIterable(resultOrStream)) {\n return resultOrStream;\n } // For each payload yielded from a subscription, map it over the normal\n // GraphQL `execute` function, with `payload` as the rootValue.\n // This implements the \"MapSourceToResponseEvent\" algorithm described in\n // the GraphQL specification. The `execute` function provides the\n // \"ExecuteSubscriptionEvent\" algorithm, as it is nearly identical to the\n // \"ExecuteQuery\" algorithm, for which `execute` is also used.\n\n const mapSourceToResponse = (payload) =>\n execute({ ...args, rootValue: payload }); // Map every source value to a ExecutionResult value as described above.\n\n return mapAsyncIterator(resultOrStream, mapSourceToResponse);\n}\n\nfunction toNormalizedArgs(args) {\n const firstArg = args[0];\n\n if (firstArg && 'document' in firstArg) {\n return firstArg;\n }\n\n return {\n schema: firstArg,\n // FIXME: when underlying TS bug fixed, see https://github.com/microsoft/TypeScript/issues/31613\n document: args[1],\n rootValue: args[2],\n contextValue: args[3],\n variableValues: args[4],\n operationName: args[5],\n subscribeFieldResolver: args[6],\n };\n}\n/**\n * Implements the \"CreateSourceEventStream\" algorithm described in the\n * GraphQL specification, resolving the subscription source event stream.\n *\n * Returns a Promise which resolves to either an AsyncIterable (if successful)\n * or an ExecutionResult (error). The promise will be rejected if the schema or\n * other arguments to this function are invalid, or if the resolved event stream\n * is not an async iterable.\n *\n * If the client-provided arguments to this function do not result in a\n * compliant subscription, a GraphQL Response (ExecutionResult) with\n * descriptive errors and no data will be returned.\n *\n * If the the source stream could not be created due to faulty subscription\n * resolver logic or underlying systems, the promise will resolve to a single\n * ExecutionResult containing `errors` and no `data`.\n *\n * If the operation succeeded, the promise resolves to the AsyncIterable for the\n * event stream returned by the resolver.\n *\n * A Source Event Stream represents a sequence of events, each of which triggers\n * a GraphQL execution for that event.\n *\n * This may be useful when hosting the stateful subscription service in a\n * different process or machine than the stateless GraphQL execution engine,\n * or otherwise separating these two steps. For more on this, see the\n * \"Supporting Subscriptions at Scale\" information in the GraphQL specification.\n */\n\nexport async function createSourceEventStream(...rawArgs) {\n const args = toNormalizedArgs(rawArgs);\n const { schema, document, variableValues } = args; // If arguments are missing or incorrectly typed, this is an internal\n // developer mistake which should throw an early error.\n\n assertValidExecutionArguments(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments,\n // a \"Response\" with only errors is returned.\n\n const exeContext = buildExecutionContext(args); // Return early errors if execution context failed.\n\n if (!('schema' in exeContext)) {\n return {\n errors: exeContext,\n };\n }\n\n try {\n const eventStream = await executeSubscription(exeContext); // Assert field returned an event stream, otherwise yield an error.\n\n if (!isAsyncIterable(eventStream)) {\n throw new Error(\n 'Subscription field must return Async Iterable. ' +\n `Received: ${inspect(eventStream)}.`,\n );\n }\n\n return eventStream;\n } catch (error) {\n // If it GraphQLError, report it as an ExecutionResult, containing only errors and no data.\n // Otherwise treat the error as a system-class error and re-throw it.\n if (error instanceof GraphQLError) {\n return {\n errors: [error],\n };\n }\n\n throw error;\n }\n}\n\nasync function executeSubscription(exeContext) {\n const { schema, fragments, operation, variableValues, rootValue } =\n exeContext;\n const rootType = schema.getSubscriptionType();\n\n if (rootType == null) {\n throw new GraphQLError(\n 'Schema is not configured to execute subscription operation.',\n {\n nodes: operation,\n },\n );\n }\n\n const rootFields = collectFields(\n schema,\n fragments,\n variableValues,\n rootType,\n operation.selectionSet,\n );\n const [responseName, fieldNodes] = [...rootFields.entries()][0];\n const fieldDef = getFieldDef(schema, rootType, fieldNodes[0]);\n\n if (!fieldDef) {\n const fieldName = fieldNodes[0].name.value;\n throw new GraphQLError(\n `The subscription field \"${fieldName}\" is not defined.`,\n {\n nodes: fieldNodes,\n },\n );\n }\n\n const path = addPath(undefined, responseName, rootType.name);\n const info = buildResolveInfo(\n exeContext,\n fieldDef,\n fieldNodes,\n rootType,\n path,\n );\n\n try {\n var _fieldDef$subscribe;\n\n // Implements the \"ResolveFieldEventStream\" algorithm from GraphQL specification.\n // It differs from \"ResolveFieldValue\" due to providing a different `resolveFn`.\n // Build a JS object of arguments from the field.arguments AST, using the\n // variables scope to fulfill any variable references.\n const args = getArgumentValues(fieldDef, fieldNodes[0], variableValues); // The resolve function's optional third argument is a context value that\n // is provided to every resolve function within an execution. It is commonly\n // used to represent an authenticated user, or request-specific caches.\n\n const contextValue = exeContext.contextValue; // Call the `subscribe()` resolver or the default resolver to produce an\n // AsyncIterable yielding raw payloads.\n\n const resolveFn =\n (_fieldDef$subscribe = fieldDef.subscribe) !== null &&\n _fieldDef$subscribe !== void 0\n ? _fieldDef$subscribe\n : exeContext.subscribeFieldResolver;\n const eventStream = await resolveFn(rootValue, args, contextValue, info);\n\n if (eventStream instanceof Error) {\n throw eventStream;\n }\n\n return eventStream;\n } catch (error) {\n throw locatedError(error, fieldNodes, pathToArray(path));\n }\n}\n","export { pathToArray as responsePathAsArray } from '../jsutils/Path.mjs';\nexport {\n execute,\n executeSync,\n defaultFieldResolver,\n defaultTypeResolver,\n} from './execute.mjs';\nexport { subscribe, createSourceEventStream } from './subscribe.mjs';\nexport {\n getArgumentValues,\n getVariableValues,\n getDirectiveValues,\n} from './values.mjs';\n","import { invariant } from '../../../jsutils/invariant.mjs';\nimport { GraphQLError } from '../../../error/GraphQLError.mjs';\nimport { getNamedType, isInputObjectType } from '../../../type/definition.mjs';\n\n/**\n * No deprecated\n *\n * A GraphQL document is only valid if all selected fields and all used enum values have not been\n * deprecated.\n *\n * Note: This rule is optional and is not part of the Validation section of the GraphQL\n * Specification. The main purpose of this rule is detection of deprecated usages and not\n * necessarily to forbid their use when querying a service.\n */\nexport function NoDeprecatedCustomRule(context) {\n return {\n Field(node) {\n const fieldDef = context.getFieldDef();\n const deprecationReason =\n fieldDef === null || fieldDef === void 0\n ? void 0\n : fieldDef.deprecationReason;\n\n if (fieldDef && deprecationReason != null) {\n const parentType = context.getParentType();\n parentType != null || invariant(false);\n context.reportError(\n new GraphQLError(\n `The field ${parentType.name}.${fieldDef.name} is deprecated. ${deprecationReason}`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n\n Argument(node) {\n const argDef = context.getArgument();\n const deprecationReason =\n argDef === null || argDef === void 0\n ? void 0\n : argDef.deprecationReason;\n\n if (argDef && deprecationReason != null) {\n const directiveDef = context.getDirective();\n\n if (directiveDef != null) {\n context.reportError(\n new GraphQLError(\n `Directive \"@${directiveDef.name}\" argument \"${argDef.name}\" is deprecated. ${deprecationReason}`,\n {\n nodes: node,\n },\n ),\n );\n } else {\n const parentType = context.getParentType();\n const fieldDef = context.getFieldDef();\n (parentType != null && fieldDef != null) || invariant(false);\n context.reportError(\n new GraphQLError(\n `Field \"${parentType.name}.${fieldDef.name}\" argument \"${argDef.name}\" is deprecated. ${deprecationReason}`,\n {\n nodes: node,\n },\n ),\n );\n }\n }\n },\n\n ObjectField(node) {\n const inputObjectDef = getNamedType(context.getParentInputType());\n\n if (isInputObjectType(inputObjectDef)) {\n const inputFieldDef = inputObjectDef.getFields()[node.name.value];\n const deprecationReason =\n inputFieldDef === null || inputFieldDef === void 0\n ? void 0\n : inputFieldDef.deprecationReason;\n\n if (deprecationReason != null) {\n context.reportError(\n new GraphQLError(\n `The input field ${inputObjectDef.name}.${inputFieldDef.name} is deprecated. ${deprecationReason}`,\n {\n nodes: node,\n },\n ),\n );\n }\n }\n },\n\n EnumValue(node) {\n const enumValueDef = context.getEnumValue();\n const deprecationReason =\n enumValueDef === null || enumValueDef === void 0\n ? void 0\n : enumValueDef.deprecationReason;\n\n if (enumValueDef && deprecationReason != null) {\n const enumTypeDef = getNamedType(context.getInputType());\n enumTypeDef != null || invariant(false);\n context.reportError(\n new GraphQLError(\n `The enum value \"${enumTypeDef.name}.${enumValueDef.name}\" is deprecated. ${deprecationReason}`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n };\n}\n","import { GraphQLError } from '../../../error/GraphQLError.mjs';\nimport { getNamedType } from '../../../type/definition.mjs';\nimport { isIntrospectionType } from '../../../type/introspection.mjs';\n\n/**\n * Prohibit introspection queries\n *\n * A GraphQL document is only valid if all fields selected are not fields that\n * return an introspection type.\n *\n * Note: This rule is optional and is not part of the Validation section of the\n * GraphQL Specification. This rule effectively disables introspection, which\n * does not reflect best practices and should only be done if absolutely necessary.\n */\nexport function NoSchemaIntrospectionCustomRule(context) {\n return {\n Field(node) {\n const type = getNamedType(context.getType());\n\n if (type && isIntrospectionType(type)) {\n context.reportError(\n new GraphQLError(\n `GraphQL introspection has been disabled, but the requested query contained the field \"${node.name.value}\".`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n };\n}\n","export { validate } from './validate.mjs';\nexport { ValidationContext } from './ValidationContext.mjs';\n// All validation rules in the GraphQL Specification.\nexport { specifiedRules } from './specifiedRules.mjs'; // Spec Section: \"Executable Definitions\"\n\nexport { ExecutableDefinitionsRule } from './rules/ExecutableDefinitionsRule.mjs'; // Spec Section: \"Field Selections on Objects, Interfaces, and Unions Types\"\n\nexport { FieldsOnCorrectTypeRule } from './rules/FieldsOnCorrectTypeRule.mjs'; // Spec Section: \"Fragments on Composite Types\"\n\nexport { FragmentsOnCompositeTypesRule } from './rules/FragmentsOnCompositeTypesRule.mjs'; // Spec Section: \"Argument Names\"\n\nexport { KnownArgumentNamesRule } from './rules/KnownArgumentNamesRule.mjs'; // Spec Section: \"Directives Are Defined\"\n\nexport { KnownDirectivesRule } from './rules/KnownDirectivesRule.mjs'; // Spec Section: \"Fragment spread target defined\"\n\nexport { KnownFragmentNamesRule } from './rules/KnownFragmentNamesRule.mjs'; // Spec Section: \"Fragment Spread Type Existence\"\n\nexport { KnownTypeNamesRule } from './rules/KnownTypeNamesRule.mjs'; // Spec Section: \"Lone Anonymous Operation\"\n\nexport { LoneAnonymousOperationRule } from './rules/LoneAnonymousOperationRule.mjs'; // Spec Section: \"Fragments must not form cycles\"\n\nexport { NoFragmentCyclesRule } from './rules/NoFragmentCyclesRule.mjs'; // Spec Section: \"All Variable Used Defined\"\n\nexport { NoUndefinedVariablesRule } from './rules/NoUndefinedVariablesRule.mjs'; // Spec Section: \"Fragments must be used\"\n\nexport { NoUnusedFragmentsRule } from './rules/NoUnusedFragmentsRule.mjs'; // Spec Section: \"All Variables Used\"\n\nexport { NoUnusedVariablesRule } from './rules/NoUnusedVariablesRule.mjs'; // Spec Section: \"Field Selection Merging\"\n\nexport { OverlappingFieldsCanBeMergedRule } from './rules/OverlappingFieldsCanBeMergedRule.mjs'; // Spec Section: \"Fragment spread is possible\"\n\nexport { PossibleFragmentSpreadsRule } from './rules/PossibleFragmentSpreadsRule.mjs'; // Spec Section: \"Argument Optionality\"\n\nexport { ProvidedRequiredArgumentsRule } from './rules/ProvidedRequiredArgumentsRule.mjs'; // Spec Section: \"Leaf Field Selections\"\n\nexport { ScalarLeafsRule } from './rules/ScalarLeafsRule.mjs'; // Spec Section: \"Subscriptions with Single Root Field\"\n\nexport { SingleFieldSubscriptionsRule } from './rules/SingleFieldSubscriptionsRule.mjs'; // Spec Section: \"Argument Uniqueness\"\n\nexport { UniqueArgumentNamesRule } from './rules/UniqueArgumentNamesRule.mjs'; // Spec Section: \"Directives Are Unique Per Location\"\n\nexport { UniqueDirectivesPerLocationRule } from './rules/UniqueDirectivesPerLocationRule.mjs'; // Spec Section: \"Fragment Name Uniqueness\"\n\nexport { UniqueFragmentNamesRule } from './rules/UniqueFragmentNamesRule.mjs'; // Spec Section: \"Input Object Field Uniqueness\"\n\nexport { UniqueInputFieldNamesRule } from './rules/UniqueInputFieldNamesRule.mjs'; // Spec Section: \"Operation Name Uniqueness\"\n\nexport { UniqueOperationNamesRule } from './rules/UniqueOperationNamesRule.mjs'; // Spec Section: \"Variable Uniqueness\"\n\nexport { UniqueVariableNamesRule } from './rules/UniqueVariableNamesRule.mjs'; // Spec Section: \"Values Type Correctness\"\n\nexport { ValuesOfCorrectTypeRule } from './rules/ValuesOfCorrectTypeRule.mjs'; // Spec Section: \"Variables are Input Types\"\n\nexport { VariablesAreInputTypesRule } from './rules/VariablesAreInputTypesRule.mjs'; // Spec Section: \"All Variable Usages Are Allowed\"\n\nexport { VariablesInAllowedPositionRule } from './rules/VariablesInAllowedPositionRule.mjs'; // SDL-specific validation rules\n\nexport { LoneSchemaDefinitionRule } from './rules/LoneSchemaDefinitionRule.mjs';\nexport { UniqueOperationTypesRule } from './rules/UniqueOperationTypesRule.mjs';\nexport { UniqueTypeNamesRule } from './rules/UniqueTypeNamesRule.mjs';\nexport { UniqueEnumValueNamesRule } from './rules/UniqueEnumValueNamesRule.mjs';\nexport { UniqueFieldDefinitionNamesRule } from './rules/UniqueFieldDefinitionNamesRule.mjs';\nexport { UniqueArgumentDefinitionNamesRule } from './rules/UniqueArgumentDefinitionNamesRule.mjs';\nexport { UniqueDirectiveNamesRule } from './rules/UniqueDirectiveNamesRule.mjs';\nexport { PossibleTypeExtensionsRule } from './rules/PossibleTypeExtensionsRule.mjs'; // Optional rules not defined by the GraphQL Specification\n\nexport { NoDeprecatedCustomRule } from './rules/custom/NoDeprecatedCustomRule.mjs';\nexport { NoSchemaIntrospectionCustomRule } from './rules/custom/NoSchemaIntrospectionCustomRule.mjs';\n","export { GraphQLError, printError, formatError } from './GraphQLError.mjs';\nexport { syntaxError } from './syntaxError.mjs';\nexport { locatedError } from './locatedError.mjs';\n","/**\n * Produce the GraphQL query recommended for a full schema introspection.\n * Accepts optional IntrospectionOptions.\n */\nexport function getIntrospectionQuery(options) {\n const optionsWithDefault = {\n descriptions: true,\n specifiedByUrl: false,\n directiveIsRepeatable: false,\n schemaDescription: false,\n inputValueDeprecation: false,\n ...options,\n };\n const descriptions = optionsWithDefault.descriptions ? 'description' : '';\n const specifiedByUrl = optionsWithDefault.specifiedByUrl\n ? 'specifiedByURL'\n : '';\n const directiveIsRepeatable = optionsWithDefault.directiveIsRepeatable\n ? 'isRepeatable'\n : '';\n const schemaDescription = optionsWithDefault.schemaDescription\n ? descriptions\n : '';\n\n function inputDeprecation(str) {\n return optionsWithDefault.inputValueDeprecation ? str : '';\n }\n\n return `\n query IntrospectionQuery {\n __schema {\n ${schemaDescription}\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n ${descriptions}\n ${directiveIsRepeatable}\n locations\n args${inputDeprecation('(includeDeprecated: true)')} {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ${descriptions}\n ${specifiedByUrl}\n fields(includeDeprecated: true) {\n name\n ${descriptions}\n args${inputDeprecation('(includeDeprecated: true)')} {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields${inputDeprecation('(includeDeprecated: true)')} {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ${descriptions}\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ${descriptions}\n type { ...TypeRef }\n defaultValue\n ${inputDeprecation('isDeprecated')}\n ${inputDeprecation('deprecationReason')}\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n `;\n}\n","import { Kind } from '../language/kinds.mjs';\n/**\n * Returns an operation AST given a document AST and optionally an operation\n * name. If a name is not provided, an operation is only returned if only one is\n * provided in the document.\n */\n\nexport function getOperationAST(documentAST, operationName) {\n let operation = null;\n\n for (const definition of documentAST.definitions) {\n if (definition.kind === Kind.OPERATION_DEFINITION) {\n var _definition$name;\n\n if (operationName == null) {\n // If no operation name was provided, only return an Operation if there\n // is one defined in the document. Upon encountering the second, return\n // null.\n if (operation) {\n return null;\n }\n\n operation = definition;\n } else if (\n ((_definition$name = definition.name) === null ||\n _definition$name === void 0\n ? void 0\n : _definition$name.value) === operationName\n ) {\n return definition;\n }\n }\n }\n\n return operation;\n}\n","import { GraphQLError } from '../error/GraphQLError.mjs';\n\n/**\n * Extracts the root type of the operation from the schema.\n *\n * @deprecated Please use `GraphQLSchema.getRootType` instead. Will be removed in v17\n */\nexport function getOperationRootType(schema, operation) {\n if (operation.operation === 'query') {\n const queryType = schema.getQueryType();\n\n if (!queryType) {\n throw new GraphQLError(\n 'Schema does not define the required query root type.',\n {\n nodes: operation,\n },\n );\n }\n\n return queryType;\n }\n\n if (operation.operation === 'mutation') {\n const mutationType = schema.getMutationType();\n\n if (!mutationType) {\n throw new GraphQLError('Schema is not configured for mutations.', {\n nodes: operation,\n });\n }\n\n return mutationType;\n }\n\n if (operation.operation === 'subscription') {\n const subscriptionType = schema.getSubscriptionType();\n\n if (!subscriptionType) {\n throw new GraphQLError('Schema is not configured for subscriptions.', {\n nodes: operation,\n });\n }\n\n return subscriptionType;\n }\n\n throw new GraphQLError(\n 'Can only have query, mutation and subscription operations.',\n {\n nodes: operation,\n },\n );\n}\n","import { invariant } from '../jsutils/invariant.mjs';\nimport { parse } from '../language/parser.mjs';\nimport { executeSync } from '../execution/execute.mjs';\nimport { getIntrospectionQuery } from './getIntrospectionQuery.mjs';\n/**\n * Build an IntrospectionQuery from a GraphQLSchema\n *\n * IntrospectionQuery is useful for utilities that care about type and field\n * relationships, but do not need to traverse through those relationships.\n *\n * This is the inverse of buildClientSchema. The primary use case is outside\n * of the server context, for instance when doing schema comparisons.\n */\n\nexport function introspectionFromSchema(schema, options) {\n const optionsWithDefaults = {\n specifiedByUrl: true,\n directiveIsRepeatable: true,\n schemaDescription: true,\n inputValueDeprecation: true,\n ...options,\n };\n const document = parse(getIntrospectionQuery(optionsWithDefaults));\n const result = executeSync({\n schema,\n document,\n });\n (!result.errors && result.data) || invariant(false);\n return result.data;\n}\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { keyValMap } from '../jsutils/keyValMap.mjs';\nimport { parseValue } from '../language/parser.mjs';\nimport {\n assertInterfaceType,\n assertNullableType,\n assertObjectType,\n GraphQLEnumType,\n GraphQLInputObjectType,\n GraphQLInterfaceType,\n GraphQLList,\n GraphQLNonNull,\n GraphQLObjectType,\n GraphQLScalarType,\n GraphQLUnionType,\n isInputType,\n isOutputType,\n} from '../type/definition.mjs';\nimport { GraphQLDirective } from '../type/directives.mjs';\nimport { introspectionTypes, TypeKind } from '../type/introspection.mjs';\nimport { specifiedScalarTypes } from '../type/scalars.mjs';\nimport { GraphQLSchema } from '../type/schema.mjs';\nimport { valueFromAST } from './valueFromAST.mjs';\n/**\n * Build a GraphQLSchema for use by client tools.\n *\n * Given the result of a client running the introspection query, creates and\n * returns a GraphQLSchema instance which can be then used with all graphql-js\n * tools, but cannot be used to execute a query, as introspection does not\n * represent the \"resolver\", \"parse\" or \"serialize\" functions or any other\n * server-internal mechanisms.\n *\n * This function expects a complete introspection result. Don't forget to check\n * the \"errors\" field of a server response before calling this function.\n */\n\nexport function buildClientSchema(introspection, options) {\n (isObjectLike(introspection) && isObjectLike(introspection.__schema)) ||\n devAssert(\n false,\n `Invalid or incomplete introspection result. Ensure that you are passing \"data\" property of introspection response and no \"errors\" was returned alongside: ${inspect(\n introspection,\n )}.`,\n ); // Get the schema from the introspection result.\n\n const schemaIntrospection = introspection.__schema; // Iterate through all types, getting the type definition for each.\n\n const typeMap = keyValMap(\n schemaIntrospection.types,\n (typeIntrospection) => typeIntrospection.name,\n (typeIntrospection) => buildType(typeIntrospection),\n ); // Include standard types only if they are used.\n\n for (const stdType of [...specifiedScalarTypes, ...introspectionTypes]) {\n if (typeMap[stdType.name]) {\n typeMap[stdType.name] = stdType;\n }\n } // Get the root Query, Mutation, and Subscription types.\n\n const queryType = schemaIntrospection.queryType\n ? getObjectType(schemaIntrospection.queryType)\n : null;\n const mutationType = schemaIntrospection.mutationType\n ? getObjectType(schemaIntrospection.mutationType)\n : null;\n const subscriptionType = schemaIntrospection.subscriptionType\n ? getObjectType(schemaIntrospection.subscriptionType)\n : null; // Get the directives supported by Introspection, assuming empty-set if\n // directives were not queried for.\n\n const directives = schemaIntrospection.directives\n ? schemaIntrospection.directives.map(buildDirective)\n : []; // Then produce and return a Schema with these types.\n\n return new GraphQLSchema({\n description: schemaIntrospection.description,\n query: queryType,\n mutation: mutationType,\n subscription: subscriptionType,\n types: Object.values(typeMap),\n directives,\n assumeValid:\n options === null || options === void 0 ? void 0 : options.assumeValid,\n }); // Given a type reference in introspection, return the GraphQLType instance.\n // preferring cached instances before building new instances.\n\n function getType(typeRef) {\n if (typeRef.kind === TypeKind.LIST) {\n const itemRef = typeRef.ofType;\n\n if (!itemRef) {\n throw new Error('Decorated type deeper than introspection query.');\n }\n\n return new GraphQLList(getType(itemRef));\n }\n\n if (typeRef.kind === TypeKind.NON_NULL) {\n const nullableRef = typeRef.ofType;\n\n if (!nullableRef) {\n throw new Error('Decorated type deeper than introspection query.');\n }\n\n const nullableType = getType(nullableRef);\n return new GraphQLNonNull(assertNullableType(nullableType));\n }\n\n return getNamedType(typeRef);\n }\n\n function getNamedType(typeRef) {\n const typeName = typeRef.name;\n\n if (!typeName) {\n throw new Error(`Unknown type reference: ${inspect(typeRef)}.`);\n }\n\n const type = typeMap[typeName];\n\n if (!type) {\n throw new Error(\n `Invalid or incomplete schema, unknown type: ${typeName}. Ensure that a full introspection query is used in order to build a client schema.`,\n );\n }\n\n return type;\n }\n\n function getObjectType(typeRef) {\n return assertObjectType(getNamedType(typeRef));\n }\n\n function getInterfaceType(typeRef) {\n return assertInterfaceType(getNamedType(typeRef));\n } // Given a type's introspection result, construct the correct\n // GraphQLType instance.\n\n function buildType(type) {\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n if (type != null && type.name != null && type.kind != null) {\n // FIXME: Properly type IntrospectionType, it's a breaking change so fix in v17\n // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check\n switch (type.kind) {\n case TypeKind.SCALAR:\n return buildScalarDef(type);\n\n case TypeKind.OBJECT:\n return buildObjectDef(type);\n\n case TypeKind.INTERFACE:\n return buildInterfaceDef(type);\n\n case TypeKind.UNION:\n return buildUnionDef(type);\n\n case TypeKind.ENUM:\n return buildEnumDef(type);\n\n case TypeKind.INPUT_OBJECT:\n return buildInputObjectDef(type);\n }\n }\n\n const typeStr = inspect(type);\n throw new Error(\n `Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${typeStr}.`,\n );\n }\n\n function buildScalarDef(scalarIntrospection) {\n return new GraphQLScalarType({\n name: scalarIntrospection.name,\n description: scalarIntrospection.description,\n specifiedByURL: scalarIntrospection.specifiedByURL,\n });\n }\n\n function buildImplementationsList(implementingIntrospection) {\n // TODO: Temporary workaround until GraphQL ecosystem will fully support\n // 'interfaces' on interface types.\n if (\n implementingIntrospection.interfaces === null &&\n implementingIntrospection.kind === TypeKind.INTERFACE\n ) {\n return [];\n }\n\n if (!implementingIntrospection.interfaces) {\n const implementingIntrospectionStr = inspect(implementingIntrospection);\n throw new Error(\n `Introspection result missing interfaces: ${implementingIntrospectionStr}.`,\n );\n }\n\n return implementingIntrospection.interfaces.map(getInterfaceType);\n }\n\n function buildObjectDef(objectIntrospection) {\n return new GraphQLObjectType({\n name: objectIntrospection.name,\n description: objectIntrospection.description,\n interfaces: () => buildImplementationsList(objectIntrospection),\n fields: () => buildFieldDefMap(objectIntrospection),\n });\n }\n\n function buildInterfaceDef(interfaceIntrospection) {\n return new GraphQLInterfaceType({\n name: interfaceIntrospection.name,\n description: interfaceIntrospection.description,\n interfaces: () => buildImplementationsList(interfaceIntrospection),\n fields: () => buildFieldDefMap(interfaceIntrospection),\n });\n }\n\n function buildUnionDef(unionIntrospection) {\n if (!unionIntrospection.possibleTypes) {\n const unionIntrospectionStr = inspect(unionIntrospection);\n throw new Error(\n `Introspection result missing possibleTypes: ${unionIntrospectionStr}.`,\n );\n }\n\n return new GraphQLUnionType({\n name: unionIntrospection.name,\n description: unionIntrospection.description,\n types: () => unionIntrospection.possibleTypes.map(getObjectType),\n });\n }\n\n function buildEnumDef(enumIntrospection) {\n if (!enumIntrospection.enumValues) {\n const enumIntrospectionStr = inspect(enumIntrospection);\n throw new Error(\n `Introspection result missing enumValues: ${enumIntrospectionStr}.`,\n );\n }\n\n return new GraphQLEnumType({\n name: enumIntrospection.name,\n description: enumIntrospection.description,\n values: keyValMap(\n enumIntrospection.enumValues,\n (valueIntrospection) => valueIntrospection.name,\n (valueIntrospection) => ({\n description: valueIntrospection.description,\n deprecationReason: valueIntrospection.deprecationReason,\n }),\n ),\n });\n }\n\n function buildInputObjectDef(inputObjectIntrospection) {\n if (!inputObjectIntrospection.inputFields) {\n const inputObjectIntrospectionStr = inspect(inputObjectIntrospection);\n throw new Error(\n `Introspection result missing inputFields: ${inputObjectIntrospectionStr}.`,\n );\n }\n\n return new GraphQLInputObjectType({\n name: inputObjectIntrospection.name,\n description: inputObjectIntrospection.description,\n fields: () => buildInputValueDefMap(inputObjectIntrospection.inputFields),\n });\n }\n\n function buildFieldDefMap(typeIntrospection) {\n if (!typeIntrospection.fields) {\n throw new Error(\n `Introspection result missing fields: ${inspect(typeIntrospection)}.`,\n );\n }\n\n return keyValMap(\n typeIntrospection.fields,\n (fieldIntrospection) => fieldIntrospection.name,\n buildField,\n );\n }\n\n function buildField(fieldIntrospection) {\n const type = getType(fieldIntrospection.type);\n\n if (!isOutputType(type)) {\n const typeStr = inspect(type);\n throw new Error(\n `Introspection must provide output type for fields, but received: ${typeStr}.`,\n );\n }\n\n if (!fieldIntrospection.args) {\n const fieldIntrospectionStr = inspect(fieldIntrospection);\n throw new Error(\n `Introspection result missing field args: ${fieldIntrospectionStr}.`,\n );\n }\n\n return {\n description: fieldIntrospection.description,\n deprecationReason: fieldIntrospection.deprecationReason,\n type,\n args: buildInputValueDefMap(fieldIntrospection.args),\n };\n }\n\n function buildInputValueDefMap(inputValueIntrospections) {\n return keyValMap(\n inputValueIntrospections,\n (inputValue) => inputValue.name,\n buildInputValue,\n );\n }\n\n function buildInputValue(inputValueIntrospection) {\n const type = getType(inputValueIntrospection.type);\n\n if (!isInputType(type)) {\n const typeStr = inspect(type);\n throw new Error(\n `Introspection must provide input type for arguments, but received: ${typeStr}.`,\n );\n }\n\n const defaultValue =\n inputValueIntrospection.defaultValue != null\n ? valueFromAST(parseValue(inputValueIntrospection.defaultValue), type)\n : undefined;\n return {\n description: inputValueIntrospection.description,\n type,\n defaultValue,\n deprecationReason: inputValueIntrospection.deprecationReason,\n };\n }\n\n function buildDirective(directiveIntrospection) {\n if (!directiveIntrospection.args) {\n const directiveIntrospectionStr = inspect(directiveIntrospection);\n throw new Error(\n `Introspection result missing directive args: ${directiveIntrospectionStr}.`,\n );\n }\n\n if (!directiveIntrospection.locations) {\n const directiveIntrospectionStr = inspect(directiveIntrospection);\n throw new Error(\n `Introspection result missing directive locations: ${directiveIntrospectionStr}.`,\n );\n }\n\n return new GraphQLDirective({\n name: directiveIntrospection.name,\n description: directiveIntrospection.description,\n isRepeatable: directiveIntrospection.isRepeatable,\n locations: directiveIntrospection.locations.slice(),\n args: buildInputValueDefMap(directiveIntrospection.args),\n });\n }\n}\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { invariant } from '../jsutils/invariant.mjs';\nimport { keyMap } from '../jsutils/keyMap.mjs';\nimport { mapValue } from '../jsutils/mapValue.mjs';\nimport { Kind } from '../language/kinds.mjs';\nimport {\n isTypeDefinitionNode,\n isTypeExtensionNode,\n} from '../language/predicates.mjs';\nimport {\n GraphQLEnumType,\n GraphQLInputObjectType,\n GraphQLInterfaceType,\n GraphQLList,\n GraphQLNonNull,\n GraphQLObjectType,\n GraphQLScalarType,\n GraphQLUnionType,\n isEnumType,\n isInputObjectType,\n isInterfaceType,\n isListType,\n isNonNullType,\n isObjectType,\n isScalarType,\n isUnionType,\n} from '../type/definition.mjs';\nimport {\n GraphQLDeprecatedDirective,\n GraphQLDirective,\n GraphQLSpecifiedByDirective,\n} from '../type/directives.mjs';\nimport {\n introspectionTypes,\n isIntrospectionType,\n} from '../type/introspection.mjs';\nimport {\n isSpecifiedScalarType,\n specifiedScalarTypes,\n} from '../type/scalars.mjs';\nimport { assertSchema, GraphQLSchema } from '../type/schema.mjs';\nimport { assertValidSDLExtension } from '../validation/validate.mjs';\nimport { getDirectiveValues } from '../execution/values.mjs';\nimport { valueFromAST } from './valueFromAST.mjs';\n\n/**\n * Produces a new schema given an existing schema and a document which may\n * contain GraphQL type extensions and definitions. The original schema will\n * remain unaltered.\n *\n * Because a schema represents a graph of references, a schema cannot be\n * extended without effectively making an entire copy. We do not know until it's\n * too late if subgraphs remain unchanged.\n *\n * This algorithm copies the provided schema, applying extensions while\n * producing the copy. The original schema remains unaltered.\n */\nexport function extendSchema(schema, documentAST, options) {\n assertSchema(schema);\n (documentAST != null && documentAST.kind === Kind.DOCUMENT) ||\n devAssert(false, 'Must provide valid Document AST.');\n\n if (\n (options === null || options === void 0 ? void 0 : options.assumeValid) !==\n true &&\n (options === null || options === void 0\n ? void 0\n : options.assumeValidSDL) !== true\n ) {\n assertValidSDLExtension(documentAST, schema);\n }\n\n const schemaConfig = schema.toConfig();\n const extendedConfig = extendSchemaImpl(schemaConfig, documentAST, options);\n return schemaConfig === extendedConfig\n ? schema\n : new GraphQLSchema(extendedConfig);\n}\n/**\n * @internal\n */\n\nexport function extendSchemaImpl(schemaConfig, documentAST, options) {\n var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid;\n\n // Collect the type definitions and extensions found in the document.\n const typeDefs = [];\n const typeExtensionsMap = Object.create(null); // New directives and types are separate because a directives and types can\n // have the same name. For example, a type named \"skip\".\n\n const directiveDefs = [];\n let schemaDef; // Schema extensions are collected which may add additional operation types.\n\n const schemaExtensions = [];\n\n for (const def of documentAST.definitions) {\n if (def.kind === Kind.SCHEMA_DEFINITION) {\n schemaDef = def;\n } else if (def.kind === Kind.SCHEMA_EXTENSION) {\n schemaExtensions.push(def);\n } else if (isTypeDefinitionNode(def)) {\n typeDefs.push(def);\n } else if (isTypeExtensionNode(def)) {\n const extendedTypeName = def.name.value;\n const existingTypeExtensions = typeExtensionsMap[extendedTypeName];\n typeExtensionsMap[extendedTypeName] = existingTypeExtensions\n ? existingTypeExtensions.concat([def])\n : [def];\n } else if (def.kind === Kind.DIRECTIVE_DEFINITION) {\n directiveDefs.push(def);\n }\n } // If this document contains no new types, extensions, or directives then\n // return the same unmodified GraphQLSchema instance.\n\n if (\n Object.keys(typeExtensionsMap).length === 0 &&\n typeDefs.length === 0 &&\n directiveDefs.length === 0 &&\n schemaExtensions.length === 0 &&\n schemaDef == null\n ) {\n return schemaConfig;\n }\n\n const typeMap = Object.create(null);\n\n for (const existingType of schemaConfig.types) {\n typeMap[existingType.name] = extendNamedType(existingType);\n }\n\n for (const typeNode of typeDefs) {\n var _stdTypeMap$name;\n\n const name = typeNode.name.value;\n typeMap[name] =\n (_stdTypeMap$name = stdTypeMap[name]) !== null &&\n _stdTypeMap$name !== void 0\n ? _stdTypeMap$name\n : buildType(typeNode);\n }\n\n const operationTypes = {\n // Get the extended root operation types.\n query: schemaConfig.query && replaceNamedType(schemaConfig.query),\n mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation),\n subscription:\n schemaConfig.subscription && replaceNamedType(schemaConfig.subscription),\n // Then, incorporate schema definition and all schema extensions.\n ...(schemaDef && getOperationTypes([schemaDef])),\n ...getOperationTypes(schemaExtensions),\n }; // Then produce and return a Schema config with these types.\n\n return {\n description:\n (_schemaDef = schemaDef) === null || _schemaDef === void 0\n ? void 0\n : (_schemaDef$descriptio = _schemaDef.description) === null ||\n _schemaDef$descriptio === void 0\n ? void 0\n : _schemaDef$descriptio.value,\n ...operationTypes,\n types: Object.values(typeMap),\n directives: [\n ...schemaConfig.directives.map(replaceDirective),\n ...directiveDefs.map(buildDirective),\n ],\n extensions: Object.create(null),\n astNode:\n (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0\n ? _schemaDef2\n : schemaConfig.astNode,\n extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions),\n assumeValid:\n (_options$assumeValid =\n options === null || options === void 0\n ? void 0\n : options.assumeValid) !== null && _options$assumeValid !== void 0\n ? _options$assumeValid\n : false,\n }; // Below are functions used for producing this schema that have closed over\n // this scope and have access to the schema, cache, and newly defined types.\n\n function replaceType(type) {\n if (isListType(type)) {\n // @ts-expect-error\n return new GraphQLList(replaceType(type.ofType));\n }\n\n if (isNonNullType(type)) {\n // @ts-expect-error\n return new GraphQLNonNull(replaceType(type.ofType));\n } // @ts-expect-error FIXME\n\n return replaceNamedType(type);\n }\n\n function replaceNamedType(type) {\n // Note: While this could make early assertions to get the correctly\n // typed values, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n return typeMap[type.name];\n }\n\n function replaceDirective(directive) {\n const config = directive.toConfig();\n return new GraphQLDirective({\n ...config,\n args: mapValue(config.args, extendArg),\n });\n }\n\n function extendNamedType(type) {\n if (isIntrospectionType(type) || isSpecifiedScalarType(type)) {\n // Builtin types are not extended.\n return type;\n }\n\n if (isScalarType(type)) {\n return extendScalarType(type);\n }\n\n if (isObjectType(type)) {\n return extendObjectType(type);\n }\n\n if (isInterfaceType(type)) {\n return extendInterfaceType(type);\n }\n\n if (isUnionType(type)) {\n return extendUnionType(type);\n }\n\n if (isEnumType(type)) {\n return extendEnumType(type);\n }\n\n if (isInputObjectType(type)) {\n return extendInputObjectType(type);\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible type definition nodes have been considered.\n\n false || invariant(false, 'Unexpected type: ' + inspect(type));\n }\n\n function extendInputObjectType(type) {\n var _typeExtensionsMap$co;\n\n const config = type.toConfig();\n const extensions =\n (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null &&\n _typeExtensionsMap$co !== void 0\n ? _typeExtensionsMap$co\n : [];\n return new GraphQLInputObjectType({\n ...config,\n fields: () => ({\n ...mapValue(config.fields, (field) => ({\n ...field,\n type: replaceType(field.type),\n })),\n ...buildInputFieldMap(extensions),\n }),\n extensionASTNodes: config.extensionASTNodes.concat(extensions),\n });\n }\n\n function extendEnumType(type) {\n var _typeExtensionsMap$ty;\n\n const config = type.toConfig();\n const extensions =\n (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null &&\n _typeExtensionsMap$ty !== void 0\n ? _typeExtensionsMap$ty\n : [];\n return new GraphQLEnumType({\n ...config,\n values: { ...config.values, ...buildEnumValueMap(extensions) },\n extensionASTNodes: config.extensionASTNodes.concat(extensions),\n });\n }\n\n function extendScalarType(type) {\n var _typeExtensionsMap$co2;\n\n const config = type.toConfig();\n const extensions =\n (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null &&\n _typeExtensionsMap$co2 !== void 0\n ? _typeExtensionsMap$co2\n : [];\n let specifiedByURL = config.specifiedByURL;\n\n for (const extensionNode of extensions) {\n var _getSpecifiedByURL;\n\n specifiedByURL =\n (_getSpecifiedByURL = getSpecifiedByURL(extensionNode)) !== null &&\n _getSpecifiedByURL !== void 0\n ? _getSpecifiedByURL\n : specifiedByURL;\n }\n\n return new GraphQLScalarType({\n ...config,\n specifiedByURL,\n extensionASTNodes: config.extensionASTNodes.concat(extensions),\n });\n }\n\n function extendObjectType(type) {\n var _typeExtensionsMap$co3;\n\n const config = type.toConfig();\n const extensions =\n (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null &&\n _typeExtensionsMap$co3 !== void 0\n ? _typeExtensionsMap$co3\n : [];\n return new GraphQLObjectType({\n ...config,\n interfaces: () => [\n ...type.getInterfaces().map(replaceNamedType),\n ...buildInterfaces(extensions),\n ],\n fields: () => ({\n ...mapValue(config.fields, extendField),\n ...buildFieldMap(extensions),\n }),\n extensionASTNodes: config.extensionASTNodes.concat(extensions),\n });\n }\n\n function extendInterfaceType(type) {\n var _typeExtensionsMap$co4;\n\n const config = type.toConfig();\n const extensions =\n (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null &&\n _typeExtensionsMap$co4 !== void 0\n ? _typeExtensionsMap$co4\n : [];\n return new GraphQLInterfaceType({\n ...config,\n interfaces: () => [\n ...type.getInterfaces().map(replaceNamedType),\n ...buildInterfaces(extensions),\n ],\n fields: () => ({\n ...mapValue(config.fields, extendField),\n ...buildFieldMap(extensions),\n }),\n extensionASTNodes: config.extensionASTNodes.concat(extensions),\n });\n }\n\n function extendUnionType(type) {\n var _typeExtensionsMap$co5;\n\n const config = type.toConfig();\n const extensions =\n (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null &&\n _typeExtensionsMap$co5 !== void 0\n ? _typeExtensionsMap$co5\n : [];\n return new GraphQLUnionType({\n ...config,\n types: () => [\n ...type.getTypes().map(replaceNamedType),\n ...buildUnionTypes(extensions),\n ],\n extensionASTNodes: config.extensionASTNodes.concat(extensions),\n });\n }\n\n function extendField(field) {\n return {\n ...field,\n type: replaceType(field.type),\n args: field.args && mapValue(field.args, extendArg),\n };\n }\n\n function extendArg(arg) {\n return { ...arg, type: replaceType(arg.type) };\n }\n\n function getOperationTypes(nodes) {\n const opTypes = {};\n\n for (const node of nodes) {\n var _node$operationTypes;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n const operationTypesNodes =\n /* c8 ignore next */\n (_node$operationTypes = node.operationTypes) !== null &&\n _node$operationTypes !== void 0\n ? _node$operationTypes\n : [];\n\n for (const operationType of operationTypesNodes) {\n // Note: While this could make early assertions to get the correctly\n // typed values below, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n // @ts-expect-error\n opTypes[operationType.operation] = getNamedType(operationType.type);\n }\n }\n\n return opTypes;\n }\n\n function getNamedType(node) {\n var _stdTypeMap$name2;\n\n const name = node.name.value;\n const type =\n (_stdTypeMap$name2 = stdTypeMap[name]) !== null &&\n _stdTypeMap$name2 !== void 0\n ? _stdTypeMap$name2\n : typeMap[name];\n\n if (type === undefined) {\n throw new Error(`Unknown type: \"${name}\".`);\n }\n\n return type;\n }\n\n function getWrappedType(node) {\n if (node.kind === Kind.LIST_TYPE) {\n return new GraphQLList(getWrappedType(node.type));\n }\n\n if (node.kind === Kind.NON_NULL_TYPE) {\n return new GraphQLNonNull(getWrappedType(node.type));\n }\n\n return getNamedType(node);\n }\n\n function buildDirective(node) {\n var _node$description;\n\n return new GraphQLDirective({\n name: node.name.value,\n description:\n (_node$description = node.description) === null ||\n _node$description === void 0\n ? void 0\n : _node$description.value,\n // @ts-expect-error\n locations: node.locations.map(({ value }) => value),\n isRepeatable: node.repeatable,\n args: buildArgumentMap(node.arguments),\n astNode: node,\n });\n }\n\n function buildFieldMap(nodes) {\n const fieldConfigMap = Object.create(null);\n\n for (const node of nodes) {\n var _node$fields;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n const nodeFields =\n /* c8 ignore next */\n (_node$fields = node.fields) !== null && _node$fields !== void 0\n ? _node$fields\n : [];\n\n for (const field of nodeFields) {\n var _field$description;\n\n fieldConfigMap[field.name.value] = {\n // Note: While this could make assertions to get the correctly typed\n // value, that would throw immediately while type system validation\n // with validateSchema() will produce more actionable results.\n type: getWrappedType(field.type),\n description:\n (_field$description = field.description) === null ||\n _field$description === void 0\n ? void 0\n : _field$description.value,\n args: buildArgumentMap(field.arguments),\n deprecationReason: getDeprecationReason(field),\n astNode: field,\n };\n }\n }\n\n return fieldConfigMap;\n }\n\n function buildArgumentMap(args) {\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n const argsNodes =\n /* c8 ignore next */\n args !== null && args !== void 0 ? args : [];\n const argConfigMap = Object.create(null);\n\n for (const arg of argsNodes) {\n var _arg$description;\n\n // Note: While this could make assertions to get the correctly typed\n // value, that would throw immediately while type system validation\n // with validateSchema() will produce more actionable results.\n const type = getWrappedType(arg.type);\n argConfigMap[arg.name.value] = {\n type,\n description:\n (_arg$description = arg.description) === null ||\n _arg$description === void 0\n ? void 0\n : _arg$description.value,\n defaultValue: valueFromAST(arg.defaultValue, type),\n deprecationReason: getDeprecationReason(arg),\n astNode: arg,\n };\n }\n\n return argConfigMap;\n }\n\n function buildInputFieldMap(nodes) {\n const inputFieldMap = Object.create(null);\n\n for (const node of nodes) {\n var _node$fields2;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n const fieldsNodes =\n /* c8 ignore next */\n (_node$fields2 = node.fields) !== null && _node$fields2 !== void 0\n ? _node$fields2\n : [];\n\n for (const field of fieldsNodes) {\n var _field$description2;\n\n // Note: While this could make assertions to get the correctly typed\n // value, that would throw immediately while type system validation\n // with validateSchema() will produce more actionable results.\n const type = getWrappedType(field.type);\n inputFieldMap[field.name.value] = {\n type,\n description:\n (_field$description2 = field.description) === null ||\n _field$description2 === void 0\n ? void 0\n : _field$description2.value,\n defaultValue: valueFromAST(field.defaultValue, type),\n deprecationReason: getDeprecationReason(field),\n astNode: field,\n };\n }\n }\n\n return inputFieldMap;\n }\n\n function buildEnumValueMap(nodes) {\n const enumValueMap = Object.create(null);\n\n for (const node of nodes) {\n var _node$values;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n const valuesNodes =\n /* c8 ignore next */\n (_node$values = node.values) !== null && _node$values !== void 0\n ? _node$values\n : [];\n\n for (const value of valuesNodes) {\n var _value$description;\n\n enumValueMap[value.name.value] = {\n description:\n (_value$description = value.description) === null ||\n _value$description === void 0\n ? void 0\n : _value$description.value,\n deprecationReason: getDeprecationReason(value),\n astNode: value,\n };\n }\n }\n\n return enumValueMap;\n }\n\n function buildInterfaces(nodes) {\n // Note: While this could make assertions to get the correctly typed\n // values below, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n // @ts-expect-error\n return nodes.flatMap(\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n (node) => {\n var _node$interfaces$map, _node$interfaces;\n\n return (\n /* c8 ignore next */\n (_node$interfaces$map =\n (_node$interfaces = node.interfaces) === null ||\n _node$interfaces === void 0\n ? void 0\n : _node$interfaces.map(getNamedType)) !== null &&\n _node$interfaces$map !== void 0\n ? _node$interfaces$map\n : []\n );\n },\n );\n }\n\n function buildUnionTypes(nodes) {\n // Note: While this could make assertions to get the correctly typed\n // values below, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n // @ts-expect-error\n return nodes.flatMap(\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n (node) => {\n var _node$types$map, _node$types;\n\n return (\n /* c8 ignore next */\n (_node$types$map =\n (_node$types = node.types) === null || _node$types === void 0\n ? void 0\n : _node$types.map(getNamedType)) !== null &&\n _node$types$map !== void 0\n ? _node$types$map\n : []\n );\n },\n );\n }\n\n function buildType(astNode) {\n var _typeExtensionsMap$na;\n\n const name = astNode.name.value;\n const extensionASTNodes =\n (_typeExtensionsMap$na = typeExtensionsMap[name]) !== null &&\n _typeExtensionsMap$na !== void 0\n ? _typeExtensionsMap$na\n : [];\n\n switch (astNode.kind) {\n case Kind.OBJECT_TYPE_DEFINITION: {\n var _astNode$description;\n\n const allNodes = [astNode, ...extensionASTNodes];\n return new GraphQLObjectType({\n name,\n description:\n (_astNode$description = astNode.description) === null ||\n _astNode$description === void 0\n ? void 0\n : _astNode$description.value,\n interfaces: () => buildInterfaces(allNodes),\n fields: () => buildFieldMap(allNodes),\n astNode,\n extensionASTNodes,\n });\n }\n\n case Kind.INTERFACE_TYPE_DEFINITION: {\n var _astNode$description2;\n\n const allNodes = [astNode, ...extensionASTNodes];\n return new GraphQLInterfaceType({\n name,\n description:\n (_astNode$description2 = astNode.description) === null ||\n _astNode$description2 === void 0\n ? void 0\n : _astNode$description2.value,\n interfaces: () => buildInterfaces(allNodes),\n fields: () => buildFieldMap(allNodes),\n astNode,\n extensionASTNodes,\n });\n }\n\n case Kind.ENUM_TYPE_DEFINITION: {\n var _astNode$description3;\n\n const allNodes = [astNode, ...extensionASTNodes];\n return new GraphQLEnumType({\n name,\n description:\n (_astNode$description3 = astNode.description) === null ||\n _astNode$description3 === void 0\n ? void 0\n : _astNode$description3.value,\n values: buildEnumValueMap(allNodes),\n astNode,\n extensionASTNodes,\n });\n }\n\n case Kind.UNION_TYPE_DEFINITION: {\n var _astNode$description4;\n\n const allNodes = [astNode, ...extensionASTNodes];\n return new GraphQLUnionType({\n name,\n description:\n (_astNode$description4 = astNode.description) === null ||\n _astNode$description4 === void 0\n ? void 0\n : _astNode$description4.value,\n types: () => buildUnionTypes(allNodes),\n astNode,\n extensionASTNodes,\n });\n }\n\n case Kind.SCALAR_TYPE_DEFINITION: {\n var _astNode$description5;\n\n return new GraphQLScalarType({\n name,\n description:\n (_astNode$description5 = astNode.description) === null ||\n _astNode$description5 === void 0\n ? void 0\n : _astNode$description5.value,\n specifiedByURL: getSpecifiedByURL(astNode),\n astNode,\n extensionASTNodes,\n });\n }\n\n case Kind.INPUT_OBJECT_TYPE_DEFINITION: {\n var _astNode$description6;\n\n const allNodes = [astNode, ...extensionASTNodes];\n return new GraphQLInputObjectType({\n name,\n description:\n (_astNode$description6 = astNode.description) === null ||\n _astNode$description6 === void 0\n ? void 0\n : _astNode$description6.value,\n fields: () => buildInputFieldMap(allNodes),\n astNode,\n extensionASTNodes,\n });\n }\n }\n }\n}\nconst stdTypeMap = keyMap(\n [...specifiedScalarTypes, ...introspectionTypes],\n (type) => type.name,\n);\n/**\n * Given a field or enum value node, returns the string value for the\n * deprecation reason.\n */\n\nfunction getDeprecationReason(node) {\n const deprecated = getDirectiveValues(GraphQLDeprecatedDirective, node); // @ts-expect-error validated by `getDirectiveValues`\n\n return deprecated === null || deprecated === void 0\n ? void 0\n : deprecated.reason;\n}\n/**\n * Given a scalar node, returns the string value for the specifiedByURL.\n */\n\nfunction getSpecifiedByURL(node) {\n const specifiedBy = getDirectiveValues(GraphQLSpecifiedByDirective, node); // @ts-expect-error validated by `getDirectiveValues`\n\n return specifiedBy === null || specifiedBy === void 0\n ? void 0\n : specifiedBy.url;\n}\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { Kind } from '../language/kinds.mjs';\nimport { parse } from '../language/parser.mjs';\nimport { specifiedDirectives } from '../type/directives.mjs';\nimport { GraphQLSchema } from '../type/schema.mjs';\nimport { assertValidSDL } from '../validation/validate.mjs';\nimport { extendSchemaImpl } from './extendSchema.mjs';\n\n/**\n * This takes the ast of a schema document produced by the parse function in\n * src/language/parser.js.\n *\n * If no schema definition is provided, then it will look for types named Query,\n * Mutation and Subscription.\n *\n * Given that AST it constructs a GraphQLSchema. The resulting schema\n * has no resolve methods, so execution will use default resolvers.\n */\nexport function buildASTSchema(documentAST, options) {\n (documentAST != null && documentAST.kind === Kind.DOCUMENT) ||\n devAssert(false, 'Must provide valid Document AST.');\n\n if (\n (options === null || options === void 0 ? void 0 : options.assumeValid) !==\n true &&\n (options === null || options === void 0\n ? void 0\n : options.assumeValidSDL) !== true\n ) {\n assertValidSDL(documentAST);\n }\n\n const emptySchemaConfig = {\n description: undefined,\n types: [],\n directives: [],\n extensions: Object.create(null),\n extensionASTNodes: [],\n assumeValid: false,\n };\n const config = extendSchemaImpl(emptySchemaConfig, documentAST, options);\n\n if (config.astNode == null) {\n for (const type of config.types) {\n switch (type.name) {\n // Note: While this could make early assertions to get the correctly\n // typed values below, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n case 'Query':\n // @ts-expect-error validated in `validateSchema`\n config.query = type;\n break;\n\n case 'Mutation':\n // @ts-expect-error validated in `validateSchema`\n config.mutation = type;\n break;\n\n case 'Subscription':\n // @ts-expect-error validated in `validateSchema`\n config.subscription = type;\n break;\n }\n }\n }\n\n const directives = [\n ...config.directives, // If specified directives were not explicitly declared, add them.\n ...specifiedDirectives.filter((stdDirective) =>\n config.directives.every(\n (directive) => directive.name !== stdDirective.name,\n ),\n ),\n ];\n return new GraphQLSchema({ ...config, directives });\n}\n/**\n * A helper function to build a GraphQLSchema directly from a source\n * document.\n */\n\nexport function buildSchema(source, options) {\n const document = parse(source, {\n noLocation:\n options === null || options === void 0 ? void 0 : options.noLocation,\n allowLegacyFragmentVariables:\n options === null || options === void 0\n ? void 0\n : options.allowLegacyFragmentVariables,\n });\n return buildASTSchema(document, {\n assumeValidSDL:\n options === null || options === void 0 ? void 0 : options.assumeValidSDL,\n assumeValid:\n options === null || options === void 0 ? void 0 : options.assumeValid,\n });\n}\n","import { inspect } from '../jsutils/inspect.mjs';\nimport { invariant } from '../jsutils/invariant.mjs';\nimport { keyValMap } from '../jsutils/keyValMap.mjs';\nimport { naturalCompare } from '../jsutils/naturalCompare.mjs';\nimport {\n GraphQLEnumType,\n GraphQLInputObjectType,\n GraphQLInterfaceType,\n GraphQLList,\n GraphQLNonNull,\n GraphQLObjectType,\n GraphQLUnionType,\n isEnumType,\n isInputObjectType,\n isInterfaceType,\n isListType,\n isNonNullType,\n isObjectType,\n isScalarType,\n isUnionType,\n} from '../type/definition.mjs';\nimport { GraphQLDirective } from '../type/directives.mjs';\nimport { isIntrospectionType } from '../type/introspection.mjs';\nimport { GraphQLSchema } from '../type/schema.mjs';\n/**\n * Sort GraphQLSchema.\n *\n * This function returns a sorted copy of the given GraphQLSchema.\n */\n\nexport function lexicographicSortSchema(schema) {\n const schemaConfig = schema.toConfig();\n const typeMap = keyValMap(\n sortByName(schemaConfig.types),\n (type) => type.name,\n sortNamedType,\n );\n return new GraphQLSchema({\n ...schemaConfig,\n types: Object.values(typeMap),\n directives: sortByName(schemaConfig.directives).map(sortDirective),\n query: replaceMaybeType(schemaConfig.query),\n mutation: replaceMaybeType(schemaConfig.mutation),\n subscription: replaceMaybeType(schemaConfig.subscription),\n });\n\n function replaceType(type) {\n if (isListType(type)) {\n // @ts-expect-error\n return new GraphQLList(replaceType(type.ofType));\n } else if (isNonNullType(type)) {\n // @ts-expect-error\n return new GraphQLNonNull(replaceType(type.ofType));\n } // @ts-expect-error FIXME: TS Conversion\n\n return replaceNamedType(type);\n }\n\n function replaceNamedType(type) {\n return typeMap[type.name];\n }\n\n function replaceMaybeType(maybeType) {\n return maybeType && replaceNamedType(maybeType);\n }\n\n function sortDirective(directive) {\n const config = directive.toConfig();\n return new GraphQLDirective({\n ...config,\n locations: sortBy(config.locations, (x) => x),\n args: sortArgs(config.args),\n });\n }\n\n function sortArgs(args) {\n return sortObjMap(args, (arg) => ({ ...arg, type: replaceType(arg.type) }));\n }\n\n function sortFields(fieldsMap) {\n return sortObjMap(fieldsMap, (field) => ({\n ...field,\n type: replaceType(field.type),\n args: field.args && sortArgs(field.args),\n }));\n }\n\n function sortInputFields(fieldsMap) {\n return sortObjMap(fieldsMap, (field) => ({\n ...field,\n type: replaceType(field.type),\n }));\n }\n\n function sortTypes(array) {\n return sortByName(array).map(replaceNamedType);\n }\n\n function sortNamedType(type) {\n if (isScalarType(type) || isIntrospectionType(type)) {\n return type;\n }\n\n if (isObjectType(type)) {\n const config = type.toConfig();\n return new GraphQLObjectType({\n ...config,\n interfaces: () => sortTypes(config.interfaces),\n fields: () => sortFields(config.fields),\n });\n }\n\n if (isInterfaceType(type)) {\n const config = type.toConfig();\n return new GraphQLInterfaceType({\n ...config,\n interfaces: () => sortTypes(config.interfaces),\n fields: () => sortFields(config.fields),\n });\n }\n\n if (isUnionType(type)) {\n const config = type.toConfig();\n return new GraphQLUnionType({\n ...config,\n types: () => sortTypes(config.types),\n });\n }\n\n if (isEnumType(type)) {\n const config = type.toConfig();\n return new GraphQLEnumType({\n ...config,\n values: sortObjMap(config.values, (value) => value),\n });\n }\n\n if (isInputObjectType(type)) {\n const config = type.toConfig();\n return new GraphQLInputObjectType({\n ...config,\n fields: () => sortInputFields(config.fields),\n });\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible types have been considered.\n\n false || invariant(false, 'Unexpected type: ' + inspect(type));\n }\n}\n\nfunction sortObjMap(map, sortValueFn) {\n const sortedMap = Object.create(null);\n\n for (const key of Object.keys(map).sort(naturalCompare)) {\n sortedMap[key] = sortValueFn(map[key]);\n }\n\n return sortedMap;\n}\n\nfunction sortByName(array) {\n return sortBy(array, (obj) => obj.name);\n}\n\nfunction sortBy(array, mapToKey) {\n return array.slice().sort((obj1, obj2) => {\n const key1 = mapToKey(obj1);\n const key2 = mapToKey(obj2);\n return naturalCompare(key1, key2);\n });\n}\n","import { inspect } from '../jsutils/inspect.mjs';\nimport { invariant } from '../jsutils/invariant.mjs';\nimport { isPrintableAsBlockString } from '../language/blockString.mjs';\nimport { Kind } from '../language/kinds.mjs';\nimport { print } from '../language/printer.mjs';\nimport {\n isEnumType,\n isInputObjectType,\n isInterfaceType,\n isObjectType,\n isScalarType,\n isUnionType,\n} from '../type/definition.mjs';\nimport {\n DEFAULT_DEPRECATION_REASON,\n isSpecifiedDirective,\n} from '../type/directives.mjs';\nimport { isIntrospectionType } from '../type/introspection.mjs';\nimport { isSpecifiedScalarType } from '../type/scalars.mjs';\nimport { astFromValue } from './astFromValue.mjs';\nexport function printSchema(schema) {\n return printFilteredSchema(\n schema,\n (n) => !isSpecifiedDirective(n),\n isDefinedType,\n );\n}\nexport function printIntrospectionSchema(schema) {\n return printFilteredSchema(schema, isSpecifiedDirective, isIntrospectionType);\n}\n\nfunction isDefinedType(type) {\n return !isSpecifiedScalarType(type) && !isIntrospectionType(type);\n}\n\nfunction printFilteredSchema(schema, directiveFilter, typeFilter) {\n const directives = schema.getDirectives().filter(directiveFilter);\n const types = Object.values(schema.getTypeMap()).filter(typeFilter);\n return [\n printSchemaDefinition(schema),\n ...directives.map((directive) => printDirective(directive)),\n ...types.map((type) => printType(type)),\n ]\n .filter(Boolean)\n .join('\\n\\n');\n}\n\nfunction printSchemaDefinition(schema) {\n if (schema.description == null && isSchemaOfCommonNames(schema)) {\n return;\n }\n\n const operationTypes = [];\n const queryType = schema.getQueryType();\n\n if (queryType) {\n operationTypes.push(` query: ${queryType.name}`);\n }\n\n const mutationType = schema.getMutationType();\n\n if (mutationType) {\n operationTypes.push(` mutation: ${mutationType.name}`);\n }\n\n const subscriptionType = schema.getSubscriptionType();\n\n if (subscriptionType) {\n operationTypes.push(` subscription: ${subscriptionType.name}`);\n }\n\n return printDescription(schema) + `schema {\\n${operationTypes.join('\\n')}\\n}`;\n}\n/**\n * GraphQL schema define root types for each type of operation. These types are\n * the same as any other type and can be named in any manner, however there is\n * a common naming convention:\n *\n * ```graphql\n * schema {\n * query: Query\n * mutation: Mutation\n * subscription: Subscription\n * }\n * ```\n *\n * When using this naming convention, the schema description can be omitted.\n */\n\nfunction isSchemaOfCommonNames(schema) {\n const queryType = schema.getQueryType();\n\n if (queryType && queryType.name !== 'Query') {\n return false;\n }\n\n const mutationType = schema.getMutationType();\n\n if (mutationType && mutationType.name !== 'Mutation') {\n return false;\n }\n\n const subscriptionType = schema.getSubscriptionType();\n\n if (subscriptionType && subscriptionType.name !== 'Subscription') {\n return false;\n }\n\n return true;\n}\n\nexport function printType(type) {\n if (isScalarType(type)) {\n return printScalar(type);\n }\n\n if (isObjectType(type)) {\n return printObject(type);\n }\n\n if (isInterfaceType(type)) {\n return printInterface(type);\n }\n\n if (isUnionType(type)) {\n return printUnion(type);\n }\n\n if (isEnumType(type)) {\n return printEnum(type);\n }\n\n if (isInputObjectType(type)) {\n return printInputObject(type);\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible types have been considered.\n\n false || invariant(false, 'Unexpected type: ' + inspect(type));\n}\n\nfunction printScalar(type) {\n return (\n printDescription(type) + `scalar ${type.name}` + printSpecifiedByURL(type)\n );\n}\n\nfunction printImplementedInterfaces(type) {\n const interfaces = type.getInterfaces();\n return interfaces.length\n ? ' implements ' + interfaces.map((i) => i.name).join(' & ')\n : '';\n}\n\nfunction printObject(type) {\n return (\n printDescription(type) +\n `type ${type.name}` +\n printImplementedInterfaces(type) +\n printFields(type)\n );\n}\n\nfunction printInterface(type) {\n return (\n printDescription(type) +\n `interface ${type.name}` +\n printImplementedInterfaces(type) +\n printFields(type)\n );\n}\n\nfunction printUnion(type) {\n const types = type.getTypes();\n const possibleTypes = types.length ? ' = ' + types.join(' | ') : '';\n return printDescription(type) + 'union ' + type.name + possibleTypes;\n}\n\nfunction printEnum(type) {\n const values = type\n .getValues()\n .map(\n (value, i) =>\n printDescription(value, ' ', !i) +\n ' ' +\n value.name +\n printDeprecated(value.deprecationReason),\n );\n return printDescription(type) + `enum ${type.name}` + printBlock(values);\n}\n\nfunction printInputObject(type) {\n const fields = Object.values(type.getFields()).map(\n (f, i) => printDescription(f, ' ', !i) + ' ' + printInputValue(f),\n );\n return printDescription(type) + `input ${type.name}` + printBlock(fields);\n}\n\nfunction printFields(type) {\n const fields = Object.values(type.getFields()).map(\n (f, i) =>\n printDescription(f, ' ', !i) +\n ' ' +\n f.name +\n printArgs(f.args, ' ') +\n ': ' +\n String(f.type) +\n printDeprecated(f.deprecationReason),\n );\n return printBlock(fields);\n}\n\nfunction printBlock(items) {\n return items.length !== 0 ? ' {\\n' + items.join('\\n') + '\\n}' : '';\n}\n\nfunction printArgs(args, indentation = '') {\n if (args.length === 0) {\n return '';\n } // If every arg does not have a description, print them on one line.\n\n if (args.every((arg) => !arg.description)) {\n return '(' + args.map(printInputValue).join(', ') + ')';\n }\n\n return (\n '(\\n' +\n args\n .map(\n (arg, i) =>\n printDescription(arg, ' ' + indentation, !i) +\n ' ' +\n indentation +\n printInputValue(arg),\n )\n .join('\\n') +\n '\\n' +\n indentation +\n ')'\n );\n}\n\nfunction printInputValue(arg) {\n const defaultAST = astFromValue(arg.defaultValue, arg.type);\n let argDecl = arg.name + ': ' + String(arg.type);\n\n if (defaultAST) {\n argDecl += ` = ${print(defaultAST)}`;\n }\n\n return argDecl + printDeprecated(arg.deprecationReason);\n}\n\nfunction printDirective(directive) {\n return (\n printDescription(directive) +\n 'directive @' +\n directive.name +\n printArgs(directive.args) +\n (directive.isRepeatable ? ' repeatable' : '') +\n ' on ' +\n directive.locations.join(' | ')\n );\n}\n\nfunction printDeprecated(reason) {\n if (reason == null) {\n return '';\n }\n\n if (reason !== DEFAULT_DEPRECATION_REASON) {\n const astValue = print({\n kind: Kind.STRING,\n value: reason,\n });\n return ` @deprecated(reason: ${astValue})`;\n }\n\n return ' @deprecated';\n}\n\nfunction printSpecifiedByURL(scalar) {\n if (scalar.specifiedByURL == null) {\n return '';\n }\n\n const astValue = print({\n kind: Kind.STRING,\n value: scalar.specifiedByURL,\n });\n return ` @specifiedBy(url: ${astValue})`;\n}\n\nfunction printDescription(def, indentation = '', firstInBlock = true) {\n const { description } = def;\n\n if (description == null) {\n return '';\n }\n\n const blockString = print({\n kind: Kind.STRING,\n value: description,\n block: isPrintableAsBlockString(description),\n });\n const prefix =\n indentation && !firstInBlock ? '\\n' + indentation : indentation;\n return prefix + blockString.replace(/\\n/g, '\\n' + indentation) + '\\n';\n}\n","import { Kind } from '../language/kinds.mjs';\n/**\n * Provided a collection of ASTs, presumably each from different files,\n * concatenate the ASTs together into batched AST, useful for validating many\n * GraphQL source files which together represent one conceptual application.\n */\n\nexport function concatAST(documents) {\n const definitions = [];\n\n for (const doc of documents) {\n definitions.push(...doc.definitions);\n }\n\n return {\n kind: Kind.DOCUMENT,\n definitions,\n };\n}\n","import { Kind } from '../language/kinds.mjs';\nimport { visit } from '../language/visitor.mjs';\n/**\n * separateOperations accepts a single AST document which may contain many\n * operations and fragments and returns a collection of AST documents each of\n * which contains a single operation as well the fragment definitions it\n * refers to.\n */\n\nexport function separateOperations(documentAST) {\n const operations = [];\n const depGraph = Object.create(null); // Populate metadata and build a dependency graph.\n\n for (const definitionNode of documentAST.definitions) {\n switch (definitionNode.kind) {\n case Kind.OPERATION_DEFINITION:\n operations.push(definitionNode);\n break;\n\n case Kind.FRAGMENT_DEFINITION:\n depGraph[definitionNode.name.value] = collectDependencies(\n definitionNode.selectionSet,\n );\n break;\n\n default: // ignore non-executable definitions\n }\n } // For each operation, produce a new synthesized AST which includes only what\n // is necessary for completing that operation.\n\n const separatedDocumentASTs = Object.create(null);\n\n for (const operation of operations) {\n const dependencies = new Set();\n\n for (const fragmentName of collectDependencies(operation.selectionSet)) {\n collectTransitiveDependencies(dependencies, depGraph, fragmentName);\n } // Provides the empty string for anonymous operations.\n\n const operationName = operation.name ? operation.name.value : ''; // The list of definition nodes to be included for this operation, sorted\n // to retain the same order as the original document.\n\n separatedDocumentASTs[operationName] = {\n kind: Kind.DOCUMENT,\n definitions: documentAST.definitions.filter(\n (node) =>\n node === operation ||\n (node.kind === Kind.FRAGMENT_DEFINITION &&\n dependencies.has(node.name.value)),\n ),\n };\n }\n\n return separatedDocumentASTs;\n}\n\n// From a dependency graph, collects a list of transitive dependencies by\n// recursing through a dependency graph.\nfunction collectTransitiveDependencies(collected, depGraph, fromName) {\n if (!collected.has(fromName)) {\n collected.add(fromName);\n const immediateDeps = depGraph[fromName];\n\n if (immediateDeps !== undefined) {\n for (const toName of immediateDeps) {\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n }\n }\n}\n\nfunction collectDependencies(selectionSet) {\n const dependencies = [];\n visit(selectionSet, {\n FragmentSpread(node) {\n dependencies.push(node.name.value);\n },\n });\n return dependencies;\n}\n","import { printBlockString } from '../language/blockString.mjs';\nimport { isPunctuatorTokenKind, Lexer } from '../language/lexer.mjs';\nimport { isSource, Source } from '../language/source.mjs';\nimport { TokenKind } from '../language/tokenKind.mjs';\n/**\n * Strips characters that are not significant to the validity or execution\n * of a GraphQL document:\n * - UnicodeBOM\n * - WhiteSpace\n * - LineTerminator\n * - Comment\n * - Comma\n * - BlockString indentation\n *\n * Note: It is required to have a delimiter character between neighboring\n * non-punctuator tokens and this function always uses single space as delimiter.\n *\n * It is guaranteed that both input and output documents if parsed would result\n * in the exact same AST except for nodes location.\n *\n * Warning: It is guaranteed that this function will always produce stable results.\n * However, it's not guaranteed that it will stay the same between different\n * releases due to bugfixes or changes in the GraphQL specification.\n *\n * Query example:\n *\n * ```graphql\n * query SomeQuery($foo: String!, $bar: String) {\n * someField(foo: $foo, bar: $bar) {\n * a\n * b {\n * c\n * d\n * }\n * }\n * }\n * ```\n *\n * Becomes:\n *\n * ```graphql\n * query SomeQuery($foo:String!$bar:String){someField(foo:$foo bar:$bar){a b{c d}}}\n * ```\n *\n * SDL example:\n *\n * ```graphql\n * \"\"\"\n * Type description\n * \"\"\"\n * type Foo {\n * \"\"\"\n * Field description\n * \"\"\"\n * bar: String\n * }\n * ```\n *\n * Becomes:\n *\n * ```graphql\n * \"\"\"Type description\"\"\" type Foo{\"\"\"Field description\"\"\" bar:String}\n * ```\n */\n\nexport function stripIgnoredCharacters(source) {\n const sourceObj = isSource(source) ? source : new Source(source);\n const body = sourceObj.body;\n const lexer = new Lexer(sourceObj);\n let strippedBody = '';\n let wasLastAddedTokenNonPunctuator = false;\n\n while (lexer.advance().kind !== TokenKind.EOF) {\n const currentToken = lexer.token;\n const tokenKind = currentToken.kind;\n /**\n * Every two non-punctuator tokens should have space between them.\n * Also prevent case of non-punctuator token following by spread resulting\n * in invalid token (e.g. `1...` is invalid Float token).\n */\n\n const isNonPunctuator = !isPunctuatorTokenKind(currentToken.kind);\n\n if (wasLastAddedTokenNonPunctuator) {\n if (isNonPunctuator || currentToken.kind === TokenKind.SPREAD) {\n strippedBody += ' ';\n }\n }\n\n const tokenBody = body.slice(currentToken.start, currentToken.end);\n\n if (tokenKind === TokenKind.BLOCK_STRING) {\n strippedBody += printBlockString(currentToken.value, {\n minimize: true,\n });\n } else {\n strippedBody += tokenBody;\n }\n\n wasLastAddedTokenNonPunctuator = isNonPunctuator;\n }\n\n return strippedBody;\n}\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { GraphQLError } from '../error/GraphQLError.mjs';\nimport { assertName } from '../type/assertName.mjs';\n/* c8 ignore start */\n\n/**\n * Upholds the spec rules about naming.\n * @deprecated Please use `assertName` instead. Will be removed in v17\n */\n\nexport function assertValidName(name) {\n const error = isValidNameError(name);\n\n if (error) {\n throw error;\n }\n\n return name;\n}\n/**\n * Returns an Error if a name is invalid.\n * @deprecated Please use `assertName` instead. Will be removed in v17\n */\n\nexport function isValidNameError(name) {\n typeof name === 'string' || devAssert(false, 'Expected name to be a string.');\n\n if (name.startsWith('__')) {\n return new GraphQLError(\n `Name \"${name}\" must not begin with \"__\", which is reserved by GraphQL introspection.`,\n );\n }\n\n try {\n assertName(name);\n } catch (error) {\n return error;\n }\n}\n/* c8 ignore stop */\n","import { inspect } from '../jsutils/inspect.mjs';\nimport { invariant } from '../jsutils/invariant.mjs';\nimport { keyMap } from '../jsutils/keyMap.mjs';\nimport { print } from '../language/printer.mjs';\nimport {\n isEnumType,\n isInputObjectType,\n isInterfaceType,\n isListType,\n isNamedType,\n isNonNullType,\n isObjectType,\n isRequiredArgument,\n isRequiredInputField,\n isScalarType,\n isUnionType,\n} from '../type/definition.mjs';\nimport { isSpecifiedScalarType } from '../type/scalars.mjs';\nimport { astFromValue } from './astFromValue.mjs';\nimport { sortValueNode } from './sortValueNode.mjs';\nvar BreakingChangeType;\n\n(function (BreakingChangeType) {\n BreakingChangeType['TYPE_REMOVED'] = 'TYPE_REMOVED';\n BreakingChangeType['TYPE_CHANGED_KIND'] = 'TYPE_CHANGED_KIND';\n BreakingChangeType['TYPE_REMOVED_FROM_UNION'] = 'TYPE_REMOVED_FROM_UNION';\n BreakingChangeType['VALUE_REMOVED_FROM_ENUM'] = 'VALUE_REMOVED_FROM_ENUM';\n BreakingChangeType['REQUIRED_INPUT_FIELD_ADDED'] =\n 'REQUIRED_INPUT_FIELD_ADDED';\n BreakingChangeType['IMPLEMENTED_INTERFACE_REMOVED'] =\n 'IMPLEMENTED_INTERFACE_REMOVED';\n BreakingChangeType['FIELD_REMOVED'] = 'FIELD_REMOVED';\n BreakingChangeType['FIELD_CHANGED_KIND'] = 'FIELD_CHANGED_KIND';\n BreakingChangeType['REQUIRED_ARG_ADDED'] = 'REQUIRED_ARG_ADDED';\n BreakingChangeType['ARG_REMOVED'] = 'ARG_REMOVED';\n BreakingChangeType['ARG_CHANGED_KIND'] = 'ARG_CHANGED_KIND';\n BreakingChangeType['DIRECTIVE_REMOVED'] = 'DIRECTIVE_REMOVED';\n BreakingChangeType['DIRECTIVE_ARG_REMOVED'] = 'DIRECTIVE_ARG_REMOVED';\n BreakingChangeType['REQUIRED_DIRECTIVE_ARG_ADDED'] =\n 'REQUIRED_DIRECTIVE_ARG_ADDED';\n BreakingChangeType['DIRECTIVE_REPEATABLE_REMOVED'] =\n 'DIRECTIVE_REPEATABLE_REMOVED';\n BreakingChangeType['DIRECTIVE_LOCATION_REMOVED'] =\n 'DIRECTIVE_LOCATION_REMOVED';\n})(BreakingChangeType || (BreakingChangeType = {}));\n\nexport { BreakingChangeType };\nvar DangerousChangeType;\n\n(function (DangerousChangeType) {\n DangerousChangeType['VALUE_ADDED_TO_ENUM'] = 'VALUE_ADDED_TO_ENUM';\n DangerousChangeType['TYPE_ADDED_TO_UNION'] = 'TYPE_ADDED_TO_UNION';\n DangerousChangeType['OPTIONAL_INPUT_FIELD_ADDED'] =\n 'OPTIONAL_INPUT_FIELD_ADDED';\n DangerousChangeType['OPTIONAL_ARG_ADDED'] = 'OPTIONAL_ARG_ADDED';\n DangerousChangeType['IMPLEMENTED_INTERFACE_ADDED'] =\n 'IMPLEMENTED_INTERFACE_ADDED';\n DangerousChangeType['ARG_DEFAULT_VALUE_CHANGE'] = 'ARG_DEFAULT_VALUE_CHANGE';\n})(DangerousChangeType || (DangerousChangeType = {}));\n\nexport { DangerousChangeType };\n\n/**\n * Given two schemas, returns an Array containing descriptions of all the types\n * of breaking changes covered by the other functions down below.\n */\nexport function findBreakingChanges(oldSchema, newSchema) {\n // @ts-expect-error\n return findSchemaChanges(oldSchema, newSchema).filter(\n (change) => change.type in BreakingChangeType,\n );\n}\n/**\n * Given two schemas, returns an Array containing descriptions of all the types\n * of potentially dangerous changes covered by the other functions down below.\n */\n\nexport function findDangerousChanges(oldSchema, newSchema) {\n // @ts-expect-error\n return findSchemaChanges(oldSchema, newSchema).filter(\n (change) => change.type in DangerousChangeType,\n );\n}\n\nfunction findSchemaChanges(oldSchema, newSchema) {\n return [\n ...findTypeChanges(oldSchema, newSchema),\n ...findDirectiveChanges(oldSchema, newSchema),\n ];\n}\n\nfunction findDirectiveChanges(oldSchema, newSchema) {\n const schemaChanges = [];\n const directivesDiff = diff(\n oldSchema.getDirectives(),\n newSchema.getDirectives(),\n );\n\n for (const oldDirective of directivesDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.DIRECTIVE_REMOVED,\n description: `${oldDirective.name} was removed.`,\n });\n }\n\n for (const [oldDirective, newDirective] of directivesDiff.persisted) {\n const argsDiff = diff(oldDirective.args, newDirective.args);\n\n for (const newArg of argsDiff.added) {\n if (isRequiredArgument(newArg)) {\n schemaChanges.push({\n type: BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED,\n description: `A required arg ${newArg.name} on directive ${oldDirective.name} was added.`,\n });\n }\n }\n\n for (const oldArg of argsDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.DIRECTIVE_ARG_REMOVED,\n description: `${oldArg.name} was removed from ${oldDirective.name}.`,\n });\n }\n\n if (oldDirective.isRepeatable && !newDirective.isRepeatable) {\n schemaChanges.push({\n type: BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED,\n description: `Repeatable flag was removed from ${oldDirective.name}.`,\n });\n }\n\n for (const location of oldDirective.locations) {\n if (!newDirective.locations.includes(location)) {\n schemaChanges.push({\n type: BreakingChangeType.DIRECTIVE_LOCATION_REMOVED,\n description: `${location} was removed from ${oldDirective.name}.`,\n });\n }\n }\n }\n\n return schemaChanges;\n}\n\nfunction findTypeChanges(oldSchema, newSchema) {\n const schemaChanges = [];\n const typesDiff = diff(\n Object.values(oldSchema.getTypeMap()),\n Object.values(newSchema.getTypeMap()),\n );\n\n for (const oldType of typesDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.TYPE_REMOVED,\n description: isSpecifiedScalarType(oldType)\n ? `Standard scalar ${oldType.name} was removed because it is not referenced anymore.`\n : `${oldType.name} was removed.`,\n });\n }\n\n for (const [oldType, newType] of typesDiff.persisted) {\n if (isEnumType(oldType) && isEnumType(newType)) {\n schemaChanges.push(...findEnumTypeChanges(oldType, newType));\n } else if (isUnionType(oldType) && isUnionType(newType)) {\n schemaChanges.push(...findUnionTypeChanges(oldType, newType));\n } else if (isInputObjectType(oldType) && isInputObjectType(newType)) {\n schemaChanges.push(...findInputObjectTypeChanges(oldType, newType));\n } else if (isObjectType(oldType) && isObjectType(newType)) {\n schemaChanges.push(\n ...findFieldChanges(oldType, newType),\n ...findImplementedInterfacesChanges(oldType, newType),\n );\n } else if (isInterfaceType(oldType) && isInterfaceType(newType)) {\n schemaChanges.push(\n ...findFieldChanges(oldType, newType),\n ...findImplementedInterfacesChanges(oldType, newType),\n );\n } else if (oldType.constructor !== newType.constructor) {\n schemaChanges.push({\n type: BreakingChangeType.TYPE_CHANGED_KIND,\n description:\n `${oldType.name} changed from ` +\n `${typeKindName(oldType)} to ${typeKindName(newType)}.`,\n });\n }\n }\n\n return schemaChanges;\n}\n\nfunction findInputObjectTypeChanges(oldType, newType) {\n const schemaChanges = [];\n const fieldsDiff = diff(\n Object.values(oldType.getFields()),\n Object.values(newType.getFields()),\n );\n\n for (const newField of fieldsDiff.added) {\n if (isRequiredInputField(newField)) {\n schemaChanges.push({\n type: BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED,\n description: `A required field ${newField.name} on input type ${oldType.name} was added.`,\n });\n } else {\n schemaChanges.push({\n type: DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED,\n description: `An optional field ${newField.name} on input type ${oldType.name} was added.`,\n });\n }\n }\n\n for (const oldField of fieldsDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.FIELD_REMOVED,\n description: `${oldType.name}.${oldField.name} was removed.`,\n });\n }\n\n for (const [oldField, newField] of fieldsDiff.persisted) {\n const isSafe = isChangeSafeForInputObjectFieldOrFieldArg(\n oldField.type,\n newField.type,\n );\n\n if (!isSafe) {\n schemaChanges.push({\n type: BreakingChangeType.FIELD_CHANGED_KIND,\n description:\n `${oldType.name}.${oldField.name} changed type from ` +\n `${String(oldField.type)} to ${String(newField.type)}.`,\n });\n }\n }\n\n return schemaChanges;\n}\n\nfunction findUnionTypeChanges(oldType, newType) {\n const schemaChanges = [];\n const possibleTypesDiff = diff(oldType.getTypes(), newType.getTypes());\n\n for (const newPossibleType of possibleTypesDiff.added) {\n schemaChanges.push({\n type: DangerousChangeType.TYPE_ADDED_TO_UNION,\n description: `${newPossibleType.name} was added to union type ${oldType.name}.`,\n });\n }\n\n for (const oldPossibleType of possibleTypesDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,\n description: `${oldPossibleType.name} was removed from union type ${oldType.name}.`,\n });\n }\n\n return schemaChanges;\n}\n\nfunction findEnumTypeChanges(oldType, newType) {\n const schemaChanges = [];\n const valuesDiff = diff(oldType.getValues(), newType.getValues());\n\n for (const newValue of valuesDiff.added) {\n schemaChanges.push({\n type: DangerousChangeType.VALUE_ADDED_TO_ENUM,\n description: `${newValue.name} was added to enum type ${oldType.name}.`,\n });\n }\n\n for (const oldValue of valuesDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,\n description: `${oldValue.name} was removed from enum type ${oldType.name}.`,\n });\n }\n\n return schemaChanges;\n}\n\nfunction findImplementedInterfacesChanges(oldType, newType) {\n const schemaChanges = [];\n const interfacesDiff = diff(oldType.getInterfaces(), newType.getInterfaces());\n\n for (const newInterface of interfacesDiff.added) {\n schemaChanges.push({\n type: DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED,\n description: `${newInterface.name} added to interfaces implemented by ${oldType.name}.`,\n });\n }\n\n for (const oldInterface of interfacesDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED,\n description: `${oldType.name} no longer implements interface ${oldInterface.name}.`,\n });\n }\n\n return schemaChanges;\n}\n\nfunction findFieldChanges(oldType, newType) {\n const schemaChanges = [];\n const fieldsDiff = diff(\n Object.values(oldType.getFields()),\n Object.values(newType.getFields()),\n );\n\n for (const oldField of fieldsDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.FIELD_REMOVED,\n description: `${oldType.name}.${oldField.name} was removed.`,\n });\n }\n\n for (const [oldField, newField] of fieldsDiff.persisted) {\n schemaChanges.push(...findArgChanges(oldType, oldField, newField));\n const isSafe = isChangeSafeForObjectOrInterfaceField(\n oldField.type,\n newField.type,\n );\n\n if (!isSafe) {\n schemaChanges.push({\n type: BreakingChangeType.FIELD_CHANGED_KIND,\n description:\n `${oldType.name}.${oldField.name} changed type from ` +\n `${String(oldField.type)} to ${String(newField.type)}.`,\n });\n }\n }\n\n return schemaChanges;\n}\n\nfunction findArgChanges(oldType, oldField, newField) {\n const schemaChanges = [];\n const argsDiff = diff(oldField.args, newField.args);\n\n for (const oldArg of argsDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.ARG_REMOVED,\n description: `${oldType.name}.${oldField.name} arg ${oldArg.name} was removed.`,\n });\n }\n\n for (const [oldArg, newArg] of argsDiff.persisted) {\n const isSafe = isChangeSafeForInputObjectFieldOrFieldArg(\n oldArg.type,\n newArg.type,\n );\n\n if (!isSafe) {\n schemaChanges.push({\n type: BreakingChangeType.ARG_CHANGED_KIND,\n description:\n `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed type from ` +\n `${String(oldArg.type)} to ${String(newArg.type)}.`,\n });\n } else if (oldArg.defaultValue !== undefined) {\n if (newArg.defaultValue === undefined) {\n schemaChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: `${oldType.name}.${oldField.name} arg ${oldArg.name} defaultValue was removed.`,\n });\n } else {\n // Since we looking only for client's observable changes we should\n // compare default values in the same representation as they are\n // represented inside introspection.\n const oldValueStr = stringifyValue(oldArg.defaultValue, oldArg.type);\n const newValueStr = stringifyValue(newArg.defaultValue, newArg.type);\n\n if (oldValueStr !== newValueStr) {\n schemaChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed defaultValue from ${oldValueStr} to ${newValueStr}.`,\n });\n }\n }\n }\n }\n\n for (const newArg of argsDiff.added) {\n if (isRequiredArgument(newArg)) {\n schemaChanges.push({\n type: BreakingChangeType.REQUIRED_ARG_ADDED,\n description: `A required arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.`,\n });\n } else {\n schemaChanges.push({\n type: DangerousChangeType.OPTIONAL_ARG_ADDED,\n description: `An optional arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.`,\n });\n }\n }\n\n return schemaChanges;\n}\n\nfunction isChangeSafeForObjectOrInterfaceField(oldType, newType) {\n if (isListType(oldType)) {\n return (\n // if they're both lists, make sure the underlying types are compatible\n (isListType(newType) &&\n isChangeSafeForObjectOrInterfaceField(\n oldType.ofType,\n newType.ofType,\n )) || // moving from nullable to non-null of the same underlying type is safe\n (isNonNullType(newType) &&\n isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType))\n );\n }\n\n if (isNonNullType(oldType)) {\n // if they're both non-null, make sure the underlying types are compatible\n return (\n isNonNullType(newType) &&\n isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType)\n );\n }\n\n return (\n // if they're both named types, see if their names are equivalent\n (isNamedType(newType) && oldType.name === newType.name) || // moving from nullable to non-null of the same underlying type is safe\n (isNonNullType(newType) &&\n isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType))\n );\n}\n\nfunction isChangeSafeForInputObjectFieldOrFieldArg(oldType, newType) {\n if (isListType(oldType)) {\n // if they're both lists, make sure the underlying types are compatible\n return (\n isListType(newType) &&\n isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType)\n );\n }\n\n if (isNonNullType(oldType)) {\n return (\n // if they're both non-null, make sure the underlying types are\n // compatible\n (isNonNullType(newType) &&\n isChangeSafeForInputObjectFieldOrFieldArg(\n oldType.ofType,\n newType.ofType,\n )) || // moving from non-null to nullable of the same underlying type is safe\n (!isNonNullType(newType) &&\n isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType))\n );\n } // if they're both named types, see if their names are equivalent\n\n return isNamedType(newType) && oldType.name === newType.name;\n}\n\nfunction typeKindName(type) {\n if (isScalarType(type)) {\n return 'a Scalar type';\n }\n\n if (isObjectType(type)) {\n return 'an Object type';\n }\n\n if (isInterfaceType(type)) {\n return 'an Interface type';\n }\n\n if (isUnionType(type)) {\n return 'a Union type';\n }\n\n if (isEnumType(type)) {\n return 'an Enum type';\n }\n\n if (isInputObjectType(type)) {\n return 'an Input type';\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible types have been considered.\n\n false || invariant(false, 'Unexpected type: ' + inspect(type));\n}\n\nfunction stringifyValue(value, type) {\n const ast = astFromValue(value, type);\n ast != null || invariant(false);\n return print(sortValueNode(ast));\n}\n\nfunction diff(oldArray, newArray) {\n const added = [];\n const removed = [];\n const persisted = [];\n const oldMap = keyMap(oldArray, ({ name }) => name);\n const newMap = keyMap(newArray, ({ name }) => name);\n\n for (const oldItem of oldArray) {\n const newItem = newMap[oldItem.name];\n\n if (newItem === undefined) {\n removed.push(oldItem);\n } else {\n persisted.push([oldItem, newItem]);\n }\n }\n\n for (const newItem of newArray) {\n if (oldMap[newItem.name] === undefined) {\n added.push(newItem);\n }\n }\n\n return {\n added,\n persisted,\n removed,\n };\n}\n","// Produce the GraphQL query recommended for a full schema introspection.\nexport { getIntrospectionQuery } from './getIntrospectionQuery.mjs';\n// Gets the target Operation from a Document.\nexport { getOperationAST } from './getOperationAST.mjs'; // Gets the Type for the target Operation AST.\n\nexport { getOperationRootType } from './getOperationRootType.mjs'; // Convert a GraphQLSchema to an IntrospectionQuery.\n\nexport { introspectionFromSchema } from './introspectionFromSchema.mjs'; // Build a GraphQLSchema from an introspection result.\n\nexport { buildClientSchema } from './buildClientSchema.mjs'; // Build a GraphQLSchema from GraphQL Schema language.\n\nexport { buildASTSchema, buildSchema } from './buildASTSchema.mjs';\n// Extends an existing GraphQLSchema from a parsed GraphQL Schema language AST.\nexport { extendSchema } from './extendSchema.mjs'; // Sort a GraphQLSchema.\n\nexport { lexicographicSortSchema } from './lexicographicSortSchema.mjs'; // Print a GraphQLSchema to GraphQL Schema language.\n\nexport {\n printSchema,\n printType,\n printIntrospectionSchema,\n} from './printSchema.mjs'; // Create a GraphQLType from a GraphQL language AST.\n\nexport { typeFromAST } from './typeFromAST.mjs'; // Create a JavaScript value from a GraphQL language AST with a type.\n\nexport { valueFromAST } from './valueFromAST.mjs'; // Create a JavaScript value from a GraphQL language AST without a type.\n\nexport { valueFromASTUntyped } from './valueFromASTUntyped.mjs'; // Create a GraphQL language AST from a JavaScript value.\n\nexport { astFromValue } from './astFromValue.mjs'; // A helper to use within recursive-descent visitors which need to be aware of the GraphQL type system.\n\nexport { TypeInfo, visitWithTypeInfo } from './TypeInfo.mjs'; // Coerces a JavaScript value to a GraphQL type, or produces errors.\n\nexport { coerceInputValue } from './coerceInputValue.mjs'; // Concatenates multiple AST together.\n\nexport { concatAST } from './concatAST.mjs'; // Separates an AST into an AST per Operation.\n\nexport { separateOperations } from './separateOperations.mjs'; // Strips characters that are not significant to the validity or execution of a GraphQL document.\n\nexport { stripIgnoredCharacters } from './stripIgnoredCharacters.mjs'; // Comparators for types\n\nexport {\n isEqualType,\n isTypeSubTypeOf,\n doTypesOverlap,\n} from './typeComparators.mjs'; // Asserts that a string is a valid GraphQL name\n\nexport { assertValidName, isValidNameError } from './assertValidName.mjs'; // Compares two GraphQLSchemas and detects breaking changes.\n\nexport {\n BreakingChangeType,\n DangerousChangeType,\n findBreakingChanges,\n findDangerousChanges,\n} from './findBreakingChanges.mjs';\n","/**\n * GraphQL.js provides a reference implementation for the GraphQL specification\n * but is also a useful utility for operating on GraphQL files and building\n * sophisticated tools.\n *\n * This primary module exports a general purpose function for fulfilling all\n * steps of the GraphQL specification in a single operation, but also includes\n * utilities for every part of the GraphQL specification:\n *\n * - Parsing the GraphQL language.\n * - Building a GraphQL type schema.\n * - Validating a GraphQL request against a type schema.\n * - Executing a GraphQL request against a type schema.\n *\n * This also includes utility functions for operating on GraphQL types and\n * GraphQL documents to facilitate building tools.\n *\n * You may also import from each sub-directory directly. For example, the\n * following two import statements are equivalent:\n *\n * ```ts\n * import { parse } from 'graphql';\n * import { parse } from 'graphql/language';\n * ```\n *\n * @packageDocumentation\n */\n// The GraphQL.js version info.\nexport { version, versionInfo } from './version.mjs'; // The primary entry point into fulfilling a GraphQL request.\n\nexport { graphql, graphqlSync } from './graphql.mjs'; // Create and operate on GraphQL type definitions and schema.\n\nexport {\n resolveObjMapThunk,\n resolveReadonlyArrayThunk, // Definitions\n GraphQLSchema,\n GraphQLDirective,\n GraphQLScalarType,\n GraphQLObjectType,\n GraphQLInterfaceType,\n GraphQLUnionType,\n GraphQLEnumType,\n GraphQLInputObjectType,\n GraphQLList,\n GraphQLNonNull, // Standard GraphQL Scalars\n specifiedScalarTypes,\n GraphQLInt,\n GraphQLFloat,\n GraphQLString,\n GraphQLBoolean,\n GraphQLID, // Int boundaries constants\n GRAPHQL_MAX_INT,\n GRAPHQL_MIN_INT, // Built-in Directives defined by the Spec\n specifiedDirectives,\n GraphQLIncludeDirective,\n GraphQLSkipDirective,\n GraphQLDeprecatedDirective,\n GraphQLSpecifiedByDirective, // \"Enum\" of Type Kinds\n TypeKind, // Constant Deprecation Reason\n DEFAULT_DEPRECATION_REASON, // GraphQL Types for introspection.\n introspectionTypes,\n __Schema,\n __Directive,\n __DirectiveLocation,\n __Type,\n __Field,\n __InputValue,\n __EnumValue,\n __TypeKind, // Meta-field definitions.\n SchemaMetaFieldDef,\n TypeMetaFieldDef,\n TypeNameMetaFieldDef, // Predicates\n isSchema,\n isDirective,\n isType,\n isScalarType,\n isObjectType,\n isInterfaceType,\n isUnionType,\n isEnumType,\n isInputObjectType,\n isListType,\n isNonNullType,\n isInputType,\n isOutputType,\n isLeafType,\n isCompositeType,\n isAbstractType,\n isWrappingType,\n isNullableType,\n isNamedType,\n isRequiredArgument,\n isRequiredInputField,\n isSpecifiedScalarType,\n isIntrospectionType,\n isSpecifiedDirective, // Assertions\n assertSchema,\n assertDirective,\n assertType,\n assertScalarType,\n assertObjectType,\n assertInterfaceType,\n assertUnionType,\n assertEnumType,\n assertInputObjectType,\n assertListType,\n assertNonNullType,\n assertInputType,\n assertOutputType,\n assertLeafType,\n assertCompositeType,\n assertAbstractType,\n assertWrappingType,\n assertNullableType,\n assertNamedType, // Un-modifiers\n getNullableType,\n getNamedType, // Validate GraphQL schema.\n validateSchema,\n assertValidSchema, // Upholds the spec rules about naming.\n assertName,\n assertEnumValueName,\n} from './type/index.mjs';\n// Parse and operate on GraphQL language source files.\nexport {\n Token,\n Source,\n Location,\n OperationTypeNode,\n getLocation, // Print source location.\n printLocation,\n printSourceLocation, // Lex\n Lexer,\n TokenKind, // Parse\n parse,\n parseValue,\n parseConstValue,\n parseType, // Print\n print, // Visit\n visit,\n visitInParallel,\n getVisitFn,\n getEnterLeaveForKind,\n BREAK,\n Kind,\n DirectiveLocation, // Predicates\n isDefinitionNode,\n isExecutableDefinitionNode,\n isSelectionNode,\n isValueNode,\n isConstValueNode,\n isTypeNode,\n isTypeSystemDefinitionNode,\n isTypeDefinitionNode,\n isTypeSystemExtensionNode,\n isTypeExtensionNode,\n} from './language/index.mjs';\n// Execute GraphQL queries.\nexport {\n execute,\n executeSync,\n defaultFieldResolver,\n defaultTypeResolver,\n responsePathAsArray,\n getArgumentValues,\n getVariableValues,\n getDirectiveValues,\n subscribe,\n createSourceEventStream,\n} from './execution/index.mjs';\n// Validate GraphQL documents.\nexport {\n validate,\n ValidationContext, // All validation rules in the GraphQL Specification.\n specifiedRules, // Individual validation rules.\n ExecutableDefinitionsRule,\n FieldsOnCorrectTypeRule,\n FragmentsOnCompositeTypesRule,\n KnownArgumentNamesRule,\n KnownDirectivesRule,\n KnownFragmentNamesRule,\n KnownTypeNamesRule,\n LoneAnonymousOperationRule,\n NoFragmentCyclesRule,\n NoUndefinedVariablesRule,\n NoUnusedFragmentsRule,\n NoUnusedVariablesRule,\n OverlappingFieldsCanBeMergedRule,\n PossibleFragmentSpreadsRule,\n ProvidedRequiredArgumentsRule,\n ScalarLeafsRule,\n SingleFieldSubscriptionsRule,\n UniqueArgumentNamesRule,\n UniqueDirectivesPerLocationRule,\n UniqueFragmentNamesRule,\n UniqueInputFieldNamesRule,\n UniqueOperationNamesRule,\n UniqueVariableNamesRule,\n ValuesOfCorrectTypeRule,\n VariablesAreInputTypesRule,\n VariablesInAllowedPositionRule, // SDL-specific validation rules\n LoneSchemaDefinitionRule,\n UniqueOperationTypesRule,\n UniqueTypeNamesRule,\n UniqueEnumValueNamesRule,\n UniqueFieldDefinitionNamesRule,\n UniqueArgumentDefinitionNamesRule,\n UniqueDirectiveNamesRule,\n PossibleTypeExtensionsRule, // Custom validation rules\n NoDeprecatedCustomRule,\n NoSchemaIntrospectionCustomRule,\n} from './validation/index.mjs';\n// Create, format, and print GraphQL errors.\nexport {\n GraphQLError,\n syntaxError,\n locatedError,\n printError,\n formatError,\n} from './error/index.mjs';\n// Utilities for operating on GraphQL type schema and parsed sources.\nexport {\n // Produce the GraphQL query recommended for a full schema introspection.\n // Accepts optional IntrospectionOptions.\n getIntrospectionQuery, // Gets the target Operation from a Document.\n getOperationAST, // Gets the Type for the target Operation AST.\n getOperationRootType, // Convert a GraphQLSchema to an IntrospectionQuery.\n introspectionFromSchema, // Build a GraphQLSchema from an introspection result.\n buildClientSchema, // Build a GraphQLSchema from a parsed GraphQL Schema language AST.\n buildASTSchema, // Build a GraphQLSchema from a GraphQL schema language document.\n buildSchema, // Extends an existing GraphQLSchema from a parsed GraphQL Schema language AST.\n extendSchema, // Sort a GraphQLSchema.\n lexicographicSortSchema, // Print a GraphQLSchema to GraphQL Schema language.\n printSchema, // Print a GraphQLType to GraphQL Schema language.\n printType, // Prints the built-in introspection schema in the Schema Language format.\n printIntrospectionSchema, // Create a GraphQLType from a GraphQL language AST.\n typeFromAST, // Create a JavaScript value from a GraphQL language AST with a Type.\n valueFromAST, // Create a JavaScript value from a GraphQL language AST without a Type.\n valueFromASTUntyped, // Create a GraphQL language AST from a JavaScript value.\n astFromValue, // A helper to use within recursive-descent visitors which need to be aware of the GraphQL type system.\n TypeInfo,\n visitWithTypeInfo, // Coerces a JavaScript value to a GraphQL type, or produces errors.\n coerceInputValue, // Concatenates multiple AST together.\n concatAST, // Separates an AST into an AST per Operation.\n separateOperations, // Strips characters that are not significant to the validity or execution of a GraphQL document.\n stripIgnoredCharacters, // Comparators for types\n isEqualType,\n isTypeSubTypeOf,\n doTypesOverlap, // Asserts a string is a valid GraphQL name.\n assertValidName, // Determine if a string is a valid GraphQL name.\n isValidNameError, // Compares two GraphQLSchemas and detects breaking changes.\n BreakingChangeType,\n DangerousChangeType,\n findBreakingChanges,\n findDangerousChanges,\n} from './utilities/index.mjs';\n","import { invariant } from \"../globals/index.js\";\nimport { visit, BREAK } from \"graphql\";\nexport function shouldInclude(_a, variables) {\n var directives = _a.directives;\n if (!directives || !directives.length) {\n return true;\n }\n return getInclusionDirectives(directives).every(function (_a) {\n var directive = _a.directive, ifArgument = _a.ifArgument;\n var evaledValue = false;\n if (ifArgument.value.kind === \"Variable\") {\n evaledValue =\n variables && variables[ifArgument.value.name.value];\n invariant(evaledValue !== void 0, 66, directive.name.value);\n }\n else {\n evaledValue = ifArgument.value.value;\n }\n return directive.name.value === \"skip\" ? !evaledValue : evaledValue;\n });\n}\nexport function getDirectiveNames(root) {\n var names = [];\n visit(root, {\n Directive: function (node) {\n names.push(node.name.value);\n },\n });\n return names;\n}\nexport var hasAnyDirectives = function (names, root) {\n return hasDirectives(names, root, false);\n};\nexport var hasAllDirectives = function (names, root) {\n return hasDirectives(names, root, true);\n};\nexport function hasDirectives(names, root, all) {\n var nameSet = new Set(names);\n var uniqueCount = nameSet.size;\n visit(root, {\n Directive: function (node) {\n if (nameSet.delete(node.name.value) && (!all || !nameSet.size)) {\n return BREAK;\n }\n },\n });\n // If we found all the names, nameSet will be empty. If we only care about\n // finding some of them, the < condition is sufficient.\n return all ? !nameSet.size : nameSet.size < uniqueCount;\n}\nexport function hasClientExports(document) {\n return document && hasDirectives([\"client\", \"export\"], document, true);\n}\nfunction isInclusionDirective(_a) {\n var value = _a.name.value;\n return value === \"skip\" || value === \"include\";\n}\nexport function getInclusionDirectives(directives) {\n var result = [];\n if (directives && directives.length) {\n directives.forEach(function (directive) {\n if (!isInclusionDirective(directive))\n return;\n var directiveArguments = directive.arguments;\n var directiveName = directive.name.value;\n invariant(directiveArguments && directiveArguments.length === 1, 67, directiveName);\n var ifArgument = directiveArguments[0];\n invariant(ifArgument.name && ifArgument.name.value === \"if\", 68, directiveName);\n var ifValue = ifArgument.value;\n // means it has to be a variable value if this is a valid @skip or @include directive\n invariant(ifValue &&\n (ifValue.kind === \"Variable\" || ifValue.kind === \"BooleanValue\"), 69, directiveName);\n result.push({ directive: directive, ifArgument: ifArgument });\n });\n }\n return result;\n}\n","// A [trie](https://en.wikipedia.org/wiki/Trie) data structure that holds\n// object keys weakly, yet can also hold non-object keys, unlike the\n// native `WeakMap`.\n// If no makeData function is supplied, the looked-up data will be an empty,\n// null-prototype Object.\nconst defaultMakeData = () => Object.create(null);\n// Useful for processing arguments objects as well as arrays.\nconst { forEach, slice } = Array.prototype;\nconst { hasOwnProperty } = Object.prototype;\nexport class Trie {\n constructor(weakness = true, makeData = defaultMakeData) {\n this.weakness = weakness;\n this.makeData = makeData;\n }\n lookup() {\n return this.lookupArray(arguments);\n }\n lookupArray(array) {\n let node = this;\n forEach.call(array, key => node = node.getChildTrie(key));\n return hasOwnProperty.call(node, \"data\")\n ? node.data\n : node.data = this.makeData(slice.call(array));\n }\n peek() {\n return this.peekArray(arguments);\n }\n peekArray(array) {\n let node = this;\n for (let i = 0, len = array.length; node && i < len; ++i) {\n const map = node.mapFor(array[i], false);\n node = map && map.get(array[i]);\n }\n return node && node.data;\n }\n remove() {\n return this.removeArray(arguments);\n }\n removeArray(array) {\n let data;\n if (array.length) {\n const head = array[0];\n const map = this.mapFor(head, false);\n const child = map && map.get(head);\n if (child) {\n data = child.removeArray(slice.call(array, 1));\n if (!child.data && !child.weak && !(child.strong && child.strong.size)) {\n map.delete(head);\n }\n }\n }\n else {\n data = this.data;\n delete this.data;\n }\n return data;\n }\n getChildTrie(key) {\n const map = this.mapFor(key, true);\n let child = map.get(key);\n if (!child)\n map.set(key, child = new Trie(this.weakness, this.makeData));\n return child;\n }\n mapFor(key, create) {\n return this.weakness && isObjRef(key)\n ? this.weak || (create ? this.weak = new WeakMap : void 0)\n : this.strong || (create ? this.strong = new Map : void 0);\n }\n}\nfunction isObjRef(value) {\n switch (typeof value) {\n case \"object\":\n if (value === null)\n break;\n // Fall through to return true...\n case \"function\":\n return true;\n }\n return false;\n}\n","import { maybe } from \"../globals/index.js\";\nexport var canUseWeakMap = typeof WeakMap === \"function\" &&\n maybe(function () { return navigator.product; }) !== \"ReactNative\";\nexport var canUseWeakSet = typeof WeakSet === \"function\";\nexport var canUseSymbol = typeof Symbol === \"function\" && typeof Symbol.for === \"function\";\nexport var canUseAsyncIteratorSymbol = canUseSymbol && Symbol.asyncIterator;\nexport var canUseDOM = typeof maybe(function () { return window.document.createElement; }) === \"function\";\nvar usingJSDOM = \n// Following advice found in this comment from @domenic (maintainer of jsdom):\n// https://github.com/jsdom/jsdom/issues/1537#issuecomment-229405327\n//\n// Since we control the version of Jest and jsdom used when running Apollo\n// Client tests, and that version is recent enought to include \" jsdom/x.y.z\"\n// at the end of the user agent string, I believe this case is all we need to\n// check. Testing for \"Node.js\" was recommended for backwards compatibility\n// with older version of jsdom, but we don't have that problem.\nmaybe(function () { return navigator.userAgent.indexOf(\"jsdom\") >= 0; }) || false;\n// Our tests should all continue to pass if we remove this !usingJSDOM\n// condition, thereby allowing useLayoutEffect when using jsdom. Unfortunately,\n// if we allow useLayoutEffect, then useSyncExternalStore generates many\n// warnings about useLayoutEffect doing nothing on the server. While these\n// warnings are harmless, this !usingJSDOM condition seems to be the best way to\n// prevent them (i.e. skipping useLayoutEffect when using jsdom).\nexport var canUseLayoutEffect = canUseDOM && !usingJSDOM;\n","export function isNonNullObject(obj) {\n return obj !== null && typeof obj === \"object\";\n}\nexport function isPlainObject(obj) {\n return (obj !== null &&\n typeof obj === \"object\" &&\n (Object.getPrototypeOf(obj) === Object.prototype ||\n Object.getPrototypeOf(obj) === null));\n}\n","import { __assign, __spreadArray } from \"tslib\";\nimport { invariant, newInvariantError } from \"../globals/index.js\";\n/**\n * Returns a query document which adds a single query operation that only\n * spreads the target fragment inside of it.\n *\n * So for example a document of:\n *\n * ```graphql\n * fragment foo on Foo { a b c }\n * ```\n *\n * Turns into:\n *\n * ```graphql\n * { ...foo }\n *\n * fragment foo on Foo { a b c }\n * ```\n *\n * The target fragment will either be the only fragment in the document, or a\n * fragment specified by the provided `fragmentName`. If there is more than one\n * fragment, but a `fragmentName` was not defined then an error will be thrown.\n */\nexport function getFragmentQueryDocument(document, fragmentName) {\n var actualFragmentName = fragmentName;\n // Build an array of all our fragment definitions that will be used for\n // validations. We also do some validations on the other definitions in the\n // document while building this list.\n var fragments = [];\n document.definitions.forEach(function (definition) {\n // Throw an error if we encounter an operation definition because we will\n // define our own operation definition later on.\n if (definition.kind === \"OperationDefinition\") {\n throw newInvariantError(\n 70,\n definition.operation,\n definition.name ? \" named '\".concat(definition.name.value, \"'\") : \"\"\n );\n }\n // Add our definition to the fragments array if it is a fragment\n // definition.\n if (definition.kind === \"FragmentDefinition\") {\n fragments.push(definition);\n }\n });\n // If the user did not give us a fragment name then let us try to get a\n // name from a single fragment in the definition.\n if (typeof actualFragmentName === \"undefined\") {\n invariant(fragments.length === 1, 71, fragments.length);\n actualFragmentName = fragments[0].name.value;\n }\n // Generate a query document with an operation that simply spreads the\n // fragment inside of it.\n var query = __assign(__assign({}, document), { definitions: __spreadArray([\n {\n kind: \"OperationDefinition\",\n // OperationTypeNode is an enum\n operation: \"query\",\n selectionSet: {\n kind: \"SelectionSet\",\n selections: [\n {\n kind: \"FragmentSpread\",\n name: {\n kind: \"Name\",\n value: actualFragmentName,\n },\n },\n ],\n },\n }\n ], document.definitions, true) });\n return query;\n}\n// Utility function that takes a list of fragment definitions and makes a hash out of them\n// that maps the name of the fragment to the fragment definition.\nexport function createFragmentMap(fragments) {\n if (fragments === void 0) { fragments = []; }\n var symTable = {};\n fragments.forEach(function (fragment) {\n symTable[fragment.name.value] = fragment;\n });\n return symTable;\n}\nexport function getFragmentFromSelection(selection, fragmentMap) {\n switch (selection.kind) {\n case \"InlineFragment\":\n return selection;\n case \"FragmentSpread\": {\n var fragmentName = selection.name.value;\n if (typeof fragmentMap === \"function\") {\n return fragmentMap(fragmentName);\n }\n var fragment = fragmentMap && fragmentMap[fragmentName];\n invariant(fragment, 72, fragmentName);\n return fragment || null;\n }\n default:\n return null;\n }\n}\n","import { newInvariantError } from \"../globals/index.js\";\nimport { isNonNullObject } from \"../common/objects.js\";\nimport { getFragmentFromSelection } from \"./fragments.js\";\nexport function makeReference(id) {\n return { __ref: String(id) };\n}\nexport function isReference(obj) {\n return Boolean(obj && typeof obj === \"object\" && typeof obj.__ref === \"string\");\n}\nexport function isDocumentNode(value) {\n return (isNonNullObject(value) &&\n value.kind === \"Document\" &&\n Array.isArray(value.definitions));\n}\nfunction isStringValue(value) {\n return value.kind === \"StringValue\";\n}\nfunction isBooleanValue(value) {\n return value.kind === \"BooleanValue\";\n}\nfunction isIntValue(value) {\n return value.kind === \"IntValue\";\n}\nfunction isFloatValue(value) {\n return value.kind === \"FloatValue\";\n}\nfunction isVariable(value) {\n return value.kind === \"Variable\";\n}\nfunction isObjectValue(value) {\n return value.kind === \"ObjectValue\";\n}\nfunction isListValue(value) {\n return value.kind === \"ListValue\";\n}\nfunction isEnumValue(value) {\n return value.kind === \"EnumValue\";\n}\nfunction isNullValue(value) {\n return value.kind === \"NullValue\";\n}\nexport function valueToObjectRepresentation(argObj, name, value, variables) {\n if (isIntValue(value) || isFloatValue(value)) {\n argObj[name.value] = Number(value.value);\n }\n else if (isBooleanValue(value) || isStringValue(value)) {\n argObj[name.value] = value.value;\n }\n else if (isObjectValue(value)) {\n var nestedArgObj_1 = {};\n value.fields.map(function (obj) {\n return valueToObjectRepresentation(nestedArgObj_1, obj.name, obj.value, variables);\n });\n argObj[name.value] = nestedArgObj_1;\n }\n else if (isVariable(value)) {\n var variableValue = (variables || {})[value.name.value];\n argObj[name.value] = variableValue;\n }\n else if (isListValue(value)) {\n argObj[name.value] = value.values.map(function (listValue) {\n var nestedArgArrayObj = {};\n valueToObjectRepresentation(nestedArgArrayObj, name, listValue, variables);\n return nestedArgArrayObj[name.value];\n });\n }\n else if (isEnumValue(value)) {\n argObj[name.value] = value.value;\n }\n else if (isNullValue(value)) {\n argObj[name.value] = null;\n }\n else {\n throw newInvariantError(81, name.value, value.kind);\n }\n}\nexport function storeKeyNameFromField(field, variables) {\n var directivesObj = null;\n if (field.directives) {\n directivesObj = {};\n field.directives.forEach(function (directive) {\n directivesObj[directive.name.value] = {};\n if (directive.arguments) {\n directive.arguments.forEach(function (_a) {\n var name = _a.name, value = _a.value;\n return valueToObjectRepresentation(directivesObj[directive.name.value], name, value, variables);\n });\n }\n });\n }\n var argObj = null;\n if (field.arguments && field.arguments.length) {\n argObj = {};\n field.arguments.forEach(function (_a) {\n var name = _a.name, value = _a.value;\n return valueToObjectRepresentation(argObj, name, value, variables);\n });\n }\n return getStoreKeyName(field.name.value, argObj, directivesObj);\n}\nvar KNOWN_DIRECTIVES = [\n \"connection\",\n \"include\",\n \"skip\",\n \"client\",\n \"rest\",\n \"export\",\n \"nonreactive\",\n];\nexport var getStoreKeyName = Object.assign(function (fieldName, args, directives) {\n if (args &&\n directives &&\n directives[\"connection\"] &&\n directives[\"connection\"][\"key\"]) {\n if (directives[\"connection\"][\"filter\"] &&\n directives[\"connection\"][\"filter\"].length > 0) {\n var filterKeys = directives[\"connection\"][\"filter\"] ?\n directives[\"connection\"][\"filter\"]\n : [];\n filterKeys.sort();\n var filteredArgs_1 = {};\n filterKeys.forEach(function (key) {\n filteredArgs_1[key] = args[key];\n });\n return \"\".concat(directives[\"connection\"][\"key\"], \"(\").concat(stringify(filteredArgs_1), \")\");\n }\n else {\n return directives[\"connection\"][\"key\"];\n }\n }\n var completeFieldName = fieldName;\n if (args) {\n // We can't use `JSON.stringify` here since it's non-deterministic,\n // and can lead to different store key names being created even though\n // the `args` object used during creation has the same properties/values.\n var stringifiedArgs = stringify(args);\n completeFieldName += \"(\".concat(stringifiedArgs, \")\");\n }\n if (directives) {\n Object.keys(directives).forEach(function (key) {\n if (KNOWN_DIRECTIVES.indexOf(key) !== -1)\n return;\n if (directives[key] && Object.keys(directives[key]).length) {\n completeFieldName += \"@\".concat(key, \"(\").concat(stringify(directives[key]), \")\");\n }\n else {\n completeFieldName += \"@\".concat(key);\n }\n });\n }\n return completeFieldName;\n}, {\n setStringify: function (s) {\n var previous = stringify;\n stringify = s;\n return previous;\n },\n});\n// Default stable JSON.stringify implementation. Can be updated/replaced with\n// something better by calling getStoreKeyName.setStringify.\nvar stringify = function defaultStringify(value) {\n return JSON.stringify(value, stringifyReplacer);\n};\nfunction stringifyReplacer(_key, value) {\n if (isNonNullObject(value) && !Array.isArray(value)) {\n value = Object.keys(value)\n .sort()\n .reduce(function (copy, key) {\n copy[key] = value[key];\n return copy;\n }, {});\n }\n return value;\n}\nexport function argumentsObjectFromField(field, variables) {\n if (field.arguments && field.arguments.length) {\n var argObj_1 = {};\n field.arguments.forEach(function (_a) {\n var name = _a.name, value = _a.value;\n return valueToObjectRepresentation(argObj_1, name, value, variables);\n });\n return argObj_1;\n }\n return null;\n}\nexport function resultKeyNameFromField(field) {\n return field.alias ? field.alias.value : field.name.value;\n}\nexport function getTypenameFromResult(result, selectionSet, fragmentMap) {\n var fragments;\n for (var _i = 0, _a = selectionSet.selections; _i < _a.length; _i++) {\n var selection = _a[_i];\n if (isField(selection)) {\n if (selection.name.value === \"__typename\") {\n return result[resultKeyNameFromField(selection)];\n }\n }\n else if (fragments) {\n fragments.push(selection);\n }\n else {\n fragments = [selection];\n }\n }\n if (typeof result.__typename === \"string\") {\n return result.__typename;\n }\n if (fragments) {\n for (var _b = 0, fragments_1 = fragments; _b < fragments_1.length; _b++) {\n var selection = fragments_1[_b];\n var typename = getTypenameFromResult(result, getFragmentFromSelection(selection, fragmentMap).selectionSet, fragmentMap);\n if (typeof typename === \"string\") {\n return typename;\n }\n }\n }\n}\nexport function isField(selection) {\n return selection.kind === \"Field\";\n}\nexport function isInlineFragment(selection) {\n return selection.kind === \"InlineFragment\";\n}\n","import { invariant, newInvariantError } from \"../globals/index.js\";\nimport { valueToObjectRepresentation } from \"./storeUtils.js\";\n// Checks the document for errors and throws an exception if there is an error.\nexport function checkDocument(doc) {\n invariant(doc && doc.kind === \"Document\", 73);\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== \"FragmentDefinition\"; })\n .map(function (definition) {\n if (definition.kind !== \"OperationDefinition\") {\n throw newInvariantError(74, definition.kind);\n }\n return definition;\n });\n invariant(operations.length <= 1, 75, operations.length);\n return doc;\n}\nexport function getOperationDefinition(doc) {\n checkDocument(doc);\n return doc.definitions.filter(function (definition) {\n return definition.kind === \"OperationDefinition\";\n })[0];\n}\nexport function getOperationName(doc) {\n return (doc.definitions\n .filter(function (definition) {\n return definition.kind === \"OperationDefinition\" && !!definition.name;\n })\n .map(function (x) { return x.name.value; })[0] || null);\n}\n// Returns the FragmentDefinitions from a particular document as an array\nexport function getFragmentDefinitions(doc) {\n return doc.definitions.filter(function (definition) {\n return definition.kind === \"FragmentDefinition\";\n });\n}\nexport function getQueryDefinition(doc) {\n var queryDef = getOperationDefinition(doc);\n invariant(queryDef && queryDef.operation === \"query\", 76);\n return queryDef;\n}\nexport function getFragmentDefinition(doc) {\n invariant(doc.kind === \"Document\", 77);\n invariant(doc.definitions.length <= 1, 78);\n var fragmentDef = doc.definitions[0];\n invariant(fragmentDef.kind === \"FragmentDefinition\", 79);\n return fragmentDef;\n}\n/**\n * Returns the first operation definition found in this document.\n * If no operation definition is found, the first fragment definition will be returned.\n * If no definitions are found, an error will be thrown.\n */\nexport function getMainDefinition(queryDoc) {\n checkDocument(queryDoc);\n var fragmentDefinition;\n for (var _i = 0, _a = queryDoc.definitions; _i < _a.length; _i++) {\n var definition = _a[_i];\n if (definition.kind === \"OperationDefinition\") {\n var operation = definition.operation;\n if (operation === \"query\" ||\n operation === \"mutation\" ||\n operation === \"subscription\") {\n return definition;\n }\n }\n if (definition.kind === \"FragmentDefinition\" && !fragmentDefinition) {\n // we do this because we want to allow multiple fragment definitions\n // to precede an operation definition.\n fragmentDefinition = definition;\n }\n }\n if (fragmentDefinition) {\n return fragmentDefinition;\n }\n throw newInvariantError(80);\n}\nexport function getDefaultValues(definition) {\n var defaultValues = Object.create(null);\n var defs = definition && definition.variableDefinitions;\n if (defs && defs.length) {\n defs.forEach(function (def) {\n if (def.defaultValue) {\n valueToObjectRepresentation(defaultValues, def.variable.name, def.defaultValue);\n }\n });\n }\n return defaultValues;\n}\n","import { Trie } from \"@wry/trie\";\nimport { canUseWeakMap, canUseWeakSet } from \"../common/canUse.js\";\nimport { checkDocument } from \"./getFromAST.js\";\nimport { invariant } from \"../globals/index.js\";\nfunction identity(document) {\n return document;\n}\nvar DocumentTransform = /** @class */ (function () {\n function DocumentTransform(transform, options) {\n if (options === void 0) { options = Object.create(null); }\n this.resultCache = canUseWeakSet ? new WeakSet() : new Set();\n this.transform = transform;\n if (options.getCacheKey) {\n // Override default `getCacheKey` function, which returns [document].\n this.getCacheKey = options.getCacheKey;\n }\n if (options.cache !== false) {\n this.stableCacheKeys = new Trie(canUseWeakMap, function (key) { return ({ key: key }); });\n }\n }\n // This default implementation of getCacheKey can be overridden by providing\n // options.getCacheKey to the DocumentTransform constructor. In general, a\n // getCacheKey function may either return an array of keys (often including\n // the document) to be used as a cache key, or undefined to indicate the\n // transform for this document should not be cached.\n DocumentTransform.prototype.getCacheKey = function (document) {\n return [document];\n };\n DocumentTransform.identity = function () {\n // No need to cache this transform since it just returns the document\n // unchanged. This should save a bit of memory that would otherwise be\n // needed to populate the `documentCache` of this transform.\n return new DocumentTransform(identity, { cache: false });\n };\n DocumentTransform.split = function (predicate, left, right) {\n if (right === void 0) { right = DocumentTransform.identity(); }\n return new DocumentTransform(function (document) {\n var documentTransform = predicate(document) ? left : right;\n return documentTransform.transformDocument(document);\n }, \n // Reasonably assume both `left` and `right` transforms handle their own caching\n { cache: false });\n };\n DocumentTransform.prototype.transformDocument = function (document) {\n // If a user passes an already transformed result back to this function,\n // immediately return it.\n if (this.resultCache.has(document)) {\n return document;\n }\n var cacheEntry = this.getStableCacheEntry(document);\n if (cacheEntry && cacheEntry.value) {\n return cacheEntry.value;\n }\n checkDocument(document);\n var transformedDocument = this.transform(document);\n this.resultCache.add(transformedDocument);\n if (cacheEntry) {\n cacheEntry.value = transformedDocument;\n }\n return transformedDocument;\n };\n DocumentTransform.prototype.concat = function (otherTransform) {\n var _this = this;\n return new DocumentTransform(function (document) {\n return otherTransform.transformDocument(_this.transformDocument(document));\n }, \n // Reasonably assume both transforms handle their own caching\n { cache: false });\n };\n DocumentTransform.prototype.getStableCacheEntry = function (document) {\n if (!this.stableCacheKeys)\n return;\n var cacheKeys = this.getCacheKey(document);\n if (cacheKeys) {\n invariant(Array.isArray(cacheKeys), 65);\n return this.stableCacheKeys.lookupArray(cacheKeys);\n }\n };\n return DocumentTransform;\n}());\nexport { DocumentTransform };\n","import { print as origPrint } from \"graphql\";\nimport { canUseWeakMap } from \"../common/canUse.js\";\nvar printCache = canUseWeakMap ? new WeakMap() : undefined;\nexport var print = function (ast) {\n var result;\n result = printCache === null || printCache === void 0 ? void 0 : printCache.get(ast);\n if (!result) {\n result = origPrint(ast);\n printCache === null || printCache === void 0 ? void 0 : printCache.set(ast, result);\n }\n return result;\n};\n","// A version of Array.isArray that works better with readonly arrays.\nexport var isArray = Array.isArray;\nexport function isNonEmptyArray(value) {\n return Array.isArray(value) && value.length > 0;\n}\n","import { __assign, __spreadArray } from \"tslib\";\nimport { invariant } from \"../globals/index.js\";\nimport { visit, Kind } from \"graphql\";\nimport { checkDocument, getOperationDefinition, getFragmentDefinition, getFragmentDefinitions, getMainDefinition, } from \"./getFromAST.js\";\nimport { isField } from \"./storeUtils.js\";\nimport { createFragmentMap } from \"./fragments.js\";\nimport { isArray, isNonEmptyArray } from \"../common/arrays.js\";\nvar TYPENAME_FIELD = {\n kind: Kind.FIELD,\n name: {\n kind: Kind.NAME,\n value: \"__typename\",\n },\n};\nfunction isEmpty(op, fragmentMap) {\n return (!op ||\n op.selectionSet.selections.every(function (selection) {\n return selection.kind === Kind.FRAGMENT_SPREAD &&\n isEmpty(fragmentMap[selection.name.value], fragmentMap);\n }));\n}\nfunction nullIfDocIsEmpty(doc) {\n return (isEmpty(getOperationDefinition(doc) || getFragmentDefinition(doc), createFragmentMap(getFragmentDefinitions(doc)))) ?\n null\n : doc;\n}\nfunction getDirectiveMatcher(configs) {\n var names = new Map();\n var tests = new Map();\n configs.forEach(function (directive) {\n if (directive) {\n if (directive.name) {\n names.set(directive.name, directive);\n }\n else if (directive.test) {\n tests.set(directive.test, directive);\n }\n }\n });\n return function (directive) {\n var config = names.get(directive.name.value);\n if (!config && tests.size) {\n tests.forEach(function (testConfig, test) {\n if (test(directive)) {\n config = testConfig;\n }\n });\n }\n return config;\n };\n}\nfunction makeInUseGetterFunction(defaultKey) {\n var map = new Map();\n return function inUseGetterFunction(key) {\n if (key === void 0) { key = defaultKey; }\n var inUse = map.get(key);\n if (!inUse) {\n map.set(key, (inUse = {\n // Variable and fragment spread names used directly within this\n // operation or fragment definition, as identified by key. These sets\n // will be populated during the first traversal of the document in\n // removeDirectivesFromDocument below.\n variables: new Set(),\n fragmentSpreads: new Set(),\n }));\n }\n return inUse;\n };\n}\nexport function removeDirectivesFromDocument(directives, doc) {\n checkDocument(doc);\n // Passing empty strings to makeInUseGetterFunction means we handle anonymous\n // operations as if their names were \"\". Anonymous fragment definitions are\n // not supposed to be possible, but the same default naming strategy seems\n // appropriate for that case as well.\n var getInUseByOperationName = makeInUseGetterFunction(\"\");\n var getInUseByFragmentName = makeInUseGetterFunction(\"\");\n var getInUse = function (ancestors) {\n for (var p = 0, ancestor = void 0; p < ancestors.length && (ancestor = ancestors[p]); ++p) {\n if (isArray(ancestor))\n continue;\n if (ancestor.kind === Kind.OPERATION_DEFINITION) {\n // If an operation is anonymous, we use the empty string as its key.\n return getInUseByOperationName(ancestor.name && ancestor.name.value);\n }\n if (ancestor.kind === Kind.FRAGMENT_DEFINITION) {\n return getInUseByFragmentName(ancestor.name.value);\n }\n }\n globalThis.__DEV__ !== false && invariant.error(82);\n return null;\n };\n var operationCount = 0;\n for (var i = doc.definitions.length - 1; i >= 0; --i) {\n if (doc.definitions[i].kind === Kind.OPERATION_DEFINITION) {\n ++operationCount;\n }\n }\n var directiveMatcher = getDirectiveMatcher(directives);\n var shouldRemoveField = function (nodeDirectives) {\n return isNonEmptyArray(nodeDirectives) &&\n nodeDirectives\n .map(directiveMatcher)\n .some(function (config) { return config && config.remove; });\n };\n var originalFragmentDefsByPath = new Map();\n // Any time the first traversal of the document below makes a change like\n // removing a fragment (by returning null), this variable should be set to\n // true. Once it becomes true, it should never be set to false again. If this\n // variable remains false throughout the traversal, then we can return the\n // original doc immediately without any modifications.\n var firstVisitMadeChanges = false;\n var fieldOrInlineFragmentVisitor = {\n enter: function (node) {\n if (shouldRemoveField(node.directives)) {\n firstVisitMadeChanges = true;\n return null;\n }\n },\n };\n var docWithoutDirectiveSubtrees = visit(doc, {\n // These two AST node types share the same implementation, defined above.\n Field: fieldOrInlineFragmentVisitor,\n InlineFragment: fieldOrInlineFragmentVisitor,\n VariableDefinition: {\n enter: function () {\n // VariableDefinition nodes do not count as variables in use, though\n // they do contain Variable nodes that might be visited below. To avoid\n // counting variable declarations as usages, we skip visiting the\n // contents of this VariableDefinition node by returning false.\n return false;\n },\n },\n Variable: {\n enter: function (node, _key, _parent, _path, ancestors) {\n var inUse = getInUse(ancestors);\n if (inUse) {\n inUse.variables.add(node.name.value);\n }\n },\n },\n FragmentSpread: {\n enter: function (node, _key, _parent, _path, ancestors) {\n if (shouldRemoveField(node.directives)) {\n firstVisitMadeChanges = true;\n return null;\n }\n var inUse = getInUse(ancestors);\n if (inUse) {\n inUse.fragmentSpreads.add(node.name.value);\n }\n // We might like to remove this FragmentSpread by returning null here if\n // the corresponding FragmentDefinition node is also going to be removed\n // by the logic below, but we can't control the relative order of those\n // events, so we have to postpone the removal of dangling FragmentSpread\n // nodes until after the current visit of the document has finished.\n },\n },\n FragmentDefinition: {\n enter: function (node, _key, _parent, path) {\n originalFragmentDefsByPath.set(JSON.stringify(path), node);\n },\n leave: function (node, _key, _parent, path) {\n var originalNode = originalFragmentDefsByPath.get(JSON.stringify(path));\n if (node === originalNode) {\n // If the FragmentNode received by this leave function is identical to\n // the one received by the corresponding enter function (above), then\n // the visitor must not have made any changes within this\n // FragmentDefinition node. This fragment definition may still be\n // removed if there are no ...spread references to it, but it won't be\n // removed just because it has only a __typename field.\n return node;\n }\n if (\n // This logic applies only if the document contains one or more\n // operations, since removing all fragments from a document containing\n // only fragments makes the document useless.\n operationCount > 0 &&\n node.selectionSet.selections.every(function (selection) {\n return selection.kind === Kind.FIELD &&\n selection.name.value === \"__typename\";\n })) {\n // This is a somewhat opinionated choice: if a FragmentDefinition ends\n // up having no fields other than __typename, we remove the whole\n // fragment definition, and later prune ...spread references to it.\n getInUseByFragmentName(node.name.value).removed = true;\n firstVisitMadeChanges = true;\n return null;\n }\n },\n },\n Directive: {\n leave: function (node) {\n // If a matching directive is found, remove the directive itself. Note\n // that this does not remove the target (field, argument, etc) of the\n // directive, but only the directive itself.\n if (directiveMatcher(node)) {\n firstVisitMadeChanges = true;\n return null;\n }\n },\n },\n });\n if (!firstVisitMadeChanges) {\n // If our first pass did not change anything about the document, then there\n // is no cleanup we need to do, and we can return the original doc.\n return doc;\n }\n // Utility for making sure inUse.transitiveVars is recursively populated.\n // Because this logic assumes inUse.fragmentSpreads has been completely\n // populated and inUse.removed has been set if appropriate,\n // populateTransitiveVars must be called after that information has been\n // collected by the first traversal of the document.\n var populateTransitiveVars = function (inUse) {\n if (!inUse.transitiveVars) {\n inUse.transitiveVars = new Set(inUse.variables);\n if (!inUse.removed) {\n inUse.fragmentSpreads.forEach(function (childFragmentName) {\n populateTransitiveVars(getInUseByFragmentName(childFragmentName)).transitiveVars.forEach(function (varName) {\n inUse.transitiveVars.add(varName);\n });\n });\n }\n }\n return inUse;\n };\n // Since we've been keeping track of fragment spreads used by particular\n // operations and fragment definitions, we now need to compute the set of all\n // spreads used (transitively) by any operations in the document.\n var allFragmentNamesUsed = new Set();\n docWithoutDirectiveSubtrees.definitions.forEach(function (def) {\n if (def.kind === Kind.OPERATION_DEFINITION) {\n populateTransitiveVars(getInUseByOperationName(def.name && def.name.value)).fragmentSpreads.forEach(function (childFragmentName) {\n allFragmentNamesUsed.add(childFragmentName);\n });\n }\n else if (def.kind === Kind.FRAGMENT_DEFINITION &&\n // If there are no operations in the document, then all fragment\n // definitions count as usages of their own fragment names. This heuristic\n // prevents accidentally removing all fragment definitions from the\n // document just because it contains no operations that use the fragments.\n operationCount === 0 &&\n !getInUseByFragmentName(def.name.value).removed) {\n allFragmentNamesUsed.add(def.name.value);\n }\n });\n // Now that we have added all fragment spreads used by operations to the\n // allFragmentNamesUsed set, we can complete the set by transitively adding\n // all fragment spreads used by those fragments, and so on.\n allFragmentNamesUsed.forEach(function (fragmentName) {\n // Once all the childFragmentName strings added here have been seen already,\n // the top-level allFragmentNamesUsed.forEach loop will terminate.\n populateTransitiveVars(getInUseByFragmentName(fragmentName)).fragmentSpreads.forEach(function (childFragmentName) {\n allFragmentNamesUsed.add(childFragmentName);\n });\n });\n var fragmentWillBeRemoved = function (fragmentName) {\n return !!(\n // A fragment definition will be removed if there are no spreads that refer\n // to it, or the fragment was explicitly removed because it had no fields\n // other than __typename.\n (!allFragmentNamesUsed.has(fragmentName) ||\n getInUseByFragmentName(fragmentName).removed));\n };\n var enterVisitor = {\n enter: function (node) {\n if (fragmentWillBeRemoved(node.name.value)) {\n return null;\n }\n },\n };\n return nullIfDocIsEmpty(visit(docWithoutDirectiveSubtrees, {\n // If the fragment is going to be removed, then leaving any dangling\n // FragmentSpread nodes with the same name would be a mistake.\n FragmentSpread: enterVisitor,\n // This is where the fragment definition is actually removed.\n FragmentDefinition: enterVisitor,\n OperationDefinition: {\n leave: function (node) {\n // Upon leaving each operation in the depth-first AST traversal, prune\n // any variables that are declared by the operation but unused within.\n if (node.variableDefinitions) {\n var usedVariableNames_1 = populateTransitiveVars(\n // If an operation is anonymous, we use the empty string as its key.\n getInUseByOperationName(node.name && node.name.value)).transitiveVars;\n // According to the GraphQL spec, all variables declared by an\n // operation must either be used by that operation or used by some\n // fragment included transitively into that operation:\n // https://spec.graphql.org/draft/#sec-All-Variables-Used\n //\n // To stay on the right side of this validation rule, if/when we\n // remove the last $var references from an operation or its fragments,\n // we must also remove the corresponding $var declaration from the\n // enclosing operation. This pruning applies only to operations and\n // not fragment definitions, at the moment. Fragments may be able to\n // declare variables eventually, but today they can only consume them.\n if (usedVariableNames_1.size < node.variableDefinitions.length) {\n return __assign(__assign({}, node), { variableDefinitions: node.variableDefinitions.filter(function (varDef) {\n return usedVariableNames_1.has(varDef.variable.name.value);\n }) });\n }\n }\n },\n },\n }));\n}\nexport var addTypenameToDocument = Object.assign(function (doc) {\n return visit(doc, {\n SelectionSet: {\n enter: function (node, _key, parent) {\n // Don't add __typename to OperationDefinitions.\n if (parent &&\n parent.kind ===\n Kind.OPERATION_DEFINITION) {\n return;\n }\n // No changes if no selections.\n var selections = node.selections;\n if (!selections) {\n return;\n }\n // If selections already have a __typename, or are part of an\n // introspection query, do nothing.\n var skip = selections.some(function (selection) {\n return (isField(selection) &&\n (selection.name.value === \"__typename\" ||\n selection.name.value.lastIndexOf(\"__\", 0) === 0));\n });\n if (skip) {\n return;\n }\n // If this SelectionSet is @export-ed as an input variable, it should\n // not have a __typename field (see issue #4691).\n var field = parent;\n if (isField(field) &&\n field.directives &&\n field.directives.some(function (d) { return d.name.value === \"export\"; })) {\n return;\n }\n // Create and return a new SelectionSet with a __typename Field.\n return __assign(__assign({}, node), { selections: __spreadArray(__spreadArray([], selections, true), [TYPENAME_FIELD], false) });\n },\n },\n });\n}, {\n added: function (field) {\n return field === TYPENAME_FIELD;\n },\n});\nvar connectionRemoveConfig = {\n test: function (directive) {\n var willRemove = directive.name.value === \"connection\";\n if (willRemove) {\n if (!directive.arguments ||\n !directive.arguments.some(function (arg) { return arg.name.value === \"key\"; })) {\n globalThis.__DEV__ !== false && invariant.warn(83);\n }\n }\n return willRemove;\n },\n};\nexport function removeConnectionDirectiveFromDocument(doc) {\n return removeDirectivesFromDocument([connectionRemoveConfig], checkDocument(doc));\n}\nfunction hasDirectivesInSelectionSet(directives, selectionSet, nestedCheck) {\n if (nestedCheck === void 0) { nestedCheck = true; }\n return (!!selectionSet &&\n selectionSet.selections &&\n selectionSet.selections.some(function (selection) {\n return hasDirectivesInSelection(directives, selection, nestedCheck);\n }));\n}\nfunction hasDirectivesInSelection(directives, selection, nestedCheck) {\n if (nestedCheck === void 0) { nestedCheck = true; }\n if (!isField(selection)) {\n return true;\n }\n if (!selection.directives) {\n return false;\n }\n return (selection.directives.some(getDirectiveMatcher(directives)) ||\n (nestedCheck &&\n hasDirectivesInSelectionSet(directives, selection.selectionSet, nestedCheck)));\n}\nfunction getArgumentMatcher(config) {\n return function argumentMatcher(argument) {\n return config.some(function (aConfig) {\n return argument.value &&\n argument.value.kind === Kind.VARIABLE &&\n argument.value.name &&\n (aConfig.name === argument.value.name.value ||\n (aConfig.test && aConfig.test(argument)));\n });\n };\n}\nexport function removeArgumentsFromDocument(config, doc) {\n var argMatcher = getArgumentMatcher(config);\n return nullIfDocIsEmpty(visit(doc, {\n OperationDefinition: {\n enter: function (node) {\n return __assign(__assign({}, node), { \n // Remove matching top level variables definitions.\n variableDefinitions: node.variableDefinitions ?\n node.variableDefinitions.filter(function (varDef) {\n return !config.some(function (arg) { return arg.name === varDef.variable.name.value; });\n })\n : [] });\n },\n },\n Field: {\n enter: function (node) {\n // If `remove` is set to true for an argument, and an argument match\n // is found for a field, remove the field as well.\n var shouldRemoveField = config.some(function (argConfig) { return argConfig.remove; });\n if (shouldRemoveField) {\n var argMatchCount_1 = 0;\n if (node.arguments) {\n node.arguments.forEach(function (arg) {\n if (argMatcher(arg)) {\n argMatchCount_1 += 1;\n }\n });\n }\n if (argMatchCount_1 === 1) {\n return null;\n }\n }\n },\n },\n Argument: {\n enter: function (node) {\n // Remove all matching arguments.\n if (argMatcher(node)) {\n return null;\n }\n },\n },\n }));\n}\nexport function removeFragmentSpreadFromDocument(config, doc) {\n function enter(node) {\n if (config.some(function (def) { return def.name === node.name.value; })) {\n return null;\n }\n }\n return nullIfDocIsEmpty(visit(doc, {\n FragmentSpread: { enter: enter },\n FragmentDefinition: { enter: enter },\n }));\n}\n// If the incoming document is a query, return it as is. Otherwise, build a\n// new document containing a query operation based on the selection set\n// of the previous main operation.\nexport function buildQueryFromSelectionSet(document) {\n var definition = getMainDefinition(document);\n var definitionOperation = definition.operation;\n if (definitionOperation === \"query\") {\n // Already a query, so return the existing document.\n return document;\n }\n // Build a new query using the selection set of the main operation.\n var modifiedDoc = visit(document, {\n OperationDefinition: {\n enter: function (node) {\n return __assign(__assign({}, node), { operation: \"query\" });\n },\n },\n });\n return modifiedDoc;\n}\n// Remove fields / selection sets that include an @client directive.\nexport function removeClientSetsFromDocument(document) {\n checkDocument(document);\n var modifiedDoc = removeDirectivesFromDocument([\n {\n test: function (directive) { return directive.name.value === \"client\"; },\n remove: true,\n },\n ], document);\n return modifiedDoc;\n}\n","import { getOperationDefinition } from \"./getFromAST.js\";\nfunction isOperation(document, operation) {\n var _a;\n return ((_a = getOperationDefinition(document)) === null || _a === void 0 ? void 0 : _a.operation) === operation;\n}\nexport function isMutationOperation(document) {\n return isOperation(document, \"mutation\");\n}\nexport function isQueryOperation(document) {\n return isOperation(document, \"query\");\n}\nexport function isSubscriptionOperation(document) {\n return isOperation(document, \"subscription\");\n}\n","import { __assign, __spreadArray } from \"tslib\";\nimport { isNonNullObject } from \"./objects.js\";\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nexport function mergeDeep() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return mergeDeepArray(sources);\n}\n// In almost any situation where you could succeed in getting the\n// TypeScript compiler to infer a tuple type for the sources array, you\n// could just use mergeDeep instead of mergeDeepArray, so instead of\n// trying to convert T[] to an intersection type we just infer the array\n// element type, which works perfectly when the sources array has a\n// consistent element type.\nexport function mergeDeepArray(sources) {\n var target = sources[0] || {};\n var count = sources.length;\n if (count > 1) {\n var merger = new DeepMerger();\n for (var i = 1; i < count; ++i) {\n target = merger.merge(target, sources[i]);\n }\n }\n return target;\n}\nvar defaultReconciler = function (target, source, property) {\n return this.merge(target[property], source[property]);\n};\nvar DeepMerger = /** @class */ (function () {\n function DeepMerger(reconciler) {\n if (reconciler === void 0) { reconciler = defaultReconciler; }\n this.reconciler = reconciler;\n this.isObject = isNonNullObject;\n this.pastCopies = new Set();\n }\n DeepMerger.prototype.merge = function (target, source) {\n var _this = this;\n var context = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n context[_i - 2] = arguments[_i];\n }\n if (isNonNullObject(source) && isNonNullObject(target)) {\n Object.keys(source).forEach(function (sourceKey) {\n if (hasOwnProperty.call(target, sourceKey)) {\n var targetValue = target[sourceKey];\n if (source[sourceKey] !== targetValue) {\n var result = _this.reconciler.apply(_this, __spreadArray([target,\n source,\n sourceKey], context, false));\n // A well-implemented reconciler may return targetValue to indicate\n // the merge changed nothing about the structure of the target.\n if (result !== targetValue) {\n target = _this.shallowCopyForMerge(target);\n target[sourceKey] = result;\n }\n }\n }\n else {\n // If there is no collision, the target can safely share memory with\n // the source, and the recursion can terminate here.\n target = _this.shallowCopyForMerge(target);\n target[sourceKey] = source[sourceKey];\n }\n });\n return target;\n }\n // If source (or target) is not an object, let source replace target.\n return source;\n };\n DeepMerger.prototype.shallowCopyForMerge = function (value) {\n if (isNonNullObject(value)) {\n if (!this.pastCopies.has(value)) {\n if (Array.isArray(value)) {\n value = value.slice(0);\n }\n else {\n value = __assign({ __proto__: Object.getPrototypeOf(value) }, value);\n }\n this.pastCopies.add(value);\n }\n }\n return value;\n };\n return DeepMerger;\n}());\nexport { DeepMerger };\n","import { __assign, __rest as __rest_1, __spreadArray } from \"tslib\";\nimport { __rest } from \"tslib\";\nimport { mergeDeep } from \"../common/mergeDeep.js\";\n// A very basic pagination field policy that always concatenates new\n// results onto the existing array, without examining options.args.\nexport function concatPagination(keyArgs) {\n if (keyArgs === void 0) { keyArgs = false; }\n return {\n keyArgs: keyArgs,\n merge: function (existing, incoming) {\n return existing ? __spreadArray(__spreadArray([], existing, true), incoming, true) : incoming;\n },\n };\n}\n// A basic field policy that uses options.args.{offset,limit} to splice\n// the incoming data into the existing array. If your arguments are called\n// something different (like args.{start,count}), feel free to copy/paste\n// this implementation and make the appropriate changes.\nexport function offsetLimitPagination(keyArgs) {\n if (keyArgs === void 0) { keyArgs = false; }\n return {\n keyArgs: keyArgs,\n merge: function (existing, incoming, _a) {\n var args = _a.args;\n var merged = existing ? existing.slice(0) : [];\n if (incoming) {\n if (args) {\n // Assume an offset of 0 if args.offset omitted.\n var _b = args.offset, offset = _b === void 0 ? 0 : _b;\n for (var i = 0; i < incoming.length; ++i) {\n merged[offset + i] = incoming[i];\n }\n }\n else {\n // It's unusual (probably a mistake) for a paginated field not\n // to receive any arguments, so you might prefer to throw an\n // exception here, instead of recovering by appending incoming\n // onto the existing array.\n merged.push.apply(merged, incoming);\n }\n }\n return merged;\n },\n };\n}\n// As proof of the flexibility of field policies, this function generates\n// one that handles Relay-style pagination, without Apollo Client knowing\n// anything about connections, edges, cursors, or pageInfo objects.\nexport function relayStylePagination(keyArgs) {\n if (keyArgs === void 0) { keyArgs = false; }\n return {\n keyArgs: keyArgs,\n read: function (existing, _a) {\n var canRead = _a.canRead, readField = _a.readField;\n if (!existing)\n return existing;\n var edges = [];\n var firstEdgeCursor = \"\";\n var lastEdgeCursor = \"\";\n existing.edges.forEach(function (edge) {\n // Edges themselves could be Reference objects, so it's important\n // to use readField to access the edge.edge.node property.\n if (canRead(readField(\"node\", edge))) {\n edges.push(edge);\n if (edge.cursor) {\n firstEdgeCursor = firstEdgeCursor || edge.cursor || \"\";\n lastEdgeCursor = edge.cursor || lastEdgeCursor;\n }\n }\n });\n if (edges.length > 1 && firstEdgeCursor === lastEdgeCursor) {\n firstEdgeCursor = \"\";\n }\n var _b = existing.pageInfo || {}, startCursor = _b.startCursor, endCursor = _b.endCursor;\n return __assign(__assign({}, getExtras(existing)), { edges: edges, pageInfo: __assign(__assign({}, existing.pageInfo), { \n // If existing.pageInfo.{start,end}Cursor are undefined or \"\", default\n // to firstEdgeCursor and/or lastEdgeCursor.\n startCursor: startCursor || firstEdgeCursor, endCursor: endCursor || lastEdgeCursor }) });\n },\n merge: function (existing, incoming, _a) {\n var args = _a.args, isReference = _a.isReference, readField = _a.readField;\n if (!existing) {\n existing = makeEmptyData();\n }\n if (!incoming) {\n return existing;\n }\n var incomingEdges = incoming.edges ?\n incoming.edges.map(function (edge) {\n if (isReference((edge = __assign({}, edge)))) {\n // In case edge is a Reference, we read out its cursor field and\n // store it as an extra property of the Reference object.\n edge.cursor = readField(\"cursor\", edge);\n }\n return edge;\n })\n : [];\n if (incoming.pageInfo) {\n var pageInfo_1 = incoming.pageInfo;\n var startCursor = pageInfo_1.startCursor, endCursor = pageInfo_1.endCursor;\n var firstEdge = incomingEdges[0];\n var lastEdge = incomingEdges[incomingEdges.length - 1];\n // In case we did not request the cursor field for edges in this\n // query, we can still infer cursors from pageInfo.\n if (firstEdge && startCursor) {\n firstEdge.cursor = startCursor;\n }\n if (lastEdge && endCursor) {\n lastEdge.cursor = endCursor;\n }\n // Cursors can also come from edges, so we default\n // pageInfo.{start,end}Cursor to {first,last}Edge.cursor.\n var firstCursor = firstEdge && firstEdge.cursor;\n if (firstCursor && !startCursor) {\n incoming = mergeDeep(incoming, {\n pageInfo: {\n startCursor: firstCursor,\n },\n });\n }\n var lastCursor = lastEdge && lastEdge.cursor;\n if (lastCursor && !endCursor) {\n incoming = mergeDeep(incoming, {\n pageInfo: {\n endCursor: lastCursor,\n },\n });\n }\n }\n var prefix = existing.edges;\n var suffix = [];\n if (args && args.after) {\n // This comparison does not need to use readField(\"cursor\", edge),\n // because we stored the cursor field of any Reference edges as an\n // extra property of the Reference object.\n var index = prefix.findIndex(function (edge) { return edge.cursor === args.after; });\n if (index >= 0) {\n prefix = prefix.slice(0, index + 1);\n // suffix = []; // already true\n }\n }\n else if (args && args.before) {\n var index = prefix.findIndex(function (edge) { return edge.cursor === args.before; });\n suffix = index < 0 ? prefix : prefix.slice(index);\n prefix = [];\n }\n else if (incoming.edges) {\n // If we have neither args.after nor args.before, the incoming\n // edges cannot be spliced into the existing edges, so they must\n // replace the existing edges. See #6592 for a motivating example.\n prefix = [];\n }\n var edges = __spreadArray(__spreadArray(__spreadArray([], prefix, true), incomingEdges, true), suffix, true);\n var pageInfo = __assign(__assign({}, incoming.pageInfo), existing.pageInfo);\n if (incoming.pageInfo) {\n var _b = incoming.pageInfo, hasPreviousPage = _b.hasPreviousPage, hasNextPage = _b.hasNextPage, startCursor = _b.startCursor, endCursor = _b.endCursor, extras = __rest_1(_b, [\"hasPreviousPage\", \"hasNextPage\", \"startCursor\", \"endCursor\"]);\n // If incoming.pageInfo had any extra non-standard properties,\n // assume they should take precedence over any existing properties\n // of the same name, regardless of where this page falls with\n // respect to the existing data.\n Object.assign(pageInfo, extras);\n // Keep existing.pageInfo.has{Previous,Next}Page unless the\n // placement of the incoming edges means incoming.hasPreviousPage\n // or incoming.hasNextPage should become the new values for those\n // properties in existing.pageInfo. Note that these updates are\n // only permitted when the beginning or end of the incoming page\n // coincides with the beginning or end of the existing data, as\n // determined using prefix.length and suffix.length.\n if (!prefix.length) {\n if (void 0 !== hasPreviousPage)\n pageInfo.hasPreviousPage = hasPreviousPage;\n if (void 0 !== startCursor)\n pageInfo.startCursor = startCursor;\n }\n if (!suffix.length) {\n if (void 0 !== hasNextPage)\n pageInfo.hasNextPage = hasNextPage;\n if (void 0 !== endCursor)\n pageInfo.endCursor = endCursor;\n }\n }\n return __assign(__assign(__assign({}, getExtras(existing)), getExtras(incoming)), { edges: edges, pageInfo: pageInfo });\n },\n };\n}\n// Returns any unrecognized properties of the given object.\nvar getExtras = function (obj) { return __rest(obj, notExtras); };\nvar notExtras = [\"edges\", \"pageInfo\"];\nfunction makeEmptyData() {\n return {\n edges: [],\n pageInfo: {\n hasPreviousPage: false,\n hasNextPage: true,\n startCursor: \"\",\n endCursor: \"\",\n },\n };\n}\n","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n// === Symbol Support ===\nvar hasSymbols = function () {\n return typeof Symbol === 'function';\n};\n\nvar hasSymbol = function (name) {\n return hasSymbols() && Boolean(Symbol[name]);\n};\n\nvar getSymbol = function (name) {\n return hasSymbol(name) ? Symbol[name] : '@@' + name;\n};\n\nif (hasSymbols() && !hasSymbol('observable')) {\n Symbol.observable = Symbol('observable');\n}\n\nvar SymbolIterator = getSymbol('iterator');\nvar SymbolObservable = getSymbol('observable');\nvar SymbolSpecies = getSymbol('species'); // === Abstract Operations ===\n\nfunction getMethod(obj, key) {\n var value = obj[key];\n if (value == null) return undefined;\n if (typeof value !== 'function') throw new TypeError(value + ' is not a function');\n return value;\n}\n\nfunction getSpecies(obj) {\n var ctor = obj.constructor;\n\n if (ctor !== undefined) {\n ctor = ctor[SymbolSpecies];\n\n if (ctor === null) {\n ctor = undefined;\n }\n }\n\n return ctor !== undefined ? ctor : Observable;\n}\n\nfunction isObservable(x) {\n return x instanceof Observable; // SPEC: Brand check\n}\n\nfunction hostReportError(e) {\n if (hostReportError.log) {\n hostReportError.log(e);\n } else {\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nfunction enqueue(fn) {\n Promise.resolve().then(function () {\n try {\n fn();\n } catch (e) {\n hostReportError(e);\n }\n });\n}\n\nfunction cleanupSubscription(subscription) {\n var cleanup = subscription._cleanup;\n if (cleanup === undefined) return;\n subscription._cleanup = undefined;\n\n if (!cleanup) {\n return;\n }\n\n try {\n if (typeof cleanup === 'function') {\n cleanup();\n } else {\n var unsubscribe = getMethod(cleanup, 'unsubscribe');\n\n if (unsubscribe) {\n unsubscribe.call(cleanup);\n }\n }\n } catch (e) {\n hostReportError(e);\n }\n}\n\nfunction closeSubscription(subscription) {\n subscription._observer = undefined;\n subscription._queue = undefined;\n subscription._state = 'closed';\n}\n\nfunction flushSubscription(subscription) {\n var queue = subscription._queue;\n\n if (!queue) {\n return;\n }\n\n subscription._queue = undefined;\n subscription._state = 'ready';\n\n for (var i = 0; i < queue.length; ++i) {\n notifySubscription(subscription, queue[i].type, queue[i].value);\n if (subscription._state === 'closed') break;\n }\n}\n\nfunction notifySubscription(subscription, type, value) {\n subscription._state = 'running';\n var observer = subscription._observer;\n\n try {\n var m = getMethod(observer, type);\n\n switch (type) {\n case 'next':\n if (m) m.call(observer, value);\n break;\n\n case 'error':\n closeSubscription(subscription);\n if (m) m.call(observer, value);else throw value;\n break;\n\n case 'complete':\n closeSubscription(subscription);\n if (m) m.call(observer);\n break;\n }\n } catch (e) {\n hostReportError(e);\n }\n\n if (subscription._state === 'closed') cleanupSubscription(subscription);else if (subscription._state === 'running') subscription._state = 'ready';\n}\n\nfunction onNotify(subscription, type, value) {\n if (subscription._state === 'closed') return;\n\n if (subscription._state === 'buffering') {\n subscription._queue.push({\n type: type,\n value: value\n });\n\n return;\n }\n\n if (subscription._state !== 'ready') {\n subscription._state = 'buffering';\n subscription._queue = [{\n type: type,\n value: value\n }];\n enqueue(function () {\n return flushSubscription(subscription);\n });\n return;\n }\n\n notifySubscription(subscription, type, value);\n}\n\nvar Subscription = /*#__PURE__*/function () {\n function Subscription(observer, subscriber) {\n // ASSERT: observer is an object\n // ASSERT: subscriber is callable\n this._cleanup = undefined;\n this._observer = observer;\n this._queue = undefined;\n this._state = 'initializing';\n var subscriptionObserver = new SubscriptionObserver(this);\n\n try {\n this._cleanup = subscriber.call(undefined, subscriptionObserver);\n } catch (e) {\n subscriptionObserver.error(e);\n }\n\n if (this._state === 'initializing') this._state = 'ready';\n }\n\n var _proto = Subscription.prototype;\n\n _proto.unsubscribe = function unsubscribe() {\n if (this._state !== 'closed') {\n closeSubscription(this);\n cleanupSubscription(this);\n }\n };\n\n _createClass(Subscription, [{\n key: \"closed\",\n get: function () {\n return this._state === 'closed';\n }\n }]);\n\n return Subscription;\n}();\n\nvar SubscriptionObserver = /*#__PURE__*/function () {\n function SubscriptionObserver(subscription) {\n this._subscription = subscription;\n }\n\n var _proto2 = SubscriptionObserver.prototype;\n\n _proto2.next = function next(value) {\n onNotify(this._subscription, 'next', value);\n };\n\n _proto2.error = function error(value) {\n onNotify(this._subscription, 'error', value);\n };\n\n _proto2.complete = function complete() {\n onNotify(this._subscription, 'complete');\n };\n\n _createClass(SubscriptionObserver, [{\n key: \"closed\",\n get: function () {\n return this._subscription._state === 'closed';\n }\n }]);\n\n return SubscriptionObserver;\n}();\n\nvar Observable = /*#__PURE__*/function () {\n function Observable(subscriber) {\n if (!(this instanceof Observable)) throw new TypeError('Observable cannot be called as a function');\n if (typeof subscriber !== 'function') throw new TypeError('Observable initializer must be a function');\n this._subscriber = subscriber;\n }\n\n var _proto3 = Observable.prototype;\n\n _proto3.subscribe = function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n observer = {\n next: observer,\n error: arguments[1],\n complete: arguments[2]\n };\n }\n\n return new Subscription(observer, this._subscriber);\n };\n\n _proto3.forEach = function forEach(fn) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n if (typeof fn !== 'function') {\n reject(new TypeError(fn + ' is not a function'));\n return;\n }\n\n function done() {\n subscription.unsubscribe();\n resolve();\n }\n\n var subscription = _this.subscribe({\n next: function (value) {\n try {\n fn(value, done);\n } catch (e) {\n reject(e);\n subscription.unsubscribe();\n }\n },\n error: reject,\n complete: resolve\n });\n });\n };\n\n _proto3.map = function map(fn) {\n var _this2 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n return _this2.subscribe({\n next: function (value) {\n try {\n value = fn(value);\n } catch (e) {\n return observer.error(e);\n }\n\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n observer.complete();\n }\n });\n });\n };\n\n _proto3.filter = function filter(fn) {\n var _this3 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n return _this3.subscribe({\n next: function (value) {\n try {\n if (!fn(value)) return;\n } catch (e) {\n return observer.error(e);\n }\n\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n observer.complete();\n }\n });\n });\n };\n\n _proto3.reduce = function reduce(fn) {\n var _this4 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n var hasSeed = arguments.length > 1;\n var hasValue = false;\n var seed = arguments[1];\n var acc = seed;\n return new C(function (observer) {\n return _this4.subscribe({\n next: function (value) {\n var first = !hasValue;\n hasValue = true;\n\n if (!first || hasSeed) {\n try {\n acc = fn(acc, value);\n } catch (e) {\n return observer.error(e);\n }\n } else {\n acc = value;\n }\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n if (!hasValue && !hasSeed) return observer.error(new TypeError('Cannot reduce an empty sequence'));\n observer.next(acc);\n observer.complete();\n }\n });\n });\n };\n\n _proto3.concat = function concat() {\n var _this5 = this;\n\n for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\n sources[_key] = arguments[_key];\n }\n\n var C = getSpecies(this);\n return new C(function (observer) {\n var subscription;\n var index = 0;\n\n function startNext(next) {\n subscription = next.subscribe({\n next: function (v) {\n observer.next(v);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n if (index === sources.length) {\n subscription = undefined;\n observer.complete();\n } else {\n startNext(C.from(sources[index++]));\n }\n }\n });\n }\n\n startNext(_this5);\n return function () {\n if (subscription) {\n subscription.unsubscribe();\n subscription = undefined;\n }\n };\n });\n };\n\n _proto3.flatMap = function flatMap(fn) {\n var _this6 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n var subscriptions = [];\n\n var outer = _this6.subscribe({\n next: function (value) {\n if (fn) {\n try {\n value = fn(value);\n } catch (e) {\n return observer.error(e);\n }\n }\n\n var inner = C.from(value).subscribe({\n next: function (value) {\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n var i = subscriptions.indexOf(inner);\n if (i >= 0) subscriptions.splice(i, 1);\n completeIfDone();\n }\n });\n subscriptions.push(inner);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n completeIfDone();\n }\n });\n\n function completeIfDone() {\n if (outer.closed && subscriptions.length === 0) observer.complete();\n }\n\n return function () {\n subscriptions.forEach(function (s) {\n return s.unsubscribe();\n });\n outer.unsubscribe();\n };\n });\n };\n\n _proto3[SymbolObservable] = function () {\n return this;\n };\n\n Observable.from = function from(x) {\n var C = typeof this === 'function' ? this : Observable;\n if (x == null) throw new TypeError(x + ' is not an object');\n var method = getMethod(x, SymbolObservable);\n\n if (method) {\n var observable = method.call(x);\n if (Object(observable) !== observable) throw new TypeError(observable + ' is not an object');\n if (isObservable(observable) && observable.constructor === C) return observable;\n return new C(function (observer) {\n return observable.subscribe(observer);\n });\n }\n\n if (hasSymbol('iterator')) {\n method = getMethod(x, SymbolIterator);\n\n if (method) {\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var _iterator = _createForOfIteratorHelperLoose(method.call(x)), _step; !(_step = _iterator()).done;) {\n var item = _step.value;\n observer.next(item);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n }\n }\n\n if (Array.isArray(x)) {\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var i = 0; i < x.length; ++i) {\n observer.next(x[i]);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n }\n\n throw new TypeError(x + ' is not observable');\n };\n\n Observable.of = function of() {\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n\n var C = typeof this === 'function' ? this : Observable;\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var i = 0; i < items.length; ++i) {\n observer.next(items[i]);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n };\n\n _createClass(Observable, null, [{\n key: SymbolSpecies,\n get: function () {\n return this;\n }\n }]);\n\n return Observable;\n}();\n\nif (hasSymbols()) {\n Object.defineProperty(Observable, Symbol('extensions'), {\n value: {\n symbol: SymbolObservable,\n hostReportError: hostReportError\n },\n configurable: true\n });\n}\n\nexport { Observable };\n","export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\n\t\t\tif (typeof Symbol.for === 'function') {\n\t\t\t\t// This just needs to be something that won't trample other user's Symbol.for use\n\t\t\t\t// It also will guide people to the source of their issues, if this is problematic.\n\t\t\t\t// META: It's a resource locator!\n\t\t\t\tresult = Symbol.for('https://github.com/benlesh/symbol-observable');\n\t\t\t} else {\n\t\t\t\t// Symbol.for didn't exist! The best we can do at this point is a totally \n\t\t\t\t// unique symbol. Note that the string argument here is a descriptor, not\n\t\t\t\t// an identifier. This symbol is unique.\n\t\t\t\tresult = Symbol('https://github.com/benlesh/symbol-observable');\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tSymbol.observable = result;\n\t\t\t} catch (err) {\n\t\t\t\t// Do nothing. In some environments, users have frozen `Symbol` for security reasons,\n\t\t\t\t// if it is frozen assigning to it will throw. In this case, we don't care, because\n\t\t\t\t// they will need to use the returned value from the ponyfill.\n\t\t\t}\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n","/* global window */\nimport ponyfill from './ponyfill.js';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n","import { Observable } from \"zen-observable-ts\";\n// This simplified polyfill attempts to follow the ECMAScript Observable\n// proposal (https://github.com/zenparsing/es-observable)\nimport \"symbol-observable\";\n// The zen-observable package defines Observable.prototype[Symbol.observable]\n// when Symbol is supported, but RxJS interop depends on also setting this fake\n// '@@observable' string as a polyfill for Symbol.observable.\nvar prototype = Observable.prototype;\nvar fakeObsSymbol = \"@@observable\";\nif (!prototype[fakeObsSymbol]) {\n // @ts-expect-error\n prototype[fakeObsSymbol] = function () {\n return this;\n };\n}\nexport { Observable };\n","export function createFulfilledPromise(value) {\n var promise = Promise.resolve(value);\n promise.status = \"fulfilled\";\n promise.value = value;\n return promise;\n}\nexport function createRejectedPromise(reason) {\n var promise = Promise.reject(reason);\n // prevent potential edge cases leaking unhandled error rejections\n promise.catch(function () { });\n promise.status = \"rejected\";\n promise.reason = reason;\n return promise;\n}\nexport function isStatefulPromise(promise) {\n return \"status\" in promise;\n}\nexport function wrapPromiseWithState(promise) {\n if (isStatefulPromise(promise)) {\n return promise;\n }\n var pendingPromise = promise;\n pendingPromise.status = \"pending\";\n pendingPromise.then(function (value) {\n if (pendingPromise.status === \"pending\") {\n var fulfilledPromise = pendingPromise;\n fulfilledPromise.status = \"fulfilled\";\n fulfilledPromise.value = value;\n }\n }, function (reason) {\n if (pendingPromise.status === \"pending\") {\n var rejectedPromise = pendingPromise;\n rejectedPromise.status = \"rejected\";\n rejectedPromise.reason = reason;\n }\n });\n return promise;\n}\n","var toString = Object.prototype.toString;\n/**\n * Deeply clones a value to create a new instance.\n */\nexport function cloneDeep(value) {\n return cloneDeepHelper(value);\n}\nfunction cloneDeepHelper(val, seen) {\n switch (toString.call(val)) {\n case \"[object Array]\": {\n seen = seen || new Map();\n if (seen.has(val))\n return seen.get(val);\n var copy_1 = val.slice(0);\n seen.set(val, copy_1);\n copy_1.forEach(function (child, i) {\n copy_1[i] = cloneDeepHelper(child, seen);\n });\n return copy_1;\n }\n case \"[object Object]\": {\n seen = seen || new Map();\n if (seen.has(val))\n return seen.get(val);\n // High fidelity polyfills of Object.create and Object.getPrototypeOf are\n // possible in all JS environments, so we will assume they exist/work.\n var copy_2 = Object.create(Object.getPrototypeOf(val));\n seen.set(val, copy_2);\n Object.keys(val).forEach(function (key) {\n copy_2[key] = cloneDeepHelper(val[key], seen);\n });\n return copy_2;\n }\n default:\n return val;\n }\n}\n","import { isNonNullObject } from \"./objects.js\";\nfunction deepFreeze(value) {\n var workSet = new Set([value]);\n workSet.forEach(function (obj) {\n if (isNonNullObject(obj) && shallowFreeze(obj) === obj) {\n Object.getOwnPropertyNames(obj).forEach(function (name) {\n if (isNonNullObject(obj[name]))\n workSet.add(obj[name]);\n });\n }\n });\n return value;\n}\nfunction shallowFreeze(obj) {\n if (globalThis.__DEV__ !== false && !Object.isFrozen(obj)) {\n try {\n Object.freeze(obj);\n }\n catch (e) {\n // Some types like Uint8Array and Node.js's Buffer cannot be frozen, but\n // they all throw a TypeError when you try, so we re-throw any exceptions\n // that are not TypeErrors, since that would be unexpected.\n if (e instanceof TypeError)\n return null;\n throw e;\n }\n }\n return obj;\n}\nexport function maybeDeepFreeze(obj) {\n if (globalThis.__DEV__ !== false) {\n deepFreeze(obj);\n }\n return obj;\n}\n","export function iterateObserversSafely(observers, method, argument) {\n // In case observers is modified during iteration, we need to commit to the\n // original elements, which also provides an opportunity to filter them down\n // to just the observers with the given method.\n var observersWithMethod = [];\n observers.forEach(function (obs) { return obs[method] && observersWithMethod.push(obs); });\n observersWithMethod.forEach(function (obs) { return obs[method](argument); });\n}\n","import { Observable } from \"./Observable.js\";\n// Like Observable.prototype.map, except that the mapping function can\n// optionally return a Promise (or be async).\nexport function asyncMap(observable, mapFn, catchFn) {\n return new Observable(function (observer) {\n var promiseQueue = {\n // Normally we would initialize promiseQueue to Promise.resolve(), but\n // in this case, for backwards compatibility, we need to be careful to\n // invoke the first callback synchronously.\n then: function (callback) {\n return new Promise(function (resolve) { return resolve(callback()); });\n },\n };\n function makeCallback(examiner, key) {\n return function (arg) {\n if (examiner) {\n var both = function () {\n // If the observer is closed, we don't want to continue calling the\n // mapping function - it's result will be swallowed anyways.\n return observer.closed ?\n /* will be swallowed */ 0\n : examiner(arg);\n };\n promiseQueue = promiseQueue.then(both, both).then(function (result) { return observer.next(result); }, function (error) { return observer.error(error); });\n }\n else {\n observer[key](arg);\n }\n };\n }\n var handler = {\n next: makeCallback(mapFn, \"next\"),\n error: makeCallback(catchFn, \"error\"),\n complete: function () {\n // no need to reassign `promiseQueue`, after `observer.complete`,\n // the observer will be closed and short-circuit everything anyways\n /*promiseQueue = */ promiseQueue.then(function () { return observer.complete(); });\n },\n };\n var sub = observable.subscribe(handler);\n return function () { return sub.unsubscribe(); };\n });\n}\n","import { Observable } from \"./Observable.js\";\nimport { canUseSymbol } from \"../common/canUse.js\";\n// Generic implementations of Observable.prototype methods like map and\n// filter need to know how to create a new Observable from an Observable\n// subclass (like Concast or ObservableQuery). Those methods assume\n// (perhaps unwisely?) that they can call the subtype's constructor with a\n// Subscriber function, even though the subclass constructor might expect\n// different parameters. Defining this static Symbol.species property on\n// the subclass is a hint to generic Observable code to use the default\n// constructor instead of trying to do `new Subclass(observer => ...)`.\nexport function fixObservableSubclass(subclass) {\n function set(key) {\n // Object.defineProperty is necessary because the Symbol.species\n // property is a getter by default in modern JS environments, so we\n // can't assign to it with a normal assignment expression.\n Object.defineProperty(subclass, key, { value: Observable });\n }\n if (canUseSymbol && Symbol.species) {\n set(Symbol.species);\n }\n // The \"@@species\" string is used as a fake Symbol.species value in some\n // polyfill systems (including the SymbolSpecies variable used by\n // zen-observable), so we should set it as well, to be safe.\n set(\"@@species\");\n return subclass;\n}\n","import { __extends } from \"tslib\";\nimport { Observable } from \"./Observable.js\";\nimport { iterateObserversSafely } from \"./iteration.js\";\nimport { fixObservableSubclass } from \"./subclassing.js\";\nfunction isPromiseLike(value) {\n return value && typeof value.then === \"function\";\n}\n// A Concast observable concatenates the given sources into a single\n// non-overlapping sequence of Ts, automatically unwrapping any promises,\n// and broadcasts the T elements of that sequence to any number of\n// subscribers, all without creating a bunch of intermediary Observable\n// wrapper objects.\n//\n// Even though any number of observers can subscribe to the Concast, each\n// source observable is guaranteed to receive at most one subscribe call,\n// and the results are multicast to all observers.\n//\n// In addition to broadcasting every next/error message to this.observers,\n// the Concast stores the most recent message using this.latest, so any\n// new observers can immediately receive the latest message, even if it\n// was originally delivered in the past. This behavior means we can assume\n// every active observer in this.observers has received the same most\n// recent message.\n//\n// With the exception of this.latest replay, a Concast is a \"hot\"\n// observable in the sense that it does not replay past results from the\n// beginning of time for each new observer.\n//\n// Could we have used some existing RxJS class instead? Concast is\n// similar to a BehaviorSubject, because it is multicast and redelivers\n// the latest next/error message to new subscribers. Unlike Subject,\n// Concast does not expose an Observer interface (this.handlers is\n// intentionally private), since Concast gets its inputs from the\n// concatenated sources. If we ever switch to RxJS, there may be some\n// value in reusing their code, but for now we use zen-observable, which\n// does not contain any Subject implementations.\nvar Concast = /** @class */ (function (_super) {\n __extends(Concast, _super);\n // Not only can the individual elements of the iterable be promises, but\n // also the iterable itself can be wrapped in a promise.\n function Concast(sources) {\n var _this = _super.call(this, function (observer) {\n _this.addObserver(observer);\n return function () { return _this.removeObserver(observer); };\n }) || this;\n // Active observers receiving broadcast messages. Thanks to this.latest,\n // we can assume all observers in this Set have received the same most\n // recent message, though possibly at different times in the past.\n _this.observers = new Set();\n _this.promise = new Promise(function (resolve, reject) {\n _this.resolve = resolve;\n _this.reject = reject;\n });\n // Bound handler functions that can be reused for every internal\n // subscription.\n _this.handlers = {\n next: function (result) {\n if (_this.sub !== null) {\n _this.latest = [\"next\", result];\n _this.notify(\"next\", result);\n iterateObserversSafely(_this.observers, \"next\", result);\n }\n },\n error: function (error) {\n var sub = _this.sub;\n if (sub !== null) {\n // Delay unsubscribing from the underlying subscription slightly,\n // so that immediately subscribing another observer can keep the\n // subscription active.\n if (sub)\n setTimeout(function () { return sub.unsubscribe(); });\n _this.sub = null;\n _this.latest = [\"error\", error];\n _this.reject(error);\n _this.notify(\"error\", error);\n iterateObserversSafely(_this.observers, \"error\", error);\n }\n },\n complete: function () {\n var _a = _this, sub = _a.sub, _b = _a.sources, sources = _b === void 0 ? [] : _b;\n if (sub !== null) {\n // If complete is called before concast.start, this.sources may be\n // undefined, so we use a default value of [] for sources. That works\n // here because it falls into the if (!value) {...} block, which\n // appropriately terminates the Concast, even if this.sources might\n // eventually have been initialized to a non-empty array.\n var value = sources.shift();\n if (!value) {\n if (sub)\n setTimeout(function () { return sub.unsubscribe(); });\n _this.sub = null;\n if (_this.latest && _this.latest[0] === \"next\") {\n _this.resolve(_this.latest[1]);\n }\n else {\n _this.resolve();\n }\n _this.notify(\"complete\");\n // We do not store this.latest = [\"complete\"], because doing so\n // discards useful information about the previous next (or\n // error) message. Instead, if new observers subscribe after\n // this Concast has completed, they will receive the final\n // 'next' message (unless there was an error) immediately\n // followed by a 'complete' message (see addObserver).\n iterateObserversSafely(_this.observers, \"complete\");\n }\n else if (isPromiseLike(value)) {\n value.then(function (obs) { return (_this.sub = obs.subscribe(_this.handlers)); });\n }\n else {\n _this.sub = value.subscribe(_this.handlers);\n }\n }\n },\n };\n _this.nextResultListeners = new Set();\n // A public way to abort observation and broadcast.\n _this.cancel = function (reason) {\n _this.reject(reason);\n _this.sources = [];\n _this.handlers.complete();\n };\n // Suppress rejection warnings for this.promise, since it's perfectly\n // acceptable to pay no attention to this.promise if you're consuming\n // the results through the normal observable API.\n _this.promise.catch(function (_) { });\n // If someone accidentally tries to create a Concast using a subscriber\n // function, recover by creating an Observable from that subscriber and\n // using it as the source.\n if (typeof sources === \"function\") {\n sources = [new Observable(sources)];\n }\n if (isPromiseLike(sources)) {\n sources.then(function (iterable) { return _this.start(iterable); }, _this.handlers.error);\n }\n else {\n _this.start(sources);\n }\n return _this;\n }\n Concast.prototype.start = function (sources) {\n if (this.sub !== void 0)\n return;\n // In practice, sources is most often simply an Array of observables.\n // TODO Consider using sources[Symbol.iterator]() to take advantage\n // of the laziness of non-Array iterables.\n this.sources = Array.from(sources);\n // Calling this.handlers.complete() kicks off consumption of the first\n // source observable. It's tempting to do this step lazily in\n // addObserver, but this.promise can be accessed without calling\n // addObserver, so consumption needs to begin eagerly.\n this.handlers.complete();\n };\n Concast.prototype.deliverLastMessage = function (observer) {\n if (this.latest) {\n var nextOrError = this.latest[0];\n var method = observer[nextOrError];\n if (method) {\n method.call(observer, this.latest[1]);\n }\n // If the subscription is already closed, and the last message was\n // a 'next' message, simulate delivery of the final 'complete'\n // message again.\n if (this.sub === null && nextOrError === \"next\" && observer.complete) {\n observer.complete();\n }\n }\n };\n Concast.prototype.addObserver = function (observer) {\n if (!this.observers.has(observer)) {\n // Immediately deliver the most recent message, so we can always\n // be sure all observers have the latest information.\n this.deliverLastMessage(observer);\n this.observers.add(observer);\n }\n };\n Concast.prototype.removeObserver = function (observer) {\n if (this.observers.delete(observer) && this.observers.size < 1) {\n // In case there are still any listeners in this.nextResultListeners, and\n // no error or completion has been broadcast yet, make sure those\n // observers have a chance to run and then remove themselves from\n // this.observers.\n this.handlers.complete();\n }\n };\n Concast.prototype.notify = function (method, arg) {\n var nextResultListeners = this.nextResultListeners;\n if (nextResultListeners.size) {\n // Replacing this.nextResultListeners first ensures it does not grow while\n // we are iterating over it, potentially leading to infinite loops.\n this.nextResultListeners = new Set();\n nextResultListeners.forEach(function (listener) { return listener(method, arg); });\n }\n };\n // We need a way to run callbacks just *before* the next result (or error or\n // completion) is delivered by this Concast, so we can be sure any code that\n // runs as a result of delivering that result/error observes the effects of\n // running the callback(s). It was tempting to reuse the Observer type instead\n // of introducing NextResultListener, but that messes with the sizing and\n // maintenance of this.observers, and ends up being more code overall.\n Concast.prototype.beforeNext = function (callback) {\n var called = false;\n this.nextResultListeners.add(function (method, arg) {\n if (!called) {\n called = true;\n callback(method, arg);\n }\n });\n };\n return Concast;\n}(Observable));\nexport { Concast };\n// Necessary because the Concast constructor has a different signature\n// than the Observable constructor.\nfixObservableSubclass(Concast);\n","import { isNonNullObject } from \"./objects.js\";\nimport { isNonEmptyArray } from \"./arrays.js\";\nimport { DeepMerger } from \"./mergeDeep.js\";\nexport function isExecutionPatchIncrementalResult(value) {\n return \"incremental\" in value;\n}\nexport function isExecutionPatchInitialResult(value) {\n return \"hasNext\" in value && \"data\" in value;\n}\nexport function isExecutionPatchResult(value) {\n return (isExecutionPatchIncrementalResult(value) ||\n isExecutionPatchInitialResult(value));\n}\n// This function detects an Apollo payload result before it is transformed\n// into a FetchResult via HttpLink; it cannot detect an ApolloPayloadResult\n// once it leaves the link chain.\nexport function isApolloPayloadResult(value) {\n return isNonNullObject(value) && \"payload\" in value;\n}\nexport function mergeIncrementalData(prevResult, result) {\n var mergedData = prevResult;\n var merger = new DeepMerger();\n if (isExecutionPatchIncrementalResult(result) &&\n isNonEmptyArray(result.incremental)) {\n result.incremental.forEach(function (_a) {\n var data = _a.data, path = _a.path;\n for (var i = path.length - 1; i >= 0; --i) {\n var key = path[i];\n var isNumericKey = !isNaN(+key);\n var parent_1 = isNumericKey ? [] : {};\n parent_1[key] = data;\n data = parent_1;\n }\n mergedData = merger.merge(mergedData, data);\n });\n }\n return mergedData;\n}\n","import { isNonEmptyArray } from \"./arrays.js\";\nimport { isExecutionPatchIncrementalResult } from \"./incrementalResult.js\";\nexport function graphQLResultHasError(result) {\n var errors = getGraphQLErrorsFromResult(result);\n return isNonEmptyArray(errors);\n}\nexport function getGraphQLErrorsFromResult(result) {\n var graphQLErrors = isNonEmptyArray(result.errors) ? result.errors.slice(0) : [];\n if (isExecutionPatchIncrementalResult(result) &&\n isNonEmptyArray(result.incremental)) {\n result.incremental.forEach(function (incrementalResult) {\n if (incrementalResult.errors) {\n graphQLErrors.push.apply(graphQLErrors, incrementalResult.errors);\n }\n });\n }\n return graphQLErrors;\n}\n","/**\n * Merges the provided objects shallowly and removes\n * all properties with an `undefined` value\n */\nexport function compact() {\n var objects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n objects[_i] = arguments[_i];\n }\n var result = Object.create(null);\n objects.forEach(function (obj) {\n if (!obj)\n return;\n Object.keys(obj).forEach(function (key) {\n var value = obj[key];\n if (value !== void 0) {\n result[key] = value;\n }\n });\n });\n return result;\n}\n","import { __assign } from \"tslib\";\nimport { compact } from \"./compact.js\";\nexport function mergeOptions(defaults, options) {\n return compact(defaults, options, options.variables && {\n variables: compact(__assign(__assign({}, (defaults && defaults.variables)), options.variables)),\n });\n}\n","import { isPlainObject } from \"./objects.js\";\nexport function omitDeep(value, key) {\n return __omitDeep(value, key);\n}\nfunction __omitDeep(value, key, known) {\n if (known === void 0) { known = new Map(); }\n if (known.has(value)) {\n return known.get(value);\n }\n var modified = false;\n if (Array.isArray(value)) {\n var array_1 = [];\n known.set(value, array_1);\n value.forEach(function (value, index) {\n var result = __omitDeep(value, key, known);\n modified || (modified = result !== value);\n array_1[index] = result;\n });\n if (modified) {\n return array_1;\n }\n }\n else if (isPlainObject(value)) {\n var obj_1 = Object.create(Object.getPrototypeOf(value));\n known.set(value, obj_1);\n Object.keys(value).forEach(function (k) {\n if (k === key) {\n modified = true;\n return;\n }\n var result = __omitDeep(value[k], key, known);\n modified || (modified = result !== value[k]);\n obj_1[k] = result;\n });\n if (modified) {\n return obj_1;\n }\n }\n return value;\n}\n","import { omitDeep } from \"./omitDeep.js\";\nexport function stripTypename(value) {\n return omitDeep(value, \"__typename\");\n}\n","export {};\n","export { DEV, maybe } from \"./globals/index.js\";\nexport { shouldInclude, hasDirectives, hasAnyDirectives, hasAllDirectives, hasClientExports, getDirectiveNames, getInclusionDirectives, } from \"./graphql/directives.js\";\nexport { DocumentTransform } from \"./graphql/DocumentTransform.js\";\nexport { createFragmentMap, getFragmentQueryDocument, getFragmentFromSelection, } from \"./graphql/fragments.js\";\nexport { checkDocument, getOperationDefinition, getOperationName, getFragmentDefinitions, getQueryDefinition, getFragmentDefinition, getMainDefinition, getDefaultValues, } from \"./graphql/getFromAST.js\";\nexport { print } from \"./graphql/print.js\";\nexport { makeReference, isDocumentNode, isReference, isField, isInlineFragment, valueToObjectRepresentation, storeKeyNameFromField, argumentsObjectFromField, resultKeyNameFromField, getStoreKeyName, getTypenameFromResult, } from \"./graphql/storeUtils.js\";\nexport { addTypenameToDocument, buildQueryFromSelectionSet, removeDirectivesFromDocument, removeConnectionDirectiveFromDocument, removeArgumentsFromDocument, removeFragmentSpreadFromDocument, removeClientSetsFromDocument, } from \"./graphql/transform.js\";\nexport { isMutationOperation, isQueryOperation, isSubscriptionOperation, } from \"./graphql/operations.js\";\nexport { concatPagination, offsetLimitPagination, relayStylePagination, } from \"./policies/pagination.js\";\nexport { Observable } from \"./observables/Observable.js\";\nexport { isStatefulPromise, createFulfilledPromise, createRejectedPromise, wrapPromiseWithState, } from \"./promises/decoration.js\";\nexport * from \"./common/mergeDeep.js\";\nexport * from \"./common/cloneDeep.js\";\nexport * from \"./common/maybeDeepFreeze.js\";\nexport * from \"./observables/iteration.js\";\nexport * from \"./observables/asyncMap.js\";\nexport * from \"./observables/Concast.js\";\nexport * from \"./observables/subclassing.js\";\nexport * from \"./common/arrays.js\";\nexport * from \"./common/objects.js\";\nexport * from \"./common/errorHandling.js\";\nexport * from \"./common/canUse.js\";\nexport * from \"./common/compact.js\";\nexport * from \"./common/makeUniqueId.js\";\nexport * from \"./common/stringifyForDisplay.js\";\nexport * from \"./common/mergeOptions.js\";\nexport * from \"./common/incrementalResult.js\";\nexport { omitDeep } from \"./common/omitDeep.js\";\nexport { stripTypename } from \"./common/stripTypename.js\";\nexport * from \"./types/IsStrictlyAny.js\";\n","import { Observable } from \"../../utilities/index.js\";\nexport function fromError(errorValue) {\n return new Observable(function (observer) {\n observer.error(errorValue);\n });\n}\n","import { invariant } from \"../../utilities/globals/index.js\";\nexport function toPromise(observable) {\n var completed = false;\n return new Promise(function (resolve, reject) {\n observable.subscribe({\n next: function (data) {\n if (completed) {\n globalThis.__DEV__ !== false && invariant.warn(42);\n }\n else {\n completed = true;\n resolve(data);\n }\n },\n error: reject,\n });\n });\n}\n","import { Observable } from \"../../utilities/index.js\";\nexport function fromPromise(promise) {\n return new Observable(function (observer) {\n promise\n .then(function (value) {\n observer.next(value);\n observer.complete();\n })\n .catch(observer.error.bind(observer));\n });\n}\n","export var throwServerError = function (response, result, message) {\n var error = new Error(message);\n error.name = \"ServerError\";\n error.response = response;\n error.statusCode = response.status;\n error.result = result;\n throw error;\n};\n","import { newInvariantError } from \"../../utilities/globals/index.js\";\nexport function validateOperation(operation) {\n var OPERATION_FIELDS = [\n \"query\",\n \"operationName\",\n \"variables\",\n \"extensions\",\n \"context\",\n ];\n for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {\n var key = _a[_i];\n if (OPERATION_FIELDS.indexOf(key) < 0) {\n throw newInvariantError(43, key);\n }\n }\n return operation;\n}\n","import { __assign } from \"tslib\";\nexport function createOperation(starting, operation) {\n var context = __assign({}, starting);\n var setContext = function (next) {\n if (typeof next === \"function\") {\n context = __assign(__assign({}, context), next(context));\n }\n else {\n context = __assign(__assign({}, context), next);\n }\n };\n var getContext = function () { return (__assign({}, context)); };\n Object.defineProperty(operation, \"setContext\", {\n enumerable: false,\n value: setContext,\n });\n Object.defineProperty(operation, \"getContext\", {\n enumerable: false,\n value: getContext,\n });\n return operation;\n}\n","import { getOperationName } from \"../../utilities/index.js\";\nexport function transformOperation(operation) {\n var transformedOperation = {\n variables: operation.variables || {},\n extensions: operation.extensions || {},\n operationName: operation.operationName,\n query: operation.query,\n };\n // Best guess at an operation name\n if (!transformedOperation.operationName) {\n transformedOperation.operationName =\n typeof transformedOperation.query !== \"string\" ?\n getOperationName(transformedOperation.query) || undefined\n : \"\";\n }\n return transformedOperation;\n}\n","import { __assign } from \"tslib\";\nimport { visit } from \"graphql\";\nexport function filterOperationVariables(variables, query) {\n var result = __assign({}, variables);\n var unusedNames = new Set(Object.keys(variables));\n visit(query, {\n Variable: function (node, _key, parent) {\n // A variable type definition at the top level of a query is not\n // enough to silence server-side errors about the variable being\n // unused, so variable definitions do not count as usage.\n // https://spec.graphql.org/draft/#sec-All-Variables-Used\n if (parent &&\n parent.kind !== \"VariableDefinition\") {\n unusedNames.delete(node.name.value);\n }\n },\n });\n unusedNames.forEach(function (name) {\n delete result[name];\n });\n return result;\n}\n","import \"../../utilities/globals/index.js\";\nexport { fromError } from \"./fromError.js\";\nexport { toPromise } from \"./toPromise.js\";\nexport { fromPromise } from \"./fromPromise.js\";\nexport { throwServerError } from \"./throwServerError.js\";\nexport { validateOperation } from \"./validateOperation.js\";\nexport { createOperation } from \"./createOperation.js\";\nexport { transformOperation } from \"./transformOperation.js\";\nexport { filterOperationVariables } from \"./filterOperationVariables.js\";\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getParsedType = exports.ZodParsedType = exports.objectUtil = exports.util = void 0;\nvar util;\n(function (util) {\n util.assertEqual = (val) => val;\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array\n .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n .join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util = exports.util || (exports.util = {}));\nvar objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil = exports.objectUtil || (exports.objectUtil = {}));\nexports.ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nconst getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return exports.ZodParsedType.undefined;\n case \"string\":\n return exports.ZodParsedType.string;\n case \"number\":\n return isNaN(data) ? exports.ZodParsedType.nan : exports.ZodParsedType.number;\n case \"boolean\":\n return exports.ZodParsedType.boolean;\n case \"function\":\n return exports.ZodParsedType.function;\n case \"bigint\":\n return exports.ZodParsedType.bigint;\n case \"symbol\":\n return exports.ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return exports.ZodParsedType.array;\n }\n if (data === null) {\n return exports.ZodParsedType.null;\n }\n if (data.then &&\n typeof data.then === \"function\" &&\n data.catch &&\n typeof data.catch === \"function\") {\n return exports.ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return exports.ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return exports.ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return exports.ZodParsedType.date;\n }\n return exports.ZodParsedType.object;\n default:\n return exports.ZodParsedType.unknown;\n }\n};\nexports.getParsedType = getParsedType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ZodError = exports.quotelessJson = exports.ZodIssueCode = void 0;\nconst util_1 = require(\"./helpers/util\");\nexports.ZodIssueCode = util_1.util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nexports.quotelessJson = quotelessJson;\nclass ZodError extends Error {\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n get errors() {\n return this.issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util_1.util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nexports.ZodError = ZodError;\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../helpers/util\");\nconst ZodError_1 = require(\"../ZodError\");\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodError_1.ZodIssueCode.invalid_type:\n if (issue.received === util_1.ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodError_1.ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util_1.util.jsonStringifyReplacer)}`;\n break;\n case ZodError_1.ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util_1.util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodError_1.ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodError_1.ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util_1.util.joinValues(issue.options)}`;\n break;\n case ZodError_1.ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util_1.util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodError_1.ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodError_1.ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodError_1.ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodError_1.ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util_1.util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodError_1.ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodError_1.ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `smaller than or equal to`\n : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodError_1.ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodError_1.ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodError_1.ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodError_1.ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util_1.util.assertNever(issue);\n }\n return { message };\n};\nexports.default = errorMap;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getErrorMap = exports.setErrorMap = exports.defaultErrorMap = void 0;\nconst en_1 = __importDefault(require(\"./locales/en\"));\nexports.defaultErrorMap = en_1.default;\nlet overrideErrorMap = en_1.default;\nfunction setErrorMap(map) {\n overrideErrorMap = map;\n}\nexports.setErrorMap = setErrorMap;\nfunction getErrorMap() {\n return overrideErrorMap;\n}\nexports.getErrorMap = getErrorMap;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.addIssueToContext = exports.EMPTY_PATH = exports.makeIssue = void 0;\nconst errors_1 = require(\"../errors\");\nconst en_1 = __importDefault(require(\"../locales/en\"));\nconst makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n if (issueData.message !== undefined) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message,\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage,\n };\n};\nexports.makeIssue = makeIssue;\nexports.EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n const overrideMap = (0, errors_1.getErrorMap)();\n const issue = (0, exports.makeIssue)({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n overrideMap,\n overrideMap === en_1.default ? undefined : en_1.default, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nexports.addIssueToContext = addIssueToContext;\nclass ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return exports.INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return exports.INVALID;\n if (value.status === \"aborted\")\n return exports.INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" &&\n (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nexports.ParseStatus = ParseStatus;\nexports.INVALID = Object.freeze({\n status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nexports.DIRTY = DIRTY;\nconst OK = (value) => ({ status: \"valid\", value });\nexports.OK = OK;\nconst isAborted = (x) => x.status === \"aborted\";\nexports.isAborted = isAborted;\nconst isDirty = (x) => x.status === \"dirty\";\nexports.isDirty = isDirty;\nconst isValid = (x) => x.status === \"valid\";\nexports.isValid = isValid;\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\nexports.isAsync = isAsync;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.errorUtil = void 0;\nvar errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil = exports.errorUtil || (exports.errorUtil = {}));\n","\"use strict\";\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _ZodEnum_cache, _ZodNativeEnum_cache;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.boolean = exports.bigint = exports.array = exports.any = exports.coerce = exports.ZodFirstPartyTypeKind = exports.late = exports.ZodSchema = exports.Schema = exports.custom = exports.ZodReadonly = exports.ZodPipeline = exports.ZodBranded = exports.BRAND = exports.ZodNaN = exports.ZodCatch = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = exports.ZodTransformer = exports.ZodEffects = exports.ZodPromise = exports.ZodNativeEnum = exports.ZodEnum = exports.ZodLiteral = exports.ZodLazy = exports.ZodFunction = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodDate = exports.ZodBoolean = exports.ZodBigInt = exports.ZodNumber = exports.ZodString = exports.datetimeRegex = exports.ZodType = void 0;\nexports.NEVER = exports.void = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.symbol = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.pipeline = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports.null = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports.instanceof = exports.function = exports.enum = exports.effect = exports.discriminatedUnion = exports.date = void 0;\nconst errors_1 = require(\"./errors\");\nconst errorUtil_1 = require(\"./helpers/errorUtil\");\nconst parseUtil_1 = require(\"./helpers/parseUtil\");\nconst util_1 = require(\"./helpers/util\");\nconst ZodError_1 = require(\"./ZodError\");\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (this._key instanceof Array) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if ((0, parseUtil_1.isValid)(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError_1.ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n var _a, _b;\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message !== null && message !== void 0 ? message : ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nclass ZodType {\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n }\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return (0, util_1.getParsedType)(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new parseUtil_1.ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if ((0, parseUtil_1.isAsync)(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n var _a;\n const ctx = {\n common: {\n issues: [],\n async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_1.getParsedType)(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n async: true,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_1.getParsedType)(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await ((0, parseUtil_1.isAsync)(maybeAsyncResult)\n ? maybeAsyncResult\n : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodError_1.ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\"\n ? refinementData(val, ctx)\n : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this, this._def);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nexports.ZodType = ZodType;\nexports.Schema = ZodType;\nexports.ZodSchema = ZodType;\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[0-9a-z]+$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;\n// const uuidRegex =\n// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\nconst nanoidRegex = /^[a-z0-9_-]{21}$/i;\nconst durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n// /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n// /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n// /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n// /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nlet emojiRegex;\n// faster, simpler, safer\nconst ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nconst ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nconst base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n// simple\n// const dateRegexSource = `\\\\d{4}-\\\\d{2}-\\\\d{2}`;\n// no leap year validation\n// const dateRegexSource = `\\\\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\\\\d|2\\\\d))`;\n// with leap year validation\nconst dateRegexSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateRegex = new RegExp(`^${dateRegexSource}$`);\nfunction timeRegexSource(args) {\n // let regex = `\\\\d{2}:\\\\d{2}:\\\\d{2}`;\n let regex = `([01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d`;\n if (args.precision) {\n regex = `${regex}\\\\.\\\\d{${args.precision}}`;\n }\n else if (args.precision == null) {\n regex = `${regex}(\\\\.\\\\d+)?`;\n }\n return regex;\n}\nfunction timeRegex(args) {\n return new RegExp(`^${timeRegexSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nfunction datetimeRegex(args) {\n let regex = `${dateRegexSource}T${timeRegexSource(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n}\nexports.datetimeRegex = datetimeRegex;\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nclass ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.string,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const status = new parseUtil_1.ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"email\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"emoji\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"uuid\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"nanoid\") {\n if (!nanoidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"nanoid\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"cuid\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"cuid2\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"ulid\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch (_a) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"url\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"regex\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"date\") {\n const regex = dateRegex;\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"time\") {\n const regex = timeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"duration\") {\n if (!durationRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"duration\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"ip\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"base64\") {\n if (!base64Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"base64\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodError_1.ZodIssueCode.invalid_string,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil_1.errorUtil.errToObj(options) });\n }\n datetime(options) {\n var _a, _b;\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,\n ...errorUtil_1.errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n ...errorUtil_1.errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options === null || options === void 0 ? void 0 : options.position,\n ...errorUtil_1.errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n /**\n * @deprecated Use z.string().min(1) instead.\n * @see {@link ZodString.min}\n */\n nonempty(message) {\n return this.min(1, errorUtil_1.errorUtil.errToObj(message));\n }\n trim() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n }\n toLowerCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n }\n toUpperCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nexports.ZodString = ZodString;\nZodString.create = (params) => {\n var _a;\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.number,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n let ctx = undefined;\n const status = new parseUtil_1.ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util_1.util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil_1.errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil_1.errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil_1.errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil_1.errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_1.errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil_1.errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n (ch.kind === \"multipleOf\" && util_1.util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null, min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" ||\n ch.kind === \"int\" ||\n ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nexports.ZodNumber = ZodNumber;\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = BigInt(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.bigint) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n let ctx = undefined;\n const status = new parseUtil_1.ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil_1.errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil_1.errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil_1.errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil_1.errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_1.errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nexports.ZodBigInt = ZodBigInt;\nZodBigInt.create = (params) => {\n var _a;\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\nclass ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodBoolean = ZodBoolean;\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.date,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n if (isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_date,\n });\n return parseUtil_1.INVALID;\n }\n const status = new parseUtil_1.ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util_1.util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nexports.ZodDate = ZodDate;\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nclass ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodSymbol = ZodSymbol;\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nclass ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodUndefined = ZodUndefined;\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nclass ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.null,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodNull = ZodNull;\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nclass ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodAny = ZodAny;\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nclass ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodUnknown = ZodUnknown;\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nclass ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.never,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n}\nexports.ZodNever = ZodNever;\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nclass ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.void,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodVoid = ZodVoid;\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nclass ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== util_1.ZodParsedType.array) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.array,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: tooBig ? ZodError_1.ZodIssueCode.too_big : ZodError_1.ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return parseUtil_1.ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return parseUtil_1.ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nexports.ZodArray = ZodArray;\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nclass ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util_1.util.objectKeys(shape);\n return (this._cached = { shape, keys });\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.object,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever &&\n this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") {\n }\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return parseUtil_1.ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return parseUtil_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil_1.errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n var _a, _b, _c, _d;\n const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: (_d = errorUtil_1.errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n util_1.util.objectKeys(mask).forEach((key) => {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n util_1.util.objectKeys(this.shape).forEach((key) => {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n util_1.util.objectKeys(this.shape).forEach((key) => {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n util_1.util.objectKeys(this.shape).forEach((key) => {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util_1.util.objectKeys(this.shape));\n }\n}\nexports.ZodObject = ZodObject;\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nclass ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError_1.ZodError(result.ctx.common.issues));\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_union,\n unionErrors,\n });\n return parseUtil_1.INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError_1.ZodError(issues));\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_union,\n unionErrors,\n });\n return parseUtil_1.INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nexports.ZodUnion = ZodUnion;\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return util_1.util.objectValues(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else if (type instanceof ZodOptional) {\n return [undefined, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodNullable) {\n return [null, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodBranded) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodReadonly) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodCatch) {\n return getDiscriminator(type._def.innerType);\n }\n else {\n return [];\n }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.object) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.object,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return parseUtil_1.INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nexports.ZodDiscriminatedUnion = ZodDiscriminatedUnion;\nfunction mergeValues(a, b) {\n const aType = (0, util_1.getParsedType)(a);\n const bType = (0, util_1.getParsedType)(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === util_1.ZodParsedType.object && bType === util_1.ZodParsedType.object) {\n const bKeys = util_1.util.objectKeys(b);\n const sharedKeys = util_1.util\n .objectKeys(a)\n .filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === util_1.ZodParsedType.array && bType === util_1.ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === util_1.ZodParsedType.date &&\n bType === util_1.ZodParsedType.date &&\n +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nclass ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if ((0, parseUtil_1.isAborted)(parsedLeft) || (0, parseUtil_1.isAborted)(parsedRight)) {\n return parseUtil_1.INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_intersection_types,\n });\n return parseUtil_1.INVALID;\n }\n if ((0, parseUtil_1.isDirty)(parsedLeft) || (0, parseUtil_1.isDirty)(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nexports.ZodIntersection = ZodIntersection;\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\nclass ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.array) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.array,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return parseUtil_1.INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return parseUtil_1.ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return parseUtil_1.ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nexports.ZodTuple = ZodTuple;\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nclass ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.object) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.object,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (ctx.common.async) {\n return parseUtil_1.ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return parseUtil_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nexports.ZodRecord = ZodRecord;\nclass ZodMap extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.map) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.map,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nexports.ZodMap = ZodMap;\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nclass ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.set) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.set,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nexports.ZodSet = ZodSet;\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nclass ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.function) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.function,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n function makeArgsIssue(args, error) {\n return (0, parseUtil_1.makeIssue)({\n data: args,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n (0, errors_1.getErrorMap)(),\n errors_1.defaultErrorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodError_1.ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return (0, parseUtil_1.makeIssue)({\n data: returns,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n (0, errors_1.getErrorMap)(),\n errors_1.defaultErrorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodError_1.ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return (0, parseUtil_1.OK)(async function (...args) {\n const error = new ZodError_1.ZodError([]);\n const parsedArgs = await me._def.args\n .parseAsync(args, params)\n .catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return (0, parseUtil_1.OK)(function (...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError_1.ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError_1.ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args\n ? args\n : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nexports.ZodFunction = ZodFunction;\nclass ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nexports.ZodLazy = ZodLazy;\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nclass ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_1.ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return parseUtil_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nexports.ZodLiteral = ZodLiteral;\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nclass ZodEnum extends ZodType {\n constructor() {\n super(...arguments);\n _ZodEnum_cache.set(this, void 0);\n }\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_1.addIssueToContext)(ctx, {\n expected: util_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_1.ZodIssueCode.invalid_type,\n });\n return parseUtil_1.INVALID;\n }\n if (!__classPrivateFieldGet(this, _ZodEnum_cache, \"f\")) {\n __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), \"f\");\n }\n if (!__classPrivateFieldGet(this, _ZodEnum_cache, \"f\").has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return ZodEnum.create(values, {\n ...this._def,\n ...newDef,\n });\n }\n exclude(values, newDef = this._def) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef,\n });\n }\n}\nexports.ZodEnum = ZodEnum;\n_ZodEnum_cache = new WeakMap();\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n constructor() {\n super(...arguments);\n _ZodNativeEnum_cache.set(this, void 0);\n }\n _parse(input) {\n const nativeEnumValues = util_1.util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== util_1.ZodParsedType.string &&\n ctx.parsedType !== util_1.ZodParsedType.number) {\n const expectedValues = util_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n expected: util_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_1.ZodIssueCode.invalid_type,\n });\n return parseUtil_1.INVALID;\n }\n if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, \"f\")) {\n __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util_1.util.getValidEnumValues(this._def.values)), \"f\");\n }\n if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, \"f\").has(input.data)) {\n const expectedValues = util_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\nexports.ZodNativeEnum = ZodNativeEnum;\n_ZodNativeEnum_cache = new WeakMap();\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nclass ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.promise &&\n ctx.common.async === false) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const promisified = ctx.parsedType === util_1.ZodParsedType.promise\n ? ctx.data\n : Promise.resolve(ctx.data);\n return (0, parseUtil_1.OK)(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nexports.ZodPromise = ZodPromise;\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nclass ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n (0, parseUtil_1.addIssueToContext)(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed) => {\n if (status.value === \"aborted\")\n return parseUtil_1.INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_1.DIRTY)(result.value);\n return result;\n });\n }\n else {\n if (status.value === \"aborted\")\n return parseUtil_1.INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_1.DIRTY)(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((inner) => {\n if (inner.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!(0, parseUtil_1.isValid)(base))\n return base;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((base) => {\n if (!(0, parseUtil_1.isValid)(base))\n return base;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n });\n }\n }\n util_1.util.assertNever(effect);\n }\n}\nexports.ZodEffects = ZodEffects;\nexports.ZodTransformer = ZodEffects;\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nclass ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_1.ZodParsedType.undefined) {\n return (0, parseUtil_1.OK)(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nexports.ZodOptional = ZodOptional;\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nclass ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_1.ZodParsedType.null) {\n return (0, parseUtil_1.OK)(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nexports.ZodNullable = ZodNullable;\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nclass ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === util_1.ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nexports.ZodDefault = ZodDefault;\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\"\n ? params.default\n : () => params.default,\n ...processCreateParams(params),\n });\n};\nclass ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if ((0, parseUtil_1.isAsync)(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nexports.ZodCatch = ZodCatch;\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nclass ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nexports.ZodNaN = ZodNaN;\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nexports.BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nexports.ZodBranded = ZodBranded;\nclass ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return (0, parseUtil_1.DIRTY)(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nexports.ZodPipeline = ZodPipeline;\nclass ZodReadonly extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if ((0, parseUtil_1.isValid)(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return (0, parseUtil_1.isAsync)(result)\n ? result.then((data) => freeze(data))\n : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nexports.ZodReadonly = ZodReadonly;\nZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params),\n });\n};\nfunction custom(check, params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n var _a, _b;\n if (!check(data)) {\n const p = typeof params === \"function\"\n ? params(data)\n : typeof params === \"string\"\n ? { message: params }\n : params;\n const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n ctx.addIssue({ code: \"custom\", ...p2, fatal: _fatal });\n }\n });\n return ZodAny.create();\n}\nexports.custom = custom;\nexports.late = {\n object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind = exports.ZodFirstPartyTypeKind || (exports.ZodFirstPartyTypeKind = {}));\n// requires TS 4.4+\nclass Class {\n constructor(..._) { }\n}\nconst instanceOfType = (\n// const instanceOfType = any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nexports.instanceof = instanceOfType;\nconst stringType = ZodString.create;\nexports.string = stringType;\nconst numberType = ZodNumber.create;\nexports.number = numberType;\nconst nanType = ZodNaN.create;\nexports.nan = nanType;\nconst bigIntType = ZodBigInt.create;\nexports.bigint = bigIntType;\nconst booleanType = ZodBoolean.create;\nexports.boolean = booleanType;\nconst dateType = ZodDate.create;\nexports.date = dateType;\nconst symbolType = ZodSymbol.create;\nexports.symbol = symbolType;\nconst undefinedType = ZodUndefined.create;\nexports.undefined = undefinedType;\nconst nullType = ZodNull.create;\nexports.null = nullType;\nconst anyType = ZodAny.create;\nexports.any = anyType;\nconst unknownType = ZodUnknown.create;\nexports.unknown = unknownType;\nconst neverType = ZodNever.create;\nexports.never = neverType;\nconst voidType = ZodVoid.create;\nexports.void = voidType;\nconst arrayType = ZodArray.create;\nexports.array = arrayType;\nconst objectType = ZodObject.create;\nexports.object = objectType;\nconst strictObjectType = ZodObject.strictCreate;\nexports.strictObject = strictObjectType;\nconst unionType = ZodUnion.create;\nexports.union = unionType;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nexports.discriminatedUnion = discriminatedUnionType;\nconst intersectionType = ZodIntersection.create;\nexports.intersection = intersectionType;\nconst tupleType = ZodTuple.create;\nexports.tuple = tupleType;\nconst recordType = ZodRecord.create;\nexports.record = recordType;\nconst mapType = ZodMap.create;\nexports.map = mapType;\nconst setType = ZodSet.create;\nexports.set = setType;\nconst functionType = ZodFunction.create;\nexports.function = functionType;\nconst lazyType = ZodLazy.create;\nexports.lazy = lazyType;\nconst literalType = ZodLiteral.create;\nexports.literal = literalType;\nconst enumType = ZodEnum.create;\nexports.enum = enumType;\nconst nativeEnumType = ZodNativeEnum.create;\nexports.nativeEnum = nativeEnumType;\nconst promiseType = ZodPromise.create;\nexports.promise = promiseType;\nconst effectsType = ZodEffects.create;\nexports.effect = effectsType;\nexports.transformer = effectsType;\nconst optionalType = ZodOptional.create;\nexports.optional = optionalType;\nconst nullableType = ZodNullable.create;\nexports.nullable = nullableType;\nconst preprocessType = ZodEffects.createWithPreprocess;\nexports.preprocess = preprocessType;\nconst pipelineType = ZodPipeline.create;\nexports.pipeline = pipelineType;\nconst ostring = () => stringType().optional();\nexports.ostring = ostring;\nconst onumber = () => numberType().optional();\nexports.onumber = onumber;\nconst oboolean = () => booleanType().optional();\nexports.oboolean = oboolean;\nexports.coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nexports.NEVER = parseUtil_1.INVALID;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./errors\"), exports);\n__exportStar(require(\"./helpers/parseUtil\"), exports);\n__exportStar(require(\"./helpers/typeAliases\"), exports);\n__exportStar(require(\"./helpers/util\"), exports);\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./ZodError\"), exports);\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.z = void 0;\nconst z = __importStar(require(\"./external\"));\nexports.z = z;\n__exportStar(require(\"./external\"), exports);\nexports.default = z;\n","\"use strict\";\n/* eslint-disable no-console -- @shure/api-logger does not yet work in web context */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.requestMessagePort = exports.electronApiKey = exports.WindowPortResponse = exports.requestPortResponseChannel = void 0;\nconst z = __importStar(require(\"zod\"));\nexports.requestPortResponseChannel = '@shure/application-apollo-link:port-to-main-process';\nexports.WindowPortResponse = z.object({\n type: z.literal(exports.requestPortResponseChannel),\n requestId: z.number()\n});\nexports.electronApiKey = '@shure/application-apollo-link';\nlet portRequestId = 0;\nasync function requestMessagePort(serviceName) {\n if (window[exports.electronApiKey] === undefined) {\n throw new Error(`Required API ${exports.electronApiKey} has not been exposed via the preload script. Call installPreloadIpc from @shure/application-apollo-link-web`);\n }\n const requestId = ++portRequestId;\n const portPromise = new Promise((resolve, reject) => {\n function processMessage(event) {\n if (event.source !== window) {\n return;\n }\n const parsed = exports.WindowPortResponse.safeParse(event.data);\n if (!parsed.success || parsed.data.requestId !== requestId) {\n return;\n }\n window.removeEventListener('message', processMessage);\n if (event.ports.length !== 1) {\n reject(new Error('Response does not contain message port'));\n return;\n }\n resolve(event.ports[0]);\n }\n window.addEventListener('message', processMessage);\n });\n window[exports.electronApiKey].sendRequestPortToMainProcess(requestId, serviceName);\n const result = await portPromise;\n result.start();\n return result;\n}\nexports.requestMessagePort = requestMessagePort;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar globals = require('../../utilities/globals');\nvar utilities = require('../../utilities');\nvar utils = require('../utils');\n\nfunction passthrough(op, forward) {\n return (forward ? forward(op) : utilities.Observable.of());\n}\nfunction toLink(handler) {\n return typeof handler === \"function\" ? new ApolloLink(handler) : handler;\n}\nfunction isTerminating(link) {\n return link.request.length <= 1;\n}\nvar ApolloLink = (function () {\n function ApolloLink(request) {\n if (request)\n this.request = request;\n }\n ApolloLink.empty = function () {\n return new ApolloLink(function () { return utilities.Observable.of(); });\n };\n ApolloLink.from = function (links) {\n if (links.length === 0)\n return ApolloLink.empty();\n return links.map(toLink).reduce(function (x, y) { return x.concat(y); });\n };\n ApolloLink.split = function (test, left, right) {\n var leftLink = toLink(left);\n var rightLink = toLink(right || new ApolloLink(passthrough));\n if (isTerminating(leftLink) && isTerminating(rightLink)) {\n return new ApolloLink(function (operation) {\n return test(operation) ?\n leftLink.request(operation) || utilities.Observable.of()\n : rightLink.request(operation) || utilities.Observable.of();\n });\n }\n else {\n return new ApolloLink(function (operation, forward) {\n return test(operation) ?\n leftLink.request(operation, forward) || utilities.Observable.of()\n : rightLink.request(operation, forward) || utilities.Observable.of();\n });\n }\n };\n ApolloLink.execute = function (link, operation) {\n return (link.request(utils.createOperation(operation.context, utils.transformOperation(utils.validateOperation(operation)))) || utilities.Observable.of());\n };\n ApolloLink.concat = function (first, second) {\n var firstLink = toLink(first);\n if (isTerminating(firstLink)) {\n globalThis.__DEV__ !== false && globals.invariant.warn(35, firstLink);\n return firstLink;\n }\n var nextLink = toLink(second);\n if (isTerminating(nextLink)) {\n return new ApolloLink(function (operation) {\n return firstLink.request(operation, function (op) { return nextLink.request(op) || utilities.Observable.of(); }) || utilities.Observable.of();\n });\n }\n else {\n return new ApolloLink(function (operation, forward) {\n return (firstLink.request(operation, function (op) {\n return nextLink.request(op, forward) || utilities.Observable.of();\n }) || utilities.Observable.of());\n });\n }\n };\n ApolloLink.prototype.split = function (test, left, right) {\n return this.concat(ApolloLink.split(test, left, right || new ApolloLink(passthrough)));\n };\n ApolloLink.prototype.concat = function (next) {\n return ApolloLink.concat(this, next);\n };\n ApolloLink.prototype.request = function (operation, forward) {\n throw globals.newInvariantError(36);\n };\n ApolloLink.prototype.onError = function (error, observer) {\n if (observer && observer.error) {\n observer.error(error);\n return false;\n }\n throw error;\n };\n ApolloLink.prototype.setOnError = function (fn) {\n this.onError = fn;\n return this;\n };\n return ApolloLink;\n}());\n\nvar empty = ApolloLink.empty;\n\nvar from = ApolloLink.from;\n\nvar split = ApolloLink.split;\n\nvar concat = ApolloLink.concat;\n\nvar execute = ApolloLink.execute;\n\nexports.ApolloLink = ApolloLink;\nexports.concat = concat;\nexports.empty = empty;\nexports.execute = execute;\nexports.from = from;\nexports.split = split;\n\n","\"use strict\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @typedef {import('@apollo/client/link/core/ApolloLink').ApolloLink} ApolloLink\n */\n/**\n * @typedef {import('@apollo/client/link/core/types').Operation} Operation\n */\n/**\n * @typedef {import('@apollo/client/link/core/types').FetchResult} FetchResult\n */\n/** @type {typeof import('@apollo/client/link/core/ApolloLink').ApolloLink} */\nmodule.exports.ApolloLink = require('@apollo/client/link/core/core.cjs').ApolloLink;\n","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n// === Symbol Support ===\nvar hasSymbols = function () {\n return typeof Symbol === 'function';\n};\n\nvar hasSymbol = function (name) {\n return hasSymbols() && Boolean(Symbol[name]);\n};\n\nvar getSymbol = function (name) {\n return hasSymbol(name) ? Symbol[name] : '@@' + name;\n};\n\nif (hasSymbols() && !hasSymbol('observable')) {\n Symbol.observable = Symbol('observable');\n}\n\nvar SymbolIterator = getSymbol('iterator');\nvar SymbolObservable = getSymbol('observable');\nvar SymbolSpecies = getSymbol('species'); // === Abstract Operations ===\n\nfunction getMethod(obj, key) {\n var value = obj[key];\n if (value == null) return undefined;\n if (typeof value !== 'function') throw new TypeError(value + ' is not a function');\n return value;\n}\n\nfunction getSpecies(obj) {\n var ctor = obj.constructor;\n\n if (ctor !== undefined) {\n ctor = ctor[SymbolSpecies];\n\n if (ctor === null) {\n ctor = undefined;\n }\n }\n\n return ctor !== undefined ? ctor : Observable;\n}\n\nfunction isObservable(x) {\n return x instanceof Observable; // SPEC: Brand check\n}\n\nfunction hostReportError(e) {\n if (hostReportError.log) {\n hostReportError.log(e);\n } else {\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nfunction enqueue(fn) {\n Promise.resolve().then(function () {\n try {\n fn();\n } catch (e) {\n hostReportError(e);\n }\n });\n}\n\nfunction cleanupSubscription(subscription) {\n var cleanup = subscription._cleanup;\n if (cleanup === undefined) return;\n subscription._cleanup = undefined;\n\n if (!cleanup) {\n return;\n }\n\n try {\n if (typeof cleanup === 'function') {\n cleanup();\n } else {\n var unsubscribe = getMethod(cleanup, 'unsubscribe');\n\n if (unsubscribe) {\n unsubscribe.call(cleanup);\n }\n }\n } catch (e) {\n hostReportError(e);\n }\n}\n\nfunction closeSubscription(subscription) {\n subscription._observer = undefined;\n subscription._queue = undefined;\n subscription._state = 'closed';\n}\n\nfunction flushSubscription(subscription) {\n var queue = subscription._queue;\n\n if (!queue) {\n return;\n }\n\n subscription._queue = undefined;\n subscription._state = 'ready';\n\n for (var i = 0; i < queue.length; ++i) {\n notifySubscription(subscription, queue[i].type, queue[i].value);\n if (subscription._state === 'closed') break;\n }\n}\n\nfunction notifySubscription(subscription, type, value) {\n subscription._state = 'running';\n var observer = subscription._observer;\n\n try {\n var m = getMethod(observer, type);\n\n switch (type) {\n case 'next':\n if (m) m.call(observer, value);\n break;\n\n case 'error':\n closeSubscription(subscription);\n if (m) m.call(observer, value);else throw value;\n break;\n\n case 'complete':\n closeSubscription(subscription);\n if (m) m.call(observer);\n break;\n }\n } catch (e) {\n hostReportError(e);\n }\n\n if (subscription._state === 'closed') cleanupSubscription(subscription);else if (subscription._state === 'running') subscription._state = 'ready';\n}\n\nfunction onNotify(subscription, type, value) {\n if (subscription._state === 'closed') return;\n\n if (subscription._state === 'buffering') {\n subscription._queue.push({\n type: type,\n value: value\n });\n\n return;\n }\n\n if (subscription._state !== 'ready') {\n subscription._state = 'buffering';\n subscription._queue = [{\n type: type,\n value: value\n }];\n enqueue(function () {\n return flushSubscription(subscription);\n });\n return;\n }\n\n notifySubscription(subscription, type, value);\n}\n\nvar Subscription = /*#__PURE__*/function () {\n function Subscription(observer, subscriber) {\n // ASSERT: observer is an object\n // ASSERT: subscriber is callable\n this._cleanup = undefined;\n this._observer = observer;\n this._queue = undefined;\n this._state = 'initializing';\n var subscriptionObserver = new SubscriptionObserver(this);\n\n try {\n this._cleanup = subscriber.call(undefined, subscriptionObserver);\n } catch (e) {\n subscriptionObserver.error(e);\n }\n\n if (this._state === 'initializing') this._state = 'ready';\n }\n\n var _proto = Subscription.prototype;\n\n _proto.unsubscribe = function unsubscribe() {\n if (this._state !== 'closed') {\n closeSubscription(this);\n cleanupSubscription(this);\n }\n };\n\n _createClass(Subscription, [{\n key: \"closed\",\n get: function () {\n return this._state === 'closed';\n }\n }]);\n\n return Subscription;\n}();\n\nvar SubscriptionObserver = /*#__PURE__*/function () {\n function SubscriptionObserver(subscription) {\n this._subscription = subscription;\n }\n\n var _proto2 = SubscriptionObserver.prototype;\n\n _proto2.next = function next(value) {\n onNotify(this._subscription, 'next', value);\n };\n\n _proto2.error = function error(value) {\n onNotify(this._subscription, 'error', value);\n };\n\n _proto2.complete = function complete() {\n onNotify(this._subscription, 'complete');\n };\n\n _createClass(SubscriptionObserver, [{\n key: \"closed\",\n get: function () {\n return this._subscription._state === 'closed';\n }\n }]);\n\n return SubscriptionObserver;\n}();\n\nvar Observable = /*#__PURE__*/function () {\n function Observable(subscriber) {\n if (!(this instanceof Observable)) throw new TypeError('Observable cannot be called as a function');\n if (typeof subscriber !== 'function') throw new TypeError('Observable initializer must be a function');\n this._subscriber = subscriber;\n }\n\n var _proto3 = Observable.prototype;\n\n _proto3.subscribe = function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n observer = {\n next: observer,\n error: arguments[1],\n complete: arguments[2]\n };\n }\n\n return new Subscription(observer, this._subscriber);\n };\n\n _proto3.forEach = function forEach(fn) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n if (typeof fn !== 'function') {\n reject(new TypeError(fn + ' is not a function'));\n return;\n }\n\n function done() {\n subscription.unsubscribe();\n resolve();\n }\n\n var subscription = _this.subscribe({\n next: function (value) {\n try {\n fn(value, done);\n } catch (e) {\n reject(e);\n subscription.unsubscribe();\n }\n },\n error: reject,\n complete: resolve\n });\n });\n };\n\n _proto3.map = function map(fn) {\n var _this2 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n return _this2.subscribe({\n next: function (value) {\n try {\n value = fn(value);\n } catch (e) {\n return observer.error(e);\n }\n\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n observer.complete();\n }\n });\n });\n };\n\n _proto3.filter = function filter(fn) {\n var _this3 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n return _this3.subscribe({\n next: function (value) {\n try {\n if (!fn(value)) return;\n } catch (e) {\n return observer.error(e);\n }\n\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n observer.complete();\n }\n });\n });\n };\n\n _proto3.reduce = function reduce(fn) {\n var _this4 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n var hasSeed = arguments.length > 1;\n var hasValue = false;\n var seed = arguments[1];\n var acc = seed;\n return new C(function (observer) {\n return _this4.subscribe({\n next: function (value) {\n var first = !hasValue;\n hasValue = true;\n\n if (!first || hasSeed) {\n try {\n acc = fn(acc, value);\n } catch (e) {\n return observer.error(e);\n }\n } else {\n acc = value;\n }\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n if (!hasValue && !hasSeed) return observer.error(new TypeError('Cannot reduce an empty sequence'));\n observer.next(acc);\n observer.complete();\n }\n });\n });\n };\n\n _proto3.concat = function concat() {\n var _this5 = this;\n\n for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\n sources[_key] = arguments[_key];\n }\n\n var C = getSpecies(this);\n return new C(function (observer) {\n var subscription;\n var index = 0;\n\n function startNext(next) {\n subscription = next.subscribe({\n next: function (v) {\n observer.next(v);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n if (index === sources.length) {\n subscription = undefined;\n observer.complete();\n } else {\n startNext(C.from(sources[index++]));\n }\n }\n });\n }\n\n startNext(_this5);\n return function () {\n if (subscription) {\n subscription.unsubscribe();\n subscription = undefined;\n }\n };\n });\n };\n\n _proto3.flatMap = function flatMap(fn) {\n var _this6 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n var subscriptions = [];\n\n var outer = _this6.subscribe({\n next: function (value) {\n if (fn) {\n try {\n value = fn(value);\n } catch (e) {\n return observer.error(e);\n }\n }\n\n var inner = C.from(value).subscribe({\n next: function (value) {\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n var i = subscriptions.indexOf(inner);\n if (i >= 0) subscriptions.splice(i, 1);\n completeIfDone();\n }\n });\n subscriptions.push(inner);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n completeIfDone();\n }\n });\n\n function completeIfDone() {\n if (outer.closed && subscriptions.length === 0) observer.complete();\n }\n\n return function () {\n subscriptions.forEach(function (s) {\n return s.unsubscribe();\n });\n outer.unsubscribe();\n };\n });\n };\n\n _proto3[SymbolObservable] = function () {\n return this;\n };\n\n Observable.from = function from(x) {\n var C = typeof this === 'function' ? this : Observable;\n if (x == null) throw new TypeError(x + ' is not an object');\n var method = getMethod(x, SymbolObservable);\n\n if (method) {\n var observable = method.call(x);\n if (Object(observable) !== observable) throw new TypeError(observable + ' is not an object');\n if (isObservable(observable) && observable.constructor === C) return observable;\n return new C(function (observer) {\n return observable.subscribe(observer);\n });\n }\n\n if (hasSymbol('iterator')) {\n method = getMethod(x, SymbolIterator);\n\n if (method) {\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var _iterator = _createForOfIteratorHelperLoose(method.call(x)), _step; !(_step = _iterator()).done;) {\n var item = _step.value;\n observer.next(item);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n }\n }\n\n if (Array.isArray(x)) {\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var i = 0; i < x.length; ++i) {\n observer.next(x[i]);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n }\n\n throw new TypeError(x + ' is not observable');\n };\n\n Observable.of = function of() {\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n\n var C = typeof this === 'function' ? this : Observable;\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var i = 0; i < items.length; ++i) {\n observer.next(items[i]);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n };\n\n _createClass(Observable, null, [{\n key: SymbolSpecies,\n get: function () {\n return this;\n }\n }]);\n\n return Observable;\n}();\n\nif (hasSymbols()) {\n Object.defineProperty(Observable, Symbol('extensions'), {\n value: {\n symbol: SymbolObservable,\n hostReportError: hostReportError\n },\n configurable: true\n });\n}\n\nexport { Observable };\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MessagePortLink = exports.GraphQlResponseMessage = exports.SerializedGraphQlError = exports.GraphQlRequestMessage = void 0;\nconst import_apollo_client_1 = require(\"./import-apollo-client\");\nconst zen_observable_ts_1 = require(\"zen-observable-ts\");\nconst graphql_1 = require(\"graphql\");\nconst z = __importStar(require(\"zod\"));\nconst assert_never_1 = require(\"assert-never\");\nexports.GraphQlRequestMessage = z\n .object({\n type: z.literal('execute'),\n id: z.number(),\n query: z.string(),\n variables: z.record(z.unknown()),\n operationName: z.string().optional()\n})\n .or(z.object({\n type: z.literal('cancel'),\n id: z.number()\n}));\nexports.SerializedGraphQlError = z.object({\n name: z.string(),\n message: z.string(),\n stack: z.string().optional(),\n locations: z\n .array(z.object({\n line: z.number(),\n column: z.number()\n }))\n .optional(),\n path: z.array(z.string().or(z.number())).optional(),\n positions: z.array(z.number()).optional(),\n extensions: z.record(z.string(), z.unknown())\n});\nexports.GraphQlResponseMessage = z\n .object({\n type: z.literal('result'),\n id: z.number(),\n data: z.record(z.unknown()).nullable(),\n errors: z.array(exports.SerializedGraphQlError).optional()\n})\n .or(z.object({\n type: z.literal('complete'),\n id: z.number()\n}));\nclass MessagePortLink extends import_apollo_client_1.ApolloLink {\n port;\n constructor(port) {\n super();\n this.port = port;\n this.port.addEventListener('message', message => {\n const parsed = exports.GraphQlResponseMessage.safeParse(message.data);\n if (!parsed.success) {\n // eslint-disable-next-line no-console -- @shure/api-logger does not yet work in web context\n console.error('Failed to parse response: ', parsed.error);\n return;\n }\n const observer = this.observers.get(parsed.data.id);\n if (observer === undefined) {\n return;\n }\n switch (parsed.data.type) {\n case 'result':\n {\n const errors = parsed.data.errors?.map(serialized => new graphql_1.GraphQLError(serialized.message, undefined, undefined, serialized.positions, serialized.path, undefined, serialized.extensions));\n observer.next?.({ data: parsed.data.data, errors });\n }\n break;\n case 'complete':\n this.observers.delete(parsed.data.id);\n observer.complete?.();\n break;\n default:\n (0, assert_never_1.assertNever)(parsed.data);\n }\n });\n }\n observers = new Map();\n observerId = 0;\n request(operation) {\n return new zen_observable_ts_1.Observable(observer => {\n const id = ++this.observerId;\n this.observers.set(id, observer);\n this.port.postMessage({\n type: 'execute',\n id,\n query: (0, graphql_1.print)(operation.query),\n variables: operation.variables,\n operationName: operation.operationName\n });\n return () => {\n if (this.observers.delete(id)) {\n this.port.postMessage({\n type: 'cancel',\n id\n });\n }\n };\n });\n }\n}\nexports.MessagePortLink = MessagePortLink;\n","const ARRAY_VALUE = 'value';\nconst ARRAY_ERROR = 'error';\nexport class AsyncSink {\n _ended;\n _values;\n _resolvers;\n constructor() {\n this._ended = false;\n this._values = [];\n this._resolvers = [];\n }\n [Symbol.asyncIterator]() {\n return this;\n }\n write(value) {\n this._push({ type: ARRAY_VALUE, value });\n }\n error(error) {\n this._push({ type: ARRAY_ERROR, error });\n }\n _push(item) {\n if (this._ended) {\n throw new Error('AsyncSink already ended');\n }\n if (this._resolvers.length > 0) {\n const { resolve, reject } = this._resolvers.shift();\n if (item.type === ARRAY_ERROR) {\n reject(item.error);\n }\n else {\n resolve({ done: false, value: item.value });\n }\n }\n else {\n this._values.push(item);\n }\n }\n next() {\n if (this._values.length > 0) {\n const { type, value, error } = this._values.shift();\n if (type === ARRAY_ERROR) {\n return Promise.reject(error);\n }\n else {\n return Promise.resolve({ done: false, value });\n }\n }\n if (this._ended) {\n return Promise.resolve({ done: true });\n }\n return new Promise((resolve, reject) => {\n this._resolvers.push({ resolve, reject });\n });\n }\n end() {\n while (this._resolvers.length > 0) {\n this._resolvers.shift().resolve({ done: true });\n }\n this._ended = true;\n }\n}\n\n\n","/**\n * @ignore\n */\nexport function bindCallback(func, thisArg, argCount) {\n if (typeof thisArg === 'undefined') {\n return func;\n }\n switch (argCount) {\n case 0:\n return function () {\n return func.call(thisArg);\n };\n case 1:\n return function (arg) {\n return func.call(thisArg, arg);\n };\n case 2:\n return function (value, index) {\n return func.call(thisArg, value, index);\n };\n case 3:\n return function (value, index, collection) {\n return func.call(thisArg, value, index, collection);\n };\n default:\n return function () {\n return func.apply(thisArg, arguments);\n };\n }\n}\n\n\n","/**\n * @ignore\n */\nexport function identity(x) {\n return x;\n}\n/**\n * @ignore\n */\nexport async function identityAsync(x) {\n return x;\n}\n\n\n","/* eslint-disable @typescript-eslint/ban-types */\n/** @ignore */\nconst isNumber = (x) => typeof x === 'number';\n/** @ignore */\nconst isBoolean = (x) => typeof x === 'boolean';\n/** @ignore */\nexport const isFunction = (x) => typeof x === 'function';\n/** @ignore */\nexport const isObject = (x) => x != null && Object(x) === x;\n/** @ignore */\nexport const isPromise = (x) => {\n return isObject(x) && isFunction(x.then);\n};\n/** @ignore */\nexport function isArrayLike(x) {\n return isObject(x) && isNumber(x['length']);\n}\n/** @ignore */\nexport function isIterable(x) {\n return x != null && isFunction(x[Symbol.iterator]);\n}\n/** @ignore */\nexport function isIterator(x) {\n return isObject(x) && !isFunction(x[Symbol.iterator]) && isFunction(x['next']);\n}\n/** @ignore */\nexport function isAsyncIterable(x) {\n return isObject(x) && isFunction(x[Symbol.asyncIterator]);\n}\n/** @ignore */\nexport function isObservable(x) {\n return x != null && Object(x) === x && typeof x['subscribe'] === 'function';\n}\n/** @ignore */\nexport const isReadableNodeStream = (x) => {\n return (isObject(x) &&\n isFunction(x['pipe']) &&\n isFunction(x['_read']) &&\n isBoolean(x['readable']) &&\n isObject(x['_readableState']));\n};\n/** @ignore */\nexport const isWritableNodeStream = (x) => {\n return (isObject(x) &&\n isFunction(x['end']) &&\n isFunction(x['_write']) &&\n isBoolean(x['writable']) &&\n isObject(x['_writableState']));\n};\n/** @ignore */\nexport const isReadableDOMStream = (x) => {\n return isObject(x) && isFunction(x['cancel']) && isFunction(x['getReader']);\n};\n/** @ignore */\nexport const isWritableDOMStream = (x) => {\n return isObject(x) && isFunction(x['abort']) && isFunction(x['getWriter']);\n};\n/** @ignore */\nexport const isFetchResponse = (x) => {\n return isObject(x) && isReadableDOMStream(x['body']);\n};\n\n\n","/**\n * @ignore\n */\nexport function toInteger(value) {\n const number = Number(value);\n if (isNaN(number)) {\n return 0;\n }\n if (number === 0 || !isFinite(number)) {\n return number;\n }\n return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n}\n\n\n","import { toInteger } from './tointeger';\nconst maxSafeInteger = Math.pow(2, 53) - 1;\n/**\n * @ignore\n */\nexport function toLength(value) {\n const len = toInteger(value);\n return Math.min(Math.max(len, 0), maxSafeInteger);\n}\n\n\n","import { isObject } from './util/isiterable';\nexport class AbortError extends Error {\n constructor(message = 'The operation has been aborted') {\n super(message);\n Object.setPrototypeOf(this, AbortError.prototype);\n Error.captureStackTrace(this, this.constructor);\n this.name = 'AbortError';\n }\n get [Symbol.toStringTag]() {\n return 'AbortError';\n }\n}\nexport function throwIfAborted(signal) {\n if (signal && signal.aborted) {\n throw new AbortError();\n }\n}\nObject.defineProperty(AbortError, Symbol.hasInstance, {\n writable: true,\n configurable: true,\n value(x) {\n return (isObject(x) && (x.constructor.name === 'AbortError' || x[Symbol.toStringTag] === 'AbortError'));\n },\n});\n\n\n","import { bindCallback } from '../util/bindcallback';\nimport { identityAsync } from '../util/identity';\nimport { isReadableNodeStream, isWritableNodeStream, isIterable, isAsyncIterable, isArrayLike, isIterator, isPromise, isObservable, } from '../util/isiterable';\nimport { toLength } from '../util/tolength';\nimport { AbortError, throwIfAborted } from '../aborterror';\n/**\n * This class serves as the base for all operations which support [Symbol.asyncIterator].\n */\nexport class AsyncIterableX {\n /** @nocollapse */\n async forEach(projection, thisArg, signal) {\n const source = signal ? new WithAbortAsyncIterable(this, signal) : this;\n let i = 0;\n for await (const item of source) {\n await projection.call(thisArg, item, i++, signal);\n }\n }\n pipe(...args) {\n let i = -1;\n const n = args.length;\n let acc = this;\n while (++i < n) {\n acc = args[i](AsyncIterableX.as(acc));\n }\n return acc;\n }\n /** @nocollapse */\n static from(source, selector = identityAsync, thisArg) {\n const fn = bindCallback(selector, thisArg, 2);\n if (isIterable(source) || isAsyncIterable(source)) {\n return new FromAsyncIterable(source, fn);\n }\n if (isPromise(source)) {\n return new FromPromiseIterable(source, fn);\n }\n if (isObservable(source)) {\n return new FromObservableAsyncIterable(source, fn);\n }\n if (isArrayLike(source)) {\n return new FromArrayIterable(source, fn);\n }\n if (isIterator(source)) {\n return new FromAsyncIterable({ [Symbol.asyncIterator]: () => source }, fn);\n }\n throw new TypeError('Input type not supported');\n }\n /**\n * Converts the input into an async-iterable sequence.\n *\n * @param {*} source The source to convert to an async-iterable sequence.\n * @returns {AsyncIterableX<*>} An async-iterable containing the input.\n */\n /** @nocollapse */\n static as(source) {\n if (source instanceof AsyncIterableX) {\n return source;\n }\n if (typeof source === 'string') {\n return new FromArrayIterable([source], identityAsync);\n }\n if (isIterable(source) || isAsyncIterable(source)) {\n return new FromAsyncIterable(source, identityAsync);\n }\n if (isPromise(source)) {\n return new FromPromiseIterable(source, identityAsync);\n }\n if (isObservable(source)) {\n return new FromObservableAsyncIterable(source, identityAsync);\n }\n if (isArrayLike(source)) {\n return new FromArrayIterable(source, identityAsync);\n }\n return new FromArrayIterable([source], identityAsync);\n }\n}\nAsyncIterableX.prototype[Symbol.toStringTag] = 'AsyncIterableX';\nObject.defineProperty(AsyncIterableX, Symbol.hasInstance, {\n writable: true,\n configurable: true,\n value(inst) {\n return !!(inst && inst[Symbol.toStringTag] === 'AsyncIterableX');\n },\n});\nconst ARRAY_VALUE = 'value';\nconst ARRAY_ERROR = 'error';\nexport class AsyncSink {\n _ended;\n _values;\n _resolvers;\n constructor() {\n this._ended = false;\n this._values = [];\n this._resolvers = [];\n }\n [Symbol.asyncIterator]() {\n return this;\n }\n write(value) {\n this._push({ type: ARRAY_VALUE, value });\n }\n error(error) {\n this._push({ type: ARRAY_ERROR, error });\n }\n _push(item) {\n if (this._ended) {\n throw new Error('AsyncSink already ended');\n }\n if (this._resolvers.length > 0) {\n const { resolve, reject } = this._resolvers.shift();\n if (item.type === ARRAY_ERROR) {\n reject(item.error);\n }\n else {\n resolve({ done: false, value: item.value });\n }\n }\n else {\n this._values.push(item);\n }\n }\n next() {\n if (this._values.length > 0) {\n const { type, value, error } = this._values.shift();\n if (type === ARRAY_ERROR) {\n return Promise.reject(error);\n }\n else {\n return Promise.resolve({ done: false, value });\n }\n }\n if (this._ended) {\n return Promise.resolve({ done: true });\n }\n return new Promise((resolve, reject) => {\n this._resolvers.push({ resolve, reject });\n });\n }\n end() {\n while (this._resolvers.length > 0) {\n this._resolvers.shift().resolve({ done: true });\n }\n this._ended = true;\n }\n}\nexport class FromArrayIterable extends AsyncIterableX {\n _source;\n _selector;\n constructor(source, selector) {\n super();\n this._source = source;\n this._selector = selector;\n }\n async *[Symbol.asyncIterator]() {\n let i = 0;\n const length = toLength(this._source.length);\n while (i < length) {\n yield await this._selector(this._source[i], i++);\n }\n }\n}\nexport class FromAsyncIterable extends AsyncIterableX {\n _source;\n _selector;\n constructor(source, selector) {\n super();\n this._source = source;\n this._selector = selector;\n }\n async *[Symbol.asyncIterator](signal) {\r\n throwIfAborted(signal);\r\n let i = 0;\n let iterator;\r\n if (isAsyncIterable(this._source)) {\r\n iterator =\r\n signal !== undefined ? new WithAbortAsyncIterable(this._source, signal) : this._source;\r\n }\r\n else {\r\n iterator = this._source;\r\n }\r\n for await (const item of iterator) {\r\n yield await this._selector(item, i++);\n }\n }\n}\nexport class FromPromiseIterable extends AsyncIterableX {\n _source;\n _selector;\n constructor(source, selector) {\n super();\n this._source = source;\n this._selector = selector;\n }\n async *[Symbol.asyncIterator]() {\n const item = await this._source;\n yield await this._selector(item, 0);\n }\n}\nexport class FromObservableAsyncIterable extends AsyncIterableX {\n _observable;\n _selector;\n constructor(observable, selector) {\n super();\n this._observable = observable;\n this._selector = selector;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n const sink = new AsyncSink();\n const subscription = this._observable.subscribe({\n next(value) {\n sink.write(value);\n },\n error(err) {\n sink.error(err);\n },\n complete() {\n sink.end();\n },\n });\n function onAbort() {\n sink.error(new AbortError());\n }\n if (signal) {\n signal.addEventListener('abort', onAbort);\n }\n let i = 0;\n try {\n for (let next; !(next = await sink.next()).done;) {\n throwIfAborted(signal);\n yield await this._selector(next.value, i++);\n }\n }\n finally {\n if (signal) {\n signal.removeEventListener('abort', onAbort);\n }\n subscription.unsubscribe();\n }\n }\n}\nclass WithAbortAsyncIterable {\n _source;\n _signal;\n constructor(source, signal) {\n this._source = source;\n this._signal = signal;\n }\n [Symbol.asyncIterator]() {\n // @ts-ignore\n return this._source[Symbol.asyncIterator](this._signal);\n }\n}\ntry {\n ((isBrowser) => {\n if (isBrowser) {\n return;\n }\n AsyncIterableX.prototype['pipe'] = nodePipe;\n const readableOpts = (x, opts = x._writableState || { objectMode: true }) => opts;\n function nodePipe(...args) {\n let i = -1;\n let end;\n const n = args.length;\n let prev = this;\n let next;\n while (++i < n) {\n next = args[i];\n if (typeof next === 'function') {\n prev = next(AsyncIterableX.as(prev));\n }\n else if (isWritableNodeStream(next)) {\n ({ end = true } = args[i + 1] || {});\n // prettier-ignore\n return isReadableNodeStream(prev) ? prev.pipe(next, { end }) :\n AsyncIterableX.as(prev).toNodeStream(readableOpts(next)).pipe(next, { end });\n }\n }\n return prev;\n }\n })(typeof window === 'object' && typeof document === 'object' && document.nodeType === 9);\n}\ncatch (e) {\n /* */\n}\n\n\n","/**\n * @ignore\n */\nexport class MaxRefCountList {\n _list = [];\n clear() {\n this._list = [];\n }\n get count() {\n return this._list.length;\n }\n get(index) {\n return this._list[index];\n }\n push(value) {\n this._list.push(value);\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n done() { }\n}\n/**\n * @ignore\n */\nexport class RefCountList {\n _readerCount;\n _list;\n _count = 0;\n constructor(readerCount) {\n this._readerCount = readerCount;\n this._list = new Map();\n }\n clear() {\n this._list.clear();\n }\n get count() {\n return this._count;\n }\n get readerCount() {\n return this._readerCount;\n }\n set readerCount(value) {\n this._readerCount = value;\n }\n done() {\n this._readerCount--;\n }\n get(index) {\n if (!this._list.has(index)) {\n throw new Error('Element no longer available in the buffer.');\n }\n const res = this._list.get(index);\n const val = res.value;\n if (--res.count === 0) {\n this._list.delete(index);\n }\n return val;\n }\n push(value) {\n this._list.set(this._count++, { value: value, count: this._readerCount });\n }\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { throwIfAborted } from '../aborterror';\nclass AnonymousAsyncIterable extends AsyncIterableX {\n _fn;\n constructor(fn) {\n super();\n this._fn = fn;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n const it = await this._fn(signal);\n let next;\n while (!(next = await it.next()).done) {\n yield next.value;\n }\n }\n}\n/**\n * Creates a new iterable using the specified function implementing the members of AsyncIterable\n *\n * @template T The type of the elements returned by the enumerable sequence.\n * @param {((signal?: AbortSignal) => AsyncIterator | Promise>)} fn The function that creates the [Symbol.asyncIterator]() method\n * @returns {AsyncIterableX} A new async-iterable instance.\n */\nexport function create(fn) {\n return new AnonymousAsyncIterable(fn);\n}\n\n\n","import { AsyncIterableX } from '../asynciterablex';\nimport { MaxRefCountList, RefCountList, } from '../../iterable/operators/_refcountlist';\nimport { create } from '../create';\nimport { throwIfAborted } from '../../aborterror';\nexport class MemoizeAsyncBuffer extends AsyncIterableX {\n _source;\n _buffer;\n _shared;\n _error;\n _stopped;\n constructor(source, buffer) {\n super();\n this._error = null;\n this._shared = null;\n this._stopped = false;\n this._source = source;\n this._buffer = buffer;\n }\n [Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n return this._getIterable(0);\n }\n async *_getIterable(offset = 0) {\n let i = offset - 1;\n let done = false;\n const buffer = this._buffer;\n try {\n do {\n if (++i < buffer.count) {\n yield buffer.get(i);\n continue;\n }\n if (this._stopped) {\n throw this._error;\n }\n if (this._shared === null) {\n this._shared = this._source.next().then((r) => {\n this._shared = null;\n if (!r.done) {\n buffer.push(r.value);\n }\n return r;\n });\n }\n ({ done } = await this._shared.catch((e) => {\n this._error = e;\n this._stopped = true;\n throw e;\n }));\n if (!done) {\n yield buffer.get(i);\n }\n } while (!done);\n }\n finally {\n buffer.done();\n }\n }\n}\n/**\n * Memoizes the source sequence within a selector function where a specified number of iterators can get access\n * to all of the sequence's elements without causing multiple iterations over the source.\n *\n * @template TSource Source sequence element type.\n * @template TResult Result sequence element type.\n * @param {number} [readerCount=-1] Number of iterators that can access the underlying buffer. Once every\n * iterator has obtained an element from the buffer, the element is removed from the buffer.\n * @param {(value: AsyncIterable) => AsyncIterable} [selector] Selector function with memoized access\n * to the source sequence for a specified number of iterators.\n * @returns {(OperatorAsyncFunction)} Sequence resulting from applying the selector function to the\n * memoized view over the source sequence.\n */\nexport function memoize(readerCount = -1, selector) {\n return function memoizeOperatorFunction(source) {\n if (!selector) {\n return readerCount === -1\n ? new MemoizeAsyncBuffer(source[Symbol.asyncIterator](), new MaxRefCountList())\n : new MemoizeAsyncBuffer(source[Symbol.asyncIterator](), new RefCountList(readerCount));\n }\n return create(() => selector(memoize(readerCount)(source))[Symbol.asyncIterator]());\n };\n}\n\n\n","import { AsyncSink } from './asyncsink';\nimport { memoize } from './operators/memoize';\n/**\n * Converts a Node.js style error first callback to an async-iterable sequence.\n *\n * @template TSource The type of the returned value from the callback.\n * @param {Function} func The Node.js error first callback to convert to an async-iterable.\n * @returns {(...args: any[]) => AsyncIterableX} A function, when invoked, contains the result of the callback as an async-iterable.\n */\nexport function asyncifyErrback(func) {\n return function (...args) {\n const sink = new AsyncSink();\n const handler = function (err, ...innerArgs) {\n if (err) {\n sink.error(err);\n sink.end();\n }\n else {\n sink.write(innerArgs.length === 1 ? innerArgs[0] : innerArgs);\n sink.end();\n }\n };\n try {\n func(...args.concat(handler));\n }\n catch (e) {\n sink.error(e);\n sink.end();\n }\n const yielder = async function* () {\n for (let next; !(next = await sink.next()).done;) {\n yield next.value;\n }\n };\n return memoize()(yielder());\n };\n}\n\n\n","import { AsyncSink } from './asyncsink';\nimport { memoize } from './operators/memoize';\n/**\n * Converts the callback function into wrapped function which returns an async-iterable.\n *\n * @template TSource The type of the value returned from the callback.\n * @param {Function} func The callback function to wrap as an async-iterable.\n * @returns {(...args: any[]) => AsyncIterableX} A function when invoked, returns an async-iterable from the callback.\n */\nexport function asyncify(func) {\n return function (...args) {\n const sink = new AsyncSink();\n const handler = function (...innerArgs) {\n sink.write(innerArgs.length === 1 ? innerArgs[0] : innerArgs);\n sink.end();\n };\n try {\n func(...args.concat(handler));\n }\n catch (e) {\n sink.error(e);\n sink.end();\n }\n const yielder = async function* () {\n for (let next; !(next = await sink.next()).done;) {\n yield next.value;\n }\n };\n return memoize()(yielder());\n };\n}\n\n\n","import { AsyncIterableX } from '../asynciterablex';\nexport class WithAbortAsyncIterable extends AsyncIterableX {\n _source;\n _signal;\n constructor(source, signal) {\n super();\n this._source = source;\n this._signal = signal;\n }\n withAbort(signal) {\n return new WithAbortAsyncIterable(this._source, signal);\n }\n [Symbol.asyncIterator]() {\n return this._source[Symbol.asyncIterator](this._signal);\n }\n}\n/**\n * Wraps the existing async-iterable sequence with an abort signal for cancellation.\n *\n * @template TSource The type of the elements in the source sequence.\n * @param {AbortSignal} signal The abort signal used for cancellation.\n * @returns {MonoTypeOperatorAsyncFunction} An async-iterable that can be cancelled by the abort signal.\n */\nexport function withAbort(signal) {\n return function withAbortOperatorFunction(source) {\n return new WithAbortAsyncIterable(source, signal);\n };\n}\n/**\n * Wraps an existing async-iterable with a new async-iterable which support cancellation.\n *\n * @template TSource The type of the elements in the source sequence.\n * @param {AsyncIterable} source The source sequence to wrap with the abort signal.\n * @param {AbortSignal} [signal] The abort signal used for cancellation.\n * @returns {AsyncIterable} The source sequence wrapped with an abort signal for cancellation.\n */\nexport function wrapWithAbort(source, signal) {\n return signal ? new WithAbortAsyncIterable(source, signal) : source;\n}\n\n\n","import { identityAsync } from '../util/identity';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Computes the average of the async-iterable sequence.\n *\n * @param {AsyncIterable} source source async-iterable sequence to compute the average.\n * @param {AverageOptions} [options] The options for calculating the average.\n * @returns {Promise} A Promise which returns the computed average for the async-iterable sequence.\n */\nexport async function average(source, options) {\n const { ['selector']: selector = identityAsync, ['signal']: signal, ['thisArg']: thisArg, } = options || {};\n throwIfAborted(signal);\n let sum = 0;\n let count = 0;\n for await (const item of wrapWithAbort(source, signal)) {\n sum += await selector.call(thisArg, item, signal);\n count++;\n }\n if (count === 0) {\n throw new Error('Empty collection');\n }\n return sum / count;\n}\n\n\n","/**\n * @ignore\n */\nexport function returnIterator(it) {\n if (typeof it.return === 'function') {\n it.return();\n }\n}\n/**\n * @ignore\n */\nexport async function returnAsyncIterator(it) {\n if (typeof it.return === 'function') {\n await it.return();\n }\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { returnAsyncIterator } from '../util/returniterator';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\nexport class CatchAllAsyncIterable extends AsyncIterableX {\n _source;\n constructor(source) {\n super();\n this._source = source;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n let error = null;\n let hasError = false;\n for (const source of this._source) {\n const it = wrapWithAbort(source, signal)[Symbol.asyncIterator]();\n error = null;\n hasError = false;\n while (1) {\n let c = {};\n try {\n const { done, value } = await it.next();\n if (done) {\n await returnAsyncIterator(it);\n break;\n }\n c = value;\n }\n catch (e) {\n error = e;\n hasError = true;\n await returnAsyncIterator(it);\n break;\n }\n yield c;\n }\n if (!hasError) {\n break;\n }\n }\n if (hasError) {\n throw error;\n }\n }\n}\n/**\n * Continues an async-iterable sequence that is terminated by an exception with the next async-iterable sequence.\n *\n * @template T The type of the elements in the source and handler sequences.\n * @param {Iterable>} source async-iterable sequences to catch exceptions for.\n * @returns {AsyncIterableX} An async-iterable sequence containing elements from consecutive source\n * sequences until a source sequence terminates successfully.\n */\nexport function catchAll(source) {\n return new CatchAllAsyncIterable(source);\n}\n/**\n * Continues an async-iterable sequence that is terminated by an exception with the next async-iterable sequence.\n *\n * @template T The type of the elements in the source and handler sequences.\n * @param {...AsyncIterable[]} args async-iterable sequences to catch exceptions for.\n * @returns {AsyncIterableX} An async-iterable sequence containing elements from consecutive source\n * sequences until a source sequence terminates successfully.\n */\nexport function catchError(...args) {\n return new CatchAllAsyncIterable(args);\n}\n\n\n","/*\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to \n*/\n// see: https://github.com/nodejs/node/issues/17469#issuecomment-685216777\n// see: https://github.com/ReactiveX/IxJS/pull/323\nfunction isPrimitive(value) {\n return value === null || (typeof value !== 'object' && typeof value !== 'function');\n}\n// Keys are the values passed to race, values are a record of data containing a\n// set of deferreds and whether the value has settled.\nconst wm = new WeakMap();\nexport function safeRace(contenders) {\n let deferred;\n const result = new Promise((resolve, reject) => {\n deferred = { resolve, reject };\n for (const contender of contenders) {\n if (isPrimitive(contender)) {\n // If the contender is a primitive, attempting to use it as a key in the\n // weakmap would throw an error. Luckily, it is safe to call\n // `Promise.resolve(contender).then` on a primitive value multiple times\n // because the promise fulfills immediately.\n Promise.resolve(contender).then(resolve, reject);\n continue;\n }\n let record = wm.get(contender);\n if (record === undefined) {\n record = { deferreds: new Set([deferred]), settled: false };\n wm.set(contender, record);\n // This call to `then` happens once for the lifetime of the value.\n Promise.resolve(contender).then((value) => {\n // eslint-disable-next-line no-shadow\n for (const { resolve } of record.deferreds) {\n resolve(value);\n }\n record.deferreds.clear();\n record.settled = true;\n }, (err) => {\n // eslint-disable-next-line no-shadow\n for (const { reject } of record.deferreds) {\n reject(err);\n }\n record.deferreds.clear();\n record.settled = true;\n });\n }\n else if (record.settled) {\n // If the value has settled, it is safe to call\n // `Promise.resolve(contender).then` on it.\n Promise.resolve(contender).then(resolve, reject);\n }\n else {\n record.deferreds.add(deferred);\n }\n }\n });\n // The finally callback executes when any value settles, preventing any of\n // the unresolved values from retaining a reference to the resolved value.\n return result.finally(() => {\n for (const contender of contenders) {\n if (!isPrimitive(contender)) {\n const record = wm.get(contender);\n record.deferreds.delete(deferred);\n }\n }\n });\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { identity } from '../util/identity';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\nimport { safeRace } from '../util/safeRace';\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst NEVER_PROMISE = new Promise(() => { });\nfunction wrapPromiseWithIndex(promise, index) {\n return promise.then((value) => ({ value, index }));\n}\nexport class CombineLatestAsyncIterable extends AsyncIterableX {\n _sources;\n constructor(sources) {\n super();\n this._sources = sources;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n const length = this._sources.length;\n const iterators = new Array(length);\n const nexts = new Array(length);\n let hasValueAll = false;\n const values = new Array(length);\n const hasValues = new Array(length);\n let active = length;\n hasValues.fill(false);\n for (let i = 0; i < length; i++) {\n const iterator = wrapWithAbort(this._sources[i], signal)[Symbol.asyncIterator]();\n iterators[i] = iterator;\n nexts[i] = wrapPromiseWithIndex(iterator.next(), i);\n }\n while (active > 0) {\n const next = safeRace(nexts);\n const { value: { value: value$, done: done$ }, index, } = await next;\n if (done$) {\n nexts[index] = NEVER_PROMISE;\n active--;\n }\n else {\n values[index] = value$;\n hasValues[index] = true;\n const iterator$ = iterators[index];\n nexts[index] = wrapPromiseWithIndex(iterator$.next(), index);\n if (hasValueAll || (hasValueAll = hasValues.every(identity))) {\n yield values;\n }\n }\n }\n }\n}\nexport function combineLatest(...sources) {\n return new CombineLatestAsyncIterable(sources);\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\nexport class ConcatAsyncIterable extends AsyncIterableX {\n _source;\n constructor(source) {\n super();\n this._source = source;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n for (const outer of this._source) {\n for await (const item of wrapWithAbort(outer, signal)) {\n yield item;\n }\n }\n }\n}\nexport function _concatAll(source) {\n return new ConcatAsyncIterable(source);\n}\n/**\n * Concatenates all async-iterable sequences in the given sequences, as long as the previous async-iterable\n * sequence terminated successfully.\n *\n * @template T The type of the elements in the sequences.\n * @param {...AsyncIterable[]} args The async-iterable sources.\n * @returns {AsyncIterableX} An async-iterable sequence that contains the elements of each given sequence, in sequential order.\n */\nexport function concat(...args) {\n return new ConcatAsyncIterable(args);\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Returns a promise that represents how many elements in the specified async-iterable sequence satisfy a condition\n * otherwise, the number of items in the sequence.\n *\n * @template T The type of elements in the source collection.\n * @param {AsyncIterable} source An async-iterable sequence that contains elements to be counted.\n * @param {OptionalFindOptions} [options] The options for a predicate for filtering, thisArg for binding and AbortSignal for cancellation.\n * @returns {Promise} The number of matching elements for the given condition if provided, otherwise\n * the number of elements in the sequence.\n */\nexport async function count(source, options) {\n const { ['signal']: signal, ['thisArg']: thisArg, ['predicate']: predicate = async () => true } = options || {};\n throwIfAborted(signal);\n let i = 0;\n for await (const item of wrapWithAbort(source, signal)) {\n if (await predicate.call(thisArg, item, i, signal)) {\n i++;\n }\n }\n return i;\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\nclass DeferAsyncIterable extends AsyncIterableX {\n _fn;\n constructor(fn) {\n super();\n this._fn = fn;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n const items = await this._fn(signal);\n for await (const item of wrapWithAbort(items, signal)) {\n yield item;\n }\n }\n}\n/**\n * Returns an async-iterable sequence that invokes the specified factory function whenever a call to [Symbol.asyncIterator] has been made.\n *\n * @template TSource The type of the elements in the sequence returned by the factory function, and in the resulting sequence.\n * @param {((signal?: AbortSignal) => AsyncIterable | Promise>)} factory Async-iterable factory function to\n * invoke for each call to [Symbol.asyncIterator].\n * @returns {AsyncIterableX} An async-iterable sequence whose observers trigger an invocation of the given async-iterable factory function.\n */\nexport function defer(factory) {\n return new DeferAsyncIterable(factory);\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Returns the element at a specified index in a sequence or undefined if the index is out of range.\n *\n * @template T The type of the elements in the source sequence.\n * @param {AsyncIterable} source async-iterable sequence to return the element from.\n * @param {number} index The zero-based index of the element to retrieve.\n * @param {AbortSignal} [signal] The optional abort signal to be used for cancelling the sequence at any time.\n * @returns {(Promise)} An async-iterable sequence that produces the element at the specified\n * position in the source sequence, or undefined if the index is outside the bounds of the source sequence.\n */\nexport async function elementAt(source, index, signal) {\n throwIfAborted(signal);\n let i = index;\n for await (const item of wrapWithAbort(source, signal)) {\n if (i === 0) {\n return item;\n }\n i--;\n }\n return undefined;\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { throwIfAborted } from '../aborterror';\nclass EmptyAsyncIterable extends AsyncIterableX {\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n }\n}\n/**\n * Returns an empty async-iterable sequence.\n *\n * @template TSource The type used for the async-iterable type parameter of the resulting sequence.\n * @returns {AsyncIterableX} An async-iterable sequence with no elements.\n */\nexport function empty() {\n return new EmptyAsyncIterable();\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Determines whether all elements of an async-iterable sequence satisfy a condition.\n *\n * @template T The type of the elements in the source sequence.\n * @param {AsyncIterable} source An async-iterable sequence whose elements to apply the predicate to.\n * @param {FindOptions} options The options for a predicate for filtering, thisArg for binding and AbortSignal for cancellation.\n * @returns {Promise} An async-iterable sequence containing a single element determining whether all elements in the\n * source sequence pass the test in the specified predicate.\n */\nexport async function every(source, options) {\n const { ['signal']: signal, ['thisArg']: thisArg, ['predicate']: predicate } = options;\n throwIfAborted(signal);\n let i = 0;\n for await (const item of wrapWithAbort(source, signal)) {\n if (!(await predicate.call(thisArg, item, i++, signal))) {\n return false;\n }\n }\n return true;\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Returns the a Promise containing the index of the first element in the array that satisfies the provided testing function.\n * Otherwise, it returns a Promise with -1, indicating that no element passed the test.\n *\n * @template T The type of the elements in the source sequence.\n * @param {AsyncIterable} source An async-iterable sequence whose elements to apply the predicate to.\n * @param {FindOptions} options The options for a predicate for filtering, thisArg for binding and AbortSignal for cancellation.\n * @returns {Promise} A promise containing the index of the first element in the array that passes the test. Otherwise, -1.\n */\nexport async function findIndex(source, options) {\n const { ['signal']: signal, ['thisArg']: thisArg, ['predicate']: predicate } = options;\n throwIfAborted(signal);\n let i = 0;\n for await (const item of wrapWithAbort(source, signal)) {\n if (await predicate.call(thisArg, item, i++, signal)) {\n return i;\n }\n }\n return -1;\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Returns the value of the first element in the provided async-iterable that satisfies the provided testing function.\n *\n * @template T The type of the elements in the source sequence.\n * @param {AsyncIterable} source An async-iterable sequence whose elements to apply the predicate to.\n * @param {FindOptions} options The options for a predicate for filtering, thisArg for binding and AbortSignal for cancellation.\n * @returns {(Promise)} A promise with the value of the first element that matches the predicate.\n */\nexport async function find(source, options) {\n const { ['signal']: signal, ['thisArg']: thisArg, ['predicate']: predicate } = options;\n throwIfAborted(signal);\n let i = 0;\n for await (const item of wrapWithAbort(source, signal)) {\n if (await predicate.call(thisArg, item, i++, signal)) {\n return item;\n }\n }\n return undefined;\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Returns the first element of an async-iterable sequence that matches the predicate if provided, or undefined if no such element exists.\n *\n * @template T The type of the elements in the source sequence.\n * @param {AsyncIterable} source Source async-enumerable sequence.\n * @returns {(Promise)} A Promise containing the first element in the async-iterable sequence,\n * or a default value if no such element exists.\n */\nexport async function first(source, options) {\n const { ['signal']: signal, ['thisArg']: thisArg, ['predicate']: predicate = async () => true } = options || {};\n throwIfAborted(signal);\n let i = 0;\n for await (const item of wrapWithAbort(source, signal)) {\n if (await predicate.call(thisArg, item, i++, signal)) {\n return item;\n }\n }\n return undefined;\n}\n\n\n","import { identity } from '../util/identity';\nimport { wrapWithAbort } from './operators/withabort';\nimport { safeRace } from '../util/safeRace';\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst NEVER_PROMISE = new Promise(() => { });\nfunction wrapPromiseWithIndex(promise, index) {\n return promise.then((value) => ({ value, index }));\n}\n/**\n * Runs all specified async-iterable sequences in parallel and collects their last elements.\n *\n * @template T The type of the elements in the source sequences.\n * @param {...any[]} sources Async-iterable sequence to collect the last elements for.\n * @returns {(Promise)} An async-iterable sequence with an array of all the last elements of all sequences.\n */\nexport async function forkJoin(...sources) {\n let signal = sources.shift();\n if (!(signal instanceof AbortSignal)) {\n sources.unshift(signal);\n signal = undefined;\n }\n const length = sources.length;\n const iterators = new Array(length);\n const nexts = new Array(length);\n let active = length;\n const values = new Array(length);\n const hasValues = new Array(length);\n hasValues.fill(false);\n for (let i = 0; i < length; i++) {\n const iterator = wrapWithAbort(sources[i], signal)[Symbol.asyncIterator]();\n iterators[i] = iterator;\n nexts[i] = wrapPromiseWithIndex(iterator.next(), i);\n }\n while (active > 0) {\n const next = safeRace(nexts);\n const { value: next$, index } = await next;\n if (next$.done) {\n nexts[index] = NEVER_PROMISE;\n active--;\n }\n else {\n const iterator$ = iterators[index];\n nexts[index] = wrapPromiseWithIndex(iterator$.next(), index);\n hasValues[index] = true;\n values[index] = next$.value;\n }\n }\n if (hasValues.length > 0 && hasValues.every(identity)) {\n return values;\n }\n return undefined;\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\n/** @ignore */\nconst SharedArrayBuf = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : ArrayBuffer;\nexport class AsyncIterableReadableStream extends AsyncIterableX {\n _stream;\n constructor(_stream) {\n super();\n this._stream = _stream;\n }\n [Symbol.asyncIterator]() {\n const stream = this._stream;\n const reader = stream['getReader']();\n return _consumeReader(stream, reader, defaultReaderToAsyncIterator(reader));\n }\n}\nexport class AsyncIterableReadableByteStream extends AsyncIterableReadableStream {\n [Symbol.asyncIterator]() {\n const stream = this._stream;\n let reader;\n try {\n reader = stream['getReader']({ mode: 'byob' });\n }\n catch (e) {\n return super[Symbol.asyncIterator]();\n }\n const iterator = _consumeReader(stream, reader, byobReaderToAsyncIterator(reader));\n // \"pump\" the iterator once so it initializes and is ready to accept a buffer or bytesToRead\n iterator.next();\n return iterator;\n }\n}\nasync function* _consumeReader(stream, reader, iterator) {\n let threw = false;\n try {\n yield* iterator;\n }\n catch (e) {\n if ((threw = true) && reader) {\n await reader['cancel'](e);\n }\n }\n finally {\n if (reader) {\n if (!threw) {\n await reader['cancel']();\n }\n if (stream.locked) {\n try {\n reader.closed.catch(() => {\n /* */\n });\n reader.releaseLock();\n }\n catch (e) {\n /* */\n }\n }\n }\n }\n}\n/** @ignore */\nasync function* defaultReaderToAsyncIterator(reader) {\n let r;\n while (!(r = await reader.read()).done) {\n yield r.value;\n }\n}\n/** @ignore */\nasync function* byobReaderToAsyncIterator(reader) {\n let r;\n let value = yield null;\n while (!(r = await readNext(reader, value, 0)).done) {\n value = yield r.value;\n }\n}\n/** @ignore */\nasync function readNext(reader, bufferOrLen, offset) {\n let size;\n let buffer;\n if (typeof bufferOrLen === 'number') {\n buffer = new ArrayBuffer((size = bufferOrLen));\n }\n else if (bufferOrLen instanceof ArrayBuffer) {\n size = (buffer = bufferOrLen).byteLength;\n }\n else if (bufferOrLen instanceof SharedArrayBuf) {\n size = (buffer = bufferOrLen).byteLength;\n }\n else {\n return { done: true, value: undefined };\n }\n return await readInto(reader, buffer, offset, size);\n}\n/** @ignore */\nasync function readInto(reader, buffer, offset, size) {\n let innerOffset = offset;\n if (innerOffset >= size) {\n return { done: false, value: new Uint8Array(buffer, 0, size) };\n }\n const { done, value } = await reader.read(new Uint8Array(buffer, innerOffset, size - innerOffset));\n if ((innerOffset += value.byteLength) < size && !done) {\n return await readInto(reader, value.buffer, innerOffset, size);\n }\n return { done, value: new Uint8Array(value.buffer, 0, innerOffset) };\n}\n/**\n * Creates an async-iterable from an existing DOM stream and optional options.\n *\n * @param {ReadableStream} stream The readable stream to convert to an async-iterable.\n * @param {{ mode: 'byob' }} [options] The optional options to set the mode for the DOM stream.\n * @returns {AsyncIterableX} An async-iterable created from the incoming async-iterable.\n */\nexport function fromDOMStream(stream, options) {\n return !options || options['mode'] !== 'byob'\n ? new AsyncIterableReadableStream(stream)\n : new AsyncIterableReadableByteStream(stream);\n}\n\n\n","import { memoize } from './operators/memoize';\nimport { identity } from '../util/identity';\nimport { isFunction } from '../util/isiterable';\nimport { AsyncSink } from './asyncsink';\nconst { isArray } = Array;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn(...args) : fn(args);\n}\n/**\n * Creates async-iterable from an event emitter by adding handlers for both listening and unsubscribing from events.\n *\n * @template TSource The type of elements in the event emitter.\n * @param {(handler: (...args: any[]) => void) => void} addHandler The function to add a listener to the source.\n * @param {(handler: (...args: any[]) => void) => void} removeHandler The function to remove a listener from the source.\n * @returns {AsyncIterableX} An async-iterable which contains the data from the underlying events as wrapped by the handlers.\n */\nexport function fromEventPattern(addHandler, removeHandler, resultSelector) {\n if (!isFunction(resultSelector)) {\n resultSelector = identity;\n }\n const sink = new AsyncSink();\n const handler = (...args) => sink.write(callOrApply(resultSelector, args));\n addHandler(handler);\n const loop = async function* () {\n try {\n for (let next; !(next = await sink.next()).done;) {\n yield next.value;\n }\n }\n finally {\n removeHandler(handler);\n sink.end();\n }\n };\n return memoize()(loop());\n}\n\n\n","import { fromEventPattern } from './fromeventpattern';\nimport { isFunction } from '../util/isiterable';\nfunction isMessagePortEventEmitter(obj) {\n return !!obj && isFunction(obj.on) && isFunction(obj.off);\n}\nfunction isNodeEventEmitter(obj) {\n return !!obj && isFunction(obj.addListener) && isFunction(obj.removeListener);\n}\nfunction isEventTarget(obj) {\n return !!obj && isFunction(obj.addEventListener) && isFunction(obj.removeEventListener);\n}\n/**\n * Converts an event emitter event into an async-iterable stream.\n *\n * @template TSource The type of elements in the emitter stream.\n * @param {EventedTarget} obj The object that emits the events to turn into an async-iterable.\n * @param {string} type The name of the event to listen for creation of the async-iterable.\n * @param {EventListenerOptions} [options] The options for listening to the events such as capture, passive and once.\n * @param {(...args: any[]) => TSource} [resultSelector] The result selector for the event.\n * @returns {AsyncIterableX} An async-iterable sequence created from the events emitted from the evented target.\n */\nexport function fromEvent(obj, type, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (isEventTarget(obj)) {\n const target = obj;\n return fromEventPattern((h) => target.addEventListener(type, h, options), (h) => target.removeEventListener(type, h, options), resultSelector);\n }\n else if (isMessagePortEventEmitter(obj)) {\n const target = obj;\n return fromEventPattern((h) => target.on(type, h), (h) => target.off(type, h), resultSelector);\n }\n else if (isNodeEventEmitter(obj)) {\n const target = obj;\n return fromEventPattern((h) => target.addListener(type, h), (h) => target.removeListener(type, h), resultSelector);\n }\n else {\n throw new TypeError('Unsupported event target');\n }\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { throwIfAborted } from '../aborterror';\nclass GenerateAsyncIterable extends AsyncIterableX {\n _initialState;\n _condition;\n _iterate;\n _resultSelector;\n constructor(initialState, condition, iterate, resultSelector) {\n super();\n this._initialState = initialState;\n this._condition = condition;\n this._iterate = iterate;\n this._resultSelector = resultSelector;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n for (let i = this._initialState; await this._condition(i, signal); i = await this._iterate(i, signal)) {\n yield await this._resultSelector(i, signal);\n }\n }\n}\n/**\n * Generates an async-iterable sequence by running a state-driven loop producing the sequence's elements.\n *\n * @template TState The type of the state used in the generator loop.\n * @template TResult The type of the elements in the produced sequence.\n * @param {TState} initialState The initial state.\n * @param {((value: TState, signal?: AbortSignal) => boolean | Promise)} condition Condition to terminate generation (upon returning false).\n * @param {((value: TState, signal?: AbortSignal) => TState | Promise)} iterate Iteration step function.\n * @param {((value: TState, signal?: AbortSignal) => TResult | Promise)} resultSelector Selector function for results produced in\n * the sequence.\n * @returns {AsyncIterableX} The generated async-iterable sequence.\n */\nexport function generate(initialState, condition, iterate, resultSelector) {\n return new GenerateAsyncIterable(initialState, condition, iterate, resultSelector);\n}\n\n\n","import { AbortError } from '../aborterror';\nexport function sleep(dueTime, signal) {\n return new Promise((resolve, reject) => {\n if (signal && signal.aborted) {\n reject(new AbortError());\n }\n const id = setTimeout(() => {\n if (signal) {\n signal.removeEventListener('abort', onAbort);\n if (signal.aborted) {\n onAbort();\n return;\n }\n }\n resolve();\n }, dueTime);\n if (signal) {\n signal.addEventListener('abort', onAbort, { once: true });\n }\n function onAbort() {\n clearTimeout(id);\n reject(new AbortError());\n }\n });\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { sleep } from './_sleep';\nimport { throwIfAborted } from '../aborterror';\nclass GenerateTimeAsyncIterable extends AsyncIterableX {\n _initialState;\n _condition;\n _iterate;\n _resultSelector;\n _timeSelector;\n constructor(initialState, condition, iterate, resultSelector, timeSelector) {\n super();\n this._initialState = initialState;\n this._condition = condition;\n this._iterate = iterate;\n this._resultSelector = resultSelector;\n this._timeSelector = timeSelector;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n for (let i = this._initialState; await this._condition(i, signal); i = await this._iterate(i, signal)) {\n const time = await this._timeSelector(i, signal);\n await sleep(time, signal);\n yield await this._resultSelector(i, signal);\n }\n }\n}\n/**\n * Generates an async-iterable sequence by running a time-based state-driven loop producing the sequence's elements.\n *\n * @template TState The type of the state used in the generator loop.\n * @template TResult The type of the elements in the produced sequence.\n * @param {TState} initialState The initial state.\n * @param {((value: TState, signal?: AbortSignal) => boolean | Promise)} condition Condition to terminate generation (upon returning false).\n * @param {((value: TState, signal?: AbortSignal) => TState | Promise)} iterate Iteration step function.\n * @param {((value: TState, signal?: AbortSignal) => TResult | Promise)} resultSelector Selector function for results produced in\n * the sequence.\n * @param {((value: TState, signal?: AbortSignal) => number | Promise)} timeSelector Selector function for how much time to wait.\n * @returns {AsyncIterableX} The generated async-iterable sequence.\n */\nexport function generateTime(initialState, condition, iterate, resultSelector, timeSelector) {\n return new GenerateTimeAsyncIterable(initialState, condition, iterate, resultSelector, timeSelector);\n}\n\n\n","import { defer } from './defer';\nimport { empty } from './empty';\n/**\n * If the specified condition evaluates true, select the thenSource sequence.\n * Otherwise, select the elseSource sequence.\n *\n * @template TSource The type of the elements in the result sequence.\n * @param {((signal?: AbortSignal) => boolean | Promise)} condition Condition evaluated to decide which sequence to return.\n * @param {AsyncIterable} thenSource Sequence returned in case evaluates true.\n * @param {AsyncIterable} [elseSource=empty()] Sequence returned in case condition evaluates false.\n * @returns {AsyncIterableX} thenSource if condition evaluates true; elseSource otherwise.\n */\nexport function iif(condition, thenSource, elseSource = empty()) {\n return defer(async (signal) => ((await condition(signal)) ? thenSource : elseSource));\n}\n\n\n","/**\n * @ignore\n */\nexport function comparer(x, y) {\n return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));\n}\n/**\n * @ignore\n */\nexport async function comparerAsync(x, y) {\n return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));\n}\n/**\n * @ignore\n */\nexport function equalityComparer(key, minValue) {\n // eslint-disable-next-line no-nested-ternary\n return key > minValue ? 1 : key < minValue ? -1 : 0;\n}\n/**\n * @ignore\n */\nexport async function equalityComparerAsync(key, minValue) {\n // eslint-disable-next-line no-nested-ternary\n return key > minValue ? 1 : key < minValue ? -1 : 0;\n}\n\n\n","import { comparer } from '../util/comparer';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Determines whether an async-itreable includes a certain value among its entries, returning true or false as appropriate.\n *\n * @template T The type of elements in the source sequence.\n * @param {AsyncIterable} source The source sequence to search for the item.\n * @param {T} valueToFind The value to search for.\n * @param {number} [fromIndex=0] The position in this async-iterable at which to begin searching for valueToFind.\n * @param {AbortSignal} [signal] An optional abort signal to cancel the operation at any time.\n * @returns {Promise} Returns a promise containing true if the value valueToFind is found within the async-iterable.\n */\nexport async function includes(source, valueToFind, fromIndex = 0, signal) {\n throwIfAborted(signal);\n let fromIdx = fromIndex;\n let i = 0;\n if (Math.abs(fromIdx)) {\n fromIdx = 0;\n }\n for await (const item of wrapWithAbort(source, signal)) {\n if (i++ > fromIdx && comparer(item, valueToFind)) {\n return true;\n }\n }\n return false;\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { sleep } from './_sleep';\nimport { throwIfAborted } from '../aborterror';\nclass IntervalAsyncIterable extends AsyncIterableX {\n _dueTime;\n constructor(dueTime) {\n super();\n this._dueTime = dueTime;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n let i = 0;\n while (1) {\n await sleep(this._dueTime, signal);\n yield i++;\n }\n }\n}\n/**\n * Produces a new item in an async-iterable at the given interval cycle time.\n *\n * @param {number} dueTime The due time in milliseconds to spawn a new item.\n * @returns {AsyncIterableX} An async-iterable producing values at the specified interval.\n */\nexport function interval(dueTime) {\n return new IntervalAsyncIterable(dueTime);\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Determines whether the given async-iterable is empty.\n *\n * @template T The type of elements in the source sequence.\n * @param {AsyncIterable} source The source async-iterable to determine whether it is empty.\n * @param {AbortSignal} [signal] An optional abort signal to cancel the operation.\n * @returns {Promise} Returns a promise containing true if the sequence is empty, otherwise false.\n */\nexport async function isEmpty(source, signal) {\n throwIfAborted(signal);\n for await (const _ of wrapWithAbort(source, signal)) {\n return false;\n }\n return true;\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Returns the last element of an async-iterable sequence that satisfies the condition in the predicate if given\n * otherwise the last item in the sequence, or a default value if no such element exists.\n *\n * @template T The type of elements in the source sequence.\n * @param {AsyncIterable} source The source async-iterable sequence.\n * @param {OptionalFindOptions} [options] The options which include an optional predicate for filtering,\n * thirArg for binding, and abort signal for cancellation\n * @returns {(Promise)} A promise containing the last value that matches the optional predicate or last item, otherwise undefined.\n */\nexport async function last(source, options) {\n const { ['signal']: signal, ['thisArg']: thisArg, ['predicate']: predicate = async () => true } = options || {};\n throwIfAborted(signal);\n let i = 0;\n let result;\n for await (const item of wrapWithAbort(source, signal)) {\n if (await predicate.call(thisArg, item, i++, signal)) {\n result = item;\n }\n }\n return result;\n}\n\n\n","import { equalityComparerAsync } from '../util/comparer';\nimport { identityAsync } from '../util/identity';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Returns the maximum element with the optional selector.\n *\n * @template TSource The type of the elements in the source sequence.\n * @param {AsyncIterable} source An async-iterable sequence to determine the maximum element of.\n * @param {ExtremaByOptions} [options] The options which include an optional comparer and abort signal.\n * @returns {Promise} The maximum element.\n */\nexport async function max(source, options) {\n const { ['comparer']: comparer = equalityComparerAsync, ['signal']: signal, ['selector']: selector = identityAsync, } = options || {};\n throwIfAborted(signal);\n const it = wrapWithAbort(source, signal)[Symbol.asyncIterator]();\n let next = await it.next();\n if (next.done) {\n throw new Error('Sequence contains no elements');\n }\n let maxValue = await selector(next.value);\n while (!(next = await it.next()).done) {\n const current = await selector(next.value);\n if ((await comparer(current, maxValue)) > 0) {\n maxValue = current;\n }\n }\n return maxValue;\n}\n\n\n","import { throwIfAborted } from '../aborterror';\nimport { wrapWithAbort } from './operators/withabort';\nexport async function extremaBy(source, selector, comparer, signal) {\n throwIfAborted(signal);\n let result = [];\n const it = wrapWithAbort(source, signal)[Symbol.asyncIterator]();\n const { value, done } = await it.next();\n if (done) {\n throw new Error('Sequence contains no elements');\n }\n let resKey = await selector(value, signal);\n result.push(value);\n let next;\n while (!(next = await it.next()).done) {\n const current = next.value;\n const key = await selector(current, signal);\n const cmp = await comparer(key, resKey, signal);\n if (cmp === 0) {\n result.push(current);\n }\n else if (cmp > 0) {\n result = [current];\n resKey = key;\n }\n }\n return result;\n}\n\n\n","import { extremaBy } from './_extremaby';\nimport { equalityComparerAsync } from '../util/comparer';\n/**\n * Returns the elements in an async-iterable sequence with the maximum key value.\n *\n * @template TSource The type of the elements in the source sequence.\n * @template TKey The type of the key computed for each element in the source sequence.\n * @param {AsyncIterable} source An async-iterable sequence to get the maximum elements for.\n * @param {ExtremaOptions} [options] The options which include an optional comparer and abort signal.\n * @returns {Promise} A promise containing a list of zero or more elements that have a maximum key value.\n */\nexport function maxBy(source, options) {\n const { ['comparer']: comparer = equalityComparerAsync, ['selector']: selector, ['signal']: signal, } = options || {};\n return extremaBy(source, selector, comparer, signal);\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\nimport { safeRace } from '../util/safeRace';\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst NEVER_PROMISE = new Promise(() => { });\nfunction wrapPromiseWithIndex(promise, index) {\n return promise.then((value) => ({ value, index }));\n}\nexport class MergeAsyncIterable extends AsyncIterableX {\n _source;\n constructor(source) {\n super();\n this._source = source;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n const length = this._source.length;\n const iterators = new Array(length);\n const nexts = new Array(length);\n let active = length;\n for (let i = 0; i < length; i++) {\n const iterator = wrapWithAbort(this._source[i], signal)[Symbol.asyncIterator]();\n iterators[i] = iterator;\n nexts[i] = wrapPromiseWithIndex(iterator.next(), i);\n }\n while (active > 0) {\n const next = safeRace(nexts);\n const { value: { done: done$, value: value$ }, index, } = await next;\n if (done$) {\n nexts[index] = NEVER_PROMISE;\n active--;\n }\n else {\n yield value$;\r\n const iterator$ = iterators[index];\n nexts[index] = wrapPromiseWithIndex(iterator$.next(), index);\n }\n }\n }\n}\nexport function merge(source, ...args) {\n return new MergeAsyncIterable([source, ...args]);\n}\n\n\n","import { equalityComparerAsync } from '../util/comparer';\nimport { identityAsync } from '../util/identity';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * * Returns the minimum element with the optional selector.\n *\n * @template TSource The type of the elements in the source sequence.\n * @param {AsyncIterable} source An async-iterable sequence to determine the minimum element of.\n * @param {ExtremaOptions} [options] The options which include an optional comparer and abort signal.\n * @returns {Promise} A promise containing the minimum element.\n */\nexport async function min(source, options) {\n const { ['comparer']: comparer = equalityComparerAsync, ['signal']: signal, ['selector']: selector = identityAsync, } = options || {};\n throwIfAborted(signal);\n const it = wrapWithAbort(source, signal)[Symbol.asyncIterator]();\n let next = await it.next();\n if (next.done) {\n throw new Error('Sequence contains no elements');\n }\n let minValue = await selector(next.value);\n while (!(next = await it.next()).done) {\n const current = await selector(next.value);\n if ((await comparer(current, minValue)) < 0) {\n minValue = current;\n }\n }\n return minValue;\n}\n\n\n","import { extremaBy } from './_extremaby';\nimport { equalityComparerAsync } from '../util/comparer';\n/**\n * Returns the elements in an async-enumerable sequence with the minimum key value.\n *\n * @template TSource The type of the elements in the source sequence.\n * @template TKey The type of the key computed for each element in the source sequence.\n * @param {AsyncIterable} source An async-iterable sequence to get the minimum elements for.\n * @param {ExtremaOptions} options The options which include an optional comparer and abort signal.\n * @returns {Promise} A promise containing a list of zero or more elements that have a minimum key value.\n */\nexport function minBy(source, options) {\n const { ['comparer']: comparer = equalityComparerAsync, ['selector']: selector, ['signal']: signal, } = options || {};\n const newComparer = async (key, minValue) => -(await comparer(key, minValue));\n return extremaBy(source, selector, newComparer, signal);\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { throwIfAborted, AbortError } from '../aborterror';\nexport class NeverAsyncIterable extends AsyncIterableX {\n constructor() {\n super();\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n await new Promise((_, reject) => {\n if (signal) {\n signal.addEventListener('abort', () => reject(new AbortError()), { once: true });\n }\n });\n }\n}\n/**\n * An async-iterable sequence that never returns a value.\n *\n * @returns {AsyncIterableX} An async-iterable sequence that never returns a value.\n */\nexport function never() {\n return new NeverAsyncIterable();\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { throwIfAborted } from '../aborterror';\nexport class OfAsyncIterable extends AsyncIterableX {\n _args;\n constructor(args) {\n super();\n this._args = args;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n for (const item of this._args) {\n yield item;\n }\n }\n}\n/**\n * Creates an async-iterable from the specified elements.\n *\n * @template TSource The type of the elements to create an async-iterable sequence.\n * @param {...TSource[]} args The elements to turn into an async-iterable sequence.\n * @returns {AsyncIterableX} The async-iterable sequence created from the elements.\n */\nexport function of(...args) {\n return new OfAsyncIterable(args);\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\nexport class OnErrorResumeNextAsyncIterable extends AsyncIterableX {\n _source;\n constructor(source) {\n super();\n this._source = source;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n for (const item of this._source) {\n const it = wrapWithAbort(item, signal)[Symbol.asyncIterator]();\n while (1) {\n let next;\n try {\n next = await it.next();\n }\n catch (e) {\n break;\n }\n if (next.done) {\n break;\n }\n yield next.value;\n }\n }\n }\n}\n/**\n * Concatenates all of the specified async-iterable sequences, even if the previous async-iterable sequence terminated exceptionally.\n *\n * @template T The type of the elements in the source sequences.\n * @param {...AsyncIterable[]} args Async-iterable sequences to concatenate.\n * @returns {AsyncIterableX} An async-iterable sequence that concatenates the source sequences, even if a sequence terminates exceptionally.\n */\nexport function onErrorResumeNext(...args) {\n return new OnErrorResumeNextAsyncIterable(args);\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\nimport { safeRace } from '../util/safeRace';\nfunction wrapPromiseWithIndex(promise, index) {\n return promise.then((value) => ({ value, index }));\n}\nexport class RaceAsyncIterable extends AsyncIterableX {\n _sources;\n constructor(sources) {\n super();\n this._sources = sources;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n const sources = this._sources;\n const length = sources.length;\n const iterators = new Array(length);\n const nexts = new Array(length);\n for (let i = 0; i < length; i++) {\n const iterator = wrapWithAbort(sources[i], signal)[Symbol.asyncIterator]();\n iterators[i] = iterator;\n nexts[i] = wrapPromiseWithIndex(iterator.next(), i);\n }\n const next = safeRace(nexts);\n const { value: next$, index } = await next;\n if (!next$.done) {\n yield next$.value;\n }\n const iterator$ = iterators[index];\n // Cancel/finish other iterators\n for (let i = 0; i < length; i++) {\n if (i === index) {\n continue;\n }\n const otherIterator = iterators[i];\n if (otherIterator.return) {\n otherIterator.return();\n }\n }\n let nextItem;\n while (!(nextItem = await iterator$.next()).done) {\n yield nextItem.value;\n }\n }\n}\n/**\n * Propagates the async sequence that reacts first.\n *\n * @param {...AsyncIterable[]} sources The source sequences.\n * @return {AsyncIterable} An async sequence that surfaces either of the given sequences, whichever reacted first.\n */\nexport function race(...sources) {\n return new RaceAsyncIterable(sources);\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { throwIfAborted } from '../aborterror';\nclass RangeAsyncIterable extends AsyncIterableX {\n _start;\n _count;\n constructor(start, count) {\n super();\n this._start = start;\n this._count = count;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n for (let current = this._start, end = this._start + this._count; current < end; current++) {\n yield current;\n }\n }\n}\n/**\n * Generates an async-iterable sequence of integral numbers within a specified range.\n *\n * @param {number} start The value of the first integer in the sequence.\n * @param {number} count The number of sequential integers to generate.\n * @returns {AsyncIterableX} An async-iterable sequence that contains a range of sequential integral numbers.\n */\nexport function range(start, count) {\n return new RangeAsyncIterable(start, count);\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Converts an existing async-iterable to a promise containing the array of values.\n *\n * @template TSource The type of elements in the source sequence.\n * @param {AsyncIterable} source The source sequence to convert to an array.\n * @param {AbortSignal} [signal] An optional abort signal to cancel the operation at any time.\n * @returns {Promise} A promise containing all the items from the source sequence as an array.\n */\nexport async function toArray(source, signal) {\n throwIfAborted(signal);\n const results = [];\n for await (const item of wrapWithAbort(source, signal)) {\n results.push(item);\n }\n return results;\n}\n\n\n","import { toArray } from './toarray';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Applies an accumulator function over an async-iterable sequence from the end, returning the result of the aggregation as a\n * single element in the result sequence. The seed value, if specified, is used as the initial accumulator value.\n * For aggregation behavior with incremental intermediate results, scan.\n *\n * @template T The type of the elements in the source sequence.\n * @template R The type of the result of the aggregation.\n * @param {AsyncIterable} source An async-iterable sequence to aggregate over from the right.\n * @param {ReduceOptions} options The options which contains a callback, with optional seed and an optional abort signal for cancellation.\n * @returns {Promise} A promise with the final accumulator value.\n */\nexport async function reduceRight(source, options) {\n const { ['seed']: seed, ['signal']: signal, ['callback']: callback } = options;\n const hasSeed = options.hasOwnProperty('seed');\n throwIfAborted(signal);\n const array = await toArray(source, signal);\n let hasValue = false;\n let acc = seed;\n for (let offset = array.length - 1; offset >= 0; offset--) {\n const item = array[offset];\n if (hasValue || (hasValue = hasSeed)) {\n acc = await callback(acc, item, offset, signal);\n }\n else {\n acc = item;\n hasValue = true;\n }\n }\n if (!(hasSeed || hasValue)) {\n throw new Error('Sequence contains no elements');\n }\n return acc;\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Applies an accumulator function over an async-iterable sequence, returning the result of the aggregation as a\n * single element in the result sequence. The seed value, if specified, is used as the initial accumulator value.\n * For aggregation behavior with incremental intermediate results, scan.\n *\n * @template T The type of the elements in the source sequence.\n * @template R The type of the result of the aggregation.\n * @param {AsyncIterable} source An async-iterable sequence to aggregate over.\n * @param {ReduceOptions} options The options which contains a callback, with optional seedn and an optional abort signal for cancellation.\n * @returns {Promise} A promise with the final accumulator value.\n */\nexport async function reduce(source, options) {\n const { ['seed']: seed, ['signal']: signal, ['callback']: callback } = options;\n const hasSeed = options.hasOwnProperty('seed');\n throwIfAborted(signal);\n let i = 0;\n let hasValue = false;\n let acc = seed;\n for await (const item of wrapWithAbort(source, signal)) {\n if (hasValue || (hasValue = hasSeed)) {\n acc = await callback(acc, item, i++, signal);\n }\n else {\n acc = item;\n hasValue = true;\n i++;\n }\n }\n if (!(hasSeed || hasValue)) {\n throw new Error('Sequence contains no elements');\n }\n return acc;\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { throwIfAborted } from '../aborterror';\nexport class RepeatValueAsyncIterable extends AsyncIterableX {\n _value;\n _count;\n constructor(value, count) {\n super();\n this._value = value;\n this._count = count;\n }\n async *[Symbol.asyncIterator](signal) {\n if (this._count === -1) {\n while (1) {\n throwIfAborted(signal);\n yield this._value;\n }\n }\n else {\n for (let i = 0; i < this._count; i++) {\n throwIfAborted(signal);\n yield this._value;\n }\n }\n }\n}\n/**\n * Repeats a given value for the specified number of times as an async-iterable.\n *\n * @template TSource The type of element to repeat.\n * @param {TSource} value The value to repeat as an async-iterable.\n * @param {number} [count=-1] The number of times to repeat the value, infinite if not specified.\n * @returns {AsyncIterableX} An async-iterable with a single item that is repeated over the specified times.\n */\nexport function repeatValue(value, count = -1) {\n return new RepeatValueAsyncIterable(value, count);\n}\n\n\n","import { comparerAsync } from '../util/comparer';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Determines whether two sequences are equal by comparing the elements pairwise.\n *\n * @template T The type of the elements in the source sequence.\n * @param {AsyncIterable} source First async-iterable sequence to compare.\n * @param {AsyncIterable} other Second async-iterable sequence to compare.\n * @param {SequencEqualOptions} [options] The sequence equal options which include an optional comparer and optional abort signal.\n * @returns {Promise} A promise which indicates whether both sequences are of equal length and their\n * corresponding elements are equal.\n */\nexport async function sequenceEqual(source, other, options) {\n const { ['comparer']: comparer = comparerAsync, ['signal']: signal } = options || {};\n throwIfAborted(signal);\n const it1 = wrapWithAbort(source, signal)[Symbol.asyncIterator]();\n const it2 = wrapWithAbort(other, signal)[Symbol.asyncIterator]();\n let next1;\n let next2;\n while (!(next1 = await it1.next()).done) {\n if (!(!(next2 = await it2.next()).done && (await comparer(next1.value, next2.value)))) {\n return false;\n }\n }\n return !!(await it2.next()).done;\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Returns the only element of an async-iterable sequence that matches the predicate if specified,\n * or undefined if no such element exists; this method reports an exception if there is more\n * than one element in the async-iterable sequence.\n *\n * @template T The type of the elements in the source sequence.\n * @param {AsyncIterable} source Source async-iterable sequence.\n * @param {OptionalFindOptions} [options] The optional options which includes a predicate for filtering,\n * thisArg for predicate binding and an abort signal for cancellation.\n * @returns {(Promise)} A promise with the single element in the async-iterable sequence that satisfies\n * the condition in the predicate, or undefined if no such element exists.\n */\nexport async function single(source, options) {\n const { ['signal']: signal, ['thisArg']: thisArg, ['predicate']: predicate = async () => true } = options || {};\n throwIfAborted(signal);\n let result;\n let hasResult = false;\n let i = 0;\n for await (const item of wrapWithAbort(source, signal)) {\n if (hasResult && (await predicate.call(thisArg, item, i++, signal))) {\n throw new Error('More than one element was found');\n }\n if (await predicate.call(thisArg, item, i++, signal)) {\n result = item;\n hasResult = true;\n }\n }\n return result;\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Determines whether any element of an async-iterable sequence satisfies a condition.\n *\n * @template T The type of the elements in the source sequence.\n * @param {AsyncIterable} source An async-iterable sequence whose elements to apply the predicate to.\n * @param {FindOptions} options The options which includes a required predicate, an optional\n * thisArg for binding, and an abort signal for cancellation.\n * @returns {Promise} A promise with a boolean determining whether any elements in the source sequence\n * pass the test in the specified predicate.\n */\nexport async function some(source, options) {\n const { ['signal']: signal, ['thisArg']: thisArg, ['predicate']: predicate } = options;\n throwIfAborted(signal);\n let i = 0;\n for await (const item of wrapWithAbort(source, signal)) {\n if (await predicate.call(thisArg, item, i++, signal)) {\n return true;\n }\n }\n return false;\n}\n\n\n","import { identityAsync } from '../util/identity';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Computes the sum of a sequence of values.\n *\n * @param {AsyncIterable} source A sequence of values to calculate the sum.\n * @param {MathOptions} [options] Optional options for providing a selector, thisArg and abort signal.\n * @returns {Promise} A promise containing the sum of the sequence of values.\n */\nexport async function sum(source, options) {\n const { ['selector']: selector = identityAsync, ['signal']: signal, ['thisArg']: thisArg, } = options || {};\n throwIfAborted(signal);\n let value = 0;\n for await (const item of wrapWithAbort(source, signal)) {\n value += await selector.call(thisArg, item, signal);\n }\n return value;\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { throwIfAborted } from '../aborterror';\nclass ThrowAsyncIterable extends AsyncIterableX {\n _error;\n constructor(error) {\n super();\n this._error = error;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n throw this._error;\n }\n}\n/**\n * Creates an async-iterable that throws the specified error upon iterating.\n *\n * @param {*} error The error to throw upon iterating the async-iterable.\n * @returns {AsyncIterableX} An async-iterable that throws when iterated.\n */\nexport function throwError(error) {\n return new ThrowAsyncIterable(error);\n}\n\n\n","import { RefCountList } from '../../iterable/operators/_refcountlist';\nimport { create } from '../create';\nimport { MemoizeAsyncBuffer } from './memoize';\nimport { throwIfAborted } from '../../aborterror';\nclass PublishedAsyncBuffer extends MemoizeAsyncBuffer {\n constructor(source) {\n super(source, new RefCountList(0));\n }\n [Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n this._buffer.readerCount++;\n return this._getIterable(this._buffer.count)[Symbol.asyncIterator]();\n }\n}\n/**\n * Buffer enabling each iterator to retrieve elements from the shared source sequence, starting from the\n * index at the point of obtaining the iterator.\n *\n * @template TSource Source sequence element type.\n * @template TResult Result sequence element type.\n * @param {(value: AsyncIterable) => AsyncIterable} [selector] Selector function with published\n * access to the source sequence for each iterator.\n * @returns {(OperatorAsyncFunction)} Sequence resulting from applying the selector function to the\n * published view over the source sequence.\n */\nexport function publish(selector) {\n return function publishOperatorFunction(source) {\n return selector\n ? create(async () => selector(publish()(source))[Symbol.asyncIterator]())\n : new PublishedAsyncBuffer(source[Symbol.asyncIterator]());\n };\n}\n\n\n","import { publish } from './operators/publish';\nimport { fromDOMStream } from './fromdomstream';\nimport { AsyncIterableX } from './asynciterablex';\n/** @ignore */\nfunction memcpy(target, source, targetByteOffset = 0, sourceByteLength = source.byteLength) {\n const targetByteLength = target.byteLength;\n const dst = new Uint8Array(target.buffer, target.byteOffset, targetByteLength);\n const src = new Uint8Array(source.buffer, source.byteOffset, Math.min(sourceByteLength, targetByteLength, source.buffer.byteLength - source.byteOffset));\n dst.set(src, targetByteOffset);\n return src.byteLength;\n}\nclass AbstractUnderlyingSource {\n _source;\n constructor(_source) {\n this._source = _source;\n }\n async cancel() {\n const source = this._source;\n if (source && source.return) {\n await source.return();\n }\n this._source = null;\n }\n}\nclass UnderlyingAsyncIterableDefaultSource extends AbstractUnderlyingSource {\n constructor(source) {\n super(source);\n }\n // eslint-disable-next-line consistent-return\n async pull(controller) {\n const source = this._source;\n if (source) {\n const r = await source.next(controller.desiredSize);\n if (!r.done) {\n return controller.enqueue(r.value);\n }\n }\n controller.close();\n }\n}\nclass UnderlyingAsyncIterableByteSource extends AbstractUnderlyingSource {\n // public readonly type: 'bytes';\n autoAllocateChunkSize;\n // If we can't create a \"byob\" reader (no browsers currently suppor it),\n // fallback to pulling values from the source iterator and enqueueing like\n // object streams\n fallbackDefaultSource;\n constructor(reader, opts = {}) {\n super(reader);\n this.type = 'bytes';\n this.autoAllocateChunkSize = opts['autoAllocateChunkSize'];\n this.fallbackDefaultSource = new UnderlyingAsyncIterableDefaultSource(reader);\n }\n // eslint-disable-next-line consistent-return\n async pull(controller) {\n if (!controller.byobRequest) {\n return await this.fallbackDefaultSource.pull(controller);\n }\n if (this._source) {\n const { view } = controller.byobRequest;\n const { done, value } = await this._source.next(view);\n if (!done) {\n // Did the source write into the BYOB view itself,\n // then yield us the `bytesWritten` value? If so,\n // pass that along\n if (typeof value === 'number') {\n return controller.byobRequest.respond(value);\n }\n // otherwise if the source is only producing buffers\n // but doesn't expect to be given one, we should copy\n // the produced buffer into the front of the BYOB view\n if (ArrayBuffer.isView(value)) {\n return value.buffer === view.buffer\n ? controller.byobRequest.respondWithNewView(value)\n : controller.byobRequest.respond(memcpy(view, value));\n }\n }\n }\n controller.close();\n }\n}\n// Generate subclasses of ReadableStream that conform to the\n// AsyncIterable protocol. These classes are dynamically created\n// the first time a ReadableStream is produced because ReadableStream\n// is a browser-only API, and closure-compiler won't compile if they're\n// statically defined at the module scope.\n/** @ignore */\nconst asyncIterableReadableStream = (() => {\n let AsyncIterableReadableByteStream_;\n let AsyncIterableDefaultReadableStream_;\n // A function that's called the first time someone creates a\n // ReadableStream via `toDOMStream()`\n const createFirstTime = (source, opts) => {\n // Generate the subclasses with [Symbol.asyncIterator]() methods\n class AsyncIterableDefaultReadableStream extends ReadableStream {\n [Symbol.asyncIterator]() {\n return fromDOMStream(this)[Symbol.asyncIterator]();\n }\n }\n class AsyncIterableReadableByteStream extends ReadableStream {\n [Symbol.asyncIterator]() {\n return fromDOMStream(this, { mode: 'byob' })[Symbol.asyncIterator]();\n }\n }\n AsyncIterableReadableByteStream_ = AsyncIterableReadableByteStream;\n AsyncIterableDefaultReadableStream_ = AsyncIterableDefaultReadableStream;\n // Now point `createAsyncIterableReadableStream` to the function that\n // instantiates the classes we just created\n // eslint-disable-next-line @typescript-eslint/no-use-before-define, no-use-before-define\n createAsyncIterableReadableStream = createAsyncIterableReadableStreamEveryOtherTime;\n // Create and return the first ReadableStream instance\n // eslint-disable-next-line @typescript-eslint/no-use-before-define, no-use-before-define\n return createAsyncIterableReadableStreamEveryOtherTime(source, opts);\n };\n // Shared function pointer that's called by the wrapper closure we return\n let createAsyncIterableReadableStream = createFirstTime;\n // Create instances of the classes generated by `createFirstTime`\n const createAsyncIterableReadableStreamEveryOtherTime = (source, opts) => {\n return source instanceof UnderlyingAsyncIterableByteSource\n ? new AsyncIterableReadableByteStream_(source, opts)\n : new AsyncIterableDefaultReadableStream_(source, opts);\n };\n return (source, opts) => createAsyncIterableReadableStream(source, opts);\n})();\n/**\n * Converts an async-iterable stream to a DOM stream.\n * @param source The async-iterable stream to convert to a DOM stream.\n * @param options The options to apply to the DOM stream.\n */\nexport function toDOMStream(source, options) {\n if (!options || !('type' in options) || options['type'] !== 'bytes') {\n return asyncIterableReadableStream(new UnderlyingAsyncIterableDefaultSource(source[Symbol.asyncIterator]()), options);\n }\n return asyncIterableReadableStream(new UnderlyingAsyncIterableByteSource(source[Symbol.asyncIterator](), options), options);\n}\nAsyncIterableX.prototype.tee = function () {\n return _getDOMStream(this).tee();\n};\nAsyncIterableX.prototype.pipeTo = function (writable, options) {\n return _getDOMStream(this).pipeTo(writable, options);\n};\nAsyncIterableX.prototype.pipeThrough = function (duplex, options) {\n return _getDOMStream(this).pipeThrough(duplex, options);\n};\nfunction _getDOMStream(self) {\n return self._DOMStream || (self._DOMStream = self.pipe(publish(), toDOMStream));\n}\nexport function toDOMStreamProto(options) {\n return !options ? toDOMStream(this) : toDOMStream(this, options);\n}\nAsyncIterableX.prototype.toDOMStream = toDOMStreamProto;\n\n\n","import { identityAsync } from '../util/identity';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Converts an async-iterable to a map with a key selector and options for an element selector and cancellation.\n *\n * @template TSource The type of elements in the source collection.\n * @template TKey The type of key used for the map.\n * @template TElement The type of element to use for the map.\n * @param {AsyncIterable} source The source collection to turn into a map.\n * @param {ToMapOptions} [options]\n * @returns {(Promise>)}\n */\nexport async function toMap(source, options) {\n const { ['signal']: signal, ['elementSelector']: elementSelector = identityAsync, ['keySelector']: keySelector = identityAsync, } = options || {};\n throwIfAborted(signal);\n const map = new Map();\n for await (const item of wrapWithAbort(source, signal)) {\n const value = await elementSelector(item, signal);\n const key = await keySelector(item, signal);\n map.set(key, value);\n }\n return map;\n}\n\n\n","import { isFunction } from './isiterable';\nconst noop = (_) => {\n /**/\n};\n// eslint-disable-next-line complexity\nexport function toObserver(next, error, complete) {\n const observer = next;\n if (observer && typeof observer === 'object') {\n return {\n next: isFunction(observer.next) ? (x) => observer.next(x) : noop,\n error: isFunction(observer.error) ? (e) => observer.error(e) : noop,\n complete: isFunction(observer.complete) ? () => observer.complete() : noop,\n };\n }\n return {\n next: isFunction(next) ? next : noop,\n error: isFunction(error) ? error : noop,\n complete: isFunction(complete) ? complete : noop,\n };\n}\n\n\n","// Symbol.observable or a string \"@@observable\". Used for interop.\n// Referenced via string indexer so closure-compiler doesn't mangle.\nexport const observable = (typeof Symbol === 'function' && Symbol.observable) || '@@observable';\n\n\n","import { toObserver } from '../util/toobserver';\nimport { observable as symbolObservable } from '../observer';\nclass BooleanSubscription {\n isUnsubscribed = false;\n unsubscribe() {\n this.isUnsubscribed = true;\n }\n}\nclass AsyncIterableObservable {\n _source;\n constructor(source) {\n this._source = source;\n }\n /** @nocollapse */\n [symbolObservable]() {\n return this;\n }\n /** @nocollapse */\n subscribe(next, error, complete) {\n const observer = toObserver(next, error, complete);\n const subscription = new BooleanSubscription();\n const it = this._source[Symbol.asyncIterator]();\n const f = () => {\n it.next()\n .then(({ value, done }) => {\n if (!subscription.isUnsubscribed) {\n if (done) {\n observer.complete();\n }\n else {\n observer.next(value);\n f();\n }\n }\n })\n .catch((err) => {\n if (!subscription.isUnsubscribed) {\n observer.error(err);\n }\n });\n };\n f();\n return subscription;\n }\n}\n/**\n * Converts the async-iterable sequence to an observable.\n *\n * @template TSource The type of the elements in the source sequence.\n * @param {AsyncIterable} source The async-iterable to convert to an observable.\n * @returns {Observable} The observable containing the elements from the async-iterable.\n */\nexport function toObservable(source) {\n return new AsyncIterableObservable(source);\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\n/**\n * Converts the existing async-iterable into a promise which resolves a Set.\n *\n * @template TSource The type of elements in the source sequence.\n * @param {AsyncIterable} source The async-iterable to convert into a set.\n * @param {AbortSignal} [signal] An optional abort signal to cancel the operation at any time.\n * @returns {Promise>} A promise which contains a Set with all the elements from the async-iterable.\n */\nexport async function toSet(source, signal) {\n throwIfAborted(signal);\n const set = new Set();\n for await (const item of wrapWithAbort(source, signal)) {\n set.add(item);\n }\n return set;\n}\n\n\n","import { AsyncIterableX } from './asynciterablex';\nimport { wrapWithAbort } from './operators/withabort';\nimport { throwIfAborted } from '../aborterror';\nclass WhileAsyncIterable extends AsyncIterableX {\n _condition;\n _source;\n constructor(condition, source) {\n super();\n this._condition = condition;\n this._source = source;\n }\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n while (await this._condition(signal)) {\n for await (const item of wrapWithAbort(this._source, signal)) {\n yield item;\n }\n }\n }\n}\n/**\n * Repeats the given source as long as the specified conditions holds, where\n * the condition is evaluated before each repeated source is iterated.\n *\n * @template TSource\n * @param {AsyncIterable} source Source to repeat as long as the condition function evaluates to true.\n * @param {((signal?: AbortSignal) => boolean | Promise)} condition Condition that will be evaluated before the source sequence is iterated.\n * @returns {AsyncIterableX} An async-iterable which is repeated while the condition returns true.\n */\nexport function whileDo(source, condition) {\n return new WhileAsyncIterable(condition, source);\n}\n\n\n","import { wrapWithAbort } from './operators/withabort';\nimport { AsyncIterableX } from './asynciterablex';\nimport { returnAsyncIterator } from '../util/returniterator';\nimport { throwIfAborted } from '../aborterror';\nexport class ZipAsyncIterable extends AsyncIterableX {\n _sources;\n constructor(sources) {\n super();\n this._sources = sources;\n }\n // eslint-disable-next-line consistent-return\n async *[Symbol.asyncIterator](signal) {\n throwIfAborted(signal);\n const sourcesLength = this._sources.length;\n const its = this._sources.map((x) => wrapWithAbort(x, signal)[Symbol.asyncIterator]());\n while (sourcesLength > 0) {\n const values = new Array(sourcesLength);\n for (let i = -1; ++i < sourcesLength;) {\n const { value, done } = await its[i].next();\n if (done) {\n await Promise.all(its.map(returnAsyncIterator));\n return undefined;\n }\n values[i] = value;\n }\n yield values;\n }\n }\n}\nexport function zip(...sources) {\n return new ZipAsyncIterable(sources);\n}\n\n\n","export * from './asyncifyerrback';\nexport * from './asyncify';\nexport * from './asynciterablex';\nexport * from './average';\nexport * from './catcherror';\nexport * from './combinelatest';\nexport * from './concat';\nexport * from './count';\nexport * from './create';\nexport * from './defer';\nexport * from './elementat';\nexport * from './empty';\nexport * from './every';\nexport * from './findindex';\nexport * from './find';\nexport * from './first';\nexport * from './forkjoin';\nexport * from './fromdomstream';\nexport * from './fromeventpattern';\nexport * from './fromevent';\nexport * from './generate';\nexport * from './generatetime';\nexport * from './iif';\nexport * from './includes';\nexport * from './interval';\nexport * from './isempty';\nexport * from './last';\nexport * from './max';\nexport * from './maxby';\nexport * from './merge';\nexport * from './min';\nexport * from './minby';\nexport * from './never';\nexport * from './of';\nexport * from './onerrorresumenext';\nexport * from './race';\nexport * from './range';\nexport * from './reduceright';\nexport * from './reduce';\nexport * from './repeatvalue';\nexport * from './sequenceequal';\nexport * from './single';\nexport * from './some';\nexport * from './sum';\nexport * from './throwerrror';\nexport * from './toarray';\nexport * from './todomstream';\nexport * from './tomap';\nexport * from './toobservable';\nexport * from './toset';\nexport * from './whiledo';\nexport * from './zip';\nimport { AsyncIterableX } from './asynciterablex';\nexport const as = AsyncIterableX.as;\nexport const from = AsyncIterableX.from;\n\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ApplicationLink = void 0;\nconst import_apollo_client_1 = require(\"./import-apollo-client\");\nconst zen_observable_ts_1 = require(\"zen-observable-ts\");\nconst graphql_1 = require(\"graphql\");\nconst asynciterable_1 = require(\"ix/asynciterable\");\nclass ApplicationLink extends import_apollo_client_1.ApolloLink {\n application;\n context;\n execute;\n subscribe;\n schema;\n constructor(application, context) {\n super(undefined);\n this.application = application;\n this.context = context;\n this.execute = application.createExecution();\n this.subscribe = application.createSubscription();\n this.schema = application.schema;\n }\n request(operation) {\n if ((0, graphql_1.getOperationAST)(operation.query, operation.operationName)?.operation === 'subscription') {\n return new zen_observable_ts_1.Observable(observer => {\n let result;\n try {\n result = this.subscribe({\n schema: this.schema,\n document: operation.query,\n rootValue: undefined,\n contextValue: this.context,\n variableValues: operation.variables,\n operationName: operation.operationName\n });\n }\n catch (error) {\n observer.error(error);\n return;\n }\n const abort = new AbortController();\n const abortSignal = abort.signal;\n result\n .then(result => {\n if (Symbol.asyncIterator in result) {\n if (abortSignal.aborted) {\n observer.complete();\n }\n else {\n const iterator = result[Symbol.asyncIterator]();\n abortSignal.addEventListener('abort', () => {\n iterator\n .return?.()\n .then(() => observer.complete())\n .catch(() => { });\n });\n (0, asynciterable_1.from)(iterator)\n .forEach(result => {\n observer.next(result);\n })\n .then(() => {\n if (abortSignal.aborted === false) {\n observer.complete();\n }\n })\n .catch(reason => observer.error(reason));\n }\n }\n else {\n observer.next(result);\n observer.complete();\n }\n })\n .catch(reason => observer.error(reason));\n return () => abort.abort();\n });\n }\n return new zen_observable_ts_1.Observable(observer => {\n let result;\n try {\n result = this.execute({\n schema: this.schema,\n document: operation.query,\n rootValue: undefined,\n contextValue: this.context,\n variableValues: operation.variables,\n operationName: operation.operationName\n });\n }\n catch (error) {\n observer.error(error);\n return;\n }\n if ('then' in result) {\n result\n .then(result => {\n observer.next(result);\n observer.complete();\n })\n .catch(reason => observer.error(reason));\n }\n else {\n observer.next(result);\n observer.complete();\n }\n });\n }\n}\nexports.ApplicationLink = ApplicationLink;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./electron-ipc-renderer\"), exports);\n__exportStar(require(\"./message-port-link\"), exports);\n__exportStar(require(\"./application-link\"), exports);\n","import { BehaviorSubject, Observable } from 'rxjs';\r\n\r\nimport {\r\n\tClaimResults,\r\n\tDeviceClaimProgress,\r\n\tDeletePendingClaimBatchResult,\r\n\tDeviceDetection,\r\n\tMacSerialNumberDevice,\r\n\tPendingClaim\r\n} from '@shure/cloud/shared/models/devices';\r\n\r\nexport abstract class DeviceClaimingApiService {\r\n\tpublic abstract claimOpInProgress$: BehaviorSubject;\r\n\tpublic abstract claimDevicesThrottled$(\r\n\t\tdevices: DeviceDetection[]\r\n\t): Observable>;\r\n\tpublic abstract claimDevicesByMacSerialThrottled$(\r\n\t\tdevices: MacSerialNumberDevice[]\r\n\t): Observable>;\r\n\tpublic abstract deletePendingClaimsThrottled$(deviceNodeIds: string[]): Observable;\r\n\tpublic abstract getPendingClaims$(): Observable;\r\n\tpublic abstract unClaimDevicesThrottled$(deviceNodeIds: string[]): Observable;\r\n}\r\n","import { Signal } from '@angular/core';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\n\r\nimport { InventoryDevice } from '@shure/cloud/shared/models/devices';\r\nimport { UpdateResponse } from '@shure/cloud/shared/models/http';\r\n\r\nexport abstract class InventoryDevicesApiService {\r\n\tpublic abstract deviceInventoryQueryInProgress$: BehaviorSubject;\r\n\tpublic abstract deviceInventory$: BehaviorSubject;\r\n\r\n\t/**\r\n\t * Loading state for inventory devices.\r\n\t */\r\n\tpublic abstract deviceInventoryLoading: Signal;\r\n\r\n\t/**\r\n\t * Get # of inventory devices.\r\n\t */\r\n\tpublic abstract getInventoryDevicesCount$(): Observable;\r\n\r\n\t/**\r\n\t * Get all inventory devices.\r\n\t */\r\n\tpublic abstract getInventoryDevices$(): Observable;\r\n\r\n\t/**\r\n\t * Get inventory device by ID.\r\n\t */\r\n\tpublic abstract getInventoryDevice$(deviceId: string): Observable;\r\n\r\n\t/**\r\n\t * Set mute for a device.\r\n\t */\r\n\tpublic abstract setMute(deviceId: string, mute: boolean): Observable>;\r\n\r\n\t/**\r\n\t * Set identify for a device.\r\n\t */\r\n\tpublic abstract setIdentify(deviceId: string, identify: boolean): Observable>;\r\n\r\n\t/**\r\n\t * Set device name.\r\n\t */\r\n\tpublic abstract setDeviceName(deviceId: string, name: string): Observable>;\r\n}\r\n","import { Observable } from 'rxjs';\r\n\r\n// TODO: LBF 7/12/2023\r\nexport abstract class SystemService {\r\n\t/**\r\n\t * Currently active network id.\r\n\t */\r\n\t// public abstract readonly activeNetworkId$: Observable;\r\n\r\n\t/**\r\n\t * Currently active network id.\r\n\t */\r\n\t// public abstract readonly apiState$: Observable;\r\n\r\n\t/**\r\n\t * Whether the system is ready or not.\r\n\t */\r\n\tpublic abstract isSystemReady(): Observable;\r\n\r\n\t/**\r\n\t * Emits `true` for systemApiReady if SystemAPI started, and `true` for fileExists if app is started with a file to be opened.\r\n\t */\r\n\t// public abstract waitForSystemReady(): Observable<{ sysApiReady: boolean; fileExists: boolean }>;\r\n\r\n\t/**\r\n\t * Update network id used for device discovery.\r\n\t */\r\n\t// public abstract updateNetworkId(networkId: string): Observable>;\r\n\r\n\t/**\r\n\t * Get connect information for system api.\r\n\t */\r\n\tpublic abstract getSysApiConnectInfo(): Observable<{ url: string; apiKey: string }>;\r\n}\r\n","import { __assign } from \"tslib\";\nimport { invariant, newInvariantError } from \"../utilities/globals/index.js\";\nimport { ApolloLink, execute } from \"../link/core/index.js\";\nimport { version } from \"../version.js\";\nimport { HttpLink } from \"../link/http/index.js\";\nimport { QueryManager } from \"./QueryManager.js\";\nimport { LocalState } from \"./LocalState.js\";\nvar hasSuggestedDevtools = false;\n// Though mergeOptions now resides in @apollo/client/utilities, it was\n// previously declared and exported from this module, and then reexported from\n// @apollo/client/core. Since we need to preserve that API anyway, the easiest\n// solution is to reexport mergeOptions where it was previously declared (here).\nimport { mergeOptions } from \"../utilities/index.js\";\nexport { mergeOptions };\n/**\n * This is the primary Apollo Client class. It is used to send GraphQL documents (i.e. queries\n * and mutations) to a GraphQL spec-compliant server over an {@link ApolloLink} instance,\n * receive results from the server and cache the results in a store. It also delivers updates\n * to GraphQL queries through {@link Observable} instances.\n */\nvar ApolloClient = /** @class */ (function () {\n /**\n * Constructs an instance of {@link ApolloClient}.\n *\n * @example\n * ```js\n * import { ApolloClient, InMemoryCache } from '@apollo/client';\n *\n * const cache = new InMemoryCache();\n *\n * const client = new ApolloClient({\n * // Provide required constructor fields\n * cache: cache,\n * uri: 'http://localhost:4000/',\n *\n * // Provide some optional constructor fields\n * name: 'react-web-client',\n * version: '1.3',\n * queryDeduplication: false,\n * defaultOptions: {\n * watchQuery: {\n * fetchPolicy: 'cache-and-network',\n * },\n * },\n * });\n * ```\n */\n function ApolloClient(options) {\n var _this = this;\n this.resetStoreCallbacks = [];\n this.clearStoreCallbacks = [];\n if (!options.cache) {\n throw newInvariantError(15);\n }\n var uri = options.uri, credentials = options.credentials, headers = options.headers, cache = options.cache, documentTransform = options.documentTransform, _a = options.ssrMode, ssrMode = _a === void 0 ? false : _a, _b = options.ssrForceFetchDelay, ssrForceFetchDelay = _b === void 0 ? 0 : _b, \n // Expose the client instance as window.__APOLLO_CLIENT__ and call\n // onBroadcast in queryManager.broadcastQueries to enable browser\n // devtools, but disable them by default in production.\n _c = options.connectToDevTools, \n // Expose the client instance as window.__APOLLO_CLIENT__ and call\n // onBroadcast in queryManager.broadcastQueries to enable browser\n // devtools, but disable them by default in production.\n connectToDevTools = _c === void 0 ? typeof window === \"object\" &&\n !window.__APOLLO_CLIENT__ &&\n globalThis.__DEV__ !== false : _c, _d = options.queryDeduplication, queryDeduplication = _d === void 0 ? true : _d, defaultOptions = options.defaultOptions, _e = options.assumeImmutableResults, assumeImmutableResults = _e === void 0 ? cache.assumeImmutableResults : _e, resolvers = options.resolvers, typeDefs = options.typeDefs, fragmentMatcher = options.fragmentMatcher, clientAwarenessName = options.name, clientAwarenessVersion = options.version;\n var link = options.link;\n if (!link) {\n link =\n uri ? new HttpLink({ uri: uri, credentials: credentials, headers: headers }) : ApolloLink.empty();\n }\n this.link = link;\n this.cache = cache;\n this.disableNetworkFetches = ssrMode || ssrForceFetchDelay > 0;\n this.queryDeduplication = queryDeduplication;\n this.defaultOptions = defaultOptions || Object.create(null);\n this.typeDefs = typeDefs;\n if (ssrForceFetchDelay) {\n setTimeout(function () { return (_this.disableNetworkFetches = false); }, ssrForceFetchDelay);\n }\n this.watchQuery = this.watchQuery.bind(this);\n this.query = this.query.bind(this);\n this.mutate = this.mutate.bind(this);\n this.resetStore = this.resetStore.bind(this);\n this.reFetchObservableQueries = this.reFetchObservableQueries.bind(this);\n this.version = version;\n this.localState = new LocalState({\n cache: cache,\n client: this,\n resolvers: resolvers,\n fragmentMatcher: fragmentMatcher,\n });\n this.queryManager = new QueryManager({\n cache: this.cache,\n link: this.link,\n defaultOptions: this.defaultOptions,\n documentTransform: documentTransform,\n queryDeduplication: queryDeduplication,\n ssrMode: ssrMode,\n clientAwareness: {\n name: clientAwarenessName,\n version: clientAwarenessVersion,\n },\n localState: this.localState,\n assumeImmutableResults: assumeImmutableResults,\n onBroadcast: connectToDevTools ?\n function () {\n if (_this.devToolsHookCb) {\n _this.devToolsHookCb({\n action: {},\n state: {\n queries: _this.queryManager.getQueryStore(),\n mutations: _this.queryManager.mutationStore || {},\n },\n dataWithOptimisticResults: _this.cache.extract(true),\n });\n }\n }\n : void 0,\n });\n if (connectToDevTools)\n this.connectToDevTools();\n }\n ApolloClient.prototype.connectToDevTools = function () {\n if (typeof window === \"object\") {\n var windowWithDevTools = window;\n var devtoolsSymbol = Symbol.for(\"apollo.devtools\");\n (windowWithDevTools[devtoolsSymbol] =\n windowWithDevTools[devtoolsSymbol] || []).push(this);\n windowWithDevTools.__APOLLO_CLIENT__ = this;\n }\n /**\n * Suggest installing the devtools for developers who don't have them\n */\n if (!hasSuggestedDevtools && globalThis.__DEV__ !== false) {\n hasSuggestedDevtools = true;\n setTimeout(function () {\n if (typeof window !== \"undefined\" &&\n window.document &&\n window.top === window.self &&\n !window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__) {\n var nav = window.navigator;\n var ua = nav && nav.userAgent;\n var url = void 0;\n if (typeof ua === \"string\") {\n if (ua.indexOf(\"Chrome/\") > -1) {\n url =\n \"https://chrome.google.com/webstore/detail/\" +\n \"apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm\";\n }\n else if (ua.indexOf(\"Firefox/\") > -1) {\n url =\n \"https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/\";\n }\n }\n if (url) {\n globalThis.__DEV__ !== false && invariant.log(\"Download the Apollo DevTools for a better development \" +\n \"experience: %s\", url);\n }\n }\n }, 10000);\n }\n };\n Object.defineProperty(ApolloClient.prototype, \"documentTransform\", {\n /**\n * The `DocumentTransform` used to modify GraphQL documents before a request\n * is made. If a custom `DocumentTransform` is not provided, this will be the\n * default document transform.\n */\n get: function () {\n return this.queryManager.documentTransform;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Call this method to terminate any active client processes, making it safe\n * to dispose of this `ApolloClient` instance.\n */\n ApolloClient.prototype.stop = function () {\n this.queryManager.stop();\n };\n /**\n * This watches the cache store of the query according to the options specified and\n * returns an {@link ObservableQuery}. We can subscribe to this {@link ObservableQuery} and\n * receive updated results through a GraphQL observer when the cache store changes.\n *\n * Note that this method is not an implementation of GraphQL subscriptions. Rather,\n * it uses Apollo's store in order to reactively deliver updates to your query results.\n *\n * For example, suppose you call watchQuery on a GraphQL query that fetches a person's\n * first and last name and this person has a particular object identifier, provided by\n * dataIdFromObject. Later, a different query fetches that same person's\n * first and last name and the first name has now changed. Then, any observers associated\n * with the results of the first query will be updated with a new result object.\n *\n * Note that if the cache does not change, the subscriber will *not* be notified.\n *\n * See [here](https://medium.com/apollo-stack/the-concepts-of-graphql-bc68bd819be3#.3mb0cbcmc) for\n * a description of store reactivity.\n */\n ApolloClient.prototype.watchQuery = function (options) {\n if (this.defaultOptions.watchQuery) {\n options = mergeOptions(this.defaultOptions.watchQuery, options);\n }\n // XXX Overwriting options is probably not the best way to do this long term...\n if (this.disableNetworkFetches &&\n (options.fetchPolicy === \"network-only\" ||\n options.fetchPolicy === \"cache-and-network\")) {\n options = __assign(__assign({}, options), { fetchPolicy: \"cache-first\" });\n }\n return this.queryManager.watchQuery(options);\n };\n /**\n * This resolves a single query according to the options specified and\n * returns a `Promise` which is either resolved with the resulting data\n * or rejected with an error.\n *\n * @param options - An object of type {@link QueryOptions} that allows us to\n * describe how this query should be treated e.g. whether it should hit the\n * server at all or just resolve from the cache, etc.\n */\n ApolloClient.prototype.query = function (options) {\n if (this.defaultOptions.query) {\n options = mergeOptions(this.defaultOptions.query, options);\n }\n invariant(options.fetchPolicy !== \"cache-and-network\", 16);\n if (this.disableNetworkFetches && options.fetchPolicy === \"network-only\") {\n options = __assign(__assign({}, options), { fetchPolicy: \"cache-first\" });\n }\n return this.queryManager.query(options);\n };\n /**\n * This resolves a single mutation according to the options specified and returns a\n * Promise which is either resolved with the resulting data or rejected with an\n * error.\n *\n * It takes options as an object with the following keys and values:\n */\n ApolloClient.prototype.mutate = function (options) {\n if (this.defaultOptions.mutate) {\n options = mergeOptions(this.defaultOptions.mutate, options);\n }\n return this.queryManager.mutate(options);\n };\n /**\n * This subscribes to a graphql subscription according to the options specified and returns an\n * {@link Observable} which either emits received data or an error.\n */\n ApolloClient.prototype.subscribe = function (options) {\n return this.queryManager.startGraphQLSubscription(options);\n };\n /**\n * Tries to read some data from the store in the shape of the provided\n * GraphQL query without making a network request. This method will start at\n * the root query. To start at a specific id returned by `dataIdFromObject`\n * use `readFragment`.\n *\n * @param optimistic - Set to `true` to allow `readQuery` to return\n * optimistic results. Is `false` by default.\n */\n ApolloClient.prototype.readQuery = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return this.cache.readQuery(options, optimistic);\n };\n /**\n * Tries to read some data from the store in the shape of the provided\n * GraphQL fragment without making a network request. This method will read a\n * GraphQL fragment from any arbitrary id that is currently cached, unlike\n * `readQuery` which will only read from the root query.\n *\n * You must pass in a GraphQL document with a single fragment or a document\n * with multiple fragments that represent what you are reading. If you pass\n * in a document with multiple fragments then you must also specify a\n * `fragmentName`.\n *\n * @param optimistic - Set to `true` to allow `readFragment` to return\n * optimistic results. Is `false` by default.\n */\n ApolloClient.prototype.readFragment = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return this.cache.readFragment(options, optimistic);\n };\n /**\n * Writes some data in the shape of the provided GraphQL query directly to\n * the store. This method will start at the root query. To start at a\n * specific id returned by `dataIdFromObject` then use `writeFragment`.\n */\n ApolloClient.prototype.writeQuery = function (options) {\n var ref = this.cache.writeQuery(options);\n if (options.broadcast !== false) {\n this.queryManager.broadcastQueries();\n }\n return ref;\n };\n /**\n * Writes some data in the shape of the provided GraphQL fragment directly to\n * the store. This method will write to a GraphQL fragment from any arbitrary\n * id that is currently cached, unlike `writeQuery` which will only write\n * from the root query.\n *\n * You must pass in a GraphQL document with a single fragment or a document\n * with multiple fragments that represent what you are writing. If you pass\n * in a document with multiple fragments then you must also specify a\n * `fragmentName`.\n */\n ApolloClient.prototype.writeFragment = function (options) {\n var ref = this.cache.writeFragment(options);\n if (options.broadcast !== false) {\n this.queryManager.broadcastQueries();\n }\n return ref;\n };\n ApolloClient.prototype.__actionHookForDevTools = function (cb) {\n this.devToolsHookCb = cb;\n };\n ApolloClient.prototype.__requestRaw = function (payload) {\n return execute(this.link, payload);\n };\n /**\n * Resets your entire store by clearing out your cache and then re-executing\n * all of your active queries. This makes it so that you may guarantee that\n * there is no data left in your store from a time before you called this\n * method.\n *\n * `resetStore()` is useful when your user just logged out. You’ve removed the\n * user session, and you now want to make sure that any references to data you\n * might have fetched while the user session was active is gone.\n *\n * It is important to remember that `resetStore()` *will* refetch any active\n * queries. This means that any components that might be mounted will execute\n * their queries again using your network interface. If you do not want to\n * re-execute any queries then you should make sure to stop watching any\n * active queries.\n */\n ApolloClient.prototype.resetStore = function () {\n var _this = this;\n return Promise.resolve()\n .then(function () {\n return _this.queryManager.clearStore({\n discardWatches: false,\n });\n })\n .then(function () { return Promise.all(_this.resetStoreCallbacks.map(function (fn) { return fn(); })); })\n .then(function () { return _this.reFetchObservableQueries(); });\n };\n /**\n * Remove all data from the store. Unlike `resetStore`, `clearStore` will\n * not refetch any active queries.\n */\n ApolloClient.prototype.clearStore = function () {\n var _this = this;\n return Promise.resolve()\n .then(function () {\n return _this.queryManager.clearStore({\n discardWatches: true,\n });\n })\n .then(function () { return Promise.all(_this.clearStoreCallbacks.map(function (fn) { return fn(); })); });\n };\n /**\n * Allows callbacks to be registered that are executed when the store is\n * reset. `onResetStore` returns an unsubscribe function that can be used\n * to remove registered callbacks.\n */\n ApolloClient.prototype.onResetStore = function (cb) {\n var _this = this;\n this.resetStoreCallbacks.push(cb);\n return function () {\n _this.resetStoreCallbacks = _this.resetStoreCallbacks.filter(function (c) { return c !== cb; });\n };\n };\n /**\n * Allows callbacks to be registered that are executed when the store is\n * cleared. `onClearStore` returns an unsubscribe function that can be used\n * to remove registered callbacks.\n */\n ApolloClient.prototype.onClearStore = function (cb) {\n var _this = this;\n this.clearStoreCallbacks.push(cb);\n return function () {\n _this.clearStoreCallbacks = _this.clearStoreCallbacks.filter(function (c) { return c !== cb; });\n };\n };\n /**\n * Refetches all of your active queries.\n *\n * `reFetchObservableQueries()` is useful if you want to bring the client back to proper state in case of a network outage\n *\n * It is important to remember that `reFetchObservableQueries()` *will* refetch any active\n * queries. This means that any components that might be mounted will execute\n * their queries again using your network interface. If you do not want to\n * re-execute any queries then you should make sure to stop watching any\n * active queries.\n * Takes optional parameter `includeStandby` which will include queries in standby-mode when refetching.\n */\n ApolloClient.prototype.reFetchObservableQueries = function (includeStandby) {\n return this.queryManager.reFetchObservableQueries(includeStandby);\n };\n /**\n * Refetches specified active queries. Similar to \"reFetchObservableQueries()\" but with a specific list of queries.\n *\n * `refetchQueries()` is useful for use cases to imperatively refresh a selection of queries.\n *\n * It is important to remember that `refetchQueries()` *will* refetch specified active\n * queries. This means that any components that might be mounted will execute\n * their queries again using your network interface. If you do not want to\n * re-execute any queries then you should make sure to stop watching any\n * active queries.\n */\n ApolloClient.prototype.refetchQueries = function (options) {\n var map = this.queryManager.refetchQueries(options);\n var queries = [];\n var results = [];\n map.forEach(function (result, obsQuery) {\n queries.push(obsQuery);\n results.push(result);\n });\n var result = Promise.all(results);\n // In case you need the raw results immediately, without awaiting\n // Promise.all(results):\n result.queries = queries;\n result.results = results;\n // If you decide to ignore the result Promise because you're using\n // result.queries and result.results instead, you shouldn't have to worry\n // about preventing uncaught rejections for the Promise.all result.\n result.catch(function (error) {\n globalThis.__DEV__ !== false && invariant.debug(17, error);\n });\n return result;\n };\n /**\n * Get all currently active `ObservableQuery` objects, in a `Map` keyed by\n * query ID strings.\n *\n * An \"active\" query is one that has observers and a `fetchPolicy` other than\n * \"standby\" or \"cache-only\".\n *\n * You can include all `ObservableQuery` objects (including the inactive ones)\n * by passing \"all\" instead of \"active\", or you can include just a subset of\n * active queries by passing an array of query names or DocumentNode objects.\n */\n ApolloClient.prototype.getObservableQueries = function (include) {\n if (include === void 0) { include = \"active\"; }\n return this.queryManager.getObservableQueries(include);\n };\n /**\n * Exposes the cache's complete state, in a serializable format for later restoration.\n */\n ApolloClient.prototype.extract = function (optimistic) {\n return this.cache.extract(optimistic);\n };\n /**\n * Replaces existing state in the cache (if any) with the values expressed by\n * `serializedState`.\n *\n * Called when hydrating a cache (server side rendering, or offline storage),\n * and also (potentially) during hot reloads.\n */\n ApolloClient.prototype.restore = function (serializedState) {\n return this.cache.restore(serializedState);\n };\n /**\n * Add additional local resolvers.\n */\n ApolloClient.prototype.addResolvers = function (resolvers) {\n this.localState.addResolvers(resolvers);\n };\n /**\n * Set (override existing) local resolvers.\n */\n ApolloClient.prototype.setResolvers = function (resolvers) {\n this.localState.setResolvers(resolvers);\n };\n /**\n * Get all registered local resolvers.\n */\n ApolloClient.prototype.getResolvers = function () {\n return this.localState.getResolvers();\n };\n /**\n * Set a custom local state fragment matcher.\n */\n ApolloClient.prototype.setLocalStateFragmentMatcher = function (fragmentMatcher) {\n this.localState.setFragmentMatcher(fragmentMatcher);\n };\n /**\n * Define a new ApolloLink (or link chain) that Apollo Client will use.\n */\n ApolloClient.prototype.setLink = function (newLink) {\n this.link = this.queryManager.link = newLink;\n };\n return ApolloClient;\n}());\nexport { ApolloClient };\n","import \"../../utilities/globals/index.js\";\nexport { empty } from \"./empty.js\";\nexport { from } from \"./from.js\";\nexport { split } from \"./split.js\";\nexport { concat } from \"./concat.js\";\nexport { execute } from \"./execute.js\";\nexport { ApolloLink } from \"./ApolloLink.js\";\nexport * from \"./types.js\";\n","import { newInvariantError, invariant } from \"../../utilities/globals/index.js\";\nimport { Observable } from \"../../utilities/index.js\";\nimport { validateOperation, createOperation, transformOperation, } from \"../utils/index.js\";\nfunction passthrough(op, forward) {\n return (forward ? forward(op) : Observable.of());\n}\nfunction toLink(handler) {\n return typeof handler === \"function\" ? new ApolloLink(handler) : handler;\n}\nfunction isTerminating(link) {\n return link.request.length <= 1;\n}\nvar ApolloLink = /** @class */ (function () {\n function ApolloLink(request) {\n if (request)\n this.request = request;\n }\n ApolloLink.empty = function () {\n return new ApolloLink(function () { return Observable.of(); });\n };\n ApolloLink.from = function (links) {\n if (links.length === 0)\n return ApolloLink.empty();\n return links.map(toLink).reduce(function (x, y) { return x.concat(y); });\n };\n ApolloLink.split = function (test, left, right) {\n var leftLink = toLink(left);\n var rightLink = toLink(right || new ApolloLink(passthrough));\n if (isTerminating(leftLink) && isTerminating(rightLink)) {\n return new ApolloLink(function (operation) {\n return test(operation) ?\n leftLink.request(operation) || Observable.of()\n : rightLink.request(operation) || Observable.of();\n });\n }\n else {\n return new ApolloLink(function (operation, forward) {\n return test(operation) ?\n leftLink.request(operation, forward) || Observable.of()\n : rightLink.request(operation, forward) || Observable.of();\n });\n }\n };\n ApolloLink.execute = function (link, operation) {\n return (link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || Observable.of());\n };\n ApolloLink.concat = function (first, second) {\n var firstLink = toLink(first);\n if (isTerminating(firstLink)) {\n globalThis.__DEV__ !== false && invariant.warn(35, firstLink);\n return firstLink;\n }\n var nextLink = toLink(second);\n if (isTerminating(nextLink)) {\n return new ApolloLink(function (operation) {\n return firstLink.request(operation, function (op) { return nextLink.request(op) || Observable.of(); }) || Observable.of();\n });\n }\n else {\n return new ApolloLink(function (operation, forward) {\n return (firstLink.request(operation, function (op) {\n return nextLink.request(op, forward) || Observable.of();\n }) || Observable.of());\n });\n }\n };\n ApolloLink.prototype.split = function (test, left, right) {\n return this.concat(ApolloLink.split(test, left, right || new ApolloLink(passthrough)));\n };\n ApolloLink.prototype.concat = function (next) {\n return ApolloLink.concat(this, next);\n };\n ApolloLink.prototype.request = function (operation, forward) {\n throw newInvariantError(36);\n };\n ApolloLink.prototype.onError = function (error, observer) {\n if (observer && observer.error) {\n observer.error(error);\n // Returning false indicates that observer.error does not need to be\n // called again, since it was already called (on the previous line).\n // Calling observer.error again would not cause any real problems,\n // since only the first call matters, but custom onError functions\n // might have other reasons for wanting to prevent the default\n // behavior by returning false.\n return false;\n }\n // Throw errors will be passed to observer.error.\n throw error;\n };\n ApolloLink.prototype.setOnError = function (fn) {\n this.onError = fn;\n return this;\n };\n return ApolloLink;\n}());\nexport { ApolloLink };\n","import { ApolloLink } from \"./ApolloLink.js\";\nexport var from = ApolloLink.from;\n","import { ApolloLink } from \"./ApolloLink.js\";\nexport var split = ApolloLink.split;\n","import { ApolloLink } from \"./ApolloLink.js\";\nexport var execute = ApolloLink.execute;\n","import \"../../utilities/globals/index.js\";\nexport { parseAndCheckHttpResponse } from \"./parseAndCheckHttpResponse.js\";\nexport { serializeFetchParameter } from \"./serializeFetchParameter.js\";\nexport { fallbackHttpConfig, defaultPrinter, selectHttpOptionsAndBody, selectHttpOptionsAndBodyInternal, // needed by ../batch-http but not public\n } from \"./selectHttpOptionsAndBody.js\";\nexport { checkFetcher } from \"./checkFetcher.js\";\nexport { createSignalIfSupported } from \"./createSignalIfSupported.js\";\nexport { selectURI } from \"./selectURI.js\";\nexport { createHttpLink } from \"./createHttpLink.js\";\nexport { HttpLink } from \"./HttpLink.js\";\nexport { rewriteURIForGET } from \"./rewriteURIForGET.js\";\n","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { responseIterator } from \"./responseIterator.js\";\nimport { throwServerError } from \"../utils/index.js\";\nimport { PROTOCOL_ERRORS_SYMBOL } from \"../../errors/index.js\";\nimport { isApolloPayloadResult } from \"../../utilities/common/incrementalResult.js\";\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nexport function readMultipartBody(response, nextValue) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _b, value, done, chunk, searchFrom, bi, message, i, headers, contentType_1, body, result, next;\n var _c, _d;\n return __generator(this, function (_e) {\n switch (_e.label) {\n case 0:\n if (TextDecoder === undefined) {\n throw new Error(\"TextDecoder must be defined in the environment: please import a polyfill.\");\n }\n decoder = new TextDecoder(\"utf-8\");\n contentType = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.get(\"content-type\");\n delimiter = \"boundary=\";\n boundaryVal = (contentType === null || contentType === void 0 ? void 0 : contentType.includes(delimiter)) ?\n contentType === null || contentType === void 0 ? void 0 : contentType.substring((contentType === null || contentType === void 0 ? void 0 : contentType.indexOf(delimiter)) + delimiter.length).replace(/['\"]/g, \"\").replace(/\\;(.*)/gm, \"\").trim()\n : \"-\";\n boundary = \"\\r\\n--\".concat(boundaryVal);\n buffer = \"\";\n iterator = responseIterator(response);\n running = true;\n _e.label = 1;\n case 1:\n if (!running) return [3 /*break*/, 3];\n return [4 /*yield*/, iterator.next()];\n case 2:\n _b = _e.sent(), value = _b.value, done = _b.done;\n chunk = typeof value === \"string\" ? value : decoder.decode(value);\n searchFrom = buffer.length - boundary.length + 1;\n running = !done;\n buffer += chunk;\n bi = buffer.indexOf(boundary, searchFrom);\n while (bi > -1) {\n message = void 0;\n _c = [\n buffer.slice(0, bi),\n buffer.slice(bi + boundary.length),\n ], message = _c[0], buffer = _c[1];\n i = message.indexOf(\"\\r\\n\\r\\n\");\n headers = parseHeaders(message.slice(0, i));\n contentType_1 = headers[\"content-type\"];\n if (contentType_1 &&\n contentType_1.toLowerCase().indexOf(\"application/json\") === -1) {\n throw new Error(\"Unsupported patch content type: application/json is required.\");\n }\n body = message.slice(i);\n if (body) {\n result = parseJsonBody(response, body);\n if (Object.keys(result).length > 1 ||\n \"data\" in result ||\n \"incremental\" in result ||\n \"errors\" in result ||\n \"payload\" in result) {\n if (isApolloPayloadResult(result)) {\n next = {};\n if (\"payload\" in result) {\n next = __assign({}, result.payload);\n }\n if (\"errors\" in result) {\n next = __assign(__assign({}, next), { extensions: __assign(__assign({}, (\"extensions\" in next ? next.extensions : null)), (_d = {}, _d[PROTOCOL_ERRORS_SYMBOL] = result.errors, _d)) });\n }\n nextValue(next);\n }\n else {\n // for the last chunk with only `hasNext: false`\n // we don't need to call observer.next as there is no data/errors\n nextValue(result);\n }\n }\n else if (\n // If the chunk contains only a \"hasNext: false\", we can call\n // observer.complete() immediately.\n Object.keys(result).length === 1 &&\n \"hasNext\" in result &&\n !result.hasNext) {\n return [2 /*return*/];\n }\n }\n bi = buffer.indexOf(boundary);\n }\n return [3 /*break*/, 1];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\nexport function parseHeaders(headerText) {\n var headersInit = {};\n headerText.split(\"\\n\").forEach(function (line) {\n var i = line.indexOf(\":\");\n if (i > -1) {\n // normalize headers to lowercase\n var name_1 = line.slice(0, i).trim().toLowerCase();\n var value = line.slice(i + 1).trim();\n headersInit[name_1] = value;\n }\n });\n return headersInit;\n}\nexport function parseJsonBody(response, bodyText) {\n if (response.status >= 300) {\n // Network error\n var getResult = function () {\n try {\n return JSON.parse(bodyText);\n }\n catch (err) {\n return bodyText;\n }\n };\n throwServerError(response, getResult(), \"Response not successful: Received status code \".concat(response.status));\n }\n try {\n return JSON.parse(bodyText);\n }\n catch (err) {\n var parseError = err;\n parseError.name = \"ServerParseError\";\n parseError.response = response;\n parseError.statusCode = response.status;\n parseError.bodyText = bodyText;\n throw parseError;\n }\n}\nexport function handleError(err, observer) {\n // if it is a network error, BUT there is graphql result info fire\n // the next observer before calling error this gives apollo-client\n // (and react-apollo) the `graphqlErrors` and `networkErrors` to\n // pass to UI this should only happen if we *also* have data as\n // part of the response key per the spec\n if (err.result && err.result.errors && err.result.data) {\n // if we don't call next, the UI can only show networkError\n // because AC didn't get any graphqlErrors this is graphql\n // execution result info (i.e errors and possibly data) this is\n // because there is no formal spec how errors should translate to\n // http status codes. So an auth error (401) could have both data\n // from a public field, errors from a private field, and a status\n // of 401\n // {\n // user { // this will have errors\n // firstName\n // }\n // products { // this is public so will have data\n // cost\n // }\n // }\n //\n // the result of above *could* look like this:\n // {\n // data: { products: [{ cost: \"$10\" }] },\n // errors: [{\n // message: 'your session has timed out',\n // path: []\n // }]\n // }\n // status code of above would be a 401\n // in the UI you want to show data where you can, errors as data where you can\n // and use correct http status codes\n observer.next(err.result);\n }\n observer.error(err);\n}\nexport function parseAndCheckHttpResponse(operations) {\n return function (response) {\n return response\n .text()\n .then(function (bodyText) { return parseJsonBody(response, bodyText); })\n .then(function (result) {\n if (!Array.isArray(result) &&\n !hasOwnProperty.call(result, \"data\") &&\n !hasOwnProperty.call(result, \"errors\")) {\n // Data error\n throwServerError(response, result, \"Server response was missing for query '\".concat(Array.isArray(operations) ?\n operations.map(function (op) { return op.operationName; })\n : operations.operationName, \"'.\"));\n }\n return result;\n });\n };\n}\n","/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/index.ts\n */\nimport { canUseAsyncIteratorSymbol } from \"../../utilities/index.js\";\nimport asyncIterator from \"./iterators/async.js\";\nimport nodeStreamIterator from \"./iterators/nodeStream.js\";\nimport promiseIterator from \"./iterators/promise.js\";\nimport readerIterator from \"./iterators/reader.js\";\nfunction isNodeResponse(value) {\n return !!value.body;\n}\nfunction isReadableStream(value) {\n return !!value.getReader;\n}\nfunction isAsyncIterableIterator(value) {\n return !!(canUseAsyncIteratorSymbol &&\n value[Symbol.asyncIterator]);\n}\nfunction isStreamableBlob(value) {\n return !!value.stream;\n}\nfunction isBlob(value) {\n return !!value.arrayBuffer;\n}\nfunction isNodeReadableStream(value) {\n return !!value.pipe;\n}\nexport function responseIterator(response) {\n var body = response;\n if (isNodeResponse(response))\n body = response.body;\n if (isAsyncIterableIterator(body))\n return asyncIterator(body);\n if (isReadableStream(body))\n return readerIterator(body.getReader());\n // this errors without casting to ReadableStream\n // because Blob.stream() returns a NodeJS ReadableStream\n if (isStreamableBlob(body)) {\n return readerIterator(body.stream().getReader());\n }\n if (isBlob(body))\n return promiseIterator(body.arrayBuffer());\n if (isNodeReadableStream(body))\n return nodeStreamIterator(body);\n throw new Error(\"Unknown body type for responseIterator. Please pass a streamable response.\");\n}\n","/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/async.ts\n */\nexport default function asyncIterator(source) {\n var _a;\n var iterator = source[Symbol.asyncIterator]();\n return _a = {\n next: function () {\n return iterator.next();\n }\n },\n _a[Symbol.asyncIterator] = function () {\n return this;\n },\n _a;\n}\n","/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/nodeStream.ts\n */\nimport { canUseAsyncIteratorSymbol } from \"../../../utilities/index.js\";\nexport default function nodeStreamIterator(stream) {\n var cleanup = null;\n var error = null;\n var done = false;\n var data = [];\n var waiting = [];\n function onData(chunk) {\n if (error)\n return;\n if (waiting.length) {\n var shiftedArr = waiting.shift();\n if (Array.isArray(shiftedArr) && shiftedArr[0]) {\n return shiftedArr[0]({ value: chunk, done: false });\n }\n }\n data.push(chunk);\n }\n function onError(err) {\n error = err;\n var all = waiting.slice();\n all.forEach(function (pair) {\n pair[1](err);\n });\n !cleanup || cleanup();\n }\n function onEnd() {\n done = true;\n var all = waiting.slice();\n all.forEach(function (pair) {\n pair[0]({ value: undefined, done: true });\n });\n !cleanup || cleanup();\n }\n cleanup = function () {\n cleanup = null;\n stream.removeListener(\"data\", onData);\n stream.removeListener(\"error\", onError);\n stream.removeListener(\"end\", onEnd);\n stream.removeListener(\"finish\", onEnd);\n stream.removeListener(\"close\", onEnd);\n };\n stream.on(\"data\", onData);\n stream.on(\"error\", onError);\n stream.on(\"end\", onEnd);\n stream.on(\"finish\", onEnd);\n stream.on(\"close\", onEnd);\n function getNext() {\n return new Promise(function (resolve, reject) {\n if (error)\n return reject(error);\n if (data.length)\n return resolve({ value: data.shift(), done: false });\n if (done)\n return resolve({ value: undefined, done: true });\n waiting.push([resolve, reject]);\n });\n }\n var iterator = {\n next: function () {\n return getNext();\n },\n };\n if (canUseAsyncIteratorSymbol) {\n iterator[Symbol.asyncIterator] = function () {\n return this;\n };\n }\n return iterator;\n}\n","/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/promise.ts\n */\nimport { canUseAsyncIteratorSymbol } from \"../../../utilities/index.js\";\nexport default function promiseIterator(promise) {\n var resolved = false;\n var iterator = {\n next: function () {\n if (resolved)\n return Promise.resolve({\n value: undefined,\n done: true,\n });\n resolved = true;\n return new Promise(function (resolve, reject) {\n promise\n .then(function (value) {\n resolve({ value: value, done: false });\n })\n .catch(reject);\n });\n },\n };\n if (canUseAsyncIteratorSymbol) {\n iterator[Symbol.asyncIterator] = function () {\n return this;\n };\n }\n return iterator;\n}\n","/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/reader.ts\n */\nimport { canUseAsyncIteratorSymbol } from \"../../../utilities/index.js\";\nexport default function readerIterator(reader) {\n var iterator = {\n next: function () {\n return reader.read();\n },\n };\n if (canUseAsyncIteratorSymbol) {\n iterator[Symbol.asyncIterator] = function () {\n return this;\n };\n }\n return iterator;\n}\n","import { __extends, __spreadArray } from \"tslib\";\nimport \"../utilities/globals/index.js\";\nimport { isNonNullObject } from \"../utilities/index.js\";\n// This Symbol allows us to pass transport-specific errors from the link chain\n// into QueryManager/client internals without risking a naming collision within\n// extensions (which implementers can use as they see fit).\nexport var PROTOCOL_ERRORS_SYMBOL = Symbol();\nexport function graphQLResultHasProtocolErrors(result) {\n if (result.extensions) {\n return Array.isArray(result.extensions[PROTOCOL_ERRORS_SYMBOL]);\n }\n return false;\n}\nexport function isApolloError(err) {\n return err.hasOwnProperty(\"graphQLErrors\");\n}\n// Sets the error message on this error according to the\n// the GraphQL and network errors that are present.\n// If the error message has already been set through the\n// constructor or otherwise, this function is a nop.\nvar generateErrorMessage = function (err) {\n var errors = __spreadArray(__spreadArray(__spreadArray([], err.graphQLErrors, true), err.clientErrors, true), err.protocolErrors, true);\n if (err.networkError)\n errors.push(err.networkError);\n return (errors\n // The rest of the code sometimes unsafely types non-Error objects as GraphQLErrors\n .map(function (err) {\n return (isNonNullObject(err) && err.message) || \"Error message not found.\";\n })\n .join(\"\\n\"));\n};\nvar ApolloError = /** @class */ (function (_super) {\n __extends(ApolloError, _super);\n // Constructs an instance of ApolloError given a GraphQLError\n // or a network error. Note that one of these has to be a valid\n // value or the constructed error will be meaningless.\n function ApolloError(_a) {\n var graphQLErrors = _a.graphQLErrors, protocolErrors = _a.protocolErrors, clientErrors = _a.clientErrors, networkError = _a.networkError, errorMessage = _a.errorMessage, extraInfo = _a.extraInfo;\n var _this = _super.call(this, errorMessage) || this;\n _this.name = \"ApolloError\";\n _this.graphQLErrors = graphQLErrors || [];\n _this.protocolErrors = protocolErrors || [];\n _this.clientErrors = clientErrors || [];\n _this.networkError = networkError || null;\n _this.message = errorMessage || generateErrorMessage(_this);\n _this.extraInfo = extraInfo;\n // We're not using `Object.setPrototypeOf` here as it isn't fully\n // supported on Android (see issue #3236).\n _this.__proto__ = ApolloError.prototype;\n return _this;\n }\n return ApolloError;\n}(Error));\nexport { ApolloError };\n","import { newInvariantError } from \"../../utilities/globals/index.js\";\nexport var serializeFetchParameter = function (p, label) {\n var serialized;\n try {\n serialized = JSON.stringify(p);\n }\n catch (e) {\n var parseError = newInvariantError(39, label, e.message);\n parseError.parseError = e;\n throw parseError;\n }\n return serialized;\n};\n","import { __assign, __spreadArray } from \"tslib\";\nimport { print } from \"../../utilities/index.js\";\nvar defaultHttpOptions = {\n includeQuery: true,\n includeExtensions: false,\n preserveHeaderCase: false,\n};\nvar defaultHeaders = {\n // headers are case insensitive (https://stackoverflow.com/a/5259004)\n accept: \"*/*\",\n // The content-type header describes the type of the body of the request, and\n // so it typically only is sent with requests that actually have bodies. One\n // could imagine that Apollo Client would remove this header when constructing\n // a GET request (which has no body), but we historically have not done that.\n // This means that browsers will preflight all Apollo Client requests (even\n // GET requests). Apollo Server's CSRF prevention feature (introduced in\n // AS3.7) takes advantage of this fact and does not block requests with this\n // header. If you want to drop this header from GET requests, then you should\n // probably replace it with a `apollo-require-preflight` header, or servers\n // with CSRF prevention enabled might block your GET request. See\n // https://www.apollographql.com/docs/apollo-server/security/cors/#preventing-cross-site-request-forgery-csrf\n // for more details.\n \"content-type\": \"application/json\",\n};\nvar defaultOptions = {\n method: \"POST\",\n};\nexport var fallbackHttpConfig = {\n http: defaultHttpOptions,\n headers: defaultHeaders,\n options: defaultOptions,\n};\nexport var defaultPrinter = function (ast, printer) { return printer(ast); };\nexport function selectHttpOptionsAndBody(operation, fallbackConfig) {\n var configs = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n configs[_i - 2] = arguments[_i];\n }\n configs.unshift(fallbackConfig);\n return selectHttpOptionsAndBodyInternal.apply(void 0, __spreadArray([operation,\n defaultPrinter], configs, false));\n}\nexport function selectHttpOptionsAndBodyInternal(operation, printer) {\n var configs = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n configs[_i - 2] = arguments[_i];\n }\n var options = {};\n var http = {};\n configs.forEach(function (config) {\n options = __assign(__assign(__assign({}, options), config.options), { headers: __assign(__assign({}, options.headers), config.headers) });\n if (config.credentials) {\n options.credentials = config.credentials;\n }\n http = __assign(__assign({}, http), config.http);\n });\n if (options.headers) {\n options.headers = removeDuplicateHeaders(options.headers, http.preserveHeaderCase);\n }\n //The body depends on the http options\n var operationName = operation.operationName, extensions = operation.extensions, variables = operation.variables, query = operation.query;\n var body = { operationName: operationName, variables: variables };\n if (http.includeExtensions)\n body.extensions = extensions;\n // not sending the query (i.e persisted queries)\n if (http.includeQuery)\n body.query = printer(query, print);\n return {\n options: options,\n body: body,\n };\n}\n// Remove potential duplicate header names, preserving last (by insertion order).\n// This is done to prevent unintentionally duplicating a header instead of\n// overwriting it (See #8447 and #8449).\nfunction removeDuplicateHeaders(headers, preserveHeaderCase) {\n // If we're not preserving the case, just remove duplicates w/ normalization.\n if (!preserveHeaderCase) {\n var normalizedHeaders_1 = Object.create(null);\n Object.keys(Object(headers)).forEach(function (name) {\n normalizedHeaders_1[name.toLowerCase()] = headers[name];\n });\n return normalizedHeaders_1;\n }\n // If we are preserving the case, remove duplicates w/ normalization,\n // preserving the original name.\n // This allows for non-http-spec-compliant servers that expect intentionally\n // capitalized header names (See #6741).\n var headerData = Object.create(null);\n Object.keys(Object(headers)).forEach(function (name) {\n headerData[name.toLowerCase()] = {\n originalName: name,\n value: headers[name],\n };\n });\n var normalizedHeaders = Object.create(null);\n Object.keys(headerData).forEach(function (name) {\n normalizedHeaders[headerData[name].originalName] = headerData[name].value;\n });\n return normalizedHeaders;\n}\n","import { newInvariantError } from \"../../utilities/globals/index.js\";\nexport var checkFetcher = function (fetcher) {\n if (!fetcher && typeof fetch === \"undefined\") {\n throw newInvariantError(37);\n }\n};\n","export var selectURI = function (operation, fallbackURI) {\n var context = operation.getContext();\n var contextURI = context.uri;\n if (contextURI) {\n return contextURI;\n }\n else if (typeof fallbackURI === \"function\") {\n return fallbackURI(operation);\n }\n else {\n return fallbackURI || \"/graphql\";\n }\n};\n","import { __assign, __rest } from \"tslib\";\nimport { invariant } from \"../../utilities/globals/index.js\";\nimport { ApolloLink } from \"../core/index.js\";\nimport { Observable, hasDirectives } from \"../../utilities/index.js\";\nimport { serializeFetchParameter } from \"./serializeFetchParameter.js\";\nimport { selectURI } from \"./selectURI.js\";\nimport { handleError, readMultipartBody, parseAndCheckHttpResponse, } from \"./parseAndCheckHttpResponse.js\";\nimport { checkFetcher } from \"./checkFetcher.js\";\nimport { selectHttpOptionsAndBodyInternal, defaultPrinter, fallbackHttpConfig, } from \"./selectHttpOptionsAndBody.js\";\nimport { rewriteURIForGET } from \"./rewriteURIForGET.js\";\nimport { fromError, filterOperationVariables } from \"../utils/index.js\";\nimport { maybe, getMainDefinition, removeClientSetsFromDocument, } from \"../../utilities/index.js\";\nvar backupFetch = maybe(function () { return fetch; });\nexport var createHttpLink = function (linkOptions) {\n if (linkOptions === void 0) { linkOptions = {}; }\n var _a = linkOptions.uri, uri = _a === void 0 ? \"/graphql\" : _a, \n // use default global fetch if nothing passed in\n preferredFetch = linkOptions.fetch, _b = linkOptions.print, print = _b === void 0 ? defaultPrinter : _b, includeExtensions = linkOptions.includeExtensions, preserveHeaderCase = linkOptions.preserveHeaderCase, useGETForQueries = linkOptions.useGETForQueries, _c = linkOptions.includeUnusedVariables, includeUnusedVariables = _c === void 0 ? false : _c, requestOptions = __rest(linkOptions, [\"uri\", \"fetch\", \"print\", \"includeExtensions\", \"preserveHeaderCase\", \"useGETForQueries\", \"includeUnusedVariables\"]);\n if (globalThis.__DEV__ !== false) {\n // Make sure at least one of preferredFetch, window.fetch, or backupFetch is\n // defined, so requests won't fail at runtime.\n checkFetcher(preferredFetch || backupFetch);\n }\n var linkConfig = {\n http: { includeExtensions: includeExtensions, preserveHeaderCase: preserveHeaderCase },\n options: requestOptions.fetchOptions,\n credentials: requestOptions.credentials,\n headers: requestOptions.headers,\n };\n return new ApolloLink(function (operation) {\n var chosenURI = selectURI(operation, uri);\n var context = operation.getContext();\n // `apollographql-client-*` headers are automatically set if a\n // `clientAwareness` object is found in the context. These headers are\n // set first, followed by the rest of the headers pulled from\n // `context.headers`. If desired, `apollographql-client-*` headers set by\n // the `clientAwareness` object can be overridden by\n // `apollographql-client-*` headers set in `context.headers`.\n var clientAwarenessHeaders = {};\n if (context.clientAwareness) {\n var _a = context.clientAwareness, name_1 = _a.name, version = _a.version;\n if (name_1) {\n clientAwarenessHeaders[\"apollographql-client-name\"] = name_1;\n }\n if (version) {\n clientAwarenessHeaders[\"apollographql-client-version\"] = version;\n }\n }\n var contextHeaders = __assign(__assign({}, clientAwarenessHeaders), context.headers);\n var contextConfig = {\n http: context.http,\n options: context.fetchOptions,\n credentials: context.credentials,\n headers: contextHeaders,\n };\n if (hasDirectives([\"client\"], operation.query)) {\n var transformedQuery = removeClientSetsFromDocument(operation.query);\n if (!transformedQuery) {\n return fromError(new Error(\"HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`.\"));\n }\n operation.query = transformedQuery;\n }\n //uses fallback, link, and then context to build options\n var _b = selectHttpOptionsAndBodyInternal(operation, print, fallbackHttpConfig, linkConfig, contextConfig), options = _b.options, body = _b.body;\n if (body.variables && !includeUnusedVariables) {\n body.variables = filterOperationVariables(body.variables, operation.query);\n }\n var controller;\n if (!options.signal && typeof AbortController !== \"undefined\") {\n controller = new AbortController();\n options.signal = controller.signal;\n }\n // If requested, set method to GET if there are no mutations.\n var definitionIsMutation = function (d) {\n return d.kind === \"OperationDefinition\" && d.operation === \"mutation\";\n };\n var definitionIsSubscription = function (d) {\n return d.kind === \"OperationDefinition\" && d.operation === \"subscription\";\n };\n var isSubscription = definitionIsSubscription(getMainDefinition(operation.query));\n // does not match custom directives beginning with @defer\n var hasDefer = hasDirectives([\"defer\"], operation.query);\n if (useGETForQueries &&\n !operation.query.definitions.some(definitionIsMutation)) {\n options.method = \"GET\";\n }\n if (hasDefer || isSubscription) {\n options.headers = options.headers || {};\n var acceptHeader = \"multipart/mixed;\";\n // Omit defer-specific headers if the user attempts to defer a selection\n // set on a subscription and log a warning.\n if (isSubscription && hasDefer) {\n globalThis.__DEV__ !== false && invariant.warn(38);\n }\n if (isSubscription) {\n acceptHeader +=\n \"boundary=graphql;subscriptionSpec=1.0,application/json\";\n }\n else if (hasDefer) {\n acceptHeader += \"deferSpec=20220824,application/json\";\n }\n options.headers.accept = acceptHeader;\n }\n if (options.method === \"GET\") {\n var _c = rewriteURIForGET(chosenURI, body), newURI = _c.newURI, parseError = _c.parseError;\n if (parseError) {\n return fromError(parseError);\n }\n chosenURI = newURI;\n }\n else {\n try {\n options.body = serializeFetchParameter(body, \"Payload\");\n }\n catch (parseError) {\n return fromError(parseError);\n }\n }\n return new Observable(function (observer) {\n // Prefer linkOptions.fetch (preferredFetch) if provided, and otherwise\n // fall back to the *current* global window.fetch function (see issue\n // #7832), or (if all else fails) the backupFetch function we saved when\n // this module was first evaluated. This last option protects against the\n // removal of window.fetch, which is unlikely but not impossible.\n var currentFetch = preferredFetch || maybe(function () { return fetch; }) || backupFetch;\n var observerNext = observer.next.bind(observer);\n currentFetch(chosenURI, options)\n .then(function (response) {\n var _a;\n operation.setContext({ response: response });\n var ctype = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.get(\"content-type\");\n if (ctype !== null && /^multipart\\/mixed/i.test(ctype)) {\n return readMultipartBody(response, observerNext);\n }\n else {\n return parseAndCheckHttpResponse(operation)(response).then(observerNext);\n }\n })\n .then(function () {\n controller = undefined;\n observer.complete();\n })\n .catch(function (err) {\n controller = undefined;\n handleError(err, observer);\n });\n return function () {\n // XXX support canceling this request\n // https://developers.google.com/web/updates/2017/09/abortable-fetch\n if (controller)\n controller.abort();\n };\n });\n });\n};\n","import { serializeFetchParameter } from \"./serializeFetchParameter.js\";\n// For GET operations, returns the given URI rewritten with parameters, or a\n// parse error.\nexport function rewriteURIForGET(chosenURI, body) {\n // Implement the standard HTTP GET serialization, plus 'extensions'. Note\n // the extra level of JSON serialization!\n var queryParams = [];\n var addQueryParam = function (key, value) {\n queryParams.push(\"\".concat(key, \"=\").concat(encodeURIComponent(value)));\n };\n if (\"query\" in body) {\n addQueryParam(\"query\", body.query);\n }\n if (body.operationName) {\n addQueryParam(\"operationName\", body.operationName);\n }\n if (body.variables) {\n var serializedVariables = void 0;\n try {\n serializedVariables = serializeFetchParameter(body.variables, \"Variables map\");\n }\n catch (parseError) {\n return { parseError: parseError };\n }\n addQueryParam(\"variables\", serializedVariables);\n }\n if (body.extensions) {\n var serializedExtensions = void 0;\n try {\n serializedExtensions = serializeFetchParameter(body.extensions, \"Extensions map\");\n }\n catch (parseError) {\n return { parseError: parseError };\n }\n addQueryParam(\"extensions\", serializedExtensions);\n }\n // Reconstruct the URI with added query params.\n // XXX This assumes that the URI is well-formed and that it doesn't\n // already contain any of these query params. We could instead use the\n // URL API and take a polyfill (whatwg-url@6) for older browsers that\n // don't support URLSearchParams. Note that some browsers (and\n // versions of whatwg-url) support URL but not URLSearchParams!\n var fragment = \"\", preFragment = chosenURI;\n var fragmentStart = chosenURI.indexOf(\"#\");\n if (fragmentStart !== -1) {\n fragment = chosenURI.substr(fragmentStart);\n preFragment = chosenURI.substr(0, fragmentStart);\n }\n var queryParamsPrefix = preFragment.indexOf(\"?\") === -1 ? \"?\" : \"&\";\n var newURI = preFragment + queryParamsPrefix + queryParams.join(\"&\") + fragment;\n return { newURI: newURI };\n}\n","import { __extends } from \"tslib\";\nimport { ApolloLink } from \"../core/index.js\";\nimport { createHttpLink } from \"./createHttpLink.js\";\nvar HttpLink = /** @class */ (function (_super) {\n __extends(HttpLink, _super);\n function HttpLink(options) {\n if (options === void 0) { options = {}; }\n var _this = _super.call(this, createHttpLink(options).request) || this;\n _this.options = options;\n return _this;\n }\n return HttpLink;\n}(ApolloLink));\nexport { HttpLink };\n","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { invariant, newInvariantError } from \"../utilities/globals/index.js\";\nimport { equal } from \"@wry/equality\";\nimport { execute } from \"../link/core/index.js\";\nimport { hasDirectives, isExecutionPatchIncrementalResult, isExecutionPatchResult, removeDirectivesFromDocument, } from \"../utilities/index.js\";\nimport { canonicalStringify } from \"../cache/index.js\";\nimport { getDefaultValues, getOperationDefinition, getOperationName, hasClientExports, graphQLResultHasError, getGraphQLErrorsFromResult, canUseWeakMap, Observable, asyncMap, isNonEmptyArray, Concast, makeUniqueId, isDocumentNode, isNonNullObject, DocumentTransform, } from \"../utilities/index.js\";\nimport { mergeIncrementalData } from \"../utilities/common/incrementalResult.js\";\nimport { ApolloError, isApolloError, graphQLResultHasProtocolErrors, } from \"../errors/index.js\";\nimport { ObservableQuery, logMissingFieldErrors } from \"./ObservableQuery.js\";\nimport { NetworkStatus, isNetworkRequestInFlight } from \"./networkStatus.js\";\nimport { LocalState } from \"./LocalState.js\";\nimport { QueryInfo, shouldWriteResult, } from \"./QueryInfo.js\";\nimport { PROTOCOL_ERRORS_SYMBOL } from \"../errors/index.js\";\nimport { print } from \"../utilities/index.js\";\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar QueryManager = /** @class */ (function () {\n function QueryManager(_a) {\n var cache = _a.cache, link = _a.link, defaultOptions = _a.defaultOptions, documentTransform = _a.documentTransform, _b = _a.queryDeduplication, queryDeduplication = _b === void 0 ? false : _b, onBroadcast = _a.onBroadcast, _c = _a.ssrMode, ssrMode = _c === void 0 ? false : _c, _d = _a.clientAwareness, clientAwareness = _d === void 0 ? {} : _d, localState = _a.localState, _e = _a.assumeImmutableResults, assumeImmutableResults = _e === void 0 ? !!cache.assumeImmutableResults : _e;\n var _this = this;\n this.clientAwareness = {};\n // All the queries that the QueryManager is currently managing (not\n // including mutations and subscriptions).\n this.queries = new Map();\n // Maps from queryId strings to Promise rejection functions for\n // currently active queries and fetches.\n // Use protected instead of private field so\n // @apollo/experimental-nextjs-app-support can access type info.\n this.fetchCancelFns = new Map();\n this.transformCache = new (canUseWeakMap ? WeakMap : Map)();\n this.queryIdCounter = 1;\n this.requestIdCounter = 1;\n this.mutationIdCounter = 1;\n // Use protected instead of private field so\n // @apollo/experimental-nextjs-app-support can access type info.\n this.inFlightLinkObservables = new Map();\n var defaultDocumentTransform = new DocumentTransform(function (document) { return _this.cache.transformDocument(document); }, \n // Allow the apollo cache to manage its own transform caches\n { cache: false });\n this.cache = cache;\n this.link = link;\n this.defaultOptions = defaultOptions || Object.create(null);\n this.queryDeduplication = queryDeduplication;\n this.clientAwareness = clientAwareness;\n this.localState = localState || new LocalState({ cache: cache });\n this.ssrMode = ssrMode;\n this.assumeImmutableResults = assumeImmutableResults;\n this.documentTransform =\n documentTransform ?\n defaultDocumentTransform\n .concat(documentTransform)\n // The custom document transform may add new fragment spreads or new\n // field selections, so we want to give the cache a chance to run\n // again. For example, the InMemoryCache adds __typename to field\n // selections and fragments from the fragment registry.\n .concat(defaultDocumentTransform)\n : defaultDocumentTransform;\n if ((this.onBroadcast = onBroadcast)) {\n this.mutationStore = Object.create(null);\n }\n }\n /**\n * Call this method to terminate any active query processes, making it safe\n * to dispose of this QueryManager instance.\n */\n QueryManager.prototype.stop = function () {\n var _this = this;\n this.queries.forEach(function (_info, queryId) {\n _this.stopQueryNoBroadcast(queryId);\n });\n this.cancelPendingFetches(newInvariantError(25));\n };\n QueryManager.prototype.cancelPendingFetches = function (error) {\n this.fetchCancelFns.forEach(function (cancel) { return cancel(error); });\n this.fetchCancelFns.clear();\n };\n QueryManager.prototype.mutate = function (_a) {\n var _b, _c;\n var mutation = _a.mutation, variables = _a.variables, optimisticResponse = _a.optimisticResponse, updateQueries = _a.updateQueries, _d = _a.refetchQueries, refetchQueries = _d === void 0 ? [] : _d, _e = _a.awaitRefetchQueries, awaitRefetchQueries = _e === void 0 ? false : _e, updateWithProxyFn = _a.update, onQueryUpdated = _a.onQueryUpdated, _f = _a.fetchPolicy, fetchPolicy = _f === void 0 ? ((_b = this.defaultOptions.mutate) === null || _b === void 0 ? void 0 : _b.fetchPolicy) || \"network-only\" : _f, _g = _a.errorPolicy, errorPolicy = _g === void 0 ? ((_c = this.defaultOptions.mutate) === null || _c === void 0 ? void 0 : _c.errorPolicy) || \"none\" : _g, keepRootFields = _a.keepRootFields, context = _a.context;\n return __awaiter(this, void 0, void 0, function () {\n var mutationId, hasClientExports, mutationStoreValue, self;\n return __generator(this, function (_h) {\n switch (_h.label) {\n case 0:\n invariant(mutation, 26);\n invariant(fetchPolicy === \"network-only\" || fetchPolicy === \"no-cache\", 27);\n mutationId = this.generateMutationId();\n mutation = this.cache.transformForLink(this.transform(mutation));\n hasClientExports = this.getDocumentInfo(mutation).hasClientExports;\n variables = this.getVariables(mutation, variables);\n if (!hasClientExports) return [3 /*break*/, 2];\n return [4 /*yield*/, this.localState.addExportedVariables(mutation, variables, context)];\n case 1:\n variables = (_h.sent());\n _h.label = 2;\n case 2:\n mutationStoreValue = this.mutationStore &&\n (this.mutationStore[mutationId] = {\n mutation: mutation,\n variables: variables,\n loading: true,\n error: null,\n });\n if (optimisticResponse) {\n this.markMutationOptimistic(optimisticResponse, {\n mutationId: mutationId,\n document: mutation,\n variables: variables,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n context: context,\n updateQueries: updateQueries,\n update: updateWithProxyFn,\n keepRootFields: keepRootFields,\n });\n }\n this.broadcastQueries();\n self = this;\n return [2 /*return*/, new Promise(function (resolve, reject) {\n return asyncMap(self.getObservableFromLink(mutation, __assign(__assign({}, context), { optimisticResponse: optimisticResponse }), variables, false), function (result) {\n if (graphQLResultHasError(result) && errorPolicy === \"none\") {\n throw new ApolloError({\n graphQLErrors: getGraphQLErrorsFromResult(result),\n });\n }\n if (mutationStoreValue) {\n mutationStoreValue.loading = false;\n mutationStoreValue.error = null;\n }\n var storeResult = __assign({}, result);\n if (typeof refetchQueries === \"function\") {\n refetchQueries = refetchQueries(storeResult);\n }\n if (errorPolicy === \"ignore\" && graphQLResultHasError(storeResult)) {\n delete storeResult.errors;\n }\n return self.markMutationResult({\n mutationId: mutationId,\n result: storeResult,\n document: mutation,\n variables: variables,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n context: context,\n update: updateWithProxyFn,\n updateQueries: updateQueries,\n awaitRefetchQueries: awaitRefetchQueries,\n refetchQueries: refetchQueries,\n removeOptimistic: optimisticResponse ? mutationId : void 0,\n onQueryUpdated: onQueryUpdated,\n keepRootFields: keepRootFields,\n });\n }).subscribe({\n next: function (storeResult) {\n self.broadcastQueries();\n // Since mutations might receive multiple payloads from the\n // ApolloLink chain (e.g. when used with @defer),\n // we resolve with a SingleExecutionResult or after the final\n // ExecutionPatchResult has arrived and we have assembled the\n // multipart response into a single result.\n if (!(\"hasNext\" in storeResult) || storeResult.hasNext === false) {\n resolve(storeResult);\n }\n },\n error: function (err) {\n if (mutationStoreValue) {\n mutationStoreValue.loading = false;\n mutationStoreValue.error = err;\n }\n if (optimisticResponse) {\n self.cache.removeOptimistic(mutationId);\n }\n self.broadcastQueries();\n reject(err instanceof ApolloError ? err : (new ApolloError({\n networkError: err,\n })));\n },\n });\n })];\n }\n });\n });\n };\n QueryManager.prototype.markMutationResult = function (mutation, cache) {\n var _this = this;\n if (cache === void 0) { cache = this.cache; }\n var result = mutation.result;\n var cacheWrites = [];\n var skipCache = mutation.fetchPolicy === \"no-cache\";\n if (!skipCache && shouldWriteResult(result, mutation.errorPolicy)) {\n if (!isExecutionPatchIncrementalResult(result)) {\n cacheWrites.push({\n result: result.data,\n dataId: \"ROOT_MUTATION\",\n query: mutation.document,\n variables: mutation.variables,\n });\n }\n if (isExecutionPatchIncrementalResult(result) &&\n isNonEmptyArray(result.incremental)) {\n var diff = cache.diff({\n id: \"ROOT_MUTATION\",\n // The cache complains if passed a mutation where it expects a\n // query, so we transform mutations and subscriptions to queries\n // (only once, thanks to this.transformCache).\n query: this.getDocumentInfo(mutation.document).asQuery,\n variables: mutation.variables,\n optimistic: false,\n returnPartialData: true,\n });\n var mergedData = void 0;\n if (diff.result) {\n mergedData = mergeIncrementalData(diff.result, result);\n }\n if (typeof mergedData !== \"undefined\") {\n // cast the ExecutionPatchResult to FetchResult here since\n // ExecutionPatchResult never has `data` when returned from the server\n result.data = mergedData;\n cacheWrites.push({\n result: mergedData,\n dataId: \"ROOT_MUTATION\",\n query: mutation.document,\n variables: mutation.variables,\n });\n }\n }\n var updateQueries_1 = mutation.updateQueries;\n if (updateQueries_1) {\n this.queries.forEach(function (_a, queryId) {\n var observableQuery = _a.observableQuery;\n var queryName = observableQuery && observableQuery.queryName;\n if (!queryName || !hasOwnProperty.call(updateQueries_1, queryName)) {\n return;\n }\n var updater = updateQueries_1[queryName];\n var _b = _this.queries.get(queryId), document = _b.document, variables = _b.variables;\n // Read the current query result from the store.\n var _c = cache.diff({\n query: document,\n variables: variables,\n returnPartialData: true,\n optimistic: false,\n }), currentQueryResult = _c.result, complete = _c.complete;\n if (complete && currentQueryResult) {\n // Run our reducer using the current query result and the mutation result.\n var nextQueryResult = updater(currentQueryResult, {\n mutationResult: result,\n queryName: (document && getOperationName(document)) || void 0,\n queryVariables: variables,\n });\n // Write the modified result back into the store if we got a new result.\n if (nextQueryResult) {\n cacheWrites.push({\n result: nextQueryResult,\n dataId: \"ROOT_QUERY\",\n query: document,\n variables: variables,\n });\n }\n }\n });\n }\n }\n if (cacheWrites.length > 0 ||\n mutation.refetchQueries ||\n mutation.update ||\n mutation.onQueryUpdated ||\n mutation.removeOptimistic) {\n var results_1 = [];\n this.refetchQueries({\n updateCache: function (cache) {\n if (!skipCache) {\n cacheWrites.forEach(function (write) { return cache.write(write); });\n }\n // If the mutation has some writes associated with it then we need to\n // apply those writes to the store by running this reducer again with\n // a write action.\n var update = mutation.update;\n // Determine whether result is a SingleExecutionResult,\n // or the final ExecutionPatchResult.\n var isFinalResult = !isExecutionPatchResult(result) ||\n (isExecutionPatchIncrementalResult(result) && !result.hasNext);\n if (update) {\n if (!skipCache) {\n // Re-read the ROOT_MUTATION data we just wrote into the cache\n // (the first cache.write call in the cacheWrites.forEach loop\n // above), so field read functions have a chance to run for\n // fields within mutation result objects.\n var diff = cache.diff({\n id: \"ROOT_MUTATION\",\n // The cache complains if passed a mutation where it expects a\n // query, so we transform mutations and subscriptions to queries\n // (only once, thanks to this.transformCache).\n query: _this.getDocumentInfo(mutation.document).asQuery,\n variables: mutation.variables,\n optimistic: false,\n returnPartialData: true,\n });\n if (diff.complete) {\n result = __assign(__assign({}, result), { data: diff.result });\n if (\"incremental\" in result) {\n delete result.incremental;\n }\n if (\"hasNext\" in result) {\n delete result.hasNext;\n }\n }\n }\n // If we've received the whole response,\n // either a SingleExecutionResult or the final ExecutionPatchResult,\n // call the update function.\n if (isFinalResult) {\n update(cache, result, {\n context: mutation.context,\n variables: mutation.variables,\n });\n }\n }\n // TODO Do this with cache.evict({ id: 'ROOT_MUTATION' }) but make it\n // shallow to allow rolling back optimistic evictions.\n if (!skipCache && !mutation.keepRootFields && isFinalResult) {\n cache.modify({\n id: \"ROOT_MUTATION\",\n fields: function (value, _a) {\n var fieldName = _a.fieldName, DELETE = _a.DELETE;\n return fieldName === \"__typename\" ? value : DELETE;\n },\n });\n }\n },\n include: mutation.refetchQueries,\n // Write the final mutation.result to the root layer of the cache.\n optimistic: false,\n // Remove the corresponding optimistic layer at the same time as we\n // write the final non-optimistic result.\n removeOptimistic: mutation.removeOptimistic,\n // Let the caller of client.mutate optionally determine the refetching\n // behavior for watched queries after the mutation.update function runs.\n // If no onQueryUpdated function was provided for this mutation, pass\n // null instead of undefined to disable the default refetching behavior.\n onQueryUpdated: mutation.onQueryUpdated || null,\n }).forEach(function (result) { return results_1.push(result); });\n if (mutation.awaitRefetchQueries || mutation.onQueryUpdated) {\n // Returning a promise here makes the mutation await that promise, so we\n // include results in that promise's work if awaitRefetchQueries or an\n // onQueryUpdated function was specified.\n return Promise.all(results_1).then(function () { return result; });\n }\n }\n return Promise.resolve(result);\n };\n QueryManager.prototype.markMutationOptimistic = function (optimisticResponse, mutation) {\n var _this = this;\n var data = typeof optimisticResponse === \"function\" ?\n optimisticResponse(mutation.variables)\n : optimisticResponse;\n return this.cache.recordOptimisticTransaction(function (cache) {\n try {\n _this.markMutationResult(__assign(__assign({}, mutation), { result: { data: data } }), cache);\n }\n catch (error) {\n globalThis.__DEV__ !== false && invariant.error(error);\n }\n }, mutation.mutationId);\n };\n QueryManager.prototype.fetchQuery = function (queryId, options, networkStatus) {\n return this.fetchConcastWithInfo(queryId, options, networkStatus).concast\n .promise;\n };\n QueryManager.prototype.getQueryStore = function () {\n var store = Object.create(null);\n this.queries.forEach(function (info, queryId) {\n store[queryId] = {\n variables: info.variables,\n networkStatus: info.networkStatus,\n networkError: info.networkError,\n graphQLErrors: info.graphQLErrors,\n };\n });\n return store;\n };\n QueryManager.prototype.resetErrors = function (queryId) {\n var queryInfo = this.queries.get(queryId);\n if (queryInfo) {\n queryInfo.networkError = undefined;\n queryInfo.graphQLErrors = [];\n }\n };\n QueryManager.prototype.transform = function (document) {\n return this.documentTransform.transformDocument(document);\n };\n QueryManager.prototype.getDocumentInfo = function (document) {\n var transformCache = this.transformCache;\n if (!transformCache.has(document)) {\n var cacheEntry = {\n // TODO These three calls (hasClientExports, shouldForceResolvers, and\n // usesNonreactiveDirective) are performing independent full traversals\n // of the transformed document. We should consider merging these\n // traversals into a single pass in the future, though the work is\n // cached after the first time.\n hasClientExports: hasClientExports(document),\n hasForcedResolvers: this.localState.shouldForceResolvers(document),\n hasNonreactiveDirective: hasDirectives([\"nonreactive\"], document),\n clientQuery: this.localState.clientQuery(document),\n serverQuery: removeDirectivesFromDocument([\n { name: \"client\", remove: true },\n { name: \"connection\" },\n { name: \"nonreactive\" },\n ], document),\n defaultVars: getDefaultValues(getOperationDefinition(document)),\n // Transform any mutation or subscription operations to query operations\n // so we can read/write them from/to the cache.\n asQuery: __assign(__assign({}, document), { definitions: document.definitions.map(function (def) {\n if (def.kind === \"OperationDefinition\" &&\n def.operation !== \"query\") {\n return __assign(__assign({}, def), { operation: \"query\" });\n }\n return def;\n }) }),\n };\n transformCache.set(document, cacheEntry);\n }\n return transformCache.get(document);\n };\n QueryManager.prototype.getVariables = function (document, variables) {\n return __assign(__assign({}, this.getDocumentInfo(document).defaultVars), variables);\n };\n QueryManager.prototype.watchQuery = function (options) {\n var query = this.transform(options.query);\n // assign variable default values if supplied\n // NOTE: We don't modify options.query here with the transformed query to\n // ensure observable.options.query is set to the raw untransformed query.\n options = __assign(__assign({}, options), { variables: this.getVariables(query, options.variables) });\n if (typeof options.notifyOnNetworkStatusChange === \"undefined\") {\n options.notifyOnNetworkStatusChange = false;\n }\n var queryInfo = new QueryInfo(this);\n var observable = new ObservableQuery({\n queryManager: this,\n queryInfo: queryInfo,\n options: options,\n });\n observable[\"lastQuery\"] = query;\n this.queries.set(observable.queryId, queryInfo);\n // We give queryInfo the transformed query to ensure the first cache diff\n // uses the transformed query instead of the raw query\n queryInfo.init({\n document: query,\n observableQuery: observable,\n variables: observable.variables,\n });\n return observable;\n };\n QueryManager.prototype.query = function (options, queryId) {\n var _this = this;\n if (queryId === void 0) { queryId = this.generateQueryId(); }\n invariant(options.query, 28);\n invariant(options.query.kind === \"Document\", 29);\n invariant(!options.returnPartialData, 30);\n invariant(!options.pollInterval, 31);\n return this.fetchQuery(queryId, __assign(__assign({}, options), { query: this.transform(options.query) })).finally(function () { return _this.stopQuery(queryId); });\n };\n QueryManager.prototype.generateQueryId = function () {\n return String(this.queryIdCounter++);\n };\n QueryManager.prototype.generateRequestId = function () {\n return this.requestIdCounter++;\n };\n QueryManager.prototype.generateMutationId = function () {\n return String(this.mutationIdCounter++);\n };\n QueryManager.prototype.stopQueryInStore = function (queryId) {\n this.stopQueryInStoreNoBroadcast(queryId);\n this.broadcastQueries();\n };\n QueryManager.prototype.stopQueryInStoreNoBroadcast = function (queryId) {\n var queryInfo = this.queries.get(queryId);\n if (queryInfo)\n queryInfo.stop();\n };\n QueryManager.prototype.clearStore = function (options) {\n if (options === void 0) { options = {\n discardWatches: true,\n }; }\n // Before we have sent the reset action to the store, we can no longer\n // rely on the results returned by in-flight requests since these may\n // depend on values that previously existed in the data portion of the\n // store. So, we cancel the promises and observers that we have issued\n // so far and not yet resolved (in the case of queries).\n this.cancelPendingFetches(newInvariantError(32));\n this.queries.forEach(function (queryInfo) {\n if (queryInfo.observableQuery) {\n // Set loading to true so listeners don't trigger unless they want\n // results with partial data.\n queryInfo.networkStatus = NetworkStatus.loading;\n }\n else {\n queryInfo.stop();\n }\n });\n if (this.mutationStore) {\n this.mutationStore = Object.create(null);\n }\n // begin removing data from the store\n return this.cache.reset(options);\n };\n QueryManager.prototype.getObservableQueries = function (include) {\n var _this = this;\n if (include === void 0) { include = \"active\"; }\n var queries = new Map();\n var queryNamesAndDocs = new Map();\n var legacyQueryOptions = new Set();\n if (Array.isArray(include)) {\n include.forEach(function (desc) {\n if (typeof desc === \"string\") {\n queryNamesAndDocs.set(desc, false);\n }\n else if (isDocumentNode(desc)) {\n queryNamesAndDocs.set(_this.transform(desc), false);\n }\n else if (isNonNullObject(desc) && desc.query) {\n legacyQueryOptions.add(desc);\n }\n });\n }\n this.queries.forEach(function (_a, queryId) {\n var oq = _a.observableQuery, document = _a.document;\n if (oq) {\n if (include === \"all\") {\n queries.set(queryId, oq);\n return;\n }\n var queryName = oq.queryName, fetchPolicy = oq.options.fetchPolicy;\n if (fetchPolicy === \"standby\" ||\n (include === \"active\" && !oq.hasObservers())) {\n return;\n }\n if (include === \"active\" ||\n (queryName && queryNamesAndDocs.has(queryName)) ||\n (document && queryNamesAndDocs.has(document))) {\n queries.set(queryId, oq);\n if (queryName)\n queryNamesAndDocs.set(queryName, true);\n if (document)\n queryNamesAndDocs.set(document, true);\n }\n }\n });\n if (legacyQueryOptions.size) {\n legacyQueryOptions.forEach(function (options) {\n // We will be issuing a fresh network request for this query, so we\n // pre-allocate a new query ID here, using a special prefix to enable\n // cleaning up these temporary queries later, after fetching.\n var queryId = makeUniqueId(\"legacyOneTimeQuery\");\n var queryInfo = _this.getQuery(queryId).init({\n document: options.query,\n variables: options.variables,\n });\n var oq = new ObservableQuery({\n queryManager: _this,\n queryInfo: queryInfo,\n options: __assign(__assign({}, options), { fetchPolicy: \"network-only\" }),\n });\n invariant(oq.queryId === queryId);\n queryInfo.setObservableQuery(oq);\n queries.set(queryId, oq);\n });\n }\n if (globalThis.__DEV__ !== false && queryNamesAndDocs.size) {\n queryNamesAndDocs.forEach(function (included, nameOrDoc) {\n if (!included) {\n globalThis.__DEV__ !== false && invariant.warn(typeof nameOrDoc === \"string\" ? 33 : 34, nameOrDoc);\n }\n });\n }\n return queries;\n };\n QueryManager.prototype.reFetchObservableQueries = function (includeStandby) {\n var _this = this;\n if (includeStandby === void 0) { includeStandby = false; }\n var observableQueryPromises = [];\n this.getObservableQueries(includeStandby ? \"all\" : \"active\").forEach(function (observableQuery, queryId) {\n var fetchPolicy = observableQuery.options.fetchPolicy;\n observableQuery.resetLastResults();\n if (includeStandby ||\n (fetchPolicy !== \"standby\" && fetchPolicy !== \"cache-only\")) {\n observableQueryPromises.push(observableQuery.refetch());\n }\n _this.getQuery(queryId).setDiff(null);\n });\n this.broadcastQueries();\n return Promise.all(observableQueryPromises);\n };\n QueryManager.prototype.setObservableQuery = function (observableQuery) {\n this.getQuery(observableQuery.queryId).setObservableQuery(observableQuery);\n };\n QueryManager.prototype.startGraphQLSubscription = function (_a) {\n var _this = this;\n var query = _a.query, fetchPolicy = _a.fetchPolicy, _b = _a.errorPolicy, errorPolicy = _b === void 0 ? \"none\" : _b, variables = _a.variables, _c = _a.context, context = _c === void 0 ? {} : _c;\n query = this.transform(query);\n variables = this.getVariables(query, variables);\n var makeObservable = function (variables) {\n return _this.getObservableFromLink(query, context, variables).map(function (result) {\n if (fetchPolicy !== \"no-cache\") {\n // the subscription interface should handle not sending us results we no longer subscribe to.\n // XXX I don't think we ever send in an object with errors, but we might in the future...\n if (shouldWriteResult(result, errorPolicy)) {\n _this.cache.write({\n query: query,\n result: result.data,\n dataId: \"ROOT_SUBSCRIPTION\",\n variables: variables,\n });\n }\n _this.broadcastQueries();\n }\n var hasErrors = graphQLResultHasError(result);\n var hasProtocolErrors = graphQLResultHasProtocolErrors(result);\n if (hasErrors || hasProtocolErrors) {\n var errors = {};\n if (hasErrors) {\n errors.graphQLErrors = result.errors;\n }\n if (hasProtocolErrors) {\n errors.protocolErrors = result.extensions[PROTOCOL_ERRORS_SYMBOL];\n }\n // `errorPolicy` is a mechanism for handling GraphQL errors, according\n // to our documentation, so we throw protocol errors regardless of the\n // set error policy.\n if (errorPolicy === \"none\" || hasProtocolErrors) {\n throw new ApolloError(errors);\n }\n }\n if (errorPolicy === \"ignore\") {\n delete result.errors;\n }\n return result;\n });\n };\n if (this.getDocumentInfo(query).hasClientExports) {\n var observablePromise_1 = this.localState\n .addExportedVariables(query, variables, context)\n .then(makeObservable);\n return new Observable(function (observer) {\n var sub = null;\n observablePromise_1.then(function (observable) { return (sub = observable.subscribe(observer)); }, observer.error);\n return function () { return sub && sub.unsubscribe(); };\n });\n }\n return makeObservable(variables);\n };\n QueryManager.prototype.stopQuery = function (queryId) {\n this.stopQueryNoBroadcast(queryId);\n this.broadcastQueries();\n };\n QueryManager.prototype.stopQueryNoBroadcast = function (queryId) {\n this.stopQueryInStoreNoBroadcast(queryId);\n this.removeQuery(queryId);\n };\n QueryManager.prototype.removeQuery = function (queryId) {\n // teardown all links\n // Both `QueryManager.fetchRequest` and `QueryManager.query` create separate promises\n // that each add their reject functions to fetchCancelFns.\n // A query created with `QueryManager.query()` could trigger a `QueryManager.fetchRequest`.\n // The same queryId could have two rejection fns for two promises\n this.fetchCancelFns.delete(queryId);\n if (this.queries.has(queryId)) {\n this.getQuery(queryId).stop();\n this.queries.delete(queryId);\n }\n };\n QueryManager.prototype.broadcastQueries = function () {\n if (this.onBroadcast)\n this.onBroadcast();\n this.queries.forEach(function (info) { return info.notify(); });\n };\n QueryManager.prototype.getLocalState = function () {\n return this.localState;\n };\n QueryManager.prototype.getObservableFromLink = function (query, context, variables, \n // Prefer context.queryDeduplication if specified.\n deduplication) {\n var _this = this;\n var _a;\n if (deduplication === void 0) { deduplication = (_a = context === null || context === void 0 ? void 0 : context.queryDeduplication) !== null && _a !== void 0 ? _a : this.queryDeduplication; }\n var observable;\n var _b = this.getDocumentInfo(query), serverQuery = _b.serverQuery, clientQuery = _b.clientQuery;\n if (serverQuery) {\n var _c = this, inFlightLinkObservables_1 = _c.inFlightLinkObservables, link = _c.link;\n var operation = {\n query: serverQuery,\n variables: variables,\n operationName: getOperationName(serverQuery) || void 0,\n context: this.prepareContext(__assign(__assign({}, context), { forceFetch: !deduplication })),\n };\n context = operation.context;\n if (deduplication) {\n var printedServerQuery_1 = print(serverQuery);\n var byVariables_1 = inFlightLinkObservables_1.get(printedServerQuery_1) || new Map();\n inFlightLinkObservables_1.set(printedServerQuery_1, byVariables_1);\n var varJson_1 = canonicalStringify(variables);\n observable = byVariables_1.get(varJson_1);\n if (!observable) {\n var concast = new Concast([\n execute(link, operation),\n ]);\n byVariables_1.set(varJson_1, (observable = concast));\n concast.beforeNext(function () {\n if (byVariables_1.delete(varJson_1) && byVariables_1.size < 1) {\n inFlightLinkObservables_1.delete(printedServerQuery_1);\n }\n });\n }\n }\n else {\n observable = new Concast([\n execute(link, operation),\n ]);\n }\n }\n else {\n observable = new Concast([Observable.of({ data: {} })]);\n context = this.prepareContext(context);\n }\n if (clientQuery) {\n observable = asyncMap(observable, function (result) {\n return _this.localState.runResolvers({\n document: clientQuery,\n remoteResult: result,\n context: context,\n variables: variables,\n });\n });\n }\n return observable;\n };\n QueryManager.prototype.getResultsFromLink = function (queryInfo, cacheWriteBehavior, options) {\n var requestId = (queryInfo.lastRequestId = this.generateRequestId());\n // Performing transformForLink here gives this.cache a chance to fill in\n // missing fragment definitions (for example) before sending this document\n // through the link chain.\n var linkDocument = this.cache.transformForLink(options.query);\n return asyncMap(this.getObservableFromLink(linkDocument, options.context, options.variables), function (result) {\n var graphQLErrors = getGraphQLErrorsFromResult(result);\n var hasErrors = graphQLErrors.length > 0;\n // If we interrupted this request by calling getResultsFromLink again\n // with the same QueryInfo object, we ignore the old results.\n if (requestId >= queryInfo.lastRequestId) {\n if (hasErrors && options.errorPolicy === \"none\") {\n // Throwing here effectively calls observer.error.\n throw queryInfo.markError(new ApolloError({\n graphQLErrors: graphQLErrors,\n }));\n }\n // Use linkDocument rather than queryInfo.document so the\n // operation/fragments used to write the result are the same as the\n // ones used to obtain it from the link.\n queryInfo.markResult(result, linkDocument, options, cacheWriteBehavior);\n queryInfo.markReady();\n }\n var aqr = {\n data: result.data,\n loading: false,\n networkStatus: NetworkStatus.ready,\n };\n if (hasErrors && options.errorPolicy !== \"ignore\") {\n aqr.errors = graphQLErrors;\n aqr.networkStatus = NetworkStatus.error;\n }\n return aqr;\n }, function (networkError) {\n var error = isApolloError(networkError) ? networkError : (new ApolloError({ networkError: networkError }));\n // Avoid storing errors from older interrupted queries.\n if (requestId >= queryInfo.lastRequestId) {\n queryInfo.markError(error);\n }\n throw error;\n });\n };\n QueryManager.prototype.fetchConcastWithInfo = function (queryId, options, \n // The initial networkStatus for this fetch, most often\n // NetworkStatus.loading, but also possibly fetchMore, poll, refetch,\n // or setVariables.\n networkStatus, query) {\n var _this = this;\n if (networkStatus === void 0) { networkStatus = NetworkStatus.loading; }\n if (query === void 0) { query = options.query; }\n var variables = this.getVariables(query, options.variables);\n var queryInfo = this.getQuery(queryId);\n var defaults = this.defaultOptions.watchQuery;\n var _a = options.fetchPolicy, fetchPolicy = _a === void 0 ? (defaults && defaults.fetchPolicy) || \"cache-first\" : _a, _b = options.errorPolicy, errorPolicy = _b === void 0 ? (defaults && defaults.errorPolicy) || \"none\" : _b, _c = options.returnPartialData, returnPartialData = _c === void 0 ? false : _c, _d = options.notifyOnNetworkStatusChange, notifyOnNetworkStatusChange = _d === void 0 ? false : _d, _e = options.context, context = _e === void 0 ? {} : _e;\n var normalized = Object.assign({}, options, {\n query: query,\n variables: variables,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n returnPartialData: returnPartialData,\n notifyOnNetworkStatusChange: notifyOnNetworkStatusChange,\n context: context,\n });\n var fromVariables = function (variables) {\n // Since normalized is always a fresh copy of options, it's safe to\n // modify its properties here, rather than creating yet another new\n // WatchQueryOptions object.\n normalized.variables = variables;\n var sourcesWithInfo = _this.fetchQueryByPolicy(queryInfo, normalized, networkStatus);\n if (\n // If we're in standby, postpone advancing options.fetchPolicy using\n // applyNextFetchPolicy.\n normalized.fetchPolicy !== \"standby\" &&\n // The \"standby\" policy currently returns [] from fetchQueryByPolicy, so\n // this is another way to detect when nothing was done/fetched.\n sourcesWithInfo.sources.length > 0 &&\n queryInfo.observableQuery) {\n queryInfo.observableQuery[\"applyNextFetchPolicy\"](\"after-fetch\", options);\n }\n return sourcesWithInfo;\n };\n // This cancel function needs to be set before the concast is created,\n // in case concast creation synchronously cancels the request.\n var cleanupCancelFn = function () { return _this.fetchCancelFns.delete(queryId); };\n this.fetchCancelFns.set(queryId, function (reason) {\n cleanupCancelFn();\n // This delay ensures the concast variable has been initialized.\n setTimeout(function () { return concast.cancel(reason); });\n });\n var concast, containsDataFromLink;\n // If the query has @export(as: ...) directives, then we need to\n // process those directives asynchronously. When there are no\n // @export directives (the common case), we deliberately avoid\n // wrapping the result of this.fetchQueryByPolicy in a Promise,\n // since the timing of result delivery is (unfortunately) important\n // for backwards compatibility. TODO This code could be simpler if\n // we deprecated and removed LocalState.\n if (this.getDocumentInfo(normalized.query).hasClientExports) {\n concast = new Concast(this.localState\n .addExportedVariables(normalized.query, normalized.variables, normalized.context)\n .then(fromVariables)\n .then(function (sourcesWithInfo) { return sourcesWithInfo.sources; }));\n // there is just no way we can synchronously get the *right* value here,\n // so we will assume `true`, which is the behaviour before the bug fix in\n // #10597. This means that bug is not fixed in that case, and is probably\n // un-fixable with reasonable effort for the edge case of @export as\n // directives.\n containsDataFromLink = true;\n }\n else {\n var sourcesWithInfo = fromVariables(normalized.variables);\n containsDataFromLink = sourcesWithInfo.fromLink;\n concast = new Concast(sourcesWithInfo.sources);\n }\n concast.promise.then(cleanupCancelFn, cleanupCancelFn);\n return {\n concast: concast,\n fromLink: containsDataFromLink,\n };\n };\n QueryManager.prototype.refetchQueries = function (_a) {\n var _this = this;\n var updateCache = _a.updateCache, include = _a.include, _b = _a.optimistic, optimistic = _b === void 0 ? false : _b, _c = _a.removeOptimistic, removeOptimistic = _c === void 0 ? optimistic ? makeUniqueId(\"refetchQueries\") : void 0 : _c, onQueryUpdated = _a.onQueryUpdated;\n var includedQueriesById = new Map();\n if (include) {\n this.getObservableQueries(include).forEach(function (oq, queryId) {\n includedQueriesById.set(queryId, {\n oq: oq,\n lastDiff: _this.getQuery(queryId).getDiff(),\n });\n });\n }\n var results = new Map();\n if (updateCache) {\n this.cache.batch({\n update: updateCache,\n // Since you can perform any combination of cache reads and/or writes in\n // the cache.batch update function, its optimistic option can be either\n // a boolean or a string, representing three distinct modes of\n // operation:\n //\n // * false: read/write only the root layer\n // * true: read/write the topmost layer\n // * string: read/write a fresh optimistic layer with that ID string\n //\n // When typeof optimistic === \"string\", a new optimistic layer will be\n // temporarily created within cache.batch with that string as its ID. If\n // we then pass that same string as the removeOptimistic option, we can\n // make cache.batch immediately remove the optimistic layer after\n // running the updateCache function, triggering only one broadcast.\n //\n // However, the refetchQueries method accepts only true or false for its\n // optimistic option (not string). We interpret true to mean a temporary\n // optimistic layer should be created, to allow efficiently rolling back\n // the effect of the updateCache function, which involves passing a\n // string instead of true as the optimistic option to cache.batch, when\n // refetchQueries receives optimistic: true.\n //\n // In other words, we are deliberately not supporting the use case of\n // writing to an *existing* optimistic layer (using the refetchQueries\n // updateCache function), since that would potentially interfere with\n // other optimistic updates in progress. Instead, you can read/write\n // only the root layer by passing optimistic: false to refetchQueries,\n // or you can read/write a brand new optimistic layer that will be\n // automatically removed by passing optimistic: true.\n optimistic: (optimistic && removeOptimistic) || false,\n // The removeOptimistic option can also be provided by itself, even if\n // optimistic === false, to remove some previously-added optimistic\n // layer safely and efficiently, like we do in markMutationResult.\n //\n // If an explicit removeOptimistic string is provided with optimistic:\n // true, the removeOptimistic string will determine the ID of the\n // temporary optimistic layer, in case that ever matters.\n removeOptimistic: removeOptimistic,\n onWatchUpdated: function (watch, diff, lastDiff) {\n var oq = watch.watcher instanceof QueryInfo && watch.watcher.observableQuery;\n if (oq) {\n if (onQueryUpdated) {\n // Since we're about to handle this query now, remove it from\n // includedQueriesById, in case it was added earlier because of\n // options.include.\n includedQueriesById.delete(oq.queryId);\n var result = onQueryUpdated(oq, diff, lastDiff);\n if (result === true) {\n // The onQueryUpdated function requested the default refetching\n // behavior by returning true.\n result = oq.refetch();\n }\n // Record the result in the results Map, as long as onQueryUpdated\n // did not return false to skip/ignore this result.\n if (result !== false) {\n results.set(oq, result);\n }\n // Allow the default cache broadcast to happen, except when\n // onQueryUpdated returns false.\n return result;\n }\n if (onQueryUpdated !== null) {\n // If we don't have an onQueryUpdated function, and onQueryUpdated\n // was not disabled by passing null, make sure this query is\n // \"included\" like any other options.include-specified query.\n includedQueriesById.set(oq.queryId, { oq: oq, lastDiff: lastDiff, diff: diff });\n }\n }\n },\n });\n }\n if (includedQueriesById.size) {\n includedQueriesById.forEach(function (_a, queryId) {\n var oq = _a.oq, lastDiff = _a.lastDiff, diff = _a.diff;\n var result;\n // If onQueryUpdated is provided, we want to use it for all included\n // queries, even the QueryOptions ones.\n if (onQueryUpdated) {\n if (!diff) {\n var info = oq[\"queryInfo\"];\n info.reset(); // Force info.getDiff() to read from cache.\n diff = info.getDiff();\n }\n result = onQueryUpdated(oq, diff, lastDiff);\n }\n // Otherwise, we fall back to refetching.\n if (!onQueryUpdated || result === true) {\n result = oq.refetch();\n }\n if (result !== false) {\n results.set(oq, result);\n }\n if (queryId.indexOf(\"legacyOneTimeQuery\") >= 0) {\n _this.stopQueryNoBroadcast(queryId);\n }\n });\n }\n if (removeOptimistic) {\n // In case no updateCache callback was provided (so cache.batch was not\n // called above, and thus did not already remove the optimistic layer),\n // remove it here. Since this is a no-op when the layer has already been\n // removed, we do it even if we called cache.batch above, since it's\n // possible this.cache is an instance of some ApolloCache subclass other\n // than InMemoryCache, and does not fully support the removeOptimistic\n // option for cache.batch.\n this.cache.removeOptimistic(removeOptimistic);\n }\n return results;\n };\n QueryManager.prototype.fetchQueryByPolicy = function (queryInfo, _a, \n // The initial networkStatus for this fetch, most often\n // NetworkStatus.loading, but also possibly fetchMore, poll, refetch,\n // or setVariables.\n networkStatus) {\n var _this = this;\n var query = _a.query, variables = _a.variables, fetchPolicy = _a.fetchPolicy, refetchWritePolicy = _a.refetchWritePolicy, errorPolicy = _a.errorPolicy, returnPartialData = _a.returnPartialData, context = _a.context, notifyOnNetworkStatusChange = _a.notifyOnNetworkStatusChange;\n var oldNetworkStatus = queryInfo.networkStatus;\n queryInfo.init({\n document: query,\n variables: variables,\n networkStatus: networkStatus,\n });\n var readCache = function () { return queryInfo.getDiff(); };\n var resultsFromCache = function (diff, networkStatus) {\n if (networkStatus === void 0) { networkStatus = queryInfo.networkStatus || NetworkStatus.loading; }\n var data = diff.result;\n if (globalThis.__DEV__ !== false && !returnPartialData && !equal(data, {})) {\n logMissingFieldErrors(diff.missing);\n }\n var fromData = function (data) {\n return Observable.of(__assign({ data: data, loading: isNetworkRequestInFlight(networkStatus), networkStatus: networkStatus }, (diff.complete ? null : { partial: true })));\n };\n if (data && _this.getDocumentInfo(query).hasForcedResolvers) {\n return _this.localState\n .runResolvers({\n document: query,\n remoteResult: { data: data },\n context: context,\n variables: variables,\n onlyRunForcedResolvers: true,\n })\n .then(function (resolved) { return fromData(resolved.data || void 0); });\n }\n // Resolves https://github.com/apollographql/apollo-client/issues/10317.\n // If errorPolicy is 'none' and notifyOnNetworkStatusChange is true,\n // data was incorrectly returned from the cache on refetch:\n // if diff.missing exists, we should not return cache data.\n if (errorPolicy === \"none\" &&\n networkStatus === NetworkStatus.refetch &&\n Array.isArray(diff.missing)) {\n return fromData(void 0);\n }\n return fromData(data);\n };\n var cacheWriteBehavior = fetchPolicy === \"no-cache\" ? 0 /* CacheWriteBehavior.FORBID */\n // Watched queries must opt into overwriting existing data on refetch,\n // by passing refetchWritePolicy: \"overwrite\" in their WatchQueryOptions.\n : (networkStatus === NetworkStatus.refetch &&\n refetchWritePolicy !== \"merge\") ?\n 1 /* CacheWriteBehavior.OVERWRITE */\n : 2 /* CacheWriteBehavior.MERGE */;\n var resultsFromLink = function () {\n return _this.getResultsFromLink(queryInfo, cacheWriteBehavior, {\n query: query,\n variables: variables,\n context: context,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n });\n };\n var shouldNotify = notifyOnNetworkStatusChange &&\n typeof oldNetworkStatus === \"number\" &&\n oldNetworkStatus !== networkStatus &&\n isNetworkRequestInFlight(networkStatus);\n switch (fetchPolicy) {\n default:\n case \"cache-first\": {\n var diff = readCache();\n if (diff.complete) {\n return {\n fromLink: false,\n sources: [resultsFromCache(diff, queryInfo.markReady())],\n };\n }\n if (returnPartialData || shouldNotify) {\n return {\n fromLink: true,\n sources: [resultsFromCache(diff), resultsFromLink()],\n };\n }\n return { fromLink: true, sources: [resultsFromLink()] };\n }\n case \"cache-and-network\": {\n var diff = readCache();\n if (diff.complete || returnPartialData || shouldNotify) {\n return {\n fromLink: true,\n sources: [resultsFromCache(diff), resultsFromLink()],\n };\n }\n return { fromLink: true, sources: [resultsFromLink()] };\n }\n case \"cache-only\":\n return {\n fromLink: false,\n sources: [resultsFromCache(readCache(), queryInfo.markReady())],\n };\n case \"network-only\":\n if (shouldNotify) {\n return {\n fromLink: true,\n sources: [resultsFromCache(readCache()), resultsFromLink()],\n };\n }\n return { fromLink: true, sources: [resultsFromLink()] };\n case \"no-cache\":\n if (shouldNotify) {\n return {\n fromLink: true,\n // Note that queryInfo.getDiff() for no-cache queries does not call\n // cache.diff, but instead returns a { complete: false } stub result\n // when there is no queryInfo.diff already defined.\n sources: [resultsFromCache(queryInfo.getDiff()), resultsFromLink()],\n };\n }\n return { fromLink: true, sources: [resultsFromLink()] };\n case \"standby\":\n return { fromLink: false, sources: [] };\n }\n };\n QueryManager.prototype.getQuery = function (queryId) {\n if (queryId && !this.queries.has(queryId)) {\n this.queries.set(queryId, new QueryInfo(this, queryId));\n }\n return this.queries.get(queryId);\n };\n QueryManager.prototype.prepareContext = function (context) {\n if (context === void 0) { context = {}; }\n var newContext = this.localState.prepareContext(context);\n return __assign(__assign({}, newContext), { clientAwareness: this.clientAwareness });\n };\n return QueryManager;\n}());\nexport { QueryManager };\n","const { toString, hasOwnProperty } = Object.prototype;\nconst fnToStr = Function.prototype.toString;\nconst previousComparisons = new Map();\n/**\n * Performs a deep equality check on two JavaScript values, tolerating cycles.\n */\nexport function equal(a, b) {\n try {\n return check(a, b);\n }\n finally {\n previousComparisons.clear();\n }\n}\n// Allow default imports as well.\nexport default equal;\nfunction check(a, b) {\n // If the two values are strictly equal, our job is easy.\n if (a === b) {\n return true;\n }\n // Object.prototype.toString returns a representation of the runtime type of\n // the given value that is considerably more precise than typeof.\n const aTag = toString.call(a);\n const bTag = toString.call(b);\n // If the runtime types of a and b are different, they could maybe be equal\n // under some interpretation of equality, but for simplicity and performance\n // we just return false instead.\n if (aTag !== bTag) {\n return false;\n }\n switch (aTag) {\n case '[object Array]':\n // Arrays are a lot like other objects, but we can cheaply compare their\n // lengths as a short-cut before comparing their elements.\n if (a.length !== b.length)\n return false;\n // Fall through to object case...\n case '[object Object]': {\n if (previouslyCompared(a, b))\n return true;\n const aKeys = definedKeys(a);\n const bKeys = definedKeys(b);\n // If `a` and `b` have a different number of enumerable keys, they\n // must be different.\n const keyCount = aKeys.length;\n if (keyCount !== bKeys.length)\n return false;\n // Now make sure they have the same keys.\n for (let k = 0; k < keyCount; ++k) {\n if (!hasOwnProperty.call(b, aKeys[k])) {\n return false;\n }\n }\n // Finally, check deep equality of all child properties.\n for (let k = 0; k < keyCount; ++k) {\n const key = aKeys[k];\n if (!check(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n case '[object Error]':\n return a.name === b.name && a.message === b.message;\n case '[object Number]':\n // Handle NaN, which is !== itself.\n if (a !== a)\n return b !== b;\n // Fall through to shared +a === +b case...\n case '[object Boolean]':\n case '[object Date]':\n return +a === +b;\n case '[object RegExp]':\n case '[object String]':\n return a == `${b}`;\n case '[object Map]':\n case '[object Set]': {\n if (a.size !== b.size)\n return false;\n if (previouslyCompared(a, b))\n return true;\n const aIterator = a.entries();\n const isMap = aTag === '[object Map]';\n while (true) {\n const info = aIterator.next();\n if (info.done)\n break;\n // If a instanceof Set, aValue === aKey.\n const [aKey, aValue] = info.value;\n // So this works the same way for both Set and Map.\n if (!b.has(aKey)) {\n return false;\n }\n // However, we care about deep equality of values only when dealing\n // with Map structures.\n if (isMap && !check(aValue, b.get(aKey))) {\n return false;\n }\n }\n return true;\n }\n case '[object Uint16Array]':\n case '[object Uint8Array]': // Buffer, in Node.js.\n case '[object Uint32Array]':\n case '[object Int32Array]':\n case '[object Int8Array]':\n case '[object Int16Array]':\n case '[object ArrayBuffer]':\n // DataView doesn't need these conversions, but the equality check is\n // otherwise the same.\n a = new Uint8Array(a);\n b = new Uint8Array(b);\n // Fall through...\n case '[object DataView]': {\n let len = a.byteLength;\n if (len === b.byteLength) {\n while (len-- && a[len] === b[len]) {\n // Keep looping as long as the bytes are equal.\n }\n }\n return len === -1;\n }\n case '[object AsyncFunction]':\n case '[object GeneratorFunction]':\n case '[object AsyncGeneratorFunction]':\n case '[object Function]': {\n const aCode = fnToStr.call(a);\n if (aCode !== fnToStr.call(b)) {\n return false;\n }\n // We consider non-native functions equal if they have the same code\n // (native functions require === because their code is censored).\n // Note that this behavior is not entirely sound, since !== function\n // objects with the same code can behave differently depending on\n // their closure scope. However, any function can behave differently\n // depending on the values of its input arguments (including this)\n // and its calling context (including its closure scope), even\n // though the function object is === to itself; and it is entirely\n // possible for functions that are not === to behave exactly the\n // same under all conceivable circumstances. Because none of these\n // factors are statically decidable in JavaScript, JS function\n // equality is not well-defined. This ambiguity allows us to\n // consider the best possible heuristic among various imperfect\n // options, and equating non-native functions that have the same\n // code has enormous practical benefits, such as when comparing\n // functions that are repeatedly passed as fresh function\n // expressions within objects that are otherwise deeply equal. Since\n // any function created from the same syntactic expression (in the\n // same code location) will always stringify to the same code\n // according to fnToStr.call, we can reasonably expect these\n // repeatedly passed function expressions to have the same code, and\n // thus behave \"the same\" (with all the caveats mentioned above),\n // even though the runtime function objects are !== to one another.\n return !endsWith(aCode, nativeCodeSuffix);\n }\n }\n // Otherwise the values are not equal.\n return false;\n}\nfunction definedKeys(obj) {\n // Remember that the second argument to Array.prototype.filter will be\n // used as `this` within the callback function.\n return Object.keys(obj).filter(isDefinedKey, obj);\n}\nfunction isDefinedKey(key) {\n return this[key] !== void 0;\n}\nconst nativeCodeSuffix = \"{ [native code] }\";\nfunction endsWith(full, suffix) {\n const fromIndex = full.length - suffix.length;\n return fromIndex >= 0 &&\n full.indexOf(suffix, fromIndex) === fromIndex;\n}\nfunction previouslyCompared(a, b) {\n // Though cyclic references can make an object graph appear infinite from the\n // perspective of a depth-first traversal, the graph still contains a finite\n // number of distinct object references. We use the previousComparisons cache\n // to avoid comparing the same pair of object references more than once, which\n // guarantees termination (even if we end up comparing every object in one\n // graph to every object in the other graph, which is extremely unlikely),\n // while still allowing weird isomorphic structures (like rings with different\n // lengths) a chance to pass the equality test.\n let bSet = previousComparisons.get(a);\n if (bSet) {\n // Return true here because we can be sure false will be returned somewhere\n // else if the objects are not equivalent.\n if (bSet.has(b))\n return true;\n }\n else {\n previousComparisons.set(a, bSet = new Set);\n }\n bSet.add(b);\n return false;\n}\n","import \"../utilities/globals/index.js\";\nexport { ApolloCache } from \"./core/cache.js\";\nexport { Cache } from \"./core/types/Cache.js\";\nexport { MissingFieldError } from \"./core/types/common.js\";\nexport { isReference, makeReference } from \"../utilities/index.js\";\nexport { EntityStore } from \"./inmemory/entityStore.js\";\nexport { fieldNameFromStoreName, defaultDataIdFromObject, } from \"./inmemory/helpers.js\";\nexport { InMemoryCache } from \"./inmemory/inMemoryCache.js\";\nexport { makeVar, cacheSlot } from \"./inmemory/reactiveVars.js\";\nexport { Policies } from \"./inmemory/policies.js\";\nexport { canonicalStringify } from \"./inmemory/object-canon.js\";\nexport { createFragmentRegistry } from \"./inmemory/fragmentRegistry.js\";\nexport * from \"./inmemory/types.js\";\n","import { __assign, __rest } from \"tslib\";\nimport { wrap } from \"optimism\";\nimport { getFragmentQueryDocument } from \"../../utilities/index.js\";\nvar ApolloCache = /** @class */ (function () {\n function ApolloCache() {\n this.assumeImmutableResults = false;\n // Make sure we compute the same (===) fragment query document every\n // time we receive the same fragment in readFragment.\n this.getFragmentDoc = wrap(getFragmentQueryDocument);\n }\n // Transactional API\n // The batch method is intended to replace/subsume both performTransaction\n // and recordOptimisticTransaction, but performTransaction came first, so we\n // provide a default batch implementation that's just another way of calling\n // performTransaction. Subclasses of ApolloCache (such as InMemoryCache) can\n // override the batch method to do more interesting things with its options.\n ApolloCache.prototype.batch = function (options) {\n var _this = this;\n var optimisticId = typeof options.optimistic === \"string\" ? options.optimistic\n : options.optimistic === false ? null\n : void 0;\n var updateResult;\n this.performTransaction(function () { return (updateResult = options.update(_this)); }, optimisticId);\n return updateResult;\n };\n ApolloCache.prototype.recordOptimisticTransaction = function (transaction, optimisticId) {\n this.performTransaction(transaction, optimisticId);\n };\n // Optional API\n // Called once per input document, allowing the cache to make static changes\n // to the query, such as adding __typename fields.\n ApolloCache.prototype.transformDocument = function (document) {\n return document;\n };\n // Called before each ApolloLink request, allowing the cache to make dynamic\n // changes to the query, such as filling in missing fragment definitions.\n ApolloCache.prototype.transformForLink = function (document) {\n return document;\n };\n ApolloCache.prototype.identify = function (object) {\n return;\n };\n ApolloCache.prototype.gc = function () {\n return [];\n };\n ApolloCache.prototype.modify = function (options) {\n return false;\n };\n // DataProxy API\n ApolloCache.prototype.readQuery = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = !!options.optimistic; }\n return this.read(__assign(__assign({}, options), { rootId: options.id || \"ROOT_QUERY\", optimistic: optimistic }));\n };\n ApolloCache.prototype.readFragment = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = !!options.optimistic; }\n return this.read(__assign(__assign({}, options), { query: this.getFragmentDoc(options.fragment, options.fragmentName), rootId: options.id, optimistic: optimistic }));\n };\n ApolloCache.prototype.writeQuery = function (_a) {\n var id = _a.id, data = _a.data, options = __rest(_a, [\"id\", \"data\"]);\n return this.write(Object.assign(options, {\n dataId: id || \"ROOT_QUERY\",\n result: data,\n }));\n };\n ApolloCache.prototype.writeFragment = function (_a) {\n var id = _a.id, data = _a.data, fragment = _a.fragment, fragmentName = _a.fragmentName, options = __rest(_a, [\"id\", \"data\", \"fragment\", \"fragmentName\"]);\n return this.write(Object.assign(options, {\n query: this.getFragmentDoc(fragment, fragmentName),\n dataId: id,\n result: data,\n }));\n };\n ApolloCache.prototype.updateQuery = function (options, update) {\n return this.batch({\n update: function (cache) {\n var value = cache.readQuery(options);\n var data = update(value);\n if (data === void 0 || data === null)\n return value;\n cache.writeQuery(__assign(__assign({}, options), { data: data }));\n return data;\n },\n });\n };\n ApolloCache.prototype.updateFragment = function (options, update) {\n return this.batch({\n update: function (cache) {\n var value = cache.readFragment(options);\n var data = update(value);\n if (data === void 0 || data === null)\n return value;\n cache.writeFragment(__assign(__assign({}, options), { data: data }));\n return data;\n },\n });\n };\n return ApolloCache;\n}());\nexport { ApolloCache };\n","// A [trie](https://en.wikipedia.org/wiki/Trie) data structure that holds\n// object keys weakly, yet can also hold non-object keys, unlike the\n// native `WeakMap`.\n// If no makeData function is supplied, the looked-up data will be an empty,\n// null-prototype Object.\nconst defaultMakeData = () => Object.create(null);\n// Useful for processing arguments objects as well as arrays.\nconst { forEach, slice } = Array.prototype;\nconst { hasOwnProperty } = Object.prototype;\nexport class Trie {\n constructor(weakness = true, makeData = defaultMakeData) {\n this.weakness = weakness;\n this.makeData = makeData;\n }\n lookup(...array) {\n return this.lookupArray(array);\n }\n lookupArray(array) {\n let node = this;\n forEach.call(array, key => node = node.getChildTrie(key));\n return hasOwnProperty.call(node, \"data\")\n ? node.data\n : node.data = this.makeData(slice.call(array));\n }\n peek(...array) {\n return this.peekArray(array);\n }\n peekArray(array) {\n let node = this;\n for (let i = 0, len = array.length; node && i < len; ++i) {\n const map = this.weakness && isObjRef(array[i]) ? node.weak : node.strong;\n node = map && map.get(array[i]);\n }\n return node && node.data;\n }\n getChildTrie(key) {\n const map = this.weakness && isObjRef(key)\n ? this.weak || (this.weak = new WeakMap())\n : this.strong || (this.strong = new Map());\n let child = map.get(key);\n if (!child)\n map.set(key, child = new Trie(this.weakness, this.makeData));\n return child;\n }\n}\nfunction isObjRef(value) {\n switch (typeof value) {\n case \"object\":\n if (value === null)\n break;\n // Fall through to return true...\n case \"function\":\n return true;\n }\n return false;\n}\n","function defaultDispose() { }\nexport class StrongCache {\n constructor(max = Infinity, dispose = defaultDispose) {\n this.max = max;\n this.dispose = dispose;\n this.map = new Map();\n this.newest = null;\n this.oldest = null;\n }\n has(key) {\n return this.map.has(key);\n }\n get(key) {\n const node = this.getNode(key);\n return node && node.value;\n }\n get size() {\n return this.map.size;\n }\n getNode(key) {\n const node = this.map.get(key);\n if (node && node !== this.newest) {\n const { older, newer } = node;\n if (newer) {\n newer.older = older;\n }\n if (older) {\n older.newer = newer;\n }\n node.older = this.newest;\n node.older.newer = node;\n node.newer = null;\n this.newest = node;\n if (node === this.oldest) {\n this.oldest = newer;\n }\n }\n return node;\n }\n set(key, value) {\n let node = this.getNode(key);\n if (node) {\n return node.value = value;\n }\n node = {\n key,\n value,\n newer: null,\n older: this.newest\n };\n if (this.newest) {\n this.newest.newer = node;\n }\n this.newest = node;\n this.oldest = this.oldest || node;\n this.map.set(key, node);\n return node.value;\n }\n clean() {\n while (this.oldest && this.map.size > this.max) {\n this.delete(this.oldest.key);\n }\n }\n delete(key) {\n const node = this.map.get(key);\n if (node) {\n if (node === this.newest) {\n this.newest = node.older;\n }\n if (node === this.oldest) {\n this.oldest = node.newer;\n }\n if (node.newer) {\n node.newer.older = node.older;\n }\n if (node.older) {\n node.older.newer = node.newer;\n }\n this.map.delete(key);\n this.dispose(node.value, key);\n return true;\n }\n return false;\n }\n}\n","// This currentContext variable will only be used if the makeSlotClass\n// function is called, which happens only if this is the first copy of the\n// @wry/context package to be imported.\nlet currentContext = null;\n// This unique internal object is used to denote the absence of a value\n// for a given Slot, and is never exposed to outside code.\nconst MISSING_VALUE = {};\nlet idCounter = 1;\n// Although we can't do anything about the cost of duplicated code from\n// accidentally bundling multiple copies of the @wry/context package, we can\n// avoid creating the Slot class more than once using makeSlotClass.\nconst makeSlotClass = () => class Slot {\n constructor() {\n // If you have a Slot object, you can find out its slot.id, but you cannot\n // guess the slot.id of a Slot you don't have access to, thanks to the\n // randomized suffix.\n this.id = [\n \"slot\",\n idCounter++,\n Date.now(),\n Math.random().toString(36).slice(2),\n ].join(\":\");\n }\n hasValue() {\n for (let context = currentContext; context; context = context.parent) {\n // We use the Slot object iself as a key to its value, which means the\n // value cannot be obtained without a reference to the Slot object.\n if (this.id in context.slots) {\n const value = context.slots[this.id];\n if (value === MISSING_VALUE)\n break;\n if (context !== currentContext) {\n // Cache the value in currentContext.slots so the next lookup will\n // be faster. This caching is safe because the tree of contexts and\n // the values of the slots are logically immutable.\n currentContext.slots[this.id] = value;\n }\n return true;\n }\n }\n if (currentContext) {\n // If a value was not found for this Slot, it's never going to be found\n // no matter how many times we look it up, so we might as well cache\n // the absence of the value, too.\n currentContext.slots[this.id] = MISSING_VALUE;\n }\n return false;\n }\n getValue() {\n if (this.hasValue()) {\n return currentContext.slots[this.id];\n }\n }\n withValue(value, callback, \n // Given the prevalence of arrow functions, specifying arguments is likely\n // to be much more common than specifying `this`, hence this ordering:\n args, thisArg) {\n const slots = {\n __proto__: null,\n [this.id]: value,\n };\n const parent = currentContext;\n currentContext = { parent, slots };\n try {\n // Function.prototype.apply allows the arguments array argument to be\n // omitted or undefined, so args! is fine here.\n return callback.apply(thisArg, args);\n }\n finally {\n currentContext = parent;\n }\n }\n // Capture the current context and wrap a callback function so that it\n // reestablishes the captured context when called.\n static bind(callback) {\n const context = currentContext;\n return function () {\n const saved = currentContext;\n try {\n currentContext = context;\n return callback.apply(this, arguments);\n }\n finally {\n currentContext = saved;\n }\n };\n }\n // Immediately run a callback function without any captured context.\n static noContext(callback, \n // Given the prevalence of arrow functions, specifying arguments is likely\n // to be much more common than specifying `this`, hence this ordering:\n args, thisArg) {\n if (currentContext) {\n const saved = currentContext;\n try {\n currentContext = null;\n // Function.prototype.apply allows the arguments array argument to be\n // omitted or undefined, so args! is fine here.\n return callback.apply(thisArg, args);\n }\n finally {\n currentContext = saved;\n }\n }\n else {\n return callback.apply(thisArg, args);\n }\n }\n};\nfunction maybe(fn) {\n try {\n return fn();\n }\n catch (ignored) { }\n}\n// We store a single global implementation of the Slot class as a permanent\n// non-enumerable property of the globalThis object. This obfuscation does\n// nothing to prevent access to the Slot class, but at least it ensures the\n// implementation (i.e. currentContext) cannot be tampered with, and all copies\n// of the @wry/context package (hopefully just one) will share the same Slot\n// implementation. Since the first copy of the @wry/context package to be\n// imported wins, this technique imposes a steep cost for any future breaking\n// changes to the Slot class.\nconst globalKey = \"@wry/context:Slot\";\nconst host = \n// Prefer globalThis when available.\n// https://github.com/benjamn/wryware/issues/347\nmaybe(() => globalThis) ||\n // Fall back to global, which works in Node.js and may be converted by some\n // bundlers to the appropriate identifier (window, self, ...) depending on the\n // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224\n maybe(() => global) ||\n // Otherwise, use a dummy host that's local to this module. We used to fall\n // back to using the Array constructor as a namespace, but that was flagged in\n // https://github.com/benjamn/wryware/issues/347, and can be avoided.\n Object.create(null);\n// Whichever globalHost we're using, make TypeScript happy about the additional\n// globalKey property.\nconst globalHost = host;\nexport const Slot = globalHost[globalKey] ||\n // Earlier versions of this package stored the globalKey property on the Array\n // constructor, so we check there as well, to prevent Slot class duplication.\n Array[globalKey] ||\n (function (Slot) {\n try {\n Object.defineProperty(globalHost, globalKey, {\n value: Slot,\n enumerable: false,\n writable: false,\n // When it was possible for globalHost to be the Array constructor (a\n // legacy Slot dedup strategy), it was important for the property to be\n // configurable:true so it could be deleted. That does not seem to be as\n // important when globalHost is the global object, but I don't want to\n // cause similar problems again, and configurable:true seems safest.\n // https://github.com/endojs/endo/issues/576#issuecomment-1178274008\n configurable: true\n });\n }\n finally {\n return Slot;\n }\n })(makeSlotClass());\n","import { Slot } from \"./slot.js\";\nexport { Slot };\nexport const { bind, noContext } = Slot;\n// Like global.setTimeout, except the callback runs with captured context.\nexport { setTimeoutWithContext as setTimeout };\nfunction setTimeoutWithContext(callback, delay) {\n return setTimeout(bind(callback), delay);\n}\n// Turn any generator function into an async function (using yield instead\n// of await), with context automatically preserved across yields.\nexport function asyncFromGen(genFn) {\n return function () {\n const gen = genFn.apply(this, arguments);\n const boundNext = bind(gen.next);\n const boundThrow = bind(gen.throw);\n return new Promise((resolve, reject) => {\n function invoke(method, argument) {\n try {\n var result = method.call(gen, argument);\n }\n catch (error) {\n return reject(error);\n }\n const next = result.done ? resolve : invokeNext;\n if (isPromiseLike(result.value)) {\n result.value.then(next, result.done ? reject : invokeThrow);\n }\n else {\n next(result.value);\n }\n }\n const invokeNext = (value) => invoke(boundNext, value);\n const invokeThrow = (error) => invoke(boundThrow, error);\n invokeNext();\n });\n };\n}\nfunction isPromiseLike(value) {\n return value && typeof value.then === \"function\";\n}\n// If you use the fibers npm package to implement coroutines in Node.js,\n// you should call this function at least once to ensure context management\n// remains coherent across any yields.\nconst wrappedFibers = [];\nexport function wrapYieldingFiberMethods(Fiber) {\n // There can be only one implementation of Fiber per process, so this array\n // should never grow longer than one element.\n if (wrappedFibers.indexOf(Fiber) < 0) {\n const wrap = (obj, method) => {\n const fn = obj[method];\n obj[method] = function () {\n return noContext(fn, arguments, this);\n };\n };\n // These methods can yield, according to\n // https://github.com/laverdet/node-fibers/blob/ddebed9b8ae3883e57f822e2108e6943e5c8d2a8/fibers.js#L97-L100\n wrap(Fiber, \"yield\");\n wrap(Fiber.prototype, \"run\");\n wrap(Fiber.prototype, \"throwInto\");\n wrappedFibers.push(Fiber);\n }\n return Fiber;\n}\n","import { Slot } from \"@wry/context\";\nexport const parentEntrySlot = new Slot();\nexport function nonReactive(fn) {\n return parentEntrySlot.withValue(void 0, fn);\n}\nexport { Slot };\nexport { bind as bindContext, noContext, setTimeout, asyncFromGen, } from \"@wry/context\";\n","export const { hasOwnProperty, } = Object.prototype;\nexport const arrayFromSet = Array.from ||\n function (set) {\n const array = [];\n set.forEach(item => array.push(item));\n return array;\n };\nexport function maybeUnsubscribe(entryOrDep) {\n const { unsubscribe } = entryOrDep;\n if (typeof unsubscribe === \"function\") {\n entryOrDep.unsubscribe = void 0;\n unsubscribe();\n }\n}\n","import { parentEntrySlot } from \"./context.js\";\nimport { maybeUnsubscribe, arrayFromSet } from \"./helpers.js\";\nconst emptySetPool = [];\nconst POOL_TARGET_SIZE = 100;\n// Since this package might be used browsers, we should avoid using the\n// Node built-in assert module.\nfunction assert(condition, optionalMessage) {\n if (!condition) {\n throw new Error(optionalMessage || \"assertion failure\");\n }\n}\nfunction valueIs(a, b) {\n const len = a.length;\n return (\n // Unknown values are not equal to each other.\n len > 0 &&\n // Both values must be ordinary (or both exceptional) to be equal.\n len === b.length &&\n // The underlying value or exception must be the same.\n a[len - 1] === b[len - 1]);\n}\nfunction valueGet(value) {\n switch (value.length) {\n case 0: throw new Error(\"unknown value\");\n case 1: return value[0];\n case 2: throw value[1];\n }\n}\nfunction valueCopy(value) {\n return value.slice(0);\n}\nexport class Entry {\n constructor(fn) {\n this.fn = fn;\n this.parents = new Set();\n this.childValues = new Map();\n // When this Entry has children that are dirty, this property becomes\n // a Set containing other Entry objects, borrowed from emptySetPool.\n // When the set becomes empty, it gets recycled back to emptySetPool.\n this.dirtyChildren = null;\n this.dirty = true;\n this.recomputing = false;\n this.value = [];\n this.deps = null;\n ++Entry.count;\n }\n peek() {\n if (this.value.length === 1 && !mightBeDirty(this)) {\n rememberParent(this);\n return this.value[0];\n }\n }\n // This is the most important method of the Entry API, because it\n // determines whether the cached this.value can be returned immediately,\n // or must be recomputed. The overall performance of the caching system\n // depends on the truth of the following observations: (1) this.dirty is\n // usually false, (2) this.dirtyChildren is usually null/empty, and thus\n // (3) valueGet(this.value) is usually returned without recomputation.\n recompute(args) {\n assert(!this.recomputing, \"already recomputing\");\n rememberParent(this);\n return mightBeDirty(this)\n ? reallyRecompute(this, args)\n : valueGet(this.value);\n }\n setDirty() {\n if (this.dirty)\n return;\n this.dirty = true;\n reportDirty(this);\n // We can go ahead and unsubscribe here, since any further dirty\n // notifications we receive will be redundant, and unsubscribing may\n // free up some resources, e.g. file watchers.\n maybeUnsubscribe(this);\n }\n dispose() {\n this.setDirty();\n // Sever any dependency relationships with our own children, so those\n // children don't retain this parent Entry in their child.parents sets,\n // thereby preventing it from being fully garbage collected.\n forgetChildren(this);\n // Because this entry has been kicked out of the cache (in index.js),\n // we've lost the ability to find out if/when this entry becomes dirty,\n // whether that happens through a subscription, because of a direct call\n // to entry.setDirty(), or because one of its children becomes dirty.\n // Because of this loss of future information, we have to assume the\n // worst (that this entry might have become dirty very soon), so we must\n // immediately mark this entry's parents as dirty. Normally we could\n // just call entry.setDirty() rather than calling parent.setDirty() for\n // each parent, but that would leave this entry in parent.childValues\n // and parent.dirtyChildren, which would prevent the child from being\n // truly forgotten.\n eachParent(this, (parent, child) => {\n parent.setDirty();\n forgetChild(parent, this);\n });\n }\n forget() {\n // The code that creates Entry objects in index.ts will replace this method\n // with one that actually removes the Entry from the cache, which will also\n // trigger the entry.dispose method.\n this.dispose();\n }\n dependOn(dep) {\n dep.add(this);\n if (!this.deps) {\n this.deps = emptySetPool.pop() || new Set();\n }\n this.deps.add(dep);\n }\n forgetDeps() {\n if (this.deps) {\n arrayFromSet(this.deps).forEach(dep => dep.delete(this));\n this.deps.clear();\n emptySetPool.push(this.deps);\n this.deps = null;\n }\n }\n}\nEntry.count = 0;\nfunction rememberParent(child) {\n const parent = parentEntrySlot.getValue();\n if (parent) {\n child.parents.add(parent);\n if (!parent.childValues.has(child)) {\n parent.childValues.set(child, []);\n }\n if (mightBeDirty(child)) {\n reportDirtyChild(parent, child);\n }\n else {\n reportCleanChild(parent, child);\n }\n return parent;\n }\n}\nfunction reallyRecompute(entry, args) {\n forgetChildren(entry);\n // Set entry as the parent entry while calling recomputeNewValue(entry).\n parentEntrySlot.withValue(entry, recomputeNewValue, [entry, args]);\n if (maybeSubscribe(entry, args)) {\n // If we successfully recomputed entry.value and did not fail to\n // (re)subscribe, then this Entry is no longer explicitly dirty.\n setClean(entry);\n }\n return valueGet(entry.value);\n}\nfunction recomputeNewValue(entry, args) {\n entry.recomputing = true;\n const { normalizeResult } = entry;\n let oldValueCopy;\n if (normalizeResult && entry.value.length === 1) {\n oldValueCopy = valueCopy(entry.value);\n }\n // Make entry.value an empty array, representing an unknown value.\n entry.value.length = 0;\n try {\n // If entry.fn succeeds, entry.value will become a normal Value.\n entry.value[0] = entry.fn.apply(null, args);\n // If we have a viable oldValueCopy to compare with the (successfully\n // recomputed) new entry.value, and they are not already === identical, give\n // normalizeResult a chance to pick/choose/reuse parts of oldValueCopy[0]\n // and/or entry.value[0] to determine the final cached entry.value.\n if (normalizeResult && oldValueCopy && !valueIs(oldValueCopy, entry.value)) {\n try {\n entry.value[0] = normalizeResult(entry.value[0], oldValueCopy[0]);\n }\n catch (_a) {\n // If normalizeResult throws, just use the newer value, rather than\n // saving the exception as entry.value[1].\n }\n }\n }\n catch (e) {\n // If entry.fn throws, entry.value will hold that exception.\n entry.value[1] = e;\n }\n // Either way, this line is always reached.\n entry.recomputing = false;\n}\nfunction mightBeDirty(entry) {\n return entry.dirty || !!(entry.dirtyChildren && entry.dirtyChildren.size);\n}\nfunction setClean(entry) {\n entry.dirty = false;\n if (mightBeDirty(entry)) {\n // This Entry may still have dirty children, in which case we can't\n // let our parents know we're clean just yet.\n return;\n }\n reportClean(entry);\n}\nfunction reportDirty(child) {\n eachParent(child, reportDirtyChild);\n}\nfunction reportClean(child) {\n eachParent(child, reportCleanChild);\n}\nfunction eachParent(child, callback) {\n const parentCount = child.parents.size;\n if (parentCount) {\n const parents = arrayFromSet(child.parents);\n for (let i = 0; i < parentCount; ++i) {\n callback(parents[i], child);\n }\n }\n}\n// Let a parent Entry know that one of its children may be dirty.\nfunction reportDirtyChild(parent, child) {\n // Must have called rememberParent(child) before calling\n // reportDirtyChild(parent, child).\n assert(parent.childValues.has(child));\n assert(mightBeDirty(child));\n const parentWasClean = !mightBeDirty(parent);\n if (!parent.dirtyChildren) {\n parent.dirtyChildren = emptySetPool.pop() || new Set;\n }\n else if (parent.dirtyChildren.has(child)) {\n // If we already know this child is dirty, then we must have already\n // informed our own parents that we are dirty, so we can terminate\n // the recursion early.\n return;\n }\n parent.dirtyChildren.add(child);\n // If parent was clean before, it just became (possibly) dirty (according to\n // mightBeDirty), since we just added child to parent.dirtyChildren.\n if (parentWasClean) {\n reportDirty(parent);\n }\n}\n// Let a parent Entry know that one of its children is no longer dirty.\nfunction reportCleanChild(parent, child) {\n // Must have called rememberChild(child) before calling\n // reportCleanChild(parent, child).\n assert(parent.childValues.has(child));\n assert(!mightBeDirty(child));\n const childValue = parent.childValues.get(child);\n if (childValue.length === 0) {\n parent.childValues.set(child, valueCopy(child.value));\n }\n else if (!valueIs(childValue, child.value)) {\n parent.setDirty();\n }\n removeDirtyChild(parent, child);\n if (mightBeDirty(parent)) {\n return;\n }\n reportClean(parent);\n}\nfunction removeDirtyChild(parent, child) {\n const dc = parent.dirtyChildren;\n if (dc) {\n dc.delete(child);\n if (dc.size === 0) {\n if (emptySetPool.length < POOL_TARGET_SIZE) {\n emptySetPool.push(dc);\n }\n parent.dirtyChildren = null;\n }\n }\n}\n// Removes all children from this entry and returns an array of the\n// removed children.\nfunction forgetChildren(parent) {\n if (parent.childValues.size > 0) {\n parent.childValues.forEach((_value, child) => {\n forgetChild(parent, child);\n });\n }\n // Remove this parent Entry from any sets to which it was added by the\n // addToSet method.\n parent.forgetDeps();\n // After we forget all our children, this.dirtyChildren must be empty\n // and therefore must have been reset to null.\n assert(parent.dirtyChildren === null);\n}\nfunction forgetChild(parent, child) {\n child.parents.delete(parent);\n parent.childValues.delete(child);\n removeDirtyChild(parent, child);\n}\nfunction maybeSubscribe(entry, args) {\n if (typeof entry.subscribe === \"function\") {\n try {\n maybeUnsubscribe(entry); // Prevent double subscriptions.\n entry.unsubscribe = entry.subscribe.apply(null, args);\n }\n catch (e) {\n // If this Entry has a subscribe function and it threw an exception\n // (or an unsubscribe function it previously returned now throws),\n // return false to indicate that we were not able to subscribe (or\n // unsubscribe), and this Entry should remain dirty.\n entry.setDirty();\n return false;\n }\n }\n // Returning true indicates either that there was no entry.subscribe\n // function or that it succeeded.\n return true;\n}\n","import { parentEntrySlot } from \"./context.js\";\nimport { hasOwnProperty, maybeUnsubscribe, arrayFromSet, } from \"./helpers.js\";\nconst EntryMethods = {\n setDirty: true,\n dispose: true,\n forget: true, // Fully remove parent Entry from LRU cache and computation graph\n};\nexport function dep(options) {\n const depsByKey = new Map();\n const subscribe = options && options.subscribe;\n function depend(key) {\n const parent = parentEntrySlot.getValue();\n if (parent) {\n let dep = depsByKey.get(key);\n if (!dep) {\n depsByKey.set(key, dep = new Set);\n }\n parent.dependOn(dep);\n if (typeof subscribe === \"function\") {\n maybeUnsubscribe(dep);\n dep.unsubscribe = subscribe(key);\n }\n }\n }\n depend.dirty = function dirty(key, entryMethodName) {\n const dep = depsByKey.get(key);\n if (dep) {\n const m = (entryMethodName &&\n hasOwnProperty.call(EntryMethods, entryMethodName)) ? entryMethodName : \"setDirty\";\n // We have to use arrayFromSet(dep).forEach instead of dep.forEach,\n // because modifying a Set while iterating over it can cause elements in\n // the Set to be removed from the Set before they've been iterated over.\n arrayFromSet(dep).forEach(entry => entry[m]());\n depsByKey.delete(key);\n maybeUnsubscribe(dep);\n }\n };\n return depend;\n}\n","import { Trie } from \"@wry/trie\";\nimport { StrongCache } from \"@wry/caches\";\nimport { Entry } from \"./entry.js\";\nimport { parentEntrySlot } from \"./context.js\";\n// These helper functions are important for making optimism work with\n// asynchronous code. In order to register parent-child dependencies,\n// optimism needs to know about any currently active parent computations.\n// In ordinary synchronous code, the parent context is implicit in the\n// execution stack, but asynchronous code requires some extra guidance in\n// order to propagate context from one async task segment to the next.\nexport { bindContext, noContext, nonReactive, setTimeout, asyncFromGen, Slot, } from \"./context.js\";\n// A lighter-weight dependency, similar to OptimisticWrapperFunction, except\n// with only one argument, no makeCacheKey, no wrapped function to recompute,\n// and no result value. Useful for representing dependency leaves in the graph\n// of computation. Subscriptions are supported.\nexport { dep } from \"./dep.js\";\n// The defaultMakeCacheKey function is remarkably powerful, because it gives\n// a unique object for any shallow-identical list of arguments. If you need\n// to implement a custom makeCacheKey function, you may find it helpful to\n// delegate the final work to defaultMakeCacheKey, which is why we export it\n// here. However, you may want to avoid defaultMakeCacheKey if your runtime\n// does not support WeakMap, or you have the ability to return a string key.\n// In those cases, just write your own custom makeCacheKey functions.\nlet defaultKeyTrie;\nexport function defaultMakeCacheKey(...args) {\n const trie = defaultKeyTrie || (defaultKeyTrie = new Trie(typeof WeakMap === \"function\"));\n return trie.lookupArray(args);\n}\n// If you're paranoid about memory leaks, or you want to avoid using WeakMap\n// under the hood, but you still need the behavior of defaultMakeCacheKey,\n// import this constructor to create your own tries.\nexport { Trie as KeyTrie };\n;\nconst caches = new Set();\nexport function wrap(originalFunction, { max = Math.pow(2, 16), keyArgs, makeCacheKey = defaultMakeCacheKey, normalizeResult, subscribe, cache: cacheOption = StrongCache, } = Object.create(null)) {\n const cache = typeof cacheOption === \"function\"\n ? new cacheOption(max, entry => entry.dispose())\n : cacheOption;\n const optimistic = function () {\n const key = makeCacheKey.apply(null, keyArgs ? keyArgs.apply(null, arguments) : arguments);\n if (key === void 0) {\n return originalFunction.apply(null, arguments);\n }\n let entry = cache.get(key);\n if (!entry) {\n cache.set(key, entry = new Entry(originalFunction));\n entry.normalizeResult = normalizeResult;\n entry.subscribe = subscribe;\n // Give the Entry the ability to trigger cache.delete(key), even though\n // the Entry itself does not know about key or cache.\n entry.forget = () => cache.delete(key);\n }\n const value = entry.recompute(Array.prototype.slice.call(arguments));\n // Move this entry to the front of the least-recently used queue,\n // since we just finished computing its value.\n cache.set(key, entry);\n caches.add(cache);\n // Clean up any excess entries in the cache, but only if there is no\n // active parent entry, meaning we're not in the middle of a larger\n // computation that might be flummoxed by the cleaning.\n if (!parentEntrySlot.hasValue()) {\n caches.forEach(cache => cache.clean());\n caches.clear();\n }\n return value;\n };\n Object.defineProperty(optimistic, \"size\", {\n get: () => cache.size,\n configurable: false,\n enumerable: false,\n });\n Object.freeze(optimistic.options = {\n max,\n keyArgs,\n makeCacheKey,\n normalizeResult,\n subscribe,\n cache,\n });\n function dirtyKey(key) {\n const entry = key && cache.get(key);\n if (entry) {\n entry.setDirty();\n }\n }\n optimistic.dirtyKey = dirtyKey;\n optimistic.dirty = function dirty() {\n dirtyKey(makeCacheKey.apply(null, arguments));\n };\n function peekKey(key) {\n const entry = key && cache.get(key);\n if (entry) {\n return entry.peek();\n }\n }\n optimistic.peekKey = peekKey;\n optimistic.peek = function peek() {\n return peekKey(makeCacheKey.apply(null, arguments));\n };\n function forgetKey(key) {\n return key ? cache.delete(key) : false;\n }\n optimistic.forgetKey = forgetKey;\n optimistic.forget = function forget() {\n return forgetKey(makeCacheKey.apply(null, arguments));\n };\n optimistic.makeCacheKey = makeCacheKey;\n optimistic.getKey = keyArgs ? function getKey() {\n return makeCacheKey.apply(null, keyArgs.apply(null, arguments));\n } : makeCacheKey;\n return Object.freeze(optimistic);\n}\n","import { __extends } from \"tslib\";\nvar MissingFieldError = /** @class */ (function (_super) {\n __extends(MissingFieldError, _super);\n function MissingFieldError(message, path, query, variables) {\n var _a;\n // 'Error' breaks prototype chain here\n var _this = _super.call(this, message) || this;\n _this.message = message;\n _this.path = path;\n _this.query = query;\n _this.variables = variables;\n if (Array.isArray(_this.path)) {\n _this.missing = _this.message;\n for (var i = _this.path.length - 1; i >= 0; --i) {\n _this.missing = (_a = {}, _a[_this.path[i]] = _this.missing, _a);\n }\n }\n else {\n _this.missing = _this.path;\n }\n // We're not using `Object.setPrototypeOf` here as it isn't fully supported\n // on Android (see issue #3236).\n _this.__proto__ = MissingFieldError.prototype;\n return _this;\n }\n return MissingFieldError;\n}(Error));\nexport { MissingFieldError };\n","import { __assign, __extends, __rest } from \"tslib\";\nimport { invariant } from \"../../utilities/globals/index.js\";\nimport { dep } from \"optimism\";\nimport { equal } from \"@wry/equality\";\nimport { Trie } from \"@wry/trie\";\nimport { isReference, makeReference, DeepMerger, maybeDeepFreeze, canUseWeakMap, isNonNullObject, } from \"../../utilities/index.js\";\nimport { hasOwn, fieldNameFromStoreName } from \"./helpers.js\";\nvar DELETE = Object.create(null);\nvar delModifier = function () { return DELETE; };\nvar INVALIDATE = Object.create(null);\nvar EntityStore = /** @class */ (function () {\n function EntityStore(policies, group) {\n var _this = this;\n this.policies = policies;\n this.group = group;\n this.data = Object.create(null);\n // Maps root entity IDs to the number of times they have been retained, minus\n // the number of times they have been released. Retained entities keep other\n // entities they reference (even indirectly) from being garbage collected.\n this.rootIds = Object.create(null);\n // Lazily tracks { __ref: } strings contained by this.data[dataId].\n this.refs = Object.create(null);\n // Bound function that can be passed around to provide easy access to fields\n // of Reference objects as well as ordinary objects.\n this.getFieldValue = function (objectOrReference, storeFieldName) {\n return maybeDeepFreeze(isReference(objectOrReference) ?\n _this.get(objectOrReference.__ref, storeFieldName)\n : objectOrReference && objectOrReference[storeFieldName]);\n };\n // Returns true for non-normalized StoreObjects and non-dangling\n // References, indicating that readField(name, objOrRef) has a chance of\n // working. Useful for filtering out dangling references from lists.\n this.canRead = function (objOrRef) {\n return isReference(objOrRef) ?\n _this.has(objOrRef.__ref)\n : typeof objOrRef === \"object\";\n };\n // Bound function that converts an id or an object with a __typename and\n // primary key fields to a Reference object. If called with a Reference object,\n // that same Reference object is returned. Pass true for mergeIntoStore to persist\n // an object into the store.\n this.toReference = function (objOrIdOrRef, mergeIntoStore) {\n if (typeof objOrIdOrRef === \"string\") {\n return makeReference(objOrIdOrRef);\n }\n if (isReference(objOrIdOrRef)) {\n return objOrIdOrRef;\n }\n var id = _this.policies.identify(objOrIdOrRef)[0];\n if (id) {\n var ref = makeReference(id);\n if (mergeIntoStore) {\n _this.merge(id, objOrIdOrRef);\n }\n return ref;\n }\n };\n }\n // Although the EntityStore class is abstract, it contains concrete\n // implementations of the various NormalizedCache interface methods that\n // are inherited by the Root and Layer subclasses.\n EntityStore.prototype.toObject = function () {\n return __assign({}, this.data);\n };\n EntityStore.prototype.has = function (dataId) {\n return this.lookup(dataId, true) !== void 0;\n };\n EntityStore.prototype.get = function (dataId, fieldName) {\n this.group.depend(dataId, fieldName);\n if (hasOwn.call(this.data, dataId)) {\n var storeObject = this.data[dataId];\n if (storeObject && hasOwn.call(storeObject, fieldName)) {\n return storeObject[fieldName];\n }\n }\n if (fieldName === \"__typename\" &&\n hasOwn.call(this.policies.rootTypenamesById, dataId)) {\n return this.policies.rootTypenamesById[dataId];\n }\n if (this instanceof Layer) {\n return this.parent.get(dataId, fieldName);\n }\n };\n EntityStore.prototype.lookup = function (dataId, dependOnExistence) {\n // The has method (above) calls lookup with dependOnExistence = true, so\n // that it can later be invalidated when we add or remove a StoreObject for\n // this dataId. Any consumer who cares about the contents of the StoreObject\n // should not rely on this dependency, since the contents could change\n // without the object being added or removed.\n if (dependOnExistence)\n this.group.depend(dataId, \"__exists\");\n if (hasOwn.call(this.data, dataId)) {\n return this.data[dataId];\n }\n if (this instanceof Layer) {\n return this.parent.lookup(dataId, dependOnExistence);\n }\n if (this.policies.rootTypenamesById[dataId]) {\n return Object.create(null);\n }\n };\n EntityStore.prototype.merge = function (older, newer) {\n var _this = this;\n var dataId;\n // Convert unexpected references to ID strings.\n if (isReference(older))\n older = older.__ref;\n if (isReference(newer))\n newer = newer.__ref;\n var existing = typeof older === \"string\" ? this.lookup((dataId = older)) : older;\n var incoming = typeof newer === \"string\" ? this.lookup((dataId = newer)) : newer;\n // If newer was a string ID, but that ID was not defined in this store,\n // then there are no fields to be merged, so we're done.\n if (!incoming)\n return;\n invariant(typeof dataId === \"string\", 1);\n var merged = new DeepMerger(storeObjectReconciler).merge(existing, incoming);\n // Even if merged === existing, existing may have come from a lower\n // layer, so we always need to set this.data[dataId] on this level.\n this.data[dataId] = merged;\n if (merged !== existing) {\n delete this.refs[dataId];\n if (this.group.caching) {\n var fieldsToDirty_1 = Object.create(null);\n // If we added a new StoreObject where there was previously none, dirty\n // anything that depended on the existence of this dataId, such as the\n // EntityStore#has method.\n if (!existing)\n fieldsToDirty_1.__exists = 1;\n // Now invalidate dependents who called getFieldValue for any fields\n // that are changing as a result of this merge.\n Object.keys(incoming).forEach(function (storeFieldName) {\n if (!existing ||\n existing[storeFieldName] !== merged[storeFieldName]) {\n // Always dirty the full storeFieldName, which may include\n // serialized arguments following the fieldName prefix.\n fieldsToDirty_1[storeFieldName] = 1;\n // Also dirty fieldNameFromStoreName(storeFieldName) if it's\n // different from storeFieldName and this field does not have\n // keyArgs configured, because that means the cache can't make\n // any assumptions about how field values with the same field\n // name but different arguments might be interrelated, so it\n // must err on the side of invalidating all field values that\n // share the same short fieldName, regardless of arguments.\n var fieldName = fieldNameFromStoreName(storeFieldName);\n if (fieldName !== storeFieldName &&\n !_this.policies.hasKeyArgs(merged.__typename, fieldName)) {\n fieldsToDirty_1[fieldName] = 1;\n }\n // If merged[storeFieldName] has become undefined, and this is the\n // Root layer, actually delete the property from the merged object,\n // which is guaranteed to have been created fresh in this method.\n if (merged[storeFieldName] === void 0 && !(_this instanceof Layer)) {\n delete merged[storeFieldName];\n }\n }\n });\n if (fieldsToDirty_1.__typename &&\n !(existing && existing.__typename) &&\n // Since we return default root __typename strings\n // automatically from store.get, we don't need to dirty the\n // ROOT_QUERY.__typename field if merged.__typename is equal\n // to the default string (usually \"Query\").\n this.policies.rootTypenamesById[dataId] === merged.__typename) {\n delete fieldsToDirty_1.__typename;\n }\n Object.keys(fieldsToDirty_1).forEach(function (fieldName) {\n return _this.group.dirty(dataId, fieldName);\n });\n }\n }\n };\n EntityStore.prototype.modify = function (dataId, fields) {\n var _this = this;\n var storeObject = this.lookup(dataId);\n if (storeObject) {\n var changedFields_1 = Object.create(null);\n var needToMerge_1 = false;\n var allDeleted_1 = true;\n var sharedDetails_1 = {\n DELETE: DELETE,\n INVALIDATE: INVALIDATE,\n isReference: isReference,\n toReference: this.toReference,\n canRead: this.canRead,\n readField: function (fieldNameOrOptions, from) {\n return _this.policies.readField(typeof fieldNameOrOptions === \"string\" ?\n {\n fieldName: fieldNameOrOptions,\n from: from || makeReference(dataId),\n }\n : fieldNameOrOptions, { store: _this });\n },\n };\n Object.keys(storeObject).forEach(function (storeFieldName) {\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var fieldValue = storeObject[storeFieldName];\n if (fieldValue === void 0)\n return;\n var modify = typeof fields === \"function\" ? fields : (fields[storeFieldName] || fields[fieldName]);\n if (modify) {\n var newValue = modify === delModifier ? DELETE : (modify(maybeDeepFreeze(fieldValue), __assign(__assign({}, sharedDetails_1), { fieldName: fieldName, storeFieldName: storeFieldName, storage: _this.getStorage(dataId, storeFieldName) })));\n if (newValue === INVALIDATE) {\n _this.group.dirty(dataId, storeFieldName);\n }\n else {\n if (newValue === DELETE)\n newValue = void 0;\n if (newValue !== fieldValue) {\n changedFields_1[storeFieldName] = newValue;\n needToMerge_1 = true;\n fieldValue = newValue;\n if (globalThis.__DEV__ !== false) {\n var checkReference = function (ref) {\n if (_this.lookup(ref.__ref) === undefined) {\n globalThis.__DEV__ !== false && invariant.warn(2, ref);\n return true;\n }\n };\n if (isReference(newValue)) {\n checkReference(newValue);\n }\n else if (Array.isArray(newValue)) {\n // Warn about writing \"mixed\" arrays of Reference and non-Reference objects\n var seenReference = false;\n var someNonReference = void 0;\n for (var _i = 0, newValue_1 = newValue; _i < newValue_1.length; _i++) {\n var value = newValue_1[_i];\n if (isReference(value)) {\n seenReference = true;\n if (checkReference(value))\n break;\n }\n else {\n // Do not warn on primitive values, since those could never be represented\n // by a reference. This is a valid (albeit uncommon) use case.\n if (typeof value === \"object\" && !!value) {\n var id = _this.policies.identify(value)[0];\n // check if object could even be referenced, otherwise we are not interested in it for this warning\n if (id) {\n someNonReference = value;\n }\n }\n }\n if (seenReference && someNonReference !== undefined) {\n globalThis.__DEV__ !== false && invariant.warn(3, someNonReference);\n break;\n }\n }\n }\n }\n }\n }\n }\n if (fieldValue !== void 0) {\n allDeleted_1 = false;\n }\n });\n if (needToMerge_1) {\n this.merge(dataId, changedFields_1);\n if (allDeleted_1) {\n if (this instanceof Layer) {\n this.data[dataId] = void 0;\n }\n else {\n delete this.data[dataId];\n }\n this.group.dirty(dataId, \"__exists\");\n }\n return true;\n }\n }\n return false;\n };\n // If called with only one argument, removes the entire entity\n // identified by dataId. If called with a fieldName as well, removes all\n // fields of that entity whose names match fieldName according to the\n // fieldNameFromStoreName helper function. If called with a fieldName\n // and variables, removes all fields of that entity whose names match fieldName\n // and whose arguments when cached exactly match the variables passed.\n EntityStore.prototype.delete = function (dataId, fieldName, args) {\n var _a;\n var storeObject = this.lookup(dataId);\n if (storeObject) {\n var typename = this.getFieldValue(storeObject, \"__typename\");\n var storeFieldName = fieldName && args ?\n this.policies.getStoreFieldName({ typename: typename, fieldName: fieldName, args: args })\n : fieldName;\n return this.modify(dataId, storeFieldName ? (_a = {},\n _a[storeFieldName] = delModifier,\n _a) : delModifier);\n }\n return false;\n };\n EntityStore.prototype.evict = function (options, limit) {\n var evicted = false;\n if (options.id) {\n if (hasOwn.call(this.data, options.id)) {\n evicted = this.delete(options.id, options.fieldName, options.args);\n }\n if (this instanceof Layer && this !== limit) {\n evicted = this.parent.evict(options, limit) || evicted;\n }\n // Always invalidate the field to trigger rereading of watched\n // queries, even if no cache data was modified by the eviction,\n // because queries may depend on computed fields with custom read\n // functions, whose values are not stored in the EntityStore.\n if (options.fieldName || evicted) {\n this.group.dirty(options.id, options.fieldName || \"__exists\");\n }\n }\n return evicted;\n };\n EntityStore.prototype.clear = function () {\n this.replace(null);\n };\n EntityStore.prototype.extract = function () {\n var _this = this;\n var obj = this.toObject();\n var extraRootIds = [];\n this.getRootIdSet().forEach(function (id) {\n if (!hasOwn.call(_this.policies.rootTypenamesById, id)) {\n extraRootIds.push(id);\n }\n });\n if (extraRootIds.length) {\n obj.__META = { extraRootIds: extraRootIds.sort() };\n }\n return obj;\n };\n EntityStore.prototype.replace = function (newData) {\n var _this = this;\n Object.keys(this.data).forEach(function (dataId) {\n if (!(newData && hasOwn.call(newData, dataId))) {\n _this.delete(dataId);\n }\n });\n if (newData) {\n var __META = newData.__META, rest_1 = __rest(newData, [\"__META\"]);\n Object.keys(rest_1).forEach(function (dataId) {\n _this.merge(dataId, rest_1[dataId]);\n });\n if (__META) {\n __META.extraRootIds.forEach(this.retain, this);\n }\n }\n };\n EntityStore.prototype.retain = function (rootId) {\n return (this.rootIds[rootId] = (this.rootIds[rootId] || 0) + 1);\n };\n EntityStore.prototype.release = function (rootId) {\n if (this.rootIds[rootId] > 0) {\n var count = --this.rootIds[rootId];\n if (!count)\n delete this.rootIds[rootId];\n return count;\n }\n return 0;\n };\n // Return a Set of all the ID strings that have been retained by\n // this layer/root *and* any layers/roots beneath it.\n EntityStore.prototype.getRootIdSet = function (ids) {\n if (ids === void 0) { ids = new Set(); }\n Object.keys(this.rootIds).forEach(ids.add, ids);\n if (this instanceof Layer) {\n this.parent.getRootIdSet(ids);\n }\n else {\n // Official singleton IDs like ROOT_QUERY and ROOT_MUTATION are\n // always considered roots for garbage collection, regardless of\n // their retainment counts in this.rootIds.\n Object.keys(this.policies.rootTypenamesById).forEach(ids.add, ids);\n }\n return ids;\n };\n // The goal of garbage collection is to remove IDs from the Root layer of the\n // store that are no longer reachable starting from any IDs that have been\n // explicitly retained (see retain and release, above). Returns an array of\n // dataId strings that were removed from the store.\n EntityStore.prototype.gc = function () {\n var _this = this;\n var ids = this.getRootIdSet();\n var snapshot = this.toObject();\n ids.forEach(function (id) {\n if (hasOwn.call(snapshot, id)) {\n // Because we are iterating over an ECMAScript Set, the IDs we add here\n // will be visited in later iterations of the forEach loop only if they\n // were not previously contained by the Set.\n Object.keys(_this.findChildRefIds(id)).forEach(ids.add, ids);\n // By removing IDs from the snapshot object here, we protect them from\n // getting removed from the root store layer below.\n delete snapshot[id];\n }\n });\n var idsToRemove = Object.keys(snapshot);\n if (idsToRemove.length) {\n var root_1 = this;\n while (root_1 instanceof Layer)\n root_1 = root_1.parent;\n idsToRemove.forEach(function (id) { return root_1.delete(id); });\n }\n return idsToRemove;\n };\n EntityStore.prototype.findChildRefIds = function (dataId) {\n if (!hasOwn.call(this.refs, dataId)) {\n var found_1 = (this.refs[dataId] = Object.create(null));\n var root = this.data[dataId];\n if (!root)\n return found_1;\n var workSet_1 = new Set([root]);\n // Within the store, only arrays and objects can contain child entity\n // references, so we can prune the traversal using this predicate:\n workSet_1.forEach(function (obj) {\n if (isReference(obj)) {\n found_1[obj.__ref] = true;\n // In rare cases, a { __ref } Reference object may have other fields.\n // This often indicates a mismerging of References with StoreObjects,\n // but garbage collection should not be fooled by a stray __ref\n // property in a StoreObject (ignoring all the other fields just\n // because the StoreObject looks like a Reference). To avoid this\n // premature termination of findChildRefIds recursion, we fall through\n // to the code below, which will handle any other properties of obj.\n }\n if (isNonNullObject(obj)) {\n Object.keys(obj).forEach(function (key) {\n var child = obj[key];\n // No need to add primitive values to the workSet, since they cannot\n // contain reference objects.\n if (isNonNullObject(child)) {\n workSet_1.add(child);\n }\n });\n }\n });\n }\n return this.refs[dataId];\n };\n EntityStore.prototype.makeCacheKey = function () {\n return this.group.keyMaker.lookupArray(arguments);\n };\n return EntityStore;\n}());\nexport { EntityStore };\n// A single CacheGroup represents a set of one or more EntityStore objects,\n// typically the Root store in a CacheGroup by itself, and all active Layer\n// stores in a group together. A single EntityStore object belongs to only\n// one CacheGroup, store.group. The CacheGroup is responsible for tracking\n// dependencies, so store.group is helpful for generating unique keys for\n// cached results that need to be invalidated when/if those dependencies\n// change. If we used the EntityStore objects themselves as cache keys (that\n// is, store rather than store.group), the cache would become unnecessarily\n// fragmented by all the different Layer objects. Instead, the CacheGroup\n// approach allows all optimistic Layer objects in the same linked list to\n// belong to one CacheGroup, with the non-optimistic Root object belonging\n// to another CacheGroup, allowing resultCaching dependencies to be tracked\n// separately for optimistic and non-optimistic entity data.\nvar CacheGroup = /** @class */ (function () {\n function CacheGroup(caching, parent) {\n if (parent === void 0) { parent = null; }\n this.caching = caching;\n this.parent = parent;\n this.d = null;\n this.resetCaching();\n }\n CacheGroup.prototype.resetCaching = function () {\n this.d = this.caching ? dep() : null;\n this.keyMaker = new Trie(canUseWeakMap);\n };\n CacheGroup.prototype.depend = function (dataId, storeFieldName) {\n if (this.d) {\n this.d(makeDepKey(dataId, storeFieldName));\n var fieldName = fieldNameFromStoreName(storeFieldName);\n if (fieldName !== storeFieldName) {\n // Fields with arguments that contribute extra identifying\n // information to the fieldName (thus forming the storeFieldName)\n // depend not only on the full storeFieldName but also on the\n // short fieldName, so the field can be invalidated using either\n // level of specificity.\n this.d(makeDepKey(dataId, fieldName));\n }\n if (this.parent) {\n this.parent.depend(dataId, storeFieldName);\n }\n }\n };\n CacheGroup.prototype.dirty = function (dataId, storeFieldName) {\n if (this.d) {\n this.d.dirty(makeDepKey(dataId, storeFieldName), \n // When storeFieldName === \"__exists\", that means the entity identified\n // by dataId has either disappeared from the cache or was newly added,\n // so the result caching system would do well to \"forget everything it\n // knows\" about that object. To achieve that kind of invalidation, we\n // not only dirty the associated result cache entry, but also remove it\n // completely from the dependency graph. For the optimism implementation\n // details, see https://github.com/benjamn/optimism/pull/195.\n storeFieldName === \"__exists\" ? \"forget\" : \"setDirty\");\n }\n };\n return CacheGroup;\n}());\nfunction makeDepKey(dataId, storeFieldName) {\n // Since field names cannot have '#' characters in them, this method\n // of joining the field name and the ID should be unambiguous, and much\n // cheaper than JSON.stringify([dataId, fieldName]).\n return storeFieldName + \"#\" + dataId;\n}\nexport function maybeDependOnExistenceOfEntity(store, entityId) {\n if (supportsResultCaching(store)) {\n // We use this pseudo-field __exists elsewhere in the EntityStore code to\n // represent changes in the existence of the entity object identified by\n // entityId. This dependency gets reliably dirtied whenever an object with\n // this ID is deleted (or newly created) within this group, so any result\n // cache entries (for example, StoreReader#executeSelectionSet results) that\n // depend on __exists for this entityId will get dirtied as well, leading to\n // the eventual recomputation (instead of reuse) of those result objects the\n // next time someone reads them from the cache.\n store.group.depend(entityId, \"__exists\");\n }\n}\n(function (EntityStore) {\n // Refer to this class as EntityStore.Root outside this namespace.\n var Root = /** @class */ (function (_super) {\n __extends(Root, _super);\n function Root(_a) {\n var policies = _a.policies, _b = _a.resultCaching, resultCaching = _b === void 0 ? true : _b, seed = _a.seed;\n var _this = _super.call(this, policies, new CacheGroup(resultCaching)) || this;\n _this.stump = new Stump(_this);\n _this.storageTrie = new Trie(canUseWeakMap);\n if (seed)\n _this.replace(seed);\n return _this;\n }\n Root.prototype.addLayer = function (layerId, replay) {\n // Adding an optimistic Layer on top of the Root actually adds the Layer\n // on top of the Stump, so the Stump always comes between the Root and\n // any Layer objects that we've added.\n return this.stump.addLayer(layerId, replay);\n };\n Root.prototype.removeLayer = function () {\n // Never remove the root layer.\n return this;\n };\n Root.prototype.getStorage = function () {\n return this.storageTrie.lookupArray(arguments);\n };\n return Root;\n }(EntityStore));\n EntityStore.Root = Root;\n})(EntityStore || (EntityStore = {}));\n// Not exported, since all Layer instances are created by the addLayer method\n// of the EntityStore.Root class.\nvar Layer = /** @class */ (function (_super) {\n __extends(Layer, _super);\n function Layer(id, parent, replay, group) {\n var _this = _super.call(this, parent.policies, group) || this;\n _this.id = id;\n _this.parent = parent;\n _this.replay = replay;\n _this.group = group;\n replay(_this);\n return _this;\n }\n Layer.prototype.addLayer = function (layerId, replay) {\n return new Layer(layerId, this, replay, this.group);\n };\n Layer.prototype.removeLayer = function (layerId) {\n var _this = this;\n // Remove all instances of the given id, not just the first one.\n var parent = this.parent.removeLayer(layerId);\n if (layerId === this.id) {\n if (this.group.caching) {\n // Dirty every ID we're removing. Technically we might be able to avoid\n // dirtying fields that have values in higher layers, but we don't have\n // easy access to higher layers here, and we're about to recreate those\n // layers anyway (see parent.addLayer below).\n Object.keys(this.data).forEach(function (dataId) {\n var ownStoreObject = _this.data[dataId];\n var parentStoreObject = parent[\"lookup\"](dataId);\n if (!parentStoreObject) {\n // The StoreObject identified by dataId was defined in this layer\n // but will be undefined in the parent layer, so we can delete the\n // whole entity using this.delete(dataId). Since we're about to\n // throw this layer away, the only goal of this deletion is to dirty\n // the removed fields.\n _this.delete(dataId);\n }\n else if (!ownStoreObject) {\n // This layer had an entry for dataId but it was undefined, which\n // means the entity was deleted in this layer, and it's about to\n // become undeleted when we remove this layer, so we need to dirty\n // all fields that are about to be reexposed.\n _this.group.dirty(dataId, \"__exists\");\n Object.keys(parentStoreObject).forEach(function (storeFieldName) {\n _this.group.dirty(dataId, storeFieldName);\n });\n }\n else if (ownStoreObject !== parentStoreObject) {\n // If ownStoreObject is not exactly the same as parentStoreObject,\n // dirty any fields whose values will change as a result of this\n // removal.\n Object.keys(ownStoreObject).forEach(function (storeFieldName) {\n if (!equal(ownStoreObject[storeFieldName], parentStoreObject[storeFieldName])) {\n _this.group.dirty(dataId, storeFieldName);\n }\n });\n }\n });\n }\n return parent;\n }\n // No changes are necessary if the parent chain remains identical.\n if (parent === this.parent)\n return this;\n // Recreate this layer on top of the new parent.\n return parent.addLayer(this.id, this.replay);\n };\n Layer.prototype.toObject = function () {\n return __assign(__assign({}, this.parent.toObject()), this.data);\n };\n Layer.prototype.findChildRefIds = function (dataId) {\n var fromParent = this.parent.findChildRefIds(dataId);\n return hasOwn.call(this.data, dataId) ? __assign(__assign({}, fromParent), _super.prototype.findChildRefIds.call(this, dataId)) : fromParent;\n };\n Layer.prototype.getStorage = function () {\n var p = this.parent;\n while (p.parent)\n p = p.parent;\n return p.getStorage.apply(p, \n // @ts-expect-error\n arguments);\n };\n return Layer;\n}(EntityStore));\n// Represents a Layer permanently installed just above the Root, which allows\n// reading optimistically (and registering optimistic dependencies) even when\n// no optimistic layers are currently active. The stump.group CacheGroup object\n// is shared by any/all Layer objects added on top of the Stump.\nvar Stump = /** @class */ (function (_super) {\n __extends(Stump, _super);\n function Stump(root) {\n return _super.call(this, \"EntityStore.Stump\", root, function () { }, new CacheGroup(root.group.caching, root.group)) || this;\n }\n Stump.prototype.removeLayer = function () {\n // Never remove the Stump layer.\n return this;\n };\n Stump.prototype.merge = function (older, newer) {\n // We never want to write any data into the Stump, so we forward any merge\n // calls to the Root instead. Another option here would be to throw an\n // exception, but the toReference(object, true) function can sometimes\n // trigger Stump writes (which used to be Root writes, before the Stump\n // concept was introduced).\n return this.parent.merge(older, newer);\n };\n return Stump;\n}(Layer));\nfunction storeObjectReconciler(existingObject, incomingObject, property) {\n var existingValue = existingObject[property];\n var incomingValue = incomingObject[property];\n // Wherever there is a key collision, prefer the incoming value, unless\n // it is deeply equal to the existing value. It's worth checking deep\n // equality here (even though blindly returning incoming would be\n // logically correct) because preserving the referential identity of\n // existing data can prevent needless rereading and rerendering.\n return equal(existingValue, incomingValue) ? existingValue : incomingValue;\n}\nexport function supportsResultCaching(store) {\n // When result caching is disabled, store.depend will be null.\n return !!(store instanceof EntityStore && store.group.caching);\n}\n","import { isReference, isField, DeepMerger, resultKeyNameFromField, shouldInclude, isNonNullObject, compact, createFragmentMap, getFragmentDefinitions, isArray, } from \"../../utilities/index.js\";\nexport var hasOwn = Object.prototype.hasOwnProperty;\nexport function isNullish(value) {\n return value === null || value === void 0;\n}\nexport { isArray };\nexport function defaultDataIdFromObject(_a, context) {\n var __typename = _a.__typename, id = _a.id, _id = _a._id;\n if (typeof __typename === \"string\") {\n if (context) {\n context.keyObject =\n !isNullish(id) ? { id: id }\n : !isNullish(_id) ? { _id: _id }\n : void 0;\n }\n // If there is no object.id, fall back to object._id.\n if (isNullish(id) && !isNullish(_id)) {\n id = _id;\n }\n if (!isNullish(id)) {\n return \"\".concat(__typename, \":\").concat(typeof id === \"number\" || typeof id === \"string\" ?\n id\n : JSON.stringify(id));\n }\n }\n}\nvar defaultConfig = {\n dataIdFromObject: defaultDataIdFromObject,\n addTypename: true,\n resultCaching: true,\n // Thanks to the shouldCanonizeResults helper, this should be the only line\n // you have to change to reenable canonization by default in the future.\n canonizeResults: false,\n};\nexport function normalizeConfig(config) {\n return compact(defaultConfig, config);\n}\nexport function shouldCanonizeResults(config) {\n var value = config.canonizeResults;\n return value === void 0 ? defaultConfig.canonizeResults : value;\n}\nexport function getTypenameFromStoreObject(store, objectOrReference) {\n return isReference(objectOrReference) ?\n store.get(objectOrReference.__ref, \"__typename\")\n : objectOrReference && objectOrReference.__typename;\n}\nexport var TypeOrFieldNameRegExp = /^[_a-z][_0-9a-z]*/i;\nexport function fieldNameFromStoreName(storeFieldName) {\n var match = storeFieldName.match(TypeOrFieldNameRegExp);\n return match ? match[0] : storeFieldName;\n}\nexport function selectionSetMatchesResult(selectionSet, result, variables) {\n if (isNonNullObject(result)) {\n return isArray(result) ?\n result.every(function (item) {\n return selectionSetMatchesResult(selectionSet, item, variables);\n })\n : selectionSet.selections.every(function (field) {\n if (isField(field) && shouldInclude(field, variables)) {\n var key = resultKeyNameFromField(field);\n return (hasOwn.call(result, key) &&\n (!field.selectionSet ||\n selectionSetMatchesResult(field.selectionSet, result[key], variables)));\n }\n // If the selection has been skipped with @skip(true) or\n // @include(false), it should not count against the matching. If\n // the selection is not a field, it must be a fragment (inline or\n // named). We will determine if selectionSetMatchesResult for that\n // fragment when we get to it, so for now we return true.\n return true;\n });\n }\n return false;\n}\nexport function storeValueIsStoreObject(value) {\n return isNonNullObject(value) && !isReference(value) && !isArray(value);\n}\nexport function makeProcessedFieldsMerger() {\n return new DeepMerger();\n}\nexport function extractFragmentContext(document, fragments) {\n // FragmentMap consisting only of fragments defined directly in document, not\n // including other fragments registered in the FragmentRegistry.\n var fragmentMap = createFragmentMap(getFragmentDefinitions(document));\n return {\n fragmentMap: fragmentMap,\n lookupFragment: function (name) {\n var def = fragmentMap[name];\n if (!def && fragments) {\n def = fragments.lookup(name);\n }\n return def || null;\n },\n };\n}\n","import { __assign, __extends } from \"tslib\";\nimport { invariant } from \"../../utilities/globals/index.js\";\n// Make builtins like Map and Set safe to use with non-extensible objects.\nimport \"./fixPolyfills.js\";\nimport { wrap } from \"optimism\";\nimport { equal } from \"@wry/equality\";\nimport { ApolloCache } from \"../core/cache.js\";\nimport { MissingFieldError } from \"../core/types/common.js\";\nimport { addTypenameToDocument, isReference, DocumentTransform, } from \"../../utilities/index.js\";\nimport { StoreReader } from \"./readFromStore.js\";\nimport { StoreWriter } from \"./writeToStore.js\";\nimport { EntityStore, supportsResultCaching } from \"./entityStore.js\";\nimport { makeVar, forgetCache, recallCache } from \"./reactiveVars.js\";\nimport { Policies } from \"./policies.js\";\nimport { hasOwn, normalizeConfig, shouldCanonizeResults } from \"./helpers.js\";\nimport { canonicalStringify } from \"./object-canon.js\";\nvar InMemoryCache = /** @class */ (function (_super) {\n __extends(InMemoryCache, _super);\n function InMemoryCache(config) {\n if (config === void 0) { config = {}; }\n var _this = _super.call(this) || this;\n _this.watches = new Set();\n _this.addTypenameTransform = new DocumentTransform(addTypenameToDocument);\n // Override the default value, since InMemoryCache result objects are frozen\n // in development and expected to remain logically immutable in production.\n _this.assumeImmutableResults = true;\n _this.makeVar = makeVar;\n _this.txCount = 0;\n _this.config = normalizeConfig(config);\n _this.addTypename = !!_this.config.addTypename;\n _this.policies = new Policies({\n cache: _this,\n dataIdFromObject: _this.config.dataIdFromObject,\n possibleTypes: _this.config.possibleTypes,\n typePolicies: _this.config.typePolicies,\n });\n _this.init();\n return _this;\n }\n InMemoryCache.prototype.init = function () {\n // Passing { resultCaching: false } in the InMemoryCache constructor options\n // will completely disable dependency tracking, which will improve memory\n // usage but worsen the performance of repeated reads.\n var rootStore = (this.data = new EntityStore.Root({\n policies: this.policies,\n resultCaching: this.config.resultCaching,\n }));\n // When no optimistic writes are currently active, cache.optimisticData ===\n // cache.data, so there are no additional layers on top of the actual data.\n // When an optimistic update happens, this.optimisticData will become a\n // linked list of EntityStore Layer objects that terminates with the\n // original this.data cache object.\n this.optimisticData = rootStore.stump;\n this.resetResultCache();\n };\n InMemoryCache.prototype.resetResultCache = function (resetResultIdentities) {\n var _this = this;\n var previousReader = this.storeReader;\n var fragments = this.config.fragments;\n // The StoreWriter is mostly stateless and so doesn't really need to be\n // reset, but it does need to have its writer.storeReader reference updated,\n // so it's simpler to update this.storeWriter as well.\n this.storeWriter = new StoreWriter(this, (this.storeReader = new StoreReader({\n cache: this,\n addTypename: this.addTypename,\n resultCacheMaxSize: this.config.resultCacheMaxSize,\n canonizeResults: shouldCanonizeResults(this.config),\n canon: resetResultIdentities ? void 0 : (previousReader && previousReader.canon),\n fragments: fragments,\n })), fragments);\n this.maybeBroadcastWatch = wrap(function (c, options) {\n return _this.broadcastWatch(c, options);\n }, {\n max: this.config.resultCacheMaxSize,\n makeCacheKey: function (c) {\n // Return a cache key (thus enabling result caching) only if we're\n // currently using a data store that can track cache dependencies.\n var store = c.optimistic ? _this.optimisticData : _this.data;\n if (supportsResultCaching(store)) {\n var optimistic = c.optimistic, id = c.id, variables = c.variables;\n return store.makeCacheKey(c.query, \n // Different watches can have the same query, optimistic\n // status, rootId, and variables, but if their callbacks are\n // different, the (identical) result needs to be delivered to\n // each distinct callback. The easiest way to achieve that\n // separation is to include c.callback in the cache key for\n // maybeBroadcastWatch calls. See issue #5733.\n c.callback, canonicalStringify({ optimistic: optimistic, id: id, variables: variables }));\n }\n },\n });\n // Since we have thrown away all the cached functions that depend on the\n // CacheGroup dependencies maintained by EntityStore, we should also reset\n // all CacheGroup dependency information.\n new Set([this.data.group, this.optimisticData.group]).forEach(function (group) {\n return group.resetCaching();\n });\n };\n InMemoryCache.prototype.restore = function (data) {\n this.init();\n // Since calling this.init() discards/replaces the entire StoreReader, along\n // with the result caches it maintains, this.data.replace(data) won't have\n // to bother deleting the old data.\n if (data)\n this.data.replace(data);\n return this;\n };\n InMemoryCache.prototype.extract = function (optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return (optimistic ? this.optimisticData : this.data).extract();\n };\n InMemoryCache.prototype.read = function (options) {\n var \n // Since read returns data or null, without any additional metadata\n // about whether/where there might have been missing fields, the\n // default behavior cannot be returnPartialData = true (like it is\n // for the diff method), since defaulting to true would violate the\n // integrity of the T in the return type. However, partial data may\n // be useful in some cases, so returnPartialData:true may be\n // specified explicitly.\n _a = options.returnPartialData, \n // Since read returns data or null, without any additional metadata\n // about whether/where there might have been missing fields, the\n // default behavior cannot be returnPartialData = true (like it is\n // for the diff method), since defaulting to true would violate the\n // integrity of the T in the return type. However, partial data may\n // be useful in some cases, so returnPartialData:true may be\n // specified explicitly.\n returnPartialData = _a === void 0 ? false : _a;\n try {\n return (this.storeReader.diffQueryAgainstStore(__assign(__assign({}, options), { store: options.optimistic ? this.optimisticData : this.data, config: this.config, returnPartialData: returnPartialData })).result || null);\n }\n catch (e) {\n if (e instanceof MissingFieldError) {\n // Swallow MissingFieldError and return null, so callers do not need to\n // worry about catching \"normal\" exceptions resulting from incomplete\n // cache data. Unexpected errors will be re-thrown. If you need more\n // information about which fields were missing, use cache.diff instead,\n // and examine diffResult.missing.\n return null;\n }\n throw e;\n }\n };\n InMemoryCache.prototype.write = function (options) {\n try {\n ++this.txCount;\n return this.storeWriter.writeToStore(this.data, options);\n }\n finally {\n if (!--this.txCount && options.broadcast !== false) {\n this.broadcastWatches();\n }\n }\n };\n InMemoryCache.prototype.modify = function (options) {\n if (hasOwn.call(options, \"id\") && !options.id) {\n // To my knowledge, TypeScript does not currently provide a way to\n // enforce that an optional property?:type must *not* be undefined\n // when present. That ability would be useful here, because we want\n // options.id to default to ROOT_QUERY only when no options.id was\n // provided. If the caller attempts to pass options.id with a\n // falsy/undefined value (perhaps because cache.identify failed), we\n // should not assume the goal was to modify the ROOT_QUERY object.\n // We could throw, but it seems natural to return false to indicate\n // that nothing was modified.\n return false;\n }\n var store = ((options.optimistic) // Defaults to false.\n ) ?\n this.optimisticData\n : this.data;\n try {\n ++this.txCount;\n return store.modify(options.id || \"ROOT_QUERY\", options.fields);\n }\n finally {\n if (!--this.txCount && options.broadcast !== false) {\n this.broadcastWatches();\n }\n }\n };\n InMemoryCache.prototype.diff = function (options) {\n return this.storeReader.diffQueryAgainstStore(__assign(__assign({}, options), { store: options.optimistic ? this.optimisticData : this.data, rootId: options.id || \"ROOT_QUERY\", config: this.config }));\n };\n InMemoryCache.prototype.watch = function (watch) {\n var _this = this;\n if (!this.watches.size) {\n // In case we previously called forgetCache(this) because\n // this.watches became empty (see below), reattach this cache to any\n // reactive variables on which it previously depended. It might seem\n // paradoxical that we're able to recall something we supposedly\n // forgot, but the point of calling forgetCache(this) is to silence\n // useless broadcasts while this.watches is empty, and to allow the\n // cache to be garbage collected. If, however, we manage to call\n // recallCache(this) here, this cache object must not have been\n // garbage collected yet, and should resume receiving updates from\n // reactive variables, now that it has a watcher to notify.\n recallCache(this);\n }\n this.watches.add(watch);\n if (watch.immediate) {\n this.maybeBroadcastWatch(watch);\n }\n return function () {\n // Once we remove the last watch from this.watches, cache.broadcastWatches\n // no longer does anything, so we preemptively tell the reactive variable\n // system to exclude this cache from future broadcasts.\n if (_this.watches.delete(watch) && !_this.watches.size) {\n forgetCache(_this);\n }\n // Remove this watch from the LRU cache managed by the\n // maybeBroadcastWatch OptimisticWrapperFunction, to prevent memory\n // leaks involving the closure of watch.callback.\n _this.maybeBroadcastWatch.forget(watch);\n };\n };\n InMemoryCache.prototype.gc = function (options) {\n canonicalStringify.reset();\n var ids = this.optimisticData.gc();\n if (options && !this.txCount) {\n if (options.resetResultCache) {\n this.resetResultCache(options.resetResultIdentities);\n }\n else if (options.resetResultIdentities) {\n this.storeReader.resetCanon();\n }\n }\n return ids;\n };\n // Call this method to ensure the given root ID remains in the cache after\n // garbage collection, along with its transitive child entities. Note that\n // the cache automatically retains all directly written entities. By default,\n // the retainment persists after optimistic updates are removed. Pass true\n // for the optimistic argument if you would prefer for the retainment to be\n // discarded when the top-most optimistic layer is removed. Returns the\n // resulting (non-negative) retainment count.\n InMemoryCache.prototype.retain = function (rootId, optimistic) {\n return (optimistic ? this.optimisticData : this.data).retain(rootId);\n };\n // Call this method to undo the effect of the retain method, above. Once the\n // retainment count falls to zero, the given ID will no longer be preserved\n // during garbage collection, though it may still be preserved by other safe\n // entities that refer to it. Returns the resulting (non-negative) retainment\n // count, in case that's useful.\n InMemoryCache.prototype.release = function (rootId, optimistic) {\n return (optimistic ? this.optimisticData : this.data).release(rootId);\n };\n // Returns the canonical ID for a given StoreObject, obeying typePolicies\n // and keyFields (and dataIdFromObject, if you still use that). At minimum,\n // the object must contain a __typename and any primary key fields required\n // to identify entities of that type. If you pass a query result object, be\n // sure that none of the primary key fields have been renamed by aliasing.\n // If you pass a Reference object, its __ref ID string will be returned.\n InMemoryCache.prototype.identify = function (object) {\n if (isReference(object))\n return object.__ref;\n try {\n return this.policies.identify(object)[0];\n }\n catch (e) {\n globalThis.__DEV__ !== false && invariant.warn(e);\n }\n };\n InMemoryCache.prototype.evict = function (options) {\n if (!options.id) {\n if (hasOwn.call(options, \"id\")) {\n // See comment in modify method about why we return false when\n // options.id exists but is falsy/undefined.\n return false;\n }\n options = __assign(__assign({}, options), { id: \"ROOT_QUERY\" });\n }\n try {\n // It's unlikely that the eviction will end up invoking any other\n // cache update operations while it's running, but {in,de}crementing\n // this.txCount still seems like a good idea, for uniformity with\n // the other update methods.\n ++this.txCount;\n // Pass this.data as a limit on the depth of the eviction, so evictions\n // during optimistic updates (when this.data is temporarily set equal to\n // this.optimisticData) do not escape their optimistic Layer.\n return this.optimisticData.evict(options, this.data);\n }\n finally {\n if (!--this.txCount && options.broadcast !== false) {\n this.broadcastWatches();\n }\n }\n };\n InMemoryCache.prototype.reset = function (options) {\n var _this = this;\n this.init();\n canonicalStringify.reset();\n if (options && options.discardWatches) {\n // Similar to what happens in the unsubscribe function returned by\n // cache.watch, applied to all current watches.\n this.watches.forEach(function (watch) { return _this.maybeBroadcastWatch.forget(watch); });\n this.watches.clear();\n forgetCache(this);\n }\n else {\n // Calling this.init() above unblocks all maybeBroadcastWatch caching, so\n // this.broadcastWatches() triggers a broadcast to every current watcher\n // (letting them know their data is now missing). This default behavior is\n // convenient because it means the watches do not have to be manually\n // reestablished after resetting the cache. To prevent this broadcast and\n // cancel all watches, pass true for options.discardWatches.\n this.broadcastWatches();\n }\n return Promise.resolve();\n };\n InMemoryCache.prototype.removeOptimistic = function (idToRemove) {\n var newOptimisticData = this.optimisticData.removeLayer(idToRemove);\n if (newOptimisticData !== this.optimisticData) {\n this.optimisticData = newOptimisticData;\n this.broadcastWatches();\n }\n };\n InMemoryCache.prototype.batch = function (options) {\n var _this = this;\n var update = options.update, _a = options.optimistic, optimistic = _a === void 0 ? true : _a, removeOptimistic = options.removeOptimistic, onWatchUpdated = options.onWatchUpdated;\n var updateResult;\n var perform = function (layer) {\n var _a = _this, data = _a.data, optimisticData = _a.optimisticData;\n ++_this.txCount;\n if (layer) {\n _this.data = _this.optimisticData = layer;\n }\n try {\n return (updateResult = update(_this));\n }\n finally {\n --_this.txCount;\n _this.data = data;\n _this.optimisticData = optimisticData;\n }\n };\n var alreadyDirty = new Set();\n if (onWatchUpdated && !this.txCount) {\n // If an options.onWatchUpdated callback is provided, we want to call it\n // with only the Cache.WatchOptions objects affected by options.update,\n // but there might be dirty watchers already waiting to be broadcast that\n // have nothing to do with the update. To prevent including those watchers\n // in the post-update broadcast, we perform this initial broadcast to\n // collect the dirty watchers, so we can re-dirty them later, after the\n // post-update broadcast, allowing them to receive their pending\n // broadcasts the next time broadcastWatches is called, just as they would\n // if we never called cache.batch.\n this.broadcastWatches(__assign(__assign({}, options), { onWatchUpdated: function (watch) {\n alreadyDirty.add(watch);\n return false;\n } }));\n }\n if (typeof optimistic === \"string\") {\n // Note that there can be multiple layers with the same optimistic ID.\n // When removeOptimistic(id) is called for that id, all matching layers\n // will be removed, and the remaining layers will be reapplied.\n this.optimisticData = this.optimisticData.addLayer(optimistic, perform);\n }\n else if (optimistic === false) {\n // Ensure both this.data and this.optimisticData refer to the root\n // (non-optimistic) layer of the cache during the update. Note that\n // this.data could be a Layer if we are currently executing an optimistic\n // update function, but otherwise will always be an EntityStore.Root\n // instance.\n perform(this.data);\n }\n else {\n // Otherwise, leave this.data and this.optimisticData unchanged and run\n // the update with broadcast batching.\n perform();\n }\n if (typeof removeOptimistic === \"string\") {\n this.optimisticData = this.optimisticData.removeLayer(removeOptimistic);\n }\n // Note: if this.txCount > 0, then alreadyDirty.size === 0, so this code\n // takes the else branch and calls this.broadcastWatches(options), which\n // does nothing when this.txCount > 0.\n if (onWatchUpdated && alreadyDirty.size) {\n this.broadcastWatches(__assign(__assign({}, options), { onWatchUpdated: function (watch, diff) {\n var result = onWatchUpdated.call(this, watch, diff);\n if (result !== false) {\n // Since onWatchUpdated did not return false, this diff is\n // about to be broadcast to watch.callback, so we don't need\n // to re-dirty it with the other alreadyDirty watches below.\n alreadyDirty.delete(watch);\n }\n return result;\n } }));\n // Silently re-dirty any watches that were already dirty before the update\n // was performed, and were not broadcast just now.\n if (alreadyDirty.size) {\n alreadyDirty.forEach(function (watch) { return _this.maybeBroadcastWatch.dirty(watch); });\n }\n }\n else {\n // If alreadyDirty is empty or we don't have an onWatchUpdated\n // function, we don't need to go to the trouble of wrapping\n // options.onWatchUpdated.\n this.broadcastWatches(options);\n }\n return updateResult;\n };\n InMemoryCache.prototype.performTransaction = function (update, optimisticId) {\n return this.batch({\n update: update,\n optimistic: optimisticId || optimisticId !== null,\n });\n };\n InMemoryCache.prototype.transformDocument = function (document) {\n return this.addTypenameToDocument(this.addFragmentsToDocument(document));\n };\n InMemoryCache.prototype.broadcastWatches = function (options) {\n var _this = this;\n if (!this.txCount) {\n this.watches.forEach(function (c) { return _this.maybeBroadcastWatch(c, options); });\n }\n };\n InMemoryCache.prototype.addFragmentsToDocument = function (document) {\n var fragments = this.config.fragments;\n return fragments ? fragments.transform(document) : document;\n };\n InMemoryCache.prototype.addTypenameToDocument = function (document) {\n if (this.addTypename) {\n return this.addTypenameTransform.transformDocument(document);\n }\n return document;\n };\n // This method is wrapped by maybeBroadcastWatch, which is called by\n // broadcastWatches, so that we compute and broadcast results only when\n // the data that would be broadcast might have changed. It would be\n // simpler to check for changes after recomputing a result but before\n // broadcasting it, but this wrapping approach allows us to skip both\n // the recomputation and the broadcast, in most cases.\n InMemoryCache.prototype.broadcastWatch = function (c, options) {\n var lastDiff = c.lastDiff;\n // Both WatchOptions and DiffOptions extend ReadOptions, and DiffOptions\n // currently requires no additional properties, so we can use c (a\n // WatchOptions object) as DiffOptions, without having to allocate a new\n // object, and without having to enumerate the relevant properties (query,\n // variables, etc.) explicitly. There will be some additional properties\n // (lastDiff, callback, etc.), but cache.diff ignores them.\n var diff = this.diff(c);\n if (options) {\n if (c.optimistic && typeof options.optimistic === \"string\") {\n diff.fromOptimisticTransaction = true;\n }\n if (options.onWatchUpdated &&\n options.onWatchUpdated.call(this, c, diff, lastDiff) === false) {\n // Returning false from the onWatchUpdated callback will prevent\n // calling c.callback(diff) for this watcher.\n return;\n }\n }\n if (!lastDiff || !equal(lastDiff.result, diff.result)) {\n c.callback((c.lastDiff = diff), lastDiff);\n }\n };\n return InMemoryCache;\n}(ApolloCache));\nexport { InMemoryCache };\n","import { __assign } from \"tslib\";\nimport { invariant, newInvariantError } from \"../../utilities/globals/index.js\";\nimport { Kind } from \"graphql\";\nimport { wrap } from \"optimism\";\nimport { isField, resultKeyNameFromField, isReference, makeReference, shouldInclude, addTypenameToDocument, getDefaultValues, getMainDefinition, getQueryDefinition, getFragmentFromSelection, maybeDeepFreeze, mergeDeepArray, DeepMerger, isNonNullObject, canUseWeakMap, compact, } from \"../../utilities/index.js\";\nimport { maybeDependOnExistenceOfEntity, supportsResultCaching, } from \"./entityStore.js\";\nimport { isArray, extractFragmentContext, getTypenameFromStoreObject, shouldCanonizeResults, } from \"./helpers.js\";\nimport { MissingFieldError } from \"../core/types/common.js\";\nimport { canonicalStringify, ObjectCanon } from \"./object-canon.js\";\nfunction execSelectionSetKeyArgs(options) {\n return [\n options.selectionSet,\n options.objectOrReference,\n options.context,\n // We split out this property so we can pass different values\n // independently without modifying options.context itself.\n options.context.canonizeResults,\n ];\n}\nvar StoreReader = /** @class */ (function () {\n function StoreReader(config) {\n var _this = this;\n this.knownResults = new (canUseWeakMap ? WeakMap : Map)();\n this.config = compact(config, {\n addTypename: config.addTypename !== false,\n canonizeResults: shouldCanonizeResults(config),\n });\n this.canon = config.canon || new ObjectCanon();\n this.executeSelectionSet = wrap(function (options) {\n var _a;\n var canonizeResults = options.context.canonizeResults;\n var peekArgs = execSelectionSetKeyArgs(options);\n // Negate this boolean option so we can find out if we've already read\n // this result using the other boolean value.\n peekArgs[3] = !canonizeResults;\n var other = (_a = _this.executeSelectionSet).peek.apply(_a, peekArgs);\n if (other) {\n if (canonizeResults) {\n return __assign(__assign({}, other), { \n // If we previously read this result without canonizing it, we can\n // reuse that result simply by canonizing it now.\n result: _this.canon.admit(other.result) });\n }\n // If we previously read this result with canonization enabled, we can\n // return that canonized result as-is.\n return other;\n }\n maybeDependOnExistenceOfEntity(options.context.store, options.enclosingRef.__ref);\n // Finally, if we didn't find any useful previous results, run the real\n // execSelectionSetImpl method with the given options.\n return _this.execSelectionSetImpl(options);\n }, {\n max: this.config.resultCacheMaxSize,\n keyArgs: execSelectionSetKeyArgs,\n // Note that the parameters of makeCacheKey are determined by the\n // array returned by keyArgs.\n makeCacheKey: function (selectionSet, parent, context, canonizeResults) {\n if (supportsResultCaching(context.store)) {\n return context.store.makeCacheKey(selectionSet, isReference(parent) ? parent.__ref : parent, context.varString, canonizeResults);\n }\n },\n });\n this.executeSubSelectedArray = wrap(function (options) {\n maybeDependOnExistenceOfEntity(options.context.store, options.enclosingRef.__ref);\n return _this.execSubSelectedArrayImpl(options);\n }, {\n max: this.config.resultCacheMaxSize,\n makeCacheKey: function (_a) {\n var field = _a.field, array = _a.array, context = _a.context;\n if (supportsResultCaching(context.store)) {\n return context.store.makeCacheKey(field, array, context.varString);\n }\n },\n });\n }\n StoreReader.prototype.resetCanon = function () {\n this.canon = new ObjectCanon();\n };\n /**\n * Given a store and a query, return as much of the result as possible and\n * identify if any data was missing from the store.\n */\n StoreReader.prototype.diffQueryAgainstStore = function (_a) {\n var store = _a.store, query = _a.query, _b = _a.rootId, rootId = _b === void 0 ? \"ROOT_QUERY\" : _b, variables = _a.variables, _c = _a.returnPartialData, returnPartialData = _c === void 0 ? true : _c, _d = _a.canonizeResults, canonizeResults = _d === void 0 ? this.config.canonizeResults : _d;\n var policies = this.config.cache.policies;\n variables = __assign(__assign({}, getDefaultValues(getQueryDefinition(query))), variables);\n var rootRef = makeReference(rootId);\n var execResult = this.executeSelectionSet({\n selectionSet: getMainDefinition(query).selectionSet,\n objectOrReference: rootRef,\n enclosingRef: rootRef,\n context: __assign({ store: store, query: query, policies: policies, variables: variables, varString: canonicalStringify(variables), canonizeResults: canonizeResults }, extractFragmentContext(query, this.config.fragments)),\n });\n var missing;\n if (execResult.missing) {\n // For backwards compatibility we still report an array of\n // MissingFieldError objects, even though there will only ever be at most\n // one of them, now that all missing field error messages are grouped\n // together in the execResult.missing tree.\n missing = [\n new MissingFieldError(firstMissing(execResult.missing), execResult.missing, query, variables),\n ];\n if (!returnPartialData) {\n throw missing[0];\n }\n }\n return {\n result: execResult.result,\n complete: !missing,\n missing: missing,\n };\n };\n StoreReader.prototype.isFresh = function (result, parent, selectionSet, context) {\n if (supportsResultCaching(context.store) &&\n this.knownResults.get(result) === selectionSet) {\n var latest = this.executeSelectionSet.peek(selectionSet, parent, context, \n // If result is canonical, then it could only have been previously\n // cached by the canonizing version of executeSelectionSet, so we can\n // avoid checking both possibilities here.\n this.canon.isKnown(result));\n if (latest && result === latest.result) {\n return true;\n }\n }\n return false;\n };\n // Uncached version of executeSelectionSet.\n StoreReader.prototype.execSelectionSetImpl = function (_a) {\n var _this = this;\n var selectionSet = _a.selectionSet, objectOrReference = _a.objectOrReference, enclosingRef = _a.enclosingRef, context = _a.context;\n if (isReference(objectOrReference) &&\n !context.policies.rootTypenamesById[objectOrReference.__ref] &&\n !context.store.has(objectOrReference.__ref)) {\n return {\n result: this.canon.empty,\n missing: \"Dangling reference to missing \".concat(objectOrReference.__ref, \" object\"),\n };\n }\n var variables = context.variables, policies = context.policies, store = context.store;\n var typename = store.getFieldValue(objectOrReference, \"__typename\");\n var objectsToMerge = [];\n var missing;\n var missingMerger = new DeepMerger();\n if (this.config.addTypename &&\n typeof typename === \"string\" &&\n !policies.rootIdsByTypename[typename]) {\n // Ensure we always include a default value for the __typename\n // field, if we have one, and this.config.addTypename is true. Note\n // that this field can be overridden by other merged objects.\n objectsToMerge.push({ __typename: typename });\n }\n function handleMissing(result, resultName) {\n var _a;\n if (result.missing) {\n missing = missingMerger.merge(missing, (_a = {},\n _a[resultName] = result.missing,\n _a));\n }\n return result.result;\n }\n var workSet = new Set(selectionSet.selections);\n workSet.forEach(function (selection) {\n var _a, _b;\n // Omit fields with directives @skip(if: ) or\n // @include(if: ).\n if (!shouldInclude(selection, variables))\n return;\n if (isField(selection)) {\n var fieldValue = policies.readField({\n fieldName: selection.name.value,\n field: selection,\n variables: context.variables,\n from: objectOrReference,\n }, context);\n var resultName = resultKeyNameFromField(selection);\n if (fieldValue === void 0) {\n if (!addTypenameToDocument.added(selection)) {\n missing = missingMerger.merge(missing, (_a = {},\n _a[resultName] = \"Can't find field '\".concat(selection.name.value, \"' on \").concat(isReference(objectOrReference) ?\n objectOrReference.__ref + \" object\"\n : \"object \" + JSON.stringify(objectOrReference, null, 2)),\n _a));\n }\n }\n else if (isArray(fieldValue)) {\n fieldValue = handleMissing(_this.executeSubSelectedArray({\n field: selection,\n array: fieldValue,\n enclosingRef: enclosingRef,\n context: context,\n }), resultName);\n }\n else if (!selection.selectionSet) {\n // If the field does not have a selection set, then we handle it\n // as a scalar value. To keep this.canon from canonicalizing\n // this value, we use this.canon.pass to wrap fieldValue in a\n // Pass object that this.canon.admit will later unwrap as-is.\n if (context.canonizeResults) {\n fieldValue = _this.canon.pass(fieldValue);\n }\n }\n else if (fieldValue != null) {\n // In this case, because we know the field has a selection set,\n // it must be trying to query a GraphQLObjectType, which is why\n // fieldValue must be != null.\n fieldValue = handleMissing(_this.executeSelectionSet({\n selectionSet: selection.selectionSet,\n objectOrReference: fieldValue,\n enclosingRef: isReference(fieldValue) ? fieldValue : enclosingRef,\n context: context,\n }), resultName);\n }\n if (fieldValue !== void 0) {\n objectsToMerge.push((_b = {}, _b[resultName] = fieldValue, _b));\n }\n }\n else {\n var fragment = getFragmentFromSelection(selection, context.lookupFragment);\n if (!fragment && selection.kind === Kind.FRAGMENT_SPREAD) {\n throw newInvariantError(9, selection.name.value);\n }\n if (fragment && policies.fragmentMatches(fragment, typename)) {\n fragment.selectionSet.selections.forEach(workSet.add, workSet);\n }\n }\n });\n var result = mergeDeepArray(objectsToMerge);\n var finalResult = { result: result, missing: missing };\n var frozen = context.canonizeResults ?\n this.canon.admit(finalResult)\n // Since this.canon is normally responsible for freezing results (only in\n // development), freeze them manually if canonization is disabled.\n : maybeDeepFreeze(finalResult);\n // Store this result with its selection set so that we can quickly\n // recognize it again in the StoreReader#isFresh method.\n if (frozen.result) {\n this.knownResults.set(frozen.result, selectionSet);\n }\n return frozen;\n };\n // Uncached version of executeSubSelectedArray.\n StoreReader.prototype.execSubSelectedArrayImpl = function (_a) {\n var _this = this;\n var field = _a.field, array = _a.array, enclosingRef = _a.enclosingRef, context = _a.context;\n var missing;\n var missingMerger = new DeepMerger();\n function handleMissing(childResult, i) {\n var _a;\n if (childResult.missing) {\n missing = missingMerger.merge(missing, (_a = {}, _a[i] = childResult.missing, _a));\n }\n return childResult.result;\n }\n if (field.selectionSet) {\n array = array.filter(context.store.canRead);\n }\n array = array.map(function (item, i) {\n // null value in array\n if (item === null) {\n return null;\n }\n // This is a nested array, recurse\n if (isArray(item)) {\n return handleMissing(_this.executeSubSelectedArray({\n field: field,\n array: item,\n enclosingRef: enclosingRef,\n context: context,\n }), i);\n }\n // This is an object, run the selection set on it\n if (field.selectionSet) {\n return handleMissing(_this.executeSelectionSet({\n selectionSet: field.selectionSet,\n objectOrReference: item,\n enclosingRef: isReference(item) ? item : enclosingRef,\n context: context,\n }), i);\n }\n if (globalThis.__DEV__ !== false) {\n assertSelectionSetForIdValue(context.store, field, item);\n }\n return item;\n });\n return {\n result: context.canonizeResults ? this.canon.admit(array) : array,\n missing: missing,\n };\n };\n return StoreReader;\n}());\nexport { StoreReader };\nfunction firstMissing(tree) {\n try {\n JSON.stringify(tree, function (_, value) {\n if (typeof value === \"string\")\n throw value;\n return value;\n });\n }\n catch (result) {\n return result;\n }\n}\nfunction assertSelectionSetForIdValue(store, field, fieldValue) {\n if (!field.selectionSet) {\n var workSet_1 = new Set([fieldValue]);\n workSet_1.forEach(function (value) {\n if (isNonNullObject(value)) {\n invariant(\n !isReference(value),\n 10,\n getTypenameFromStoreObject(store, value),\n field.name.value\n );\n Object.values(value).forEach(workSet_1.add, workSet_1);\n }\n });\n }\n}\n","import { __assign } from \"tslib\";\nimport { Trie } from \"@wry/trie\";\nimport { canUseWeakMap, canUseWeakSet, isNonNullObject as isObjectOrArray, } from \"../../utilities/index.js\";\nimport { isArray } from \"./helpers.js\";\nfunction shallowCopy(value) {\n if (isObjectOrArray(value)) {\n return isArray(value) ?\n value.slice(0)\n : __assign({ __proto__: Object.getPrototypeOf(value) }, value);\n }\n return value;\n}\n// When programmers talk about the \"canonical form\" of an object, they\n// usually have the following meaning in mind, which I've copied from\n// https://en.wiktionary.org/wiki/canonical_form:\n//\n// 1. A standard or normal presentation of a mathematical entity [or\n// object]. A canonical form is an element of a set of representatives\n// of equivalence classes of forms such that there is a function or\n// procedure which projects every element of each equivalence class\n// onto that one element, the canonical form of that equivalence\n// class. The canonical form is expected to be simpler than the rest of\n// the forms in some way.\n//\n// That's a long-winded way of saying any two objects that have the same\n// canonical form may be considered equivalent, even if they are !==,\n// which usually means the objects are structurally equivalent (deeply\n// equal), but don't necessarily use the same memory.\n//\n// Like a literary or musical canon, this ObjectCanon class represents a\n// collection of unique canonical items (JavaScript objects), with the\n// important property that canon.admit(a) === canon.admit(b) if a and b\n// are deeply equal to each other. In terms of the definition above, the\n// canon.admit method is the \"function or procedure which projects every\"\n// object \"onto that one element, the canonical form.\"\n//\n// In the worst case, the canonicalization process may involve looking at\n// every property in the provided object tree, so it takes the same order\n// of time as deep equality checking. Fortunately, already-canonicalized\n// objects are returned immediately from canon.admit, so the presence of\n// canonical subtrees tends to speed up canonicalization.\n//\n// Since consumers of canonical objects can check for deep equality in\n// constant time, canonicalizing cache results can massively improve the\n// performance of application code that skips re-rendering unchanged\n// results, such as \"pure\" UI components in a framework like React.\n//\n// Of course, since canonical objects may be shared widely between\n// unrelated consumers, it's important to think of them as immutable, even\n// though they are not actually frozen with Object.freeze in production,\n// due to the extra performance overhead that comes with frozen objects.\n//\n// Custom scalar objects whose internal class name is neither Array nor\n// Object can be included safely in the admitted tree, but they will not\n// be replaced with a canonical version (to put it another way, they are\n// assumed to be canonical already).\n//\n// If we ignore custom objects, no detection of cycles or repeated object\n// references is currently required by the StoreReader class, since\n// GraphQL result objects are JSON-serializable trees (and thus contain\n// neither cycles nor repeated subtrees), so we can avoid the complexity\n// of keeping track of objects we've already seen during the recursion of\n// the admit method.\n//\n// In the future, we may consider adding additional cases to the switch\n// statement to handle other common object types, such as \"[object Date]\"\n// objects, as needed.\nvar ObjectCanon = /** @class */ (function () {\n function ObjectCanon() {\n // Set of all canonical objects this ObjectCanon has admitted, allowing\n // canon.admit to return previously-canonicalized objects immediately.\n this.known = new (canUseWeakSet ? WeakSet : Set)();\n // Efficient storage/lookup structure for canonical objects.\n this.pool = new Trie(canUseWeakMap);\n // Make the ObjectCanon assume this value has already been\n // canonicalized.\n this.passes = new WeakMap();\n // Arrays that contain the same elements in a different order can share\n // the same SortedKeysInfo object, to save memory.\n this.keysByJSON = new Map();\n // This has to come last because it depends on keysByJSON.\n this.empty = this.admit({});\n }\n ObjectCanon.prototype.isKnown = function (value) {\n return isObjectOrArray(value) && this.known.has(value);\n };\n ObjectCanon.prototype.pass = function (value) {\n if (isObjectOrArray(value)) {\n var copy = shallowCopy(value);\n this.passes.set(copy, value);\n return copy;\n }\n return value;\n };\n ObjectCanon.prototype.admit = function (value) {\n var _this = this;\n if (isObjectOrArray(value)) {\n var original = this.passes.get(value);\n if (original)\n return original;\n var proto = Object.getPrototypeOf(value);\n switch (proto) {\n case Array.prototype: {\n if (this.known.has(value))\n return value;\n var array = value.map(this.admit, this);\n // Arrays are looked up in the Trie using their recursively\n // canonicalized elements, and the known version of the array is\n // preserved as node.array.\n var node = this.pool.lookupArray(array);\n if (!node.array) {\n this.known.add((node.array = array));\n // Since canonical arrays may be shared widely between\n // unrelated consumers, it's important to regard them as\n // immutable, even if they are not frozen in production.\n if (globalThis.__DEV__ !== false) {\n Object.freeze(array);\n }\n }\n return node.array;\n }\n case null:\n case Object.prototype: {\n if (this.known.has(value))\n return value;\n var proto_1 = Object.getPrototypeOf(value);\n var array_1 = [proto_1];\n var keys = this.sortedKeys(value);\n array_1.push(keys.json);\n var firstValueIndex_1 = array_1.length;\n keys.sorted.forEach(function (key) {\n array_1.push(_this.admit(value[key]));\n });\n // Objects are looked up in the Trie by their prototype (which\n // is *not* recursively canonicalized), followed by a JSON\n // representation of their (sorted) keys, followed by the\n // sequence of recursively canonicalized values corresponding to\n // those keys. To keep the final results unambiguous with other\n // sequences (such as arrays that just happen to contain [proto,\n // keys.json, value1, value2, ...]), the known version of the\n // object is stored as node.object.\n var node = this.pool.lookupArray(array_1);\n if (!node.object) {\n var obj_1 = (node.object = Object.create(proto_1));\n this.known.add(obj_1);\n keys.sorted.forEach(function (key, i) {\n obj_1[key] = array_1[firstValueIndex_1 + i];\n });\n // Since canonical objects may be shared widely between\n // unrelated consumers, it's important to regard them as\n // immutable, even if they are not frozen in production.\n if (globalThis.__DEV__ !== false) {\n Object.freeze(obj_1);\n }\n }\n return node.object;\n }\n }\n }\n return value;\n };\n // It's worthwhile to cache the sorting of arrays of strings, since the\n // same initial unsorted arrays tend to be encountered many times.\n // Fortunately, we can reuse the Trie machinery to look up the sorted\n // arrays in linear time (which is faster than sorting large arrays).\n ObjectCanon.prototype.sortedKeys = function (obj) {\n var keys = Object.keys(obj);\n var node = this.pool.lookupArray(keys);\n if (!node.keys) {\n keys.sort();\n var json = JSON.stringify(keys);\n if (!(node.keys = this.keysByJSON.get(json))) {\n this.keysByJSON.set(json, (node.keys = { sorted: keys, json: json }));\n }\n }\n return node.keys;\n };\n return ObjectCanon;\n}());\nexport { ObjectCanon };\n// Since the keys of canonical objects are always created in lexicographically\n// sorted order, we can use the ObjectCanon to implement a fast and stable\n// version of JSON.stringify, which automatically sorts object keys.\nexport var canonicalStringify = Object.assign(function (value) {\n if (isObjectOrArray(value)) {\n if (stringifyCanon === void 0) {\n resetCanonicalStringify();\n }\n var canonical = stringifyCanon.admit(value);\n var json = stringifyCache.get(canonical);\n if (json === void 0) {\n stringifyCache.set(canonical, (json = JSON.stringify(canonical)));\n }\n return json;\n }\n return JSON.stringify(value);\n}, {\n reset: resetCanonicalStringify,\n});\n// Can be reset by calling canonicalStringify.reset().\nvar stringifyCanon;\nvar stringifyCache;\nfunction resetCanonicalStringify() {\n stringifyCanon = new ObjectCanon();\n stringifyCache = new (canUseWeakMap ? WeakMap : Map)();\n}\n","import { __assign } from \"tslib\";\nimport { invariant, newInvariantError } from \"../../utilities/globals/index.js\";\nimport { equal } from \"@wry/equality\";\nimport { Trie } from \"@wry/trie\";\nimport { Kind } from \"graphql\";\nimport { getFragmentFromSelection, getDefaultValues, getOperationDefinition, getTypenameFromResult, makeReference, isField, resultKeyNameFromField, isReference, shouldInclude, cloneDeep, addTypenameToDocument, isNonEmptyArray, argumentsObjectFromField, } from \"../../utilities/index.js\";\nimport { isArray, makeProcessedFieldsMerger, fieldNameFromStoreName, storeValueIsStoreObject, extractFragmentContext, } from \"./helpers.js\";\nimport { canonicalStringify } from \"./object-canon.js\";\nimport { normalizeReadFieldOptions } from \"./policies.js\";\n// Since there are only four possible combinations of context.clientOnly and\n// context.deferred values, we should need at most four \"flavors\" of any given\n// WriteContext. To avoid creating multiple copies of the same context, we cache\n// the contexts in the context.flavors Map (shared by all flavors) according to\n// their clientOnly and deferred values (always in that order).\nfunction getContextFlavor(context, clientOnly, deferred) {\n var key = \"\".concat(clientOnly).concat(deferred);\n var flavored = context.flavors.get(key);\n if (!flavored) {\n context.flavors.set(key, (flavored =\n context.clientOnly === clientOnly && context.deferred === deferred ?\n context\n : __assign(__assign({}, context), { clientOnly: clientOnly, deferred: deferred })));\n }\n return flavored;\n}\nvar StoreWriter = /** @class */ (function () {\n function StoreWriter(cache, reader, fragments) {\n this.cache = cache;\n this.reader = reader;\n this.fragments = fragments;\n }\n StoreWriter.prototype.writeToStore = function (store, _a) {\n var _this = this;\n var query = _a.query, result = _a.result, dataId = _a.dataId, variables = _a.variables, overwrite = _a.overwrite;\n var operationDefinition = getOperationDefinition(query);\n var merger = makeProcessedFieldsMerger();\n variables = __assign(__assign({}, getDefaultValues(operationDefinition)), variables);\n var context = __assign(__assign({ store: store, written: Object.create(null), merge: function (existing, incoming) {\n return merger.merge(existing, incoming);\n }, variables: variables, varString: canonicalStringify(variables) }, extractFragmentContext(query, this.fragments)), { overwrite: !!overwrite, incomingById: new Map(), clientOnly: false, deferred: false, flavors: new Map() });\n var ref = this.processSelectionSet({\n result: result || Object.create(null),\n dataId: dataId,\n selectionSet: operationDefinition.selectionSet,\n mergeTree: { map: new Map() },\n context: context,\n });\n if (!isReference(ref)) {\n throw newInvariantError(11, result);\n }\n // So far, the store has not been modified, so now it's time to process\n // context.incomingById and merge those incoming fields into context.store.\n context.incomingById.forEach(function (_a, dataId) {\n var storeObject = _a.storeObject, mergeTree = _a.mergeTree, fieldNodeSet = _a.fieldNodeSet;\n var entityRef = makeReference(dataId);\n if (mergeTree && mergeTree.map.size) {\n var applied = _this.applyMerges(mergeTree, entityRef, storeObject, context);\n if (isReference(applied)) {\n // Assume References returned by applyMerges have already been merged\n // into the store. See makeMergeObjectsFunction in policies.ts for an\n // example of how this can happen.\n return;\n }\n // Otherwise, applyMerges returned a StoreObject, whose fields we should\n // merge into the store (see store.merge statement below).\n storeObject = applied;\n }\n if (globalThis.__DEV__ !== false && !context.overwrite) {\n var fieldsWithSelectionSets_1 = Object.create(null);\n fieldNodeSet.forEach(function (field) {\n if (field.selectionSet) {\n fieldsWithSelectionSets_1[field.name.value] = true;\n }\n });\n var hasSelectionSet_1 = function (storeFieldName) {\n return fieldsWithSelectionSets_1[fieldNameFromStoreName(storeFieldName)] ===\n true;\n };\n var hasMergeFunction_1 = function (storeFieldName) {\n var childTree = mergeTree && mergeTree.map.get(storeFieldName);\n return Boolean(childTree && childTree.info && childTree.info.merge);\n };\n Object.keys(storeObject).forEach(function (storeFieldName) {\n // If a merge function was defined for this field, trust that it\n // did the right thing about (not) clobbering data. If the field\n // has no selection set, it's a scalar field, so it doesn't need\n // a merge function (even if it's an object, like JSON data).\n if (hasSelectionSet_1(storeFieldName) &&\n !hasMergeFunction_1(storeFieldName)) {\n warnAboutDataLoss(entityRef, storeObject, storeFieldName, context.store);\n }\n });\n }\n store.merge(dataId, storeObject);\n });\n // Any IDs written explicitly to the cache will be retained as\n // reachable root IDs for garbage collection purposes. Although this\n // logic includes root IDs like ROOT_QUERY and ROOT_MUTATION, their\n // retainment counts are effectively ignored because cache.gc() always\n // includes them in its root ID set.\n store.retain(ref.__ref);\n return ref;\n };\n StoreWriter.prototype.processSelectionSet = function (_a) {\n var _this = this;\n var dataId = _a.dataId, result = _a.result, selectionSet = _a.selectionSet, context = _a.context, \n // This object allows processSelectionSet to report useful information\n // to its callers without explicitly returning that information.\n mergeTree = _a.mergeTree;\n var policies = this.cache.policies;\n // This variable will be repeatedly updated using context.merge to\n // accumulate all fields that need to be written into the store.\n var incoming = Object.create(null);\n // If typename was not passed in, infer it. Note that typename is\n // always passed in for tricky-to-infer cases such as \"Query\" for\n // ROOT_QUERY.\n var typename = (dataId && policies.rootTypenamesById[dataId]) ||\n getTypenameFromResult(result, selectionSet, context.fragmentMap) ||\n (dataId && context.store.get(dataId, \"__typename\"));\n if (\"string\" === typeof typename) {\n incoming.__typename = typename;\n }\n // This readField function will be passed as context.readField in the\n // KeyFieldsContext object created within policies.identify (called below).\n // In addition to reading from the existing context.store (thanks to the\n // policies.readField(options, context) line at the very bottom), this\n // version of readField can read from Reference objects that are currently\n // pending in context.incomingById, which is important whenever keyFields\n // need to be extracted from a child object that processSelectionSet has\n // turned into a Reference.\n var readField = function () {\n var options = normalizeReadFieldOptions(arguments, incoming, context.variables);\n if (isReference(options.from)) {\n var info = context.incomingById.get(options.from.__ref);\n if (info) {\n var result_1 = policies.readField(__assign(__assign({}, options), { from: info.storeObject }), context);\n if (result_1 !== void 0) {\n return result_1;\n }\n }\n }\n return policies.readField(options, context);\n };\n var fieldNodeSet = new Set();\n this.flattenFields(selectionSet, result, \n // This WriteContext will be the default context value for fields returned\n // by the flattenFields method, but some fields may be assigned a modified\n // context, depending on the presence of @client and other directives.\n context, typename).forEach(function (context, field) {\n var _a;\n var resultFieldKey = resultKeyNameFromField(field);\n var value = result[resultFieldKey];\n fieldNodeSet.add(field);\n if (value !== void 0) {\n var storeFieldName = policies.getStoreFieldName({\n typename: typename,\n fieldName: field.name.value,\n field: field,\n variables: context.variables,\n });\n var childTree = getChildMergeTree(mergeTree, storeFieldName);\n var incomingValue = _this.processFieldValue(value, field, \n // Reset context.clientOnly and context.deferred to their default\n // values before processing nested selection sets.\n field.selectionSet ?\n getContextFlavor(context, false, false)\n : context, childTree);\n // To determine if this field holds a child object with a merge function\n // defined in its type policy (see PR #7070), we need to figure out the\n // child object's __typename.\n var childTypename = void 0;\n // The field's value can be an object that has a __typename only if the\n // field has a selection set. Otherwise incomingValue is scalar.\n if (field.selectionSet &&\n (isReference(incomingValue) || storeValueIsStoreObject(incomingValue))) {\n childTypename = readField(\"__typename\", incomingValue);\n }\n var merge = policies.getMergeFunction(typename, field.name.value, childTypename);\n if (merge) {\n childTree.info = {\n // TODO Check compatibility against any existing childTree.field?\n field: field,\n typename: typename,\n merge: merge,\n };\n }\n else {\n maybeRecycleChildMergeTree(mergeTree, storeFieldName);\n }\n incoming = context.merge(incoming, (_a = {},\n _a[storeFieldName] = incomingValue,\n _a));\n }\n else if (globalThis.__DEV__ !== false &&\n !context.clientOnly &&\n !context.deferred &&\n !addTypenameToDocument.added(field) &&\n // If the field has a read function, it may be a synthetic field or\n // provide a default value, so its absence from the written data should\n // not be cause for alarm.\n !policies.getReadFunction(typename, field.name.value)) {\n globalThis.__DEV__ !== false && invariant.error(12, resultKeyNameFromField(field), result);\n }\n });\n // Identify the result object, even if dataId was already provided,\n // since we always need keyObject below.\n try {\n var _b = policies.identify(result, {\n typename: typename,\n selectionSet: selectionSet,\n fragmentMap: context.fragmentMap,\n storeObject: incoming,\n readField: readField,\n }), id = _b[0], keyObject = _b[1];\n // If dataId was not provided, fall back to the id just generated by\n // policies.identify.\n dataId = dataId || id;\n // Write any key fields that were used during identification, even if\n // they were not mentioned in the original query.\n if (keyObject) {\n // TODO Reverse the order of the arguments?\n incoming = context.merge(incoming, keyObject);\n }\n }\n catch (e) {\n // If dataId was provided, tolerate failure of policies.identify.\n if (!dataId)\n throw e;\n }\n if (\"string\" === typeof dataId) {\n var dataRef = makeReference(dataId);\n // Avoid processing the same entity object using the same selection\n // set more than once. We use an array instead of a Set since most\n // entity IDs will be written using only one selection set, so the\n // size of this array is likely to be very small, meaning indexOf is\n // likely to be faster than Set.prototype.has.\n var sets = context.written[dataId] || (context.written[dataId] = []);\n if (sets.indexOf(selectionSet) >= 0)\n return dataRef;\n sets.push(selectionSet);\n // If we're about to write a result object into the store, but we\n // happen to know that the exact same (===) result object would be\n // returned if we were to reread the result with the same inputs,\n // then we can skip the rest of the processSelectionSet work for\n // this object, and immediately return a Reference to it.\n if (this.reader &&\n this.reader.isFresh(result, dataRef, selectionSet, context)) {\n return dataRef;\n }\n var previous_1 = context.incomingById.get(dataId);\n if (previous_1) {\n previous_1.storeObject = context.merge(previous_1.storeObject, incoming);\n previous_1.mergeTree = mergeMergeTrees(previous_1.mergeTree, mergeTree);\n fieldNodeSet.forEach(function (field) { return previous_1.fieldNodeSet.add(field); });\n }\n else {\n context.incomingById.set(dataId, {\n storeObject: incoming,\n // Save a reference to mergeTree only if it is not empty, because\n // empty MergeTrees may be recycled by maybeRecycleChildMergeTree and\n // reused for entirely different parts of the result tree.\n mergeTree: mergeTreeIsEmpty(mergeTree) ? void 0 : mergeTree,\n fieldNodeSet: fieldNodeSet,\n });\n }\n return dataRef;\n }\n return incoming;\n };\n StoreWriter.prototype.processFieldValue = function (value, field, context, mergeTree) {\n var _this = this;\n if (!field.selectionSet || value === null) {\n // In development, we need to clone scalar values so that they can be\n // safely frozen with maybeDeepFreeze in readFromStore.ts. In production,\n // it's cheaper to store the scalar values directly in the cache.\n return globalThis.__DEV__ !== false ? cloneDeep(value) : value;\n }\n if (isArray(value)) {\n return value.map(function (item, i) {\n var value = _this.processFieldValue(item, field, context, getChildMergeTree(mergeTree, i));\n maybeRecycleChildMergeTree(mergeTree, i);\n return value;\n });\n }\n return this.processSelectionSet({\n result: value,\n selectionSet: field.selectionSet,\n context: context,\n mergeTree: mergeTree,\n });\n };\n // Implements https://spec.graphql.org/draft/#sec-Field-Collection, but with\n // some additions for tracking @client and @defer directives.\n StoreWriter.prototype.flattenFields = function (selectionSet, result, context, typename) {\n if (typename === void 0) { typename = getTypenameFromResult(result, selectionSet, context.fragmentMap); }\n var fieldMap = new Map();\n var policies = this.cache.policies;\n var limitingTrie = new Trie(false); // No need for WeakMap, since limitingTrie does not escape.\n (function flatten(selectionSet, inheritedContext) {\n var visitedNode = limitingTrie.lookup(selectionSet, \n // Because we take inheritedClientOnly and inheritedDeferred into\n // consideration here (in addition to selectionSet), it's possible for\n // the same selection set to be flattened more than once, if it appears\n // in the query with different @client and/or @directive configurations.\n inheritedContext.clientOnly, inheritedContext.deferred);\n if (visitedNode.visited)\n return;\n visitedNode.visited = true;\n selectionSet.selections.forEach(function (selection) {\n if (!shouldInclude(selection, context.variables))\n return;\n var clientOnly = inheritedContext.clientOnly, deferred = inheritedContext.deferred;\n if (\n // Since the presence of @client or @defer on this field can only\n // cause clientOnly or deferred to become true, we can skip the\n // forEach loop if both clientOnly and deferred are already true.\n !(clientOnly && deferred) &&\n isNonEmptyArray(selection.directives)) {\n selection.directives.forEach(function (dir) {\n var name = dir.name.value;\n if (name === \"client\")\n clientOnly = true;\n if (name === \"defer\") {\n var args = argumentsObjectFromField(dir, context.variables);\n // The @defer directive takes an optional args.if boolean\n // argument, similar to @include(if: boolean). Note that\n // @defer(if: false) does not make context.deferred false, but\n // instead behaves as if there was no @defer directive.\n if (!args || args.if !== false) {\n deferred = true;\n }\n // TODO In the future, we may want to record args.label using\n // context.deferred, if a label is specified.\n }\n });\n }\n if (isField(selection)) {\n var existing = fieldMap.get(selection);\n if (existing) {\n // If this field has been visited along another recursive path\n // before, the final context should have clientOnly or deferred set\n // to true only if *all* paths have the directive (hence the &&).\n clientOnly = clientOnly && existing.clientOnly;\n deferred = deferred && existing.deferred;\n }\n fieldMap.set(selection, getContextFlavor(context, clientOnly, deferred));\n }\n else {\n var fragment = getFragmentFromSelection(selection, context.lookupFragment);\n if (!fragment && selection.kind === Kind.FRAGMENT_SPREAD) {\n throw newInvariantError(13, selection.name.value);\n }\n if (fragment &&\n policies.fragmentMatches(fragment, typename, result, context.variables)) {\n flatten(fragment.selectionSet, getContextFlavor(context, clientOnly, deferred));\n }\n }\n });\n })(selectionSet, context);\n return fieldMap;\n };\n StoreWriter.prototype.applyMerges = function (mergeTree, existing, incoming, context, getStorageArgs) {\n var _a;\n var _this = this;\n if (mergeTree.map.size && !isReference(incoming)) {\n var e_1 = \n // Items in the same position in different arrays are not\n // necessarily related to each other, so when incoming is an array\n // we process its elements as if there was no existing data.\n (!isArray(incoming) &&\n // Likewise, existing must be either a Reference or a StoreObject\n // in order for its fields to be safe to merge with the fields of\n // the incoming object.\n (isReference(existing) || storeValueIsStoreObject(existing))) ?\n existing\n : void 0;\n // This narrowing is implied by mergeTree.map.size > 0 and\n // !isReference(incoming), though TypeScript understandably cannot\n // hope to infer this type.\n var i_1 = incoming;\n // The options.storage objects provided to read and merge functions\n // are derived from the identity of the parent object plus a\n // sequence of storeFieldName strings/numbers identifying the nested\n // field name path of each field value to be merged.\n if (e_1 && !getStorageArgs) {\n getStorageArgs = [isReference(e_1) ? e_1.__ref : e_1];\n }\n // It's possible that applying merge functions to this subtree will\n // not change the incoming data, so this variable tracks the fields\n // that did change, so we can create a new incoming object when (and\n // only when) at least one incoming field has changed. We use a Map\n // to preserve the type of numeric keys.\n var changedFields_1;\n var getValue_1 = function (from, name) {\n return (isArray(from) ?\n typeof name === \"number\" ?\n from[name]\n : void 0\n : context.store.getFieldValue(from, String(name)));\n };\n mergeTree.map.forEach(function (childTree, storeFieldName) {\n var eVal = getValue_1(e_1, storeFieldName);\n var iVal = getValue_1(i_1, storeFieldName);\n // If we have no incoming data, leave any existing data untouched.\n if (void 0 === iVal)\n return;\n if (getStorageArgs) {\n getStorageArgs.push(storeFieldName);\n }\n var aVal = _this.applyMerges(childTree, eVal, iVal, context, getStorageArgs);\n if (aVal !== iVal) {\n changedFields_1 = changedFields_1 || new Map();\n changedFields_1.set(storeFieldName, aVal);\n }\n if (getStorageArgs) {\n invariant(getStorageArgs.pop() === storeFieldName);\n }\n });\n if (changedFields_1) {\n // Shallow clone i so we can add changed fields to it.\n incoming = (isArray(i_1) ? i_1.slice(0) : __assign({}, i_1));\n changedFields_1.forEach(function (value, name) {\n incoming[name] = value;\n });\n }\n }\n if (mergeTree.info) {\n return this.cache.policies.runMergeFunction(existing, incoming, mergeTree.info, context, getStorageArgs && (_a = context.store).getStorage.apply(_a, getStorageArgs));\n }\n return incoming;\n };\n return StoreWriter;\n}());\nexport { StoreWriter };\nvar emptyMergeTreePool = [];\nfunction getChildMergeTree(_a, name) {\n var map = _a.map;\n if (!map.has(name)) {\n map.set(name, emptyMergeTreePool.pop() || { map: new Map() });\n }\n return map.get(name);\n}\nfunction mergeMergeTrees(left, right) {\n if (left === right || !right || mergeTreeIsEmpty(right))\n return left;\n if (!left || mergeTreeIsEmpty(left))\n return right;\n var info = left.info && right.info ? __assign(__assign({}, left.info), right.info) : left.info || right.info;\n var needToMergeMaps = left.map.size && right.map.size;\n var map = needToMergeMaps ? new Map()\n : left.map.size ? left.map\n : right.map;\n var merged = { info: info, map: map };\n if (needToMergeMaps) {\n var remainingRightKeys_1 = new Set(right.map.keys());\n left.map.forEach(function (leftTree, key) {\n merged.map.set(key, mergeMergeTrees(leftTree, right.map.get(key)));\n remainingRightKeys_1.delete(key);\n });\n remainingRightKeys_1.forEach(function (key) {\n merged.map.set(key, mergeMergeTrees(right.map.get(key), left.map.get(key)));\n });\n }\n return merged;\n}\nfunction mergeTreeIsEmpty(tree) {\n return !tree || !(tree.info || tree.map.size);\n}\nfunction maybeRecycleChildMergeTree(_a, name) {\n var map = _a.map;\n var childTree = map.get(name);\n if (childTree && mergeTreeIsEmpty(childTree)) {\n emptyMergeTreePool.push(childTree);\n map.delete(name);\n }\n}\nvar warnings = new Set();\n// Note that this function is unused in production, and thus should be\n// pruned by any well-configured minifier.\nfunction warnAboutDataLoss(existingRef, incomingObj, storeFieldName, store) {\n var getChild = function (objOrRef) {\n var child = store.getFieldValue(objOrRef, storeFieldName);\n return typeof child === \"object\" && child;\n };\n var existing = getChild(existingRef);\n if (!existing)\n return;\n var incoming = getChild(incomingObj);\n if (!incoming)\n return;\n // It's always safe to replace a reference, since it refers to data\n // safely stored elsewhere.\n if (isReference(existing))\n return;\n // If the values are structurally equivalent, we do not need to worry\n // about incoming replacing existing.\n if (equal(existing, incoming))\n return;\n // If we're replacing every key of the existing object, then the\n // existing data would be overwritten even if the objects were\n // normalized, so warning would not be helpful here.\n if (Object.keys(existing).every(function (key) { return store.getFieldValue(incoming, key) !== void 0; })) {\n return;\n }\n var parentType = store.getFieldValue(existingRef, \"__typename\") ||\n store.getFieldValue(incomingObj, \"__typename\");\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var typeDotName = \"\".concat(parentType, \".\").concat(fieldName);\n // Avoid warning more than once for the same type and field name.\n if (warnings.has(typeDotName))\n return;\n warnings.add(typeDotName);\n var childTypenames = [];\n // Arrays do not have __typename fields, and always need a custom merge\n // function, even if their elements are normalized entities.\n if (!isArray(existing) && !isArray(incoming)) {\n [existing, incoming].forEach(function (child) {\n var typename = store.getFieldValue(child, \"__typename\");\n if (typeof typename === \"string\" && !childTypenames.includes(typename)) {\n childTypenames.push(typename);\n }\n });\n }\n globalThis.__DEV__ !== false && invariant.warn(14, fieldName, parentType, childTypenames.length ?\n \"either ensure all objects of type \" +\n childTypenames.join(\" and \") +\n \" have an ID or a custom merge function, or \"\n : \"\", typeDotName, existing, incoming);\n}\n","import { __assign, __rest } from \"tslib\";\nimport { invariant, newInvariantError } from \"../../utilities/globals/index.js\";\nimport { storeKeyNameFromField, argumentsObjectFromField, isReference, getStoreKeyName, isNonNullObject, stringifyForDisplay, } from \"../../utilities/index.js\";\nimport { hasOwn, fieldNameFromStoreName, storeValueIsStoreObject, selectionSetMatchesResult, TypeOrFieldNameRegExp, defaultDataIdFromObject, isArray, } from \"./helpers.js\";\nimport { cacheSlot } from \"./reactiveVars.js\";\n// Upgrade to a faster version of the default stable JSON.stringify function\n// used by getStoreKeyName. This function is used when computing storeFieldName\n// strings (when no keyArgs has been configured for a field).\nimport { canonicalStringify } from \"./object-canon.js\";\nimport { keyArgsFnFromSpecifier, keyFieldsFnFromSpecifier, } from \"./key-extractor.js\";\ngetStoreKeyName.setStringify(canonicalStringify);\nfunction argsFromFieldSpecifier(spec) {\n return (spec.args !== void 0 ? spec.args\n : spec.field ? argumentsObjectFromField(spec.field, spec.variables)\n : null);\n}\nvar nullKeyFieldsFn = function () { return void 0; };\nvar simpleKeyArgsFn = function (_args, context) { return context.fieldName; };\n// These merge functions can be selected by specifying merge:true or\n// merge:false in a field policy.\nvar mergeTrueFn = function (existing, incoming, _a) {\n var mergeObjects = _a.mergeObjects;\n return mergeObjects(existing, incoming);\n};\nvar mergeFalseFn = function (_, incoming) { return incoming; };\nvar Policies = /** @class */ (function () {\n function Policies(config) {\n this.config = config;\n this.typePolicies = Object.create(null);\n this.toBeAdded = Object.create(null);\n // Map from subtype names to sets of supertype names. Note that this\n // representation inverts the structure of possibleTypes (whose keys are\n // supertypes and whose values are arrays of subtypes) because it tends\n // to be much more efficient to search upwards than downwards.\n this.supertypeMap = new Map();\n // Any fuzzy subtypes specified by possibleTypes will be converted to\n // RegExp objects and recorded here. Every key of this map can also be\n // found in supertypeMap. In many cases this Map will be empty, which\n // means no fuzzy subtype checking will happen in fragmentMatches.\n this.fuzzySubtypes = new Map();\n this.rootIdsByTypename = Object.create(null);\n this.rootTypenamesById = Object.create(null);\n this.usingPossibleTypes = false;\n this.config = __assign({ dataIdFromObject: defaultDataIdFromObject }, config);\n this.cache = this.config.cache;\n this.setRootTypename(\"Query\");\n this.setRootTypename(\"Mutation\");\n this.setRootTypename(\"Subscription\");\n if (config.possibleTypes) {\n this.addPossibleTypes(config.possibleTypes);\n }\n if (config.typePolicies) {\n this.addTypePolicies(config.typePolicies);\n }\n }\n Policies.prototype.identify = function (object, partialContext) {\n var _a;\n var policies = this;\n var typename = (partialContext &&\n (partialContext.typename || ((_a = partialContext.storeObject) === null || _a === void 0 ? void 0 : _a.__typename))) ||\n object.__typename;\n // It should be possible to write root Query fields with writeFragment,\n // using { __typename: \"Query\", ... } as the data, but it does not make\n // sense to allow the same identification behavior for the Mutation and\n // Subscription types, since application code should never be writing\n // directly to (or reading directly from) those root objects.\n if (typename === this.rootTypenamesById.ROOT_QUERY) {\n return [\"ROOT_QUERY\"];\n }\n // Default context.storeObject to object if not otherwise provided.\n var storeObject = (partialContext && partialContext.storeObject) || object;\n var context = __assign(__assign({}, partialContext), { typename: typename, storeObject: storeObject, readField: (partialContext && partialContext.readField) ||\n function () {\n var options = normalizeReadFieldOptions(arguments, storeObject);\n return policies.readField(options, {\n store: policies.cache[\"data\"],\n variables: options.variables,\n });\n } });\n var id;\n var policy = typename && this.getTypePolicy(typename);\n var keyFn = (policy && policy.keyFn) || this.config.dataIdFromObject;\n while (keyFn) {\n var specifierOrId = keyFn(__assign(__assign({}, object), storeObject), context);\n if (isArray(specifierOrId)) {\n keyFn = keyFieldsFnFromSpecifier(specifierOrId);\n }\n else {\n id = specifierOrId;\n break;\n }\n }\n id = id ? String(id) : void 0;\n return context.keyObject ? [id, context.keyObject] : [id];\n };\n Policies.prototype.addTypePolicies = function (typePolicies) {\n var _this = this;\n Object.keys(typePolicies).forEach(function (typename) {\n var _a = typePolicies[typename], queryType = _a.queryType, mutationType = _a.mutationType, subscriptionType = _a.subscriptionType, incoming = __rest(_a, [\"queryType\", \"mutationType\", \"subscriptionType\"]);\n // Though {query,mutation,subscription}Type configurations are rare,\n // it's important to call setRootTypename as early as possible,\n // since these configurations should apply consistently for the\n // entire lifetime of the cache. Also, since only one __typename can\n // qualify as one of these root types, these three properties cannot\n // be inherited, unlike the rest of the incoming properties. That\n // restriction is convenient, because the purpose of this.toBeAdded\n // is to delay the processing of type/field policies until the first\n // time they're used, allowing policies to be added in any order as\n // long as all relevant policies (including policies for supertypes)\n // have been added by the time a given policy is used for the first\n // time. In other words, since inheritance doesn't matter for these\n // properties, there's also no need to delay their processing using\n // the this.toBeAdded queue.\n if (queryType)\n _this.setRootTypename(\"Query\", typename);\n if (mutationType)\n _this.setRootTypename(\"Mutation\", typename);\n if (subscriptionType)\n _this.setRootTypename(\"Subscription\", typename);\n if (hasOwn.call(_this.toBeAdded, typename)) {\n _this.toBeAdded[typename].push(incoming);\n }\n else {\n _this.toBeAdded[typename] = [incoming];\n }\n });\n };\n Policies.prototype.updateTypePolicy = function (typename, incoming) {\n var _this = this;\n var existing = this.getTypePolicy(typename);\n var keyFields = incoming.keyFields, fields = incoming.fields;\n function setMerge(existing, merge) {\n existing.merge =\n typeof merge === \"function\" ? merge\n // Pass merge:true as a shorthand for a merge implementation\n // that returns options.mergeObjects(existing, incoming).\n : merge === true ? mergeTrueFn\n // Pass merge:false to make incoming always replace existing\n // without any warnings about data clobbering.\n : merge === false ? mergeFalseFn\n : existing.merge;\n }\n // Type policies can define merge functions, as an alternative to\n // using field policies to merge child objects.\n setMerge(existing, incoming.merge);\n existing.keyFn =\n // Pass false to disable normalization for this typename.\n keyFields === false ? nullKeyFieldsFn\n // Pass an array of strings to use those fields to compute a\n // composite ID for objects of this typename.\n : isArray(keyFields) ? keyFieldsFnFromSpecifier(keyFields)\n // Pass a function to take full control over identification.\n : typeof keyFields === \"function\" ? keyFields\n // Leave existing.keyFn unchanged if above cases fail.\n : existing.keyFn;\n if (fields) {\n Object.keys(fields).forEach(function (fieldName) {\n var existing = _this.getFieldPolicy(typename, fieldName, true);\n var incoming = fields[fieldName];\n if (typeof incoming === \"function\") {\n existing.read = incoming;\n }\n else {\n var keyArgs = incoming.keyArgs, read = incoming.read, merge = incoming.merge;\n existing.keyFn =\n // Pass false to disable argument-based differentiation of\n // field identities.\n keyArgs === false ? simpleKeyArgsFn\n // Pass an array of strings to use named arguments to\n // compute a composite identity for the field.\n : isArray(keyArgs) ? keyArgsFnFromSpecifier(keyArgs)\n // Pass a function to take full control over field identity.\n : typeof keyArgs === \"function\" ? keyArgs\n // Leave existing.keyFn unchanged if above cases fail.\n : existing.keyFn;\n if (typeof read === \"function\") {\n existing.read = read;\n }\n setMerge(existing, merge);\n }\n if (existing.read && existing.merge) {\n // If we have both a read and a merge function, assume\n // keyArgs:false, because read and merge together can take\n // responsibility for interpreting arguments in and out. This\n // default assumption can always be overridden by specifying\n // keyArgs explicitly in the FieldPolicy.\n existing.keyFn = existing.keyFn || simpleKeyArgsFn;\n }\n });\n }\n };\n Policies.prototype.setRootTypename = function (which, typename) {\n if (typename === void 0) { typename = which; }\n var rootId = \"ROOT_\" + which.toUpperCase();\n var old = this.rootTypenamesById[rootId];\n if (typename !== old) {\n invariant(!old || old === which, 5, which);\n // First, delete any old __typename associated with this rootId from\n // rootIdsByTypename.\n if (old)\n delete this.rootIdsByTypename[old];\n // Now make this the only __typename that maps to this rootId.\n this.rootIdsByTypename[typename] = rootId;\n // Finally, update the __typename associated with this rootId.\n this.rootTypenamesById[rootId] = typename;\n }\n };\n Policies.prototype.addPossibleTypes = function (possibleTypes) {\n var _this = this;\n this.usingPossibleTypes = true;\n Object.keys(possibleTypes).forEach(function (supertype) {\n // Make sure all types have an entry in this.supertypeMap, even if\n // their supertype set is empty, so we can return false immediately\n // from policies.fragmentMatches for unknown supertypes.\n _this.getSupertypeSet(supertype, true);\n possibleTypes[supertype].forEach(function (subtype) {\n _this.getSupertypeSet(subtype, true).add(supertype);\n var match = subtype.match(TypeOrFieldNameRegExp);\n if (!match || match[0] !== subtype) {\n // TODO Don't interpret just any invalid typename as a RegExp.\n _this.fuzzySubtypes.set(subtype, new RegExp(subtype));\n }\n });\n });\n };\n Policies.prototype.getTypePolicy = function (typename) {\n var _this = this;\n if (!hasOwn.call(this.typePolicies, typename)) {\n var policy_1 = (this.typePolicies[typename] = Object.create(null));\n policy_1.fields = Object.create(null);\n // When the TypePolicy for typename is first accessed, instead of\n // starting with an empty policy object, inherit any properties or\n // fields from the type policies of the supertypes of typename.\n //\n // Any properties or fields defined explicitly within the TypePolicy\n // for typename will take precedence, and if there are multiple\n // supertypes, the properties of policies whose types were added\n // later via addPossibleTypes will take precedence over those of\n // earlier supertypes. TODO Perhaps we should warn about these\n // conflicts in development, and recommend defining the property\n // explicitly in the subtype policy?\n //\n // Field policy inheritance is atomic/shallow: you can't inherit a\n // field policy and then override just its read function, since read\n // and merge functions often need to cooperate, so changing only one\n // of them would be a recipe for inconsistency.\n //\n // Once the TypePolicy for typename has been accessed, its properties can\n // still be updated directly using addTypePolicies, but future changes to\n // inherited supertype policies will not be reflected in this subtype\n // policy, because this code runs at most once per typename.\n var supertypes_1 = this.supertypeMap.get(typename);\n if (!supertypes_1 && this.fuzzySubtypes.size) {\n // To make the inheritance logic work for unknown typename strings that\n // may have fuzzy supertypes, we give this typename an empty supertype\n // set and then populate it with any fuzzy supertypes that match.\n supertypes_1 = this.getSupertypeSet(typename, true);\n // This only works for typenames that are directly matched by a fuzzy\n // supertype. What if there is an intermediate chain of supertypes?\n // While possible, that situation can only be solved effectively by\n // specifying the intermediate relationships via possibleTypes, manually\n // and in a non-fuzzy way.\n this.fuzzySubtypes.forEach(function (regExp, fuzzy) {\n if (regExp.test(typename)) {\n // The fuzzy parameter is just the original string version of regExp\n // (not a valid __typename string), but we can look up the\n // associated supertype(s) in this.supertypeMap.\n var fuzzySupertypes = _this.supertypeMap.get(fuzzy);\n if (fuzzySupertypes) {\n fuzzySupertypes.forEach(function (supertype) {\n return supertypes_1.add(supertype);\n });\n }\n }\n });\n }\n if (supertypes_1 && supertypes_1.size) {\n supertypes_1.forEach(function (supertype) {\n var _a = _this.getTypePolicy(supertype), fields = _a.fields, rest = __rest(_a, [\"fields\"]);\n Object.assign(policy_1, rest);\n Object.assign(policy_1.fields, fields);\n });\n }\n }\n var inbox = this.toBeAdded[typename];\n if (inbox && inbox.length) {\n // Merge the pending policies into this.typePolicies, in the order they\n // were originally passed to addTypePolicy.\n inbox.splice(0).forEach(function (policy) {\n _this.updateTypePolicy(typename, policy);\n });\n }\n return this.typePolicies[typename];\n };\n Policies.prototype.getFieldPolicy = function (typename, fieldName, createIfMissing) {\n if (typename) {\n var fieldPolicies = this.getTypePolicy(typename).fields;\n return (fieldPolicies[fieldName] ||\n (createIfMissing && (fieldPolicies[fieldName] = Object.create(null))));\n }\n };\n Policies.prototype.getSupertypeSet = function (subtype, createIfMissing) {\n var supertypeSet = this.supertypeMap.get(subtype);\n if (!supertypeSet && createIfMissing) {\n this.supertypeMap.set(subtype, (supertypeSet = new Set()));\n }\n return supertypeSet;\n };\n Policies.prototype.fragmentMatches = function (fragment, typename, result, variables) {\n var _this = this;\n if (!fragment.typeCondition)\n return true;\n // If the fragment has a type condition but the object we're matching\n // against does not have a __typename, the fragment cannot match.\n if (!typename)\n return false;\n var supertype = fragment.typeCondition.name.value;\n // Common case: fragment type condition and __typename are the same.\n if (typename === supertype)\n return true;\n if (this.usingPossibleTypes && this.supertypeMap.has(supertype)) {\n var typenameSupertypeSet = this.getSupertypeSet(typename, true);\n var workQueue_1 = [typenameSupertypeSet];\n var maybeEnqueue_1 = function (subtype) {\n var supertypeSet = _this.getSupertypeSet(subtype, false);\n if (supertypeSet &&\n supertypeSet.size &&\n workQueue_1.indexOf(supertypeSet) < 0) {\n workQueue_1.push(supertypeSet);\n }\n };\n // We need to check fuzzy subtypes only if we encountered fuzzy\n // subtype strings in addPossibleTypes, and only while writing to\n // the cache, since that's when selectionSetMatchesResult gives a\n // strong signal of fragment matching. The StoreReader class calls\n // policies.fragmentMatches without passing a result object, so\n // needToCheckFuzzySubtypes is always false while reading.\n var needToCheckFuzzySubtypes = !!(result && this.fuzzySubtypes.size);\n var checkingFuzzySubtypes = false;\n // It's important to keep evaluating workQueue.length each time through\n // the loop, because the queue can grow while we're iterating over it.\n for (var i = 0; i < workQueue_1.length; ++i) {\n var supertypeSet = workQueue_1[i];\n if (supertypeSet.has(supertype)) {\n if (!typenameSupertypeSet.has(supertype)) {\n if (checkingFuzzySubtypes) {\n globalThis.__DEV__ !== false && invariant.warn(6, typename, supertype);\n }\n // Record positive results for faster future lookup.\n // Unfortunately, we cannot safely cache negative results,\n // because new possibleTypes data could always be added to the\n // Policies class.\n typenameSupertypeSet.add(supertype);\n }\n return true;\n }\n supertypeSet.forEach(maybeEnqueue_1);\n if (needToCheckFuzzySubtypes &&\n // Start checking fuzzy subtypes only after exhausting all\n // non-fuzzy subtypes (after the final iteration of the loop).\n i === workQueue_1.length - 1 &&\n // We could wait to compare fragment.selectionSet to result\n // after we verify the supertype, but this check is often less\n // expensive than that search, and we will have to do the\n // comparison anyway whenever we find a potential match.\n selectionSetMatchesResult(fragment.selectionSet, result, variables)) {\n // We don't always need to check fuzzy subtypes (if no result\n // was provided, or !this.fuzzySubtypes.size), but, when we do,\n // we only want to check them once.\n needToCheckFuzzySubtypes = false;\n checkingFuzzySubtypes = true;\n // If we find any fuzzy subtypes that match typename, extend the\n // workQueue to search through the supertypes of those fuzzy\n // subtypes. Otherwise the for-loop will terminate and we'll\n // return false below.\n this.fuzzySubtypes.forEach(function (regExp, fuzzyString) {\n var match = typename.match(regExp);\n if (match && match[0] === typename) {\n maybeEnqueue_1(fuzzyString);\n }\n });\n }\n }\n }\n return false;\n };\n Policies.prototype.hasKeyArgs = function (typename, fieldName) {\n var policy = this.getFieldPolicy(typename, fieldName, false);\n return !!(policy && policy.keyFn);\n };\n Policies.prototype.getStoreFieldName = function (fieldSpec) {\n var typename = fieldSpec.typename, fieldName = fieldSpec.fieldName;\n var policy = this.getFieldPolicy(typename, fieldName, false);\n var storeFieldName;\n var keyFn = policy && policy.keyFn;\n if (keyFn && typename) {\n var context = {\n typename: typename,\n fieldName: fieldName,\n field: fieldSpec.field || null,\n variables: fieldSpec.variables,\n };\n var args = argsFromFieldSpecifier(fieldSpec);\n while (keyFn) {\n var specifierOrString = keyFn(args, context);\n if (isArray(specifierOrString)) {\n keyFn = keyArgsFnFromSpecifier(specifierOrString);\n }\n else {\n // If the custom keyFn returns a falsy value, fall back to\n // fieldName instead.\n storeFieldName = specifierOrString || fieldName;\n break;\n }\n }\n }\n if (storeFieldName === void 0) {\n storeFieldName =\n fieldSpec.field ?\n storeKeyNameFromField(fieldSpec.field, fieldSpec.variables)\n : getStoreKeyName(fieldName, argsFromFieldSpecifier(fieldSpec));\n }\n // Returning false from a keyArgs function is like configuring\n // keyArgs: false, but more dynamic.\n if (storeFieldName === false) {\n return fieldName;\n }\n // Make sure custom field names start with the actual field.name.value\n // of the field, so we can always figure out which properties of a\n // StoreObject correspond to which original field names.\n return fieldName === fieldNameFromStoreName(storeFieldName) ? storeFieldName\n : fieldName + \":\" + storeFieldName;\n };\n Policies.prototype.readField = function (options, context) {\n var objectOrReference = options.from;\n if (!objectOrReference)\n return;\n var nameOrField = options.field || options.fieldName;\n if (!nameOrField)\n return;\n if (options.typename === void 0) {\n var typename = context.store.getFieldValue(objectOrReference, \"__typename\");\n if (typename)\n options.typename = typename;\n }\n var storeFieldName = this.getStoreFieldName(options);\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var existing = context.store.getFieldValue(objectOrReference, storeFieldName);\n var policy = this.getFieldPolicy(options.typename, fieldName, false);\n var read = policy && policy.read;\n if (read) {\n var readOptions = makeFieldFunctionOptions(this, objectOrReference, options, context, context.store.getStorage(isReference(objectOrReference) ?\n objectOrReference.__ref\n : objectOrReference, storeFieldName));\n // Call read(existing, readOptions) with cacheSlot holding this.cache.\n return cacheSlot.withValue(this.cache, read, [\n existing,\n readOptions,\n ]);\n }\n return existing;\n };\n Policies.prototype.getReadFunction = function (typename, fieldName) {\n var policy = this.getFieldPolicy(typename, fieldName, false);\n return policy && policy.read;\n };\n Policies.prototype.getMergeFunction = function (parentTypename, fieldName, childTypename) {\n var policy = this.getFieldPolicy(parentTypename, fieldName, false);\n var merge = policy && policy.merge;\n if (!merge && childTypename) {\n policy = this.getTypePolicy(childTypename);\n merge = policy && policy.merge;\n }\n return merge;\n };\n Policies.prototype.runMergeFunction = function (existing, incoming, _a, context, storage) {\n var field = _a.field, typename = _a.typename, merge = _a.merge;\n if (merge === mergeTrueFn) {\n // Instead of going to the trouble of creating a full\n // FieldFunctionOptions object and calling mergeTrueFn, we can\n // simply call mergeObjects, as mergeTrueFn would.\n return makeMergeObjectsFunction(context.store)(existing, incoming);\n }\n if (merge === mergeFalseFn) {\n // Likewise for mergeFalseFn, whose implementation is even simpler.\n return incoming;\n }\n // If cache.writeQuery or cache.writeFragment was called with\n // options.overwrite set to true, we still call merge functions, but\n // the existing data is always undefined, so the merge function will\n // not attempt to combine the incoming data with the existing data.\n if (context.overwrite) {\n existing = void 0;\n }\n return merge(existing, incoming, makeFieldFunctionOptions(this, \n // Unlike options.readField for read functions, we do not fall\n // back to the current object if no foreignObjOrRef is provided,\n // because it's not clear what the current object should be for\n // merge functions: the (possibly undefined) existing object, or\n // the incoming object? If you think your merge function needs\n // to read sibling fields in order to produce a new value for\n // the current field, you might want to rethink your strategy,\n // because that's a recipe for making merge behavior sensitive\n // to the order in which fields are written into the cache.\n // However, readField(name, ref) is useful for merge functions\n // that need to deduplicate child objects and references.\n void 0, {\n typename: typename,\n fieldName: field.name.value,\n field: field,\n variables: context.variables,\n }, context, storage || Object.create(null)));\n };\n return Policies;\n}());\nexport { Policies };\nfunction makeFieldFunctionOptions(policies, objectOrReference, fieldSpec, context, storage) {\n var storeFieldName = policies.getStoreFieldName(fieldSpec);\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var variables = fieldSpec.variables || context.variables;\n var _a = context.store, toReference = _a.toReference, canRead = _a.canRead;\n return {\n args: argsFromFieldSpecifier(fieldSpec),\n field: fieldSpec.field || null,\n fieldName: fieldName,\n storeFieldName: storeFieldName,\n variables: variables,\n isReference: isReference,\n toReference: toReference,\n storage: storage,\n cache: policies.cache,\n canRead: canRead,\n readField: function () {\n return policies.readField(normalizeReadFieldOptions(arguments, objectOrReference, variables), context);\n },\n mergeObjects: makeMergeObjectsFunction(context.store),\n };\n}\nexport function normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables) {\n var fieldNameOrOptions = readFieldArgs[0], from = readFieldArgs[1], argc = readFieldArgs.length;\n var options;\n if (typeof fieldNameOrOptions === \"string\") {\n options = {\n fieldName: fieldNameOrOptions,\n // Default to objectOrReference only when no second argument was\n // passed for the from parameter, not when undefined is explicitly\n // passed as the second argument.\n from: argc > 1 ? from : objectOrReference,\n };\n }\n else {\n options = __assign({}, fieldNameOrOptions);\n // Default to objectOrReference only when fieldNameOrOptions.from is\n // actually omitted, rather than just undefined.\n if (!hasOwn.call(options, \"from\")) {\n options.from = objectOrReference;\n }\n }\n if (globalThis.__DEV__ !== false && options.from === void 0) {\n globalThis.__DEV__ !== false && invariant.warn(7, stringifyForDisplay(Array.from(readFieldArgs)));\n }\n if (void 0 === options.variables) {\n options.variables = variables;\n }\n return options;\n}\nfunction makeMergeObjectsFunction(store) {\n return function mergeObjects(existing, incoming) {\n if (isArray(existing) || isArray(incoming)) {\n throw newInvariantError(8);\n }\n // These dynamic checks are necessary because the parameters of a\n // custom merge function can easily have the any type, so the type\n // system cannot always enforce the StoreObject | Reference parameter\n // types of options.mergeObjects.\n if (isNonNullObject(existing) && isNonNullObject(incoming)) {\n var eType = store.getFieldValue(existing, \"__typename\");\n var iType = store.getFieldValue(incoming, \"__typename\");\n var typesDiffer = eType && iType && eType !== iType;\n if (typesDiffer) {\n return incoming;\n }\n if (isReference(existing) && storeValueIsStoreObject(incoming)) {\n // Update the normalized EntityStore for the entity identified by\n // existing.__ref, preferring/overwriting any fields contributed by the\n // newer incoming StoreObject.\n store.merge(existing.__ref, incoming);\n return existing;\n }\n if (storeValueIsStoreObject(existing) && isReference(incoming)) {\n // Update the normalized EntityStore for the entity identified by\n // incoming.__ref, taking fields from the older existing object only if\n // those fields are not already present in the newer StoreObject\n // identified by incoming.__ref.\n store.merge(existing, incoming.__ref);\n return incoming;\n }\n if (storeValueIsStoreObject(existing) &&\n storeValueIsStoreObject(incoming)) {\n return __assign(__assign({}, existing), incoming);\n }\n }\n return incoming;\n };\n}\n","import { dep, Slot } from \"optimism\";\n// Contextual Slot that acquires its value when custom read functions are\n// called in Policies#readField.\nexport var cacheSlot = new Slot();\nvar cacheInfoMap = new WeakMap();\nfunction getCacheInfo(cache) {\n var info = cacheInfoMap.get(cache);\n if (!info) {\n cacheInfoMap.set(cache, (info = {\n vars: new Set(),\n dep: dep(),\n }));\n }\n return info;\n}\nexport function forgetCache(cache) {\n getCacheInfo(cache).vars.forEach(function (rv) { return rv.forgetCache(cache); });\n}\n// Calling forgetCache(cache) serves to silence broadcasts and allows the\n// cache to be garbage collected. However, the varsByCache WeakMap\n// preserves the set of reactive variables that were previously associated\n// with this cache, which makes it possible to \"recall\" the cache at a\n// later time, by reattaching it to those variables. If the cache has been\n// garbage collected in the meantime, because it is no longer reachable,\n// you won't be able to call recallCache(cache), and the cache will\n// automatically disappear from the varsByCache WeakMap.\nexport function recallCache(cache) {\n getCacheInfo(cache).vars.forEach(function (rv) { return rv.attachCache(cache); });\n}\nexport function makeVar(value) {\n var caches = new Set();\n var listeners = new Set();\n var rv = function (newValue) {\n if (arguments.length > 0) {\n if (value !== newValue) {\n value = newValue;\n caches.forEach(function (cache) {\n // Invalidate any fields with custom read functions that\n // consumed this variable, so query results involving those\n // fields will be recomputed the next time we read them.\n getCacheInfo(cache).dep.dirty(rv);\n // Broadcast changes to any caches that have previously read\n // from this variable.\n broadcast(cache);\n });\n // Finally, notify any listeners added via rv.onNextChange.\n var oldListeners = Array.from(listeners);\n listeners.clear();\n oldListeners.forEach(function (listener) { return listener(value); });\n }\n }\n else {\n // When reading from the variable, obtain the current cache from\n // context via cacheSlot. This isn't entirely foolproof, but it's\n // the same system that powers varDep.\n var cache = cacheSlot.getValue();\n if (cache) {\n attach(cache);\n getCacheInfo(cache).dep(rv);\n }\n }\n return value;\n };\n rv.onNextChange = function (listener) {\n listeners.add(listener);\n return function () {\n listeners.delete(listener);\n };\n };\n var attach = (rv.attachCache = function (cache) {\n caches.add(cache);\n getCacheInfo(cache).vars.add(rv);\n return rv;\n });\n rv.forgetCache = function (cache) { return caches.delete(cache); };\n return rv;\n}\nfunction broadcast(cache) {\n if (cache.broadcastWatches) {\n cache.broadcastWatches();\n }\n}\n","import { invariant } from \"../../utilities/globals/index.js\";\nimport { argumentsObjectFromField, DeepMerger, isNonEmptyArray, isNonNullObject, } from \"../../utilities/index.js\";\nimport { hasOwn, isArray } from \"./helpers.js\";\n// Mapping from JSON-encoded KeySpecifier strings to associated information.\nvar specifierInfoCache = Object.create(null);\nfunction lookupSpecifierInfo(spec) {\n // It's safe to encode KeySpecifier arrays with JSON.stringify, since they're\n // just arrays of strings or nested KeySpecifier arrays, and the order of the\n // array elements is important (and suitably preserved by JSON.stringify).\n var cacheKey = JSON.stringify(spec);\n return (specifierInfoCache[cacheKey] ||\n (specifierInfoCache[cacheKey] = Object.create(null)));\n}\nexport function keyFieldsFnFromSpecifier(specifier) {\n var info = lookupSpecifierInfo(specifier);\n return (info.keyFieldsFn || (info.keyFieldsFn = function (object, context) {\n var extract = function (from, key) {\n return context.readField(key, from);\n };\n var keyObject = (context.keyObject = collectSpecifierPaths(specifier, function (schemaKeyPath) {\n var extracted = extractKeyPath(context.storeObject, schemaKeyPath, \n // Using context.readField to extract paths from context.storeObject\n // allows the extraction to see through Reference objects and respect\n // custom read functions.\n extract);\n if (extracted === void 0 &&\n object !== context.storeObject &&\n hasOwn.call(object, schemaKeyPath[0])) {\n // If context.storeObject fails to provide a value for the requested\n // path, fall back to the raw result object, if it has a top-level key\n // matching the first key in the path (schemaKeyPath[0]). This allows\n // key fields included in the written data to be saved in the cache\n // even if they are not selected explicitly in context.selectionSet.\n // Not being mentioned by context.selectionSet is convenient here,\n // since it means these extra fields cannot be affected by field\n // aliasing, which is why we can use extractKey instead of\n // context.readField for this extraction.\n extracted = extractKeyPath(object, schemaKeyPath, extractKey);\n }\n invariant(extracted !== void 0, 4, schemaKeyPath.join(\".\"), object);\n return extracted;\n }));\n return \"\".concat(context.typename, \":\").concat(JSON.stringify(keyObject));\n }));\n}\n// The keyArgs extraction process is roughly analogous to keyFields extraction,\n// but there are no aliases involved, missing fields are tolerated (by merely\n// omitting them from the key), and drawing from field.directives or variables\n// is allowed (in addition to drawing from the field's arguments object).\n// Concretely, these differences mean passing a different key path extractor\n// function to collectSpecifierPaths, reusing the shared extractKeyPath helper\n// wherever possible.\nexport function keyArgsFnFromSpecifier(specifier) {\n var info = lookupSpecifierInfo(specifier);\n return (info.keyArgsFn ||\n (info.keyArgsFn = function (args, _a) {\n var field = _a.field, variables = _a.variables, fieldName = _a.fieldName;\n var collected = collectSpecifierPaths(specifier, function (keyPath) {\n var firstKey = keyPath[0];\n var firstChar = firstKey.charAt(0);\n if (firstChar === \"@\") {\n if (field && isNonEmptyArray(field.directives)) {\n var directiveName_1 = firstKey.slice(1);\n // If the directive appears multiple times, only the first\n // occurrence's arguments will be used. TODO Allow repetition?\n // TODO Cache this work somehow, a la aliasMap?\n var d = field.directives.find(function (d) { return d.name.value === directiveName_1; });\n // Fortunately argumentsObjectFromField works for DirectiveNode!\n var directiveArgs = d && argumentsObjectFromField(d, variables);\n // For directives without arguments (d defined, but directiveArgs ===\n // null), the presence or absence of the directive still counts as\n // part of the field key, so we return null in those cases. If no\n // directive with this name was found for this field (d undefined and\n // thus directiveArgs undefined), we return undefined, which causes\n // this value to be omitted from the key object returned by\n // collectSpecifierPaths.\n return (directiveArgs &&\n extractKeyPath(directiveArgs, \n // If keyPath.length === 1, this code calls extractKeyPath with an\n // empty path, which works because it uses directiveArgs as the\n // extracted value.\n keyPath.slice(1)));\n }\n // If the key started with @ but there was no corresponding directive,\n // we want to omit this value from the key object, not fall through to\n // treating @whatever as a normal argument name.\n return;\n }\n if (firstChar === \"$\") {\n var variableName = firstKey.slice(1);\n if (variables && hasOwn.call(variables, variableName)) {\n var varKeyPath = keyPath.slice(0);\n varKeyPath[0] = variableName;\n return extractKeyPath(variables, varKeyPath);\n }\n // If the key started with $ but there was no corresponding variable, we\n // want to omit this value from the key object, not fall through to\n // treating $whatever as a normal argument name.\n return;\n }\n if (args) {\n return extractKeyPath(args, keyPath);\n }\n });\n var suffix = JSON.stringify(collected);\n // If no arguments were passed to this field, and it didn't have any other\n // field key contributions from directives or variables, hide the empty\n // :{} suffix from the field key. However, a field passed no arguments can\n // still end up with a non-empty :{...} suffix if its key configuration\n // refers to directives or variables.\n if (args || suffix !== \"{}\") {\n fieldName += \":\" + suffix;\n }\n return fieldName;\n }));\n}\nexport function collectSpecifierPaths(specifier, extractor) {\n // For each path specified by specifier, invoke the extractor, and repeatedly\n // merge the results together, with appropriate ancestor context.\n var merger = new DeepMerger();\n return getSpecifierPaths(specifier).reduce(function (collected, path) {\n var _a;\n var toMerge = extractor(path);\n if (toMerge !== void 0) {\n // This path is not expected to contain array indexes, so the toMerge\n // reconstruction will not contain arrays. TODO Fix this?\n for (var i = path.length - 1; i >= 0; --i) {\n toMerge = (_a = {}, _a[path[i]] = toMerge, _a);\n }\n collected = merger.merge(collected, toMerge);\n }\n return collected;\n }, Object.create(null));\n}\nexport function getSpecifierPaths(spec) {\n var info = lookupSpecifierInfo(spec);\n if (!info.paths) {\n var paths_1 = (info.paths = []);\n var currentPath_1 = [];\n spec.forEach(function (s, i) {\n if (isArray(s)) {\n getSpecifierPaths(s).forEach(function (p) { return paths_1.push(currentPath_1.concat(p)); });\n currentPath_1.length = 0;\n }\n else {\n currentPath_1.push(s);\n if (!isArray(spec[i + 1])) {\n paths_1.push(currentPath_1.slice(0));\n currentPath_1.length = 0;\n }\n }\n });\n }\n return info.paths;\n}\nfunction extractKey(object, key) {\n return object[key];\n}\nexport function extractKeyPath(object, path, extract) {\n // For each key in path, extract the corresponding child property from obj,\n // flattening arrays if encountered (uncommon for keyFields and keyArgs, but\n // possible). The final result of path.reduce is normalized so unexpected leaf\n // objects have their keys safely sorted. That final result is difficult to\n // type as anything other than any. You're welcome to try to improve the\n // return type, but keep in mind extractKeyPath is not a public function\n // (exported only for testing), so the effort may not be worthwhile unless the\n // limited set of actual callers (see above) pass arguments that TypeScript\n // can statically type. If we know only that path is some array of strings\n // (and not, say, a specific tuple of statically known strings), any (or\n // possibly unknown) is the honest answer.\n extract = extract || extractKey;\n return normalize(path.reduce(function reducer(obj, key) {\n return isArray(obj) ?\n obj.map(function (child) { return reducer(child, key); })\n : obj && extract(obj, key);\n }, object));\n}\nfunction normalize(value) {\n // Usually the extracted value will be a scalar value, since most primary\n // key fields are scalar, but just in case we get an object or an array, we\n // need to do some normalization of the order of (nested) keys.\n if (isNonNullObject(value)) {\n if (isArray(value)) {\n return value.map(normalize);\n }\n return collectSpecifierPaths(Object.keys(value).sort(), function (path) {\n return extractKeyPath(value, path);\n });\n }\n return value;\n}\n","import { __assign, __extends } from \"tslib\";\nimport { invariant } from \"../utilities/globals/index.js\";\nimport { equal } from \"@wry/equality\";\nimport { NetworkStatus, isNetworkRequestInFlight } from \"./networkStatus.js\";\nimport { cloneDeep, compact, getOperationDefinition, Observable, iterateObserversSafely, fixObservableSubclass, getQueryDefinition, } from \"../utilities/index.js\";\nimport { equalByQuery } from \"./equalByQuery.js\";\nvar assign = Object.assign, hasOwnProperty = Object.hasOwnProperty;\nvar ObservableQuery = /** @class */ (function (_super) {\n __extends(ObservableQuery, _super);\n function ObservableQuery(_a) {\n var queryManager = _a.queryManager, queryInfo = _a.queryInfo, options = _a.options;\n var _this = _super.call(this, function (observer) {\n // Zen Observable has its own error function, so in order to log correctly\n // we need to provide a custom error callback.\n try {\n var subObserver = observer._subscription._observer;\n if (subObserver && !subObserver.error) {\n subObserver.error = defaultSubscriptionObserverErrorCallback;\n }\n }\n catch (_a) { }\n var first = !_this.observers.size;\n _this.observers.add(observer);\n // Deliver most recent error or result.\n var last = _this.last;\n if (last && last.error) {\n observer.error && observer.error(last.error);\n }\n else if (last && last.result) {\n observer.next && observer.next(last.result);\n }\n // Initiate observation of this query if it hasn't been reported to\n // the QueryManager yet.\n if (first) {\n // Blindly catching here prevents unhandled promise rejections,\n // and is safe because the ObservableQuery handles this error with\n // this.observer.error, so we're not just swallowing the error by\n // ignoring it here.\n _this.reobserve().catch(function () { });\n }\n return function () {\n if (_this.observers.delete(observer) && !_this.observers.size) {\n _this.tearDownQuery();\n }\n };\n }) || this;\n _this.observers = new Set();\n _this.subscriptions = new Set();\n // related classes\n _this.queryInfo = queryInfo;\n _this.queryManager = queryManager;\n // active state\n _this.waitForOwnResult = skipCacheDataFor(options.fetchPolicy);\n _this.isTornDown = false;\n var _b = queryManager.defaultOptions.watchQuery, _c = _b === void 0 ? {} : _b, _d = _c.fetchPolicy, defaultFetchPolicy = _d === void 0 ? \"cache-first\" : _d;\n var _e = options.fetchPolicy, fetchPolicy = _e === void 0 ? defaultFetchPolicy : _e, \n // Make sure we don't store \"standby\" as the initialFetchPolicy.\n _f = options.initialFetchPolicy, \n // Make sure we don't store \"standby\" as the initialFetchPolicy.\n initialFetchPolicy = _f === void 0 ? fetchPolicy === \"standby\" ? defaultFetchPolicy : (fetchPolicy) : _f;\n _this.options = __assign(__assign({}, options), { \n // Remember the initial options.fetchPolicy so we can revert back to this\n // policy when variables change. This information can also be specified\n // (or overridden) by providing options.initialFetchPolicy explicitly.\n initialFetchPolicy: initialFetchPolicy, \n // This ensures this.options.fetchPolicy always has a string value, in\n // case options.fetchPolicy was not provided.\n fetchPolicy: fetchPolicy });\n _this.queryId = queryInfo.queryId || queryManager.generateQueryId();\n var opDef = getOperationDefinition(_this.query);\n _this.queryName = opDef && opDef.name && opDef.name.value;\n return _this;\n }\n Object.defineProperty(ObservableQuery.prototype, \"query\", {\n // The `query` computed property will always reflect the document transformed\n // by the last run query. `this.options.query` will always reflect the raw\n // untransformed query to ensure document transforms with runtime conditionals\n // are run on the original document.\n get: function () {\n return this.lastQuery || this.options.query;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ObservableQuery.prototype, \"variables\", {\n // Computed shorthand for this.options.variables, preserved for\n // backwards compatibility.\n get: function () {\n return this.options.variables;\n },\n enumerable: false,\n configurable: true\n });\n ObservableQuery.prototype.result = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n // TODO: this code doesn’t actually make sense insofar as the observer\n // will never exist in this.observers due how zen-observable wraps observables.\n // https://github.com/zenparsing/zen-observable/blob/master/src/Observable.js#L169\n var observer = {\n next: function (result) {\n resolve(result);\n // Stop the query within the QueryManager if we can before\n // this function returns.\n //\n // We do this in order to prevent observers piling up within\n // the QueryManager. Notice that we only fully unsubscribe\n // from the subscription in a setTimeout(..., 0) call. This call can\n // actually be handled by the browser at a much later time. If queries\n // are fired in the meantime, observers that should have been removed\n // from the QueryManager will continue to fire, causing an unnecessary\n // performance hit.\n _this.observers.delete(observer);\n if (!_this.observers.size) {\n _this.queryManager.removeQuery(_this.queryId);\n }\n setTimeout(function () {\n subscription.unsubscribe();\n }, 0);\n },\n error: reject,\n };\n var subscription = _this.subscribe(observer);\n });\n };\n ObservableQuery.prototype.getCurrentResult = function (saveAsLastResult) {\n if (saveAsLastResult === void 0) { saveAsLastResult = true; }\n // Use the last result as long as the variables match this.variables.\n var lastResult = this.getLastResult(true);\n var networkStatus = this.queryInfo.networkStatus ||\n (lastResult && lastResult.networkStatus) ||\n NetworkStatus.ready;\n var result = __assign(__assign({}, lastResult), { loading: isNetworkRequestInFlight(networkStatus), networkStatus: networkStatus });\n var _a = this.options.fetchPolicy, fetchPolicy = _a === void 0 ? \"cache-first\" : _a;\n if (\n // These fetch policies should never deliver data from the cache, unless\n // redelivering a previously delivered result.\n skipCacheDataFor(fetchPolicy) ||\n // If this.options.query has @client(always: true) fields, we cannot\n // trust diff.result, since it was read from the cache without running\n // local resolvers (and it's too late to run resolvers now, since we must\n // return a result synchronously).\n this.queryManager.getDocumentInfo(this.query).hasForcedResolvers) {\n // Fall through.\n }\n else if (this.waitForOwnResult) {\n // This would usually be a part of `QueryInfo.getDiff()`.\n // which we skip in the waitForOwnResult case since we are not\n // interested in the diff.\n this.queryInfo[\"updateWatch\"]();\n }\n else {\n var diff = this.queryInfo.getDiff();\n if (diff.complete || this.options.returnPartialData) {\n result.data = diff.result;\n }\n if (equal(result.data, {})) {\n result.data = void 0;\n }\n if (diff.complete) {\n // Similar to setting result.partial to false, but taking advantage of the\n // falsiness of missing fields.\n delete result.partial;\n // If the diff is complete, and we're using a FetchPolicy that\n // terminates after a complete cache read, we can assume the next result\n // we receive will have NetworkStatus.ready and !loading.\n if (diff.complete &&\n result.networkStatus === NetworkStatus.loading &&\n (fetchPolicy === \"cache-first\" || fetchPolicy === \"cache-only\")) {\n result.networkStatus = NetworkStatus.ready;\n result.loading = false;\n }\n }\n else {\n result.partial = true;\n }\n if (globalThis.__DEV__ !== false &&\n !diff.complete &&\n !this.options.partialRefetch &&\n !result.loading &&\n !result.data &&\n !result.error) {\n logMissingFieldErrors(diff.missing);\n }\n }\n if (saveAsLastResult) {\n this.updateLastResult(result);\n }\n return result;\n };\n // Compares newResult to the snapshot we took of this.lastResult when it was\n // first received.\n ObservableQuery.prototype.isDifferentFromLastResult = function (newResult, variables) {\n if (!this.last) {\n return true;\n }\n var resultIsDifferent = this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective ?\n !equalByQuery(this.query, this.last.result, newResult, this.variables)\n : !equal(this.last.result, newResult);\n return (resultIsDifferent || (variables && !equal(this.last.variables, variables)));\n };\n ObservableQuery.prototype.getLast = function (key, variablesMustMatch) {\n var last = this.last;\n if (last &&\n last[key] &&\n (!variablesMustMatch || equal(last.variables, this.variables))) {\n return last[key];\n }\n };\n ObservableQuery.prototype.getLastResult = function (variablesMustMatch) {\n return this.getLast(\"result\", variablesMustMatch);\n };\n ObservableQuery.prototype.getLastError = function (variablesMustMatch) {\n return this.getLast(\"error\", variablesMustMatch);\n };\n ObservableQuery.prototype.resetLastResults = function () {\n delete this.last;\n this.isTornDown = false;\n };\n ObservableQuery.prototype.resetQueryStoreErrors = function () {\n this.queryManager.resetErrors(this.queryId);\n };\n /**\n * Update the variables of this observable query, and fetch the new results.\n * This method should be preferred over `setVariables` in most use cases.\n *\n * @param variables - The new set of variables. If there are missing variables,\n * the previous values of those variables will be used.\n */\n ObservableQuery.prototype.refetch = function (variables) {\n var _a;\n var reobserveOptions = {\n // Always disable polling for refetches.\n pollInterval: 0,\n };\n // Unless the provided fetchPolicy always consults the network\n // (no-cache, network-only, or cache-and-network), override it with\n // network-only to force the refetch for this fetchQuery call.\n var fetchPolicy = this.options.fetchPolicy;\n if (fetchPolicy === \"cache-and-network\") {\n reobserveOptions.fetchPolicy = fetchPolicy;\n }\n else if (fetchPolicy === \"no-cache\") {\n reobserveOptions.fetchPolicy = \"no-cache\";\n }\n else {\n reobserveOptions.fetchPolicy = \"network-only\";\n }\n if (globalThis.__DEV__ !== false && variables && hasOwnProperty.call(variables, \"variables\")) {\n var queryDef = getQueryDefinition(this.query);\n var vars = queryDef.variableDefinitions;\n if (!vars || !vars.some(function (v) { return v.variable.name.value === \"variables\"; })) {\n globalThis.__DEV__ !== false && invariant.warn(\n 20,\n variables,\n ((_a = queryDef.name) === null || _a === void 0 ? void 0 : _a.value) || queryDef\n );\n }\n }\n if (variables && !equal(this.options.variables, variables)) {\n // Update the existing options with new variables\n reobserveOptions.variables = this.options.variables = __assign(__assign({}, this.options.variables), variables);\n }\n this.queryInfo.resetLastWrite();\n return this.reobserve(reobserveOptions, NetworkStatus.refetch);\n };\n ObservableQuery.prototype.fetchMore = function (fetchMoreOptions) {\n var _this = this;\n var combinedOptions = __assign(__assign({}, (fetchMoreOptions.query ? fetchMoreOptions : (__assign(__assign(__assign(__assign({}, this.options), { query: this.options.query }), fetchMoreOptions), { variables: __assign(__assign({}, this.options.variables), fetchMoreOptions.variables) })))), { \n // The fetchMore request goes immediately to the network and does\n // not automatically write its result to the cache (hence no-cache\n // instead of network-only), because we allow the caller of\n // fetchMore to provide an updateQuery callback that determines how\n // the data gets written to the cache.\n fetchPolicy: \"no-cache\" });\n combinedOptions.query = this.transformDocument(combinedOptions.query);\n var qid = this.queryManager.generateQueryId();\n // If a temporary query is passed to `fetchMore`, we don't want to store\n // it as the last query result since it may be an optimized query for\n // pagination. We will however run the transforms on the original document\n // as well as the document passed in `fetchMoreOptions` to ensure the cache\n // uses the most up-to-date document which may rely on runtime conditionals.\n this.lastQuery =\n fetchMoreOptions.query ?\n this.transformDocument(this.options.query)\n : combinedOptions.query;\n // Simulate a loading result for the original query with\n // result.networkStatus === NetworkStatus.fetchMore.\n var queryInfo = this.queryInfo;\n var originalNetworkStatus = queryInfo.networkStatus;\n queryInfo.networkStatus = NetworkStatus.fetchMore;\n if (combinedOptions.notifyOnNetworkStatusChange) {\n this.observe();\n }\n var updatedQuerySet = new Set();\n return this.queryManager\n .fetchQuery(qid, combinedOptions, NetworkStatus.fetchMore)\n .then(function (fetchMoreResult) {\n _this.queryManager.removeQuery(qid);\n if (queryInfo.networkStatus === NetworkStatus.fetchMore) {\n queryInfo.networkStatus = originalNetworkStatus;\n }\n // Performing this cache update inside a cache.batch transaction ensures\n // any affected cache.watch watchers are notified at most once about any\n // updates. Most watchers will be using the QueryInfo class, which\n // responds to notifications by calling reobserveCacheFirst to deliver\n // fetchMore cache results back to this ObservableQuery.\n _this.queryManager.cache.batch({\n update: function (cache) {\n var updateQuery = fetchMoreOptions.updateQuery;\n if (updateQuery) {\n cache.updateQuery({\n query: _this.query,\n variables: _this.variables,\n returnPartialData: true,\n optimistic: false,\n }, function (previous) {\n return updateQuery(previous, {\n fetchMoreResult: fetchMoreResult.data,\n variables: combinedOptions.variables,\n });\n });\n }\n else {\n // If we're using a field policy instead of updateQuery, the only\n // thing we need to do is write the new data to the cache using\n // combinedOptions.variables (instead of this.variables, which is\n // what this.updateQuery uses, because it works by abusing the\n // original field value, keyed by the original variables).\n cache.writeQuery({\n query: combinedOptions.query,\n variables: combinedOptions.variables,\n data: fetchMoreResult.data,\n });\n }\n },\n onWatchUpdated: function (watch) {\n // Record the DocumentNode associated with any watched query whose\n // data were updated by the cache writes above.\n updatedQuerySet.add(watch.query);\n },\n });\n return fetchMoreResult;\n })\n .finally(function () {\n // In case the cache writes above did not generate a broadcast\n // notification (which would have been intercepted by onWatchUpdated),\n // likely because the written data were the same as what was already in\n // the cache, we still want fetchMore to deliver its final loading:false\n // result with the unchanged data.\n if (!updatedQuerySet.has(_this.query)) {\n reobserveCacheFirst(_this);\n }\n });\n };\n // XXX the subscription variables are separate from the query variables.\n // if you want to update subscription variables, right now you have to do that separately,\n // and you can only do it by stopping the subscription and then subscribing again with new variables.\n ObservableQuery.prototype.subscribeToMore = function (options) {\n var _this = this;\n var subscription = this.queryManager\n .startGraphQLSubscription({\n query: options.document,\n variables: options.variables,\n context: options.context,\n })\n .subscribe({\n next: function (subscriptionData) {\n var updateQuery = options.updateQuery;\n if (updateQuery) {\n _this.updateQuery(function (previous, _a) {\n var variables = _a.variables;\n return updateQuery(previous, {\n subscriptionData: subscriptionData,\n variables: variables,\n });\n });\n }\n },\n error: function (err) {\n if (options.onError) {\n options.onError(err);\n return;\n }\n globalThis.__DEV__ !== false && invariant.error(21, err);\n },\n });\n this.subscriptions.add(subscription);\n return function () {\n if (_this.subscriptions.delete(subscription)) {\n subscription.unsubscribe();\n }\n };\n };\n ObservableQuery.prototype.setOptions = function (newOptions) {\n return this.reobserve(newOptions);\n };\n ObservableQuery.prototype.silentSetOptions = function (newOptions) {\n var mergedOptions = compact(this.options, newOptions || {});\n assign(this.options, mergedOptions);\n };\n /**\n * Update the variables of this observable query, and fetch the new results\n * if they've changed. Most users should prefer `refetch` instead of\n * `setVariables` in order to to be properly notified of results even when\n * they come from the cache.\n *\n * Note: the `next` callback will *not* fire if the variables have not changed\n * or if the result is coming from cache.\n *\n * Note: the promise will return the old results immediately if the variables\n * have not changed.\n *\n * Note: the promise will return null immediately if the query is not active\n * (there are no subscribers).\n *\n * @param variables - The new set of variables. If there are missing variables,\n * the previous values of those variables will be used.\n */\n ObservableQuery.prototype.setVariables = function (variables) {\n if (equal(this.variables, variables)) {\n // If we have no observers, then we don't actually want to make a network\n // request. As soon as someone observes the query, the request will kick\n // off. For now, we just store any changes. (See #1077)\n return this.observers.size ? this.result() : Promise.resolve();\n }\n this.options.variables = variables;\n // See comment above\n if (!this.observers.size) {\n return Promise.resolve();\n }\n return this.reobserve({\n // Reset options.fetchPolicy to its original value.\n fetchPolicy: this.options.initialFetchPolicy,\n variables: variables,\n }, NetworkStatus.setVariables);\n };\n ObservableQuery.prototype.updateQuery = function (mapFn) {\n var queryManager = this.queryManager;\n var result = queryManager.cache.diff({\n query: this.options.query,\n variables: this.variables,\n returnPartialData: true,\n optimistic: false,\n }).result;\n var newResult = mapFn(result, {\n variables: this.variables,\n });\n if (newResult) {\n queryManager.cache.writeQuery({\n query: this.options.query,\n data: newResult,\n variables: this.variables,\n });\n queryManager.broadcastQueries();\n }\n };\n ObservableQuery.prototype.startPolling = function (pollInterval) {\n this.options.pollInterval = pollInterval;\n this.updatePolling();\n };\n ObservableQuery.prototype.stopPolling = function () {\n this.options.pollInterval = 0;\n this.updatePolling();\n };\n // Update options.fetchPolicy according to options.nextFetchPolicy.\n ObservableQuery.prototype.applyNextFetchPolicy = function (reason, \n // It's possible to use this method to apply options.nextFetchPolicy to\n // options.fetchPolicy even if options !== this.options, though that happens\n // most often when the options are temporary, used for only one request and\n // then thrown away, so nextFetchPolicy may not end up mattering.\n options) {\n if (options.nextFetchPolicy) {\n var _a = options.fetchPolicy, fetchPolicy = _a === void 0 ? \"cache-first\" : _a, _b = options.initialFetchPolicy, initialFetchPolicy = _b === void 0 ? fetchPolicy : _b;\n if (fetchPolicy === \"standby\") {\n // Do nothing, leaving options.fetchPolicy unchanged.\n }\n else if (typeof options.nextFetchPolicy === \"function\") {\n // When someone chooses \"cache-and-network\" or \"network-only\" as their\n // initial FetchPolicy, they often do not want future cache updates to\n // trigger unconditional network requests, which is what repeatedly\n // applying the \"cache-and-network\" or \"network-only\" policies would\n // seem to imply. Instead, when the cache reports an update after the\n // initial network request, it may be desirable for subsequent network\n // requests to be triggered only if the cache result is incomplete. To\n // that end, the options.nextFetchPolicy option provides an easy way to\n // update options.fetchPolicy after the initial network request, without\n // having to call observableQuery.setOptions.\n options.fetchPolicy = options.nextFetchPolicy(fetchPolicy, {\n reason: reason,\n options: options,\n observable: this,\n initialFetchPolicy: initialFetchPolicy,\n });\n }\n else if (reason === \"variables-changed\") {\n options.fetchPolicy = initialFetchPolicy;\n }\n else {\n options.fetchPolicy = options.nextFetchPolicy;\n }\n }\n return options.fetchPolicy;\n };\n ObservableQuery.prototype.fetch = function (options, newNetworkStatus, query) {\n // TODO Make sure we update the networkStatus (and infer fetchVariables)\n // before actually committing to the fetch.\n this.queryManager.setObservableQuery(this);\n return this.queryManager[\"fetchConcastWithInfo\"](this.queryId, options, newNetworkStatus, query);\n };\n // Turns polling on or off based on this.options.pollInterval.\n ObservableQuery.prototype.updatePolling = function () {\n var _this = this;\n // Avoid polling in SSR mode\n if (this.queryManager.ssrMode) {\n return;\n }\n var _a = this, pollingInfo = _a.pollingInfo, pollInterval = _a.options.pollInterval;\n if (!pollInterval) {\n if (pollingInfo) {\n clearTimeout(pollingInfo.timeout);\n delete this.pollingInfo;\n }\n return;\n }\n if (pollingInfo && pollingInfo.interval === pollInterval) {\n return;\n }\n invariant(pollInterval, 22);\n var info = pollingInfo || (this.pollingInfo = {});\n info.interval = pollInterval;\n var maybeFetch = function () {\n if (_this.pollingInfo) {\n if (!isNetworkRequestInFlight(_this.queryInfo.networkStatus)) {\n _this.reobserve({\n // Most fetchPolicy options don't make sense to use in a polling context, as\n // users wouldn't want to be polling the cache directly. However, network-only and\n // no-cache are both useful for when the user wants to control whether or not the\n // polled results are written to the cache.\n fetchPolicy: _this.options.initialFetchPolicy === \"no-cache\" ?\n \"no-cache\"\n : \"network-only\",\n }, NetworkStatus.poll).then(poll, poll);\n }\n else {\n poll();\n }\n }\n };\n var poll = function () {\n var info = _this.pollingInfo;\n if (info) {\n clearTimeout(info.timeout);\n info.timeout = setTimeout(maybeFetch, info.interval);\n }\n };\n poll();\n };\n ObservableQuery.prototype.updateLastResult = function (newResult, variables) {\n if (variables === void 0) { variables = this.variables; }\n var error = this.getLastError();\n // Preserve this.last.error unless the variables have changed.\n if (error && this.last && !equal(variables, this.last.variables)) {\n error = void 0;\n }\n return (this.last = __assign({ result: this.queryManager.assumeImmutableResults ?\n newResult\n : cloneDeep(newResult), variables: variables }, (error ? { error: error } : null)));\n };\n ObservableQuery.prototype.reobserveAsConcast = function (newOptions, newNetworkStatus) {\n var _this = this;\n this.isTornDown = false;\n var useDisposableConcast = \n // Refetching uses a disposable Concast to allow refetches using different\n // options/variables, without permanently altering the options of the\n // original ObservableQuery.\n newNetworkStatus === NetworkStatus.refetch ||\n // The fetchMore method does not actually call the reobserve method, but,\n // if it did, it would definitely use a disposable Concast.\n newNetworkStatus === NetworkStatus.fetchMore ||\n // Polling uses a disposable Concast so the polling options (which force\n // fetchPolicy to be \"network-only\" or \"no-cache\") won't override the original options.\n newNetworkStatus === NetworkStatus.poll;\n // Save the old variables, since Object.assign may modify them below.\n var oldVariables = this.options.variables;\n var oldFetchPolicy = this.options.fetchPolicy;\n var mergedOptions = compact(this.options, newOptions || {});\n var options = useDisposableConcast ?\n // Disposable Concast fetches receive a shallow copy of this.options\n // (merged with newOptions), leaving this.options unmodified.\n mergedOptions\n : assign(this.options, mergedOptions);\n // Don't update options.query with the transformed query to avoid\n // overwriting this.options.query when we aren't using a disposable concast.\n // We want to ensure we can re-run the custom document transforms the next\n // time a request is made against the original query.\n var query = this.transformDocument(options.query);\n this.lastQuery = query;\n if (!useDisposableConcast) {\n // We can skip calling updatePolling if we're not changing this.options.\n this.updatePolling();\n // Reset options.fetchPolicy to its original value when variables change,\n // unless a new fetchPolicy was provided by newOptions.\n if (newOptions &&\n newOptions.variables &&\n !equal(newOptions.variables, oldVariables) &&\n // Don't mess with the fetchPolicy if it's currently \"standby\".\n options.fetchPolicy !== \"standby\" &&\n // If we're changing the fetchPolicy anyway, don't try to change it here\n // using applyNextFetchPolicy. The explicit options.fetchPolicy wins.\n options.fetchPolicy === oldFetchPolicy) {\n this.applyNextFetchPolicy(\"variables-changed\", options);\n if (newNetworkStatus === void 0) {\n newNetworkStatus = NetworkStatus.setVariables;\n }\n }\n }\n this.waitForOwnResult && (this.waitForOwnResult = skipCacheDataFor(options.fetchPolicy));\n var finishWaitingForOwnResult = function () {\n if (_this.concast === concast) {\n _this.waitForOwnResult = false;\n }\n };\n var variables = options.variables && __assign({}, options.variables);\n var _a = this.fetch(options, newNetworkStatus, query), concast = _a.concast, fromLink = _a.fromLink;\n var observer = {\n next: function (result) {\n finishWaitingForOwnResult();\n _this.reportResult(result, variables);\n },\n error: function (error) {\n finishWaitingForOwnResult();\n _this.reportError(error, variables);\n },\n };\n if (!useDisposableConcast && (fromLink || !this.concast)) {\n // We use the {add,remove}Observer methods directly to avoid wrapping\n // observer with an unnecessary SubscriptionObserver object.\n if (this.concast && this.observer) {\n this.concast.removeObserver(this.observer);\n }\n this.concast = concast;\n this.observer = observer;\n }\n concast.addObserver(observer);\n return concast;\n };\n ObservableQuery.prototype.reobserve = function (newOptions, newNetworkStatus) {\n return this.reobserveAsConcast(newOptions, newNetworkStatus)\n .promise;\n };\n ObservableQuery.prototype.resubscribeAfterError = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // If `lastError` is set in the current when the subscription is re-created,\n // the subscription will immediately receive the error, which will\n // cause it to terminate again. To avoid this, we first clear\n // the last error/result from the `observableQuery` before re-starting\n // the subscription, and restore the last value afterwards so that the\n // subscription has a chance to stay open.\n var last = this.last;\n this.resetLastResults();\n var subscription = this.subscribe.apply(this, args);\n this.last = last;\n return subscription;\n };\n // (Re)deliver the current result to this.observers without applying fetch\n // policies or making network requests.\n ObservableQuery.prototype.observe = function () {\n this.reportResult(\n // Passing false is important so that this.getCurrentResult doesn't\n // save the fetchMore result as this.lastResult, causing it to be\n // ignored due to the this.isDifferentFromLastResult check in\n // this.reportResult.\n this.getCurrentResult(false), this.variables);\n };\n ObservableQuery.prototype.reportResult = function (result, variables) {\n var lastError = this.getLastError();\n var isDifferent = this.isDifferentFromLastResult(result, variables);\n // Update the last result even when isDifferentFromLastResult returns false,\n // because the query may be using the @nonreactive directive, and we want to\n // save the the latest version of any nonreactive subtrees (in case\n // getCurrentResult is called), even though we skip broadcasting changes.\n if (lastError || !result.partial || this.options.returnPartialData) {\n this.updateLastResult(result, variables);\n }\n if (lastError || isDifferent) {\n iterateObserversSafely(this.observers, \"next\", result);\n }\n };\n ObservableQuery.prototype.reportError = function (error, variables) {\n // Since we don't get the current result on errors, only the error, we\n // must mirror the updates that occur in QueryStore.markQueryError here\n var errorResult = __assign(__assign({}, this.getLastResult()), { error: error, errors: error.graphQLErrors, networkStatus: NetworkStatus.error, loading: false });\n this.updateLastResult(errorResult, variables);\n iterateObserversSafely(this.observers, \"error\", (this.last.error = error));\n };\n ObservableQuery.prototype.hasObservers = function () {\n return this.observers.size > 0;\n };\n ObservableQuery.prototype.tearDownQuery = function () {\n if (this.isTornDown)\n return;\n if (this.concast && this.observer) {\n this.concast.removeObserver(this.observer);\n delete this.concast;\n delete this.observer;\n }\n this.stopPolling();\n // stop all active GraphQL subscriptions\n this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });\n this.subscriptions.clear();\n this.queryManager.stopQuery(this.queryId);\n this.observers.clear();\n this.isTornDown = true;\n };\n ObservableQuery.prototype.transformDocument = function (document) {\n return this.queryManager.transform(document);\n };\n return ObservableQuery;\n}(Observable));\nexport { ObservableQuery };\n// Necessary because the ObservableQuery constructor has a different\n// signature than the Observable constructor.\nfixObservableSubclass(ObservableQuery);\n// Reobserve with fetchPolicy effectively set to \"cache-first\", triggering\n// delivery of any new data from the cache, possibly falling back to the network\n// if any cache data are missing. This allows _complete_ cache results to be\n// delivered without also kicking off unnecessary network requests when\n// this.options.fetchPolicy is \"cache-and-network\" or \"network-only\". When\n// this.options.fetchPolicy is any other policy (\"cache-first\", \"cache-only\",\n// \"standby\", or \"no-cache\"), we call this.reobserve() as usual.\nexport function reobserveCacheFirst(obsQuery) {\n var _a = obsQuery.options, fetchPolicy = _a.fetchPolicy, nextFetchPolicy = _a.nextFetchPolicy;\n if (fetchPolicy === \"cache-and-network\" || fetchPolicy === \"network-only\") {\n return obsQuery.reobserve({\n fetchPolicy: \"cache-first\",\n // Use a temporary nextFetchPolicy function that replaces itself with the\n // previous nextFetchPolicy value and returns the original fetchPolicy.\n nextFetchPolicy: function (currentFetchPolicy, context) {\n // Replace this nextFetchPolicy function in the options object with the\n // original this.options.nextFetchPolicy value.\n this.nextFetchPolicy = nextFetchPolicy;\n // If the original nextFetchPolicy value was a function, give it a\n // chance to decide what happens here.\n if (typeof this.nextFetchPolicy === \"function\") {\n return this.nextFetchPolicy(currentFetchPolicy, context);\n }\n // Otherwise go back to the original this.options.fetchPolicy.\n return fetchPolicy;\n },\n });\n }\n return obsQuery.reobserve();\n}\nfunction defaultSubscriptionObserverErrorCallback(error) {\n globalThis.__DEV__ !== false && invariant.error(23, error.message, error.stack);\n}\nexport function logMissingFieldErrors(missing) {\n if (globalThis.__DEV__ !== false && missing) {\n globalThis.__DEV__ !== false && invariant.debug(24, missing);\n }\n}\nfunction skipCacheDataFor(fetchPolicy /* `undefined` would mean `\"cache-first\"` */) {\n return (fetchPolicy === \"network-only\" ||\n fetchPolicy === \"no-cache\" ||\n fetchPolicy === \"standby\");\n}\n","/**\n * The current status of a query’s execution in our system.\n */\nexport var NetworkStatus;\n(function (NetworkStatus) {\n /**\n * The query has never been run before and the query is now currently running. A query will still\n * have this network status even if a partial data result was returned from the cache, but a\n * query was dispatched anyway.\n */\n NetworkStatus[NetworkStatus[\"loading\"] = 1] = \"loading\";\n /**\n * If `setVariables` was called and a query was fired because of that then the network status\n * will be `setVariables` until the result of that query comes back.\n */\n NetworkStatus[NetworkStatus[\"setVariables\"] = 2] = \"setVariables\";\n /**\n * Indicates that `fetchMore` was called on this query and that the query created is currently in\n * flight.\n */\n NetworkStatus[NetworkStatus[\"fetchMore\"] = 3] = \"fetchMore\";\n /**\n * Similar to the `setVariables` network status. It means that `refetch` was called on a query\n * and the refetch request is currently in flight.\n */\n NetworkStatus[NetworkStatus[\"refetch\"] = 4] = \"refetch\";\n /**\n * Indicates that a polling query is currently in flight. So for example if you are polling a\n * query every 10 seconds then the network status will switch to `poll` every 10 seconds whenever\n * a poll request has been sent but not resolved.\n */\n NetworkStatus[NetworkStatus[\"poll\"] = 6] = \"poll\";\n /**\n * No request is in flight for this query, and no errors happened. Everything is OK.\n */\n NetworkStatus[NetworkStatus[\"ready\"] = 7] = \"ready\";\n /**\n * No request is in flight for this query, but one or more errors were detected.\n */\n NetworkStatus[NetworkStatus[\"error\"] = 8] = \"error\";\n})(NetworkStatus || (NetworkStatus = {}));\n/**\n * Returns true if there is currently a network request in flight according to a given network\n * status.\n */\nexport function isNetworkRequestInFlight(networkStatus) {\n return networkStatus ? networkStatus < 7 : false;\n}\n/**\n * Returns true if the network request is in ready or error state according to a given network\n * status.\n */\nexport function isNetworkRequestSettled(networkStatus) {\n return networkStatus === 7 || networkStatus === 8;\n}\n","import { __rest } from \"tslib\";\nimport equal from \"@wry/equality\";\nimport { createFragmentMap, getFragmentDefinitions, getFragmentFromSelection, getMainDefinition, isField, resultKeyNameFromField, shouldInclude, } from \"../utilities/index.js\";\n// Returns true if aResult and bResult are deeply equal according to the fields\n// selected by the given query, ignoring any fields marked as @nonreactive.\nexport function equalByQuery(query, _a, _b, variables) {\n var aData = _a.data, aRest = __rest(_a, [\"data\"]);\n var bData = _b.data, bRest = __rest(_b, [\"data\"]);\n return (equal(aRest, bRest) &&\n equalBySelectionSet(getMainDefinition(query).selectionSet, aData, bData, {\n fragmentMap: createFragmentMap(getFragmentDefinitions(query)),\n variables: variables,\n }));\n}\nfunction equalBySelectionSet(selectionSet, aResult, bResult, context) {\n if (aResult === bResult) {\n return true;\n }\n var seenSelections = new Set();\n // Returning true from this Array.prototype.every callback function skips the\n // current field/subtree. Returning false aborts the entire traversal\n // immediately, causing equalBySelectionSet to return false.\n return selectionSet.selections.every(function (selection) {\n // Avoid re-processing the same selection at the same level of recursion, in\n // case the same field gets included via multiple indirect fragment spreads.\n if (seenSelections.has(selection))\n return true;\n seenSelections.add(selection);\n // Ignore @skip(if: true) and @include(if: false) fields.\n if (!shouldInclude(selection, context.variables))\n return true;\n // If the field or (named) fragment spread has a @nonreactive directive on\n // it, we don't care if it's different, so we pretend it's the same.\n if (selectionHasNonreactiveDirective(selection))\n return true;\n if (isField(selection)) {\n var resultKey = resultKeyNameFromField(selection);\n var aResultChild = aResult && aResult[resultKey];\n var bResultChild = bResult && bResult[resultKey];\n var childSelectionSet = selection.selectionSet;\n if (!childSelectionSet) {\n // These are scalar values, so we can compare them with deep equal\n // without redoing the main recursive work.\n return equal(aResultChild, bResultChild);\n }\n var aChildIsArray = Array.isArray(aResultChild);\n var bChildIsArray = Array.isArray(bResultChild);\n if (aChildIsArray !== bChildIsArray)\n return false;\n if (aChildIsArray && bChildIsArray) {\n var length_1 = aResultChild.length;\n if (bResultChild.length !== length_1) {\n return false;\n }\n for (var i = 0; i < length_1; ++i) {\n if (!equalBySelectionSet(childSelectionSet, aResultChild[i], bResultChild[i], context)) {\n return false;\n }\n }\n return true;\n }\n return equalBySelectionSet(childSelectionSet, aResultChild, bResultChild, context);\n }\n else {\n var fragment = getFragmentFromSelection(selection, context.fragmentMap);\n if (fragment) {\n // The fragment might === selection if it's an inline fragment, but\n // could be !== if it's a named fragment ...spread.\n if (selectionHasNonreactiveDirective(fragment))\n return true;\n return equalBySelectionSet(fragment.selectionSet, \n // Notice that we reuse the same aResult and bResult values here,\n // since the fragment ...spread does not specify a field name, but\n // consists of multiple fields (within the fragment's selection set)\n // that should be applied to the current result value(s).\n aResult, bResult, context);\n }\n }\n });\n}\nfunction selectionHasNonreactiveDirective(selection) {\n return (!!selection.directives && selection.directives.some(directiveIsNonreactive));\n}\nfunction directiveIsNonreactive(dir) {\n return dir.name.value === \"nonreactive\";\n}\n","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { invariant } from \"../utilities/globals/index.js\";\nimport { visit, BREAK, isSelectionNode } from \"graphql\";\nimport { argumentsObjectFromField, buildQueryFromSelectionSet, createFragmentMap, getFragmentDefinitions, getMainDefinition, hasDirectives, isField, isInlineFragment, mergeDeep, mergeDeepArray, removeClientSetsFromDocument, resultKeyNameFromField, shouldInclude, } from \"../utilities/index.js\";\nimport { cacheSlot } from \"../cache/index.js\";\nvar LocalState = /** @class */ (function () {\n function LocalState(_a) {\n var cache = _a.cache, client = _a.client, resolvers = _a.resolvers, fragmentMatcher = _a.fragmentMatcher;\n this.selectionsToResolveCache = new WeakMap();\n this.cache = cache;\n if (client) {\n this.client = client;\n }\n if (resolvers) {\n this.addResolvers(resolvers);\n }\n if (fragmentMatcher) {\n this.setFragmentMatcher(fragmentMatcher);\n }\n }\n LocalState.prototype.addResolvers = function (resolvers) {\n var _this = this;\n this.resolvers = this.resolvers || {};\n if (Array.isArray(resolvers)) {\n resolvers.forEach(function (resolverGroup) {\n _this.resolvers = mergeDeep(_this.resolvers, resolverGroup);\n });\n }\n else {\n this.resolvers = mergeDeep(this.resolvers, resolvers);\n }\n };\n LocalState.prototype.setResolvers = function (resolvers) {\n this.resolvers = {};\n this.addResolvers(resolvers);\n };\n LocalState.prototype.getResolvers = function () {\n return this.resolvers || {};\n };\n // Run local client resolvers against the incoming query and remote data.\n // Locally resolved field values are merged with the incoming remote data,\n // and returned. Note that locally resolved fields will overwrite\n // remote data using the same field name.\n LocalState.prototype.runResolvers = function (_a) {\n var document = _a.document, remoteResult = _a.remoteResult, context = _a.context, variables = _a.variables, _b = _a.onlyRunForcedResolvers, onlyRunForcedResolvers = _b === void 0 ? false : _b;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_c) {\n if (document) {\n return [2 /*return*/, this.resolveDocument(document, remoteResult.data, context, variables, this.fragmentMatcher, onlyRunForcedResolvers).then(function (localResult) { return (__assign(__assign({}, remoteResult), { data: localResult.result })); })];\n }\n return [2 /*return*/, remoteResult];\n });\n });\n };\n LocalState.prototype.setFragmentMatcher = function (fragmentMatcher) {\n this.fragmentMatcher = fragmentMatcher;\n };\n LocalState.prototype.getFragmentMatcher = function () {\n return this.fragmentMatcher;\n };\n // Client queries contain everything in the incoming document (if a @client\n // directive is found).\n LocalState.prototype.clientQuery = function (document) {\n if (hasDirectives([\"client\"], document)) {\n if (this.resolvers) {\n return document;\n }\n }\n return null;\n };\n // Server queries are stripped of all @client based selection sets.\n LocalState.prototype.serverQuery = function (document) {\n return removeClientSetsFromDocument(document);\n };\n LocalState.prototype.prepareContext = function (context) {\n var cache = this.cache;\n return __assign(__assign({}, context), { cache: cache, \n // Getting an entry's cache key is useful for local state resolvers.\n getCacheKey: function (obj) {\n return cache.identify(obj);\n } });\n };\n // To support `@client @export(as: \"someVar\")` syntax, we'll first resolve\n // @client @export fields locally, then pass the resolved values back to be\n // used alongside the original operation variables.\n LocalState.prototype.addExportedVariables = function (document, variables, context) {\n if (variables === void 0) { variables = {}; }\n if (context === void 0) { context = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (document) {\n return [2 /*return*/, this.resolveDocument(document, this.buildRootValueFromCache(document, variables) || {}, this.prepareContext(context), variables).then(function (data) { return (__assign(__assign({}, variables), data.exportedVariables)); })];\n }\n return [2 /*return*/, __assign({}, variables)];\n });\n });\n };\n LocalState.prototype.shouldForceResolvers = function (document) {\n var forceResolvers = false;\n visit(document, {\n Directive: {\n enter: function (node) {\n if (node.name.value === \"client\" && node.arguments) {\n forceResolvers = node.arguments.some(function (arg) {\n return arg.name.value === \"always\" &&\n arg.value.kind === \"BooleanValue\" &&\n arg.value.value === true;\n });\n if (forceResolvers) {\n return BREAK;\n }\n }\n },\n },\n });\n return forceResolvers;\n };\n // Query the cache and return matching data.\n LocalState.prototype.buildRootValueFromCache = function (document, variables) {\n return this.cache.diff({\n query: buildQueryFromSelectionSet(document),\n variables: variables,\n returnPartialData: true,\n optimistic: false,\n }).result;\n };\n LocalState.prototype.resolveDocument = function (document, rootValue, context, variables, fragmentMatcher, onlyRunForcedResolvers) {\n if (context === void 0) { context = {}; }\n if (variables === void 0) { variables = {}; }\n if (fragmentMatcher === void 0) { fragmentMatcher = function () { return true; }; }\n if (onlyRunForcedResolvers === void 0) { onlyRunForcedResolvers = false; }\n return __awaiter(this, void 0, void 0, function () {\n var mainDefinition, fragments, fragmentMap, selectionsToResolve, definitionOperation, defaultOperationType, _a, cache, client, execContext, isClientFieldDescendant;\n return __generator(this, function (_b) {\n mainDefinition = getMainDefinition(document);\n fragments = getFragmentDefinitions(document);\n fragmentMap = createFragmentMap(fragments);\n selectionsToResolve = this.collectSelectionsToResolve(mainDefinition, fragmentMap);\n definitionOperation = mainDefinition.operation;\n defaultOperationType = definitionOperation ?\n definitionOperation.charAt(0).toUpperCase() +\n definitionOperation.slice(1)\n : \"Query\";\n _a = this, cache = _a.cache, client = _a.client;\n execContext = {\n fragmentMap: fragmentMap,\n context: __assign(__assign({}, context), { cache: cache, client: client }),\n variables: variables,\n fragmentMatcher: fragmentMatcher,\n defaultOperationType: defaultOperationType,\n exportedVariables: {},\n selectionsToResolve: selectionsToResolve,\n onlyRunForcedResolvers: onlyRunForcedResolvers,\n };\n isClientFieldDescendant = false;\n return [2 /*return*/, this.resolveSelectionSet(mainDefinition.selectionSet, isClientFieldDescendant, rootValue, execContext).then(function (result) { return ({\n result: result,\n exportedVariables: execContext.exportedVariables,\n }); })];\n });\n });\n };\n LocalState.prototype.resolveSelectionSet = function (selectionSet, isClientFieldDescendant, rootValue, execContext) {\n return __awaiter(this, void 0, void 0, function () {\n var fragmentMap, context, variables, resultsToMerge, execute;\n var _this = this;\n return __generator(this, function (_a) {\n fragmentMap = execContext.fragmentMap, context = execContext.context, variables = execContext.variables;\n resultsToMerge = [rootValue];\n execute = function (selection) { return __awaiter(_this, void 0, void 0, function () {\n var fragment, typeCondition;\n return __generator(this, function (_a) {\n if (!isClientFieldDescendant &&\n !execContext.selectionsToResolve.has(selection)) {\n // Skip selections without @client directives\n // (still processing if one of the ancestors or one of the child fields has @client directive)\n return [2 /*return*/];\n }\n if (!shouldInclude(selection, variables)) {\n // Skip this entirely.\n return [2 /*return*/];\n }\n if (isField(selection)) {\n return [2 /*return*/, this.resolveField(selection, isClientFieldDescendant, rootValue, execContext).then(function (fieldResult) {\n var _a;\n if (typeof fieldResult !== \"undefined\") {\n resultsToMerge.push((_a = {},\n _a[resultKeyNameFromField(selection)] = fieldResult,\n _a));\n }\n })];\n }\n if (isInlineFragment(selection)) {\n fragment = selection;\n }\n else {\n // This is a named fragment.\n fragment = fragmentMap[selection.name.value];\n invariant(fragment, 18, selection.name.value);\n }\n if (fragment && fragment.typeCondition) {\n typeCondition = fragment.typeCondition.name.value;\n if (execContext.fragmentMatcher(rootValue, typeCondition, context)) {\n return [2 /*return*/, this.resolveSelectionSet(fragment.selectionSet, isClientFieldDescendant, rootValue, execContext).then(function (fragmentResult) {\n resultsToMerge.push(fragmentResult);\n })];\n }\n }\n return [2 /*return*/];\n });\n }); };\n return [2 /*return*/, Promise.all(selectionSet.selections.map(execute)).then(function () {\n return mergeDeepArray(resultsToMerge);\n })];\n });\n });\n };\n LocalState.prototype.resolveField = function (field, isClientFieldDescendant, rootValue, execContext) {\n return __awaiter(this, void 0, void 0, function () {\n var variables, fieldName, aliasedFieldName, aliasUsed, defaultResult, resultPromise, resolverType, resolverMap, resolve;\n var _this = this;\n return __generator(this, function (_a) {\n if (!rootValue) {\n return [2 /*return*/, null];\n }\n variables = execContext.variables;\n fieldName = field.name.value;\n aliasedFieldName = resultKeyNameFromField(field);\n aliasUsed = fieldName !== aliasedFieldName;\n defaultResult = rootValue[aliasedFieldName] || rootValue[fieldName];\n resultPromise = Promise.resolve(defaultResult);\n // Usually all local resolvers are run when passing through here, but\n // if we've specifically identified that we only want to run forced\n // resolvers (that is, resolvers for fields marked with\n // `@client(always: true)`), then we'll skip running non-forced resolvers.\n if (!execContext.onlyRunForcedResolvers ||\n this.shouldForceResolvers(field)) {\n resolverType = rootValue.__typename || execContext.defaultOperationType;\n resolverMap = this.resolvers && this.resolvers[resolverType];\n if (resolverMap) {\n resolve = resolverMap[aliasUsed ? fieldName : aliasedFieldName];\n if (resolve) {\n resultPromise = Promise.resolve(\n // In case the resolve function accesses reactive variables,\n // set cacheSlot to the current cache instance.\n cacheSlot.withValue(this.cache, resolve, [\n rootValue,\n argumentsObjectFromField(field, variables),\n execContext.context,\n { field: field, fragmentMap: execContext.fragmentMap },\n ]));\n }\n }\n }\n return [2 /*return*/, resultPromise.then(function (result) {\n var _a, _b;\n if (result === void 0) { result = defaultResult; }\n // If an @export directive is associated with the current field, store\n // the `as` export variable name and current result for later use.\n if (field.directives) {\n field.directives.forEach(function (directive) {\n if (directive.name.value === \"export\" && directive.arguments) {\n directive.arguments.forEach(function (arg) {\n if (arg.name.value === \"as\" && arg.value.kind === \"StringValue\") {\n execContext.exportedVariables[arg.value.value] = result;\n }\n });\n }\n });\n }\n // Handle all scalar types here.\n if (!field.selectionSet) {\n return result;\n }\n // From here down, the field has a selection set, which means it's trying\n // to query a GraphQLObjectType.\n if (result == null) {\n // Basically any field in a GraphQL response can be null, or missing\n return result;\n }\n var isClientField = (_b = (_a = field.directives) === null || _a === void 0 ? void 0 : _a.some(function (d) { return d.name.value === \"client\"; })) !== null && _b !== void 0 ? _b : false;\n if (Array.isArray(result)) {\n return _this.resolveSubSelectedArray(field, isClientFieldDescendant || isClientField, result, execContext);\n }\n // Returned value is an object, and the query has a sub-selection. Recurse.\n if (field.selectionSet) {\n return _this.resolveSelectionSet(field.selectionSet, isClientFieldDescendant || isClientField, result, execContext);\n }\n })];\n });\n });\n };\n LocalState.prototype.resolveSubSelectedArray = function (field, isClientFieldDescendant, result, execContext) {\n var _this = this;\n return Promise.all(result.map(function (item) {\n if (item === null) {\n return null;\n }\n // This is a nested array, recurse.\n if (Array.isArray(item)) {\n return _this.resolveSubSelectedArray(field, isClientFieldDescendant, item, execContext);\n }\n // This is an object, run the selection set on it.\n if (field.selectionSet) {\n return _this.resolveSelectionSet(field.selectionSet, isClientFieldDescendant, item, execContext);\n }\n }));\n };\n // Collect selection nodes on paths from document root down to all @client directives.\n // This function takes into account transitive fragment spreads.\n // Complexity equals to a single `visit` over the full document.\n LocalState.prototype.collectSelectionsToResolve = function (mainDefinition, fragmentMap) {\n var isSingleASTNode = function (node) { return !Array.isArray(node); };\n var selectionsToResolveCache = this.selectionsToResolveCache;\n function collectByDefinition(definitionNode) {\n if (!selectionsToResolveCache.has(definitionNode)) {\n var matches_1 = new Set();\n selectionsToResolveCache.set(definitionNode, matches_1);\n visit(definitionNode, {\n Directive: function (node, _, __, ___, ancestors) {\n if (node.name.value === \"client\") {\n ancestors.forEach(function (node) {\n if (isSingleASTNode(node) && isSelectionNode(node)) {\n matches_1.add(node);\n }\n });\n }\n },\n FragmentSpread: function (spread, _, __, ___, ancestors) {\n var fragment = fragmentMap[spread.name.value];\n invariant(fragment, 19, spread.name.value);\n var fragmentSelections = collectByDefinition(fragment);\n if (fragmentSelections.size > 0) {\n // Fragment for this spread contains @client directive (either directly or transitively)\n // Collect selection nodes on paths from the root down to fields with the @client directive\n ancestors.forEach(function (node) {\n if (isSingleASTNode(node) && isSelectionNode(node)) {\n matches_1.add(node);\n }\n });\n matches_1.add(spread);\n fragmentSelections.forEach(function (selection) {\n matches_1.add(selection);\n });\n }\n },\n });\n }\n return selectionsToResolveCache.get(definitionNode);\n }\n return collectByDefinition(mainDefinition);\n };\n return LocalState;\n}());\nexport { LocalState };\n","import { __assign } from \"tslib\";\nimport { equal } from \"@wry/equality\";\nimport { DeepMerger } from \"../utilities/index.js\";\nimport { mergeIncrementalData } from \"../utilities/index.js\";\nimport { reobserveCacheFirst } from \"./ObservableQuery.js\";\nimport { isNonEmptyArray, graphQLResultHasError, canUseWeakMap, } from \"../utilities/index.js\";\nimport { NetworkStatus, isNetworkRequestInFlight } from \"./networkStatus.js\";\nvar destructiveMethodCounts = new (canUseWeakMap ? WeakMap : Map)();\nfunction wrapDestructiveCacheMethod(cache, methodName) {\n var original = cache[methodName];\n if (typeof original === \"function\") {\n cache[methodName] = function () {\n destructiveMethodCounts.set(cache, \n // The %1e15 allows the count to wrap around to 0 safely every\n // quadrillion evictions, so there's no risk of overflow. To be\n // clear, this is more of a pedantic principle than something\n // that matters in any conceivable practical scenario.\n (destructiveMethodCounts.get(cache) + 1) % 1e15);\n // @ts-expect-error this is just too generic to be typed correctly\n return original.apply(this, arguments);\n };\n }\n}\nfunction cancelNotifyTimeout(info) {\n if (info[\"notifyTimeout\"]) {\n clearTimeout(info[\"notifyTimeout\"]);\n info[\"notifyTimeout\"] = void 0;\n }\n}\n// A QueryInfo object represents a single query managed by the\n// QueryManager, which tracks all QueryInfo objects by queryId in its\n// this.queries Map. QueryInfo objects store the latest results and errors\n// for the given query, and are responsible for reporting those results to\n// the corresponding ObservableQuery, via the QueryInfo.notify method.\n// Results are reported asynchronously whenever setDiff marks the\n// QueryInfo object as dirty, though a call to the QueryManager's\n// broadcastQueries method may trigger the notification before it happens\n// automatically. This class used to be a simple interface type without\n// any field privacy or meaningful methods, which is why it still has so\n// many public fields. The effort to lock down and simplify the QueryInfo\n// interface is ongoing, and further improvements are welcome.\nvar QueryInfo = /** @class */ (function () {\n function QueryInfo(queryManager, queryId) {\n if (queryId === void 0) { queryId = queryManager.generateQueryId(); }\n this.queryId = queryId;\n this.listeners = new Set();\n this.document = null;\n this.lastRequestId = 1;\n this.stopped = false;\n this.dirty = false;\n this.observableQuery = null;\n var cache = (this.cache = queryManager.cache);\n // Track how often cache.evict is called, since we want eviction to\n // override the feud-stopping logic in the markResult method, by\n // causing shouldWrite to return true. Wrapping the cache.evict method\n // is a bit of a hack, but it saves us from having to make eviction\n // counting an official part of the ApolloCache API.\n if (!destructiveMethodCounts.has(cache)) {\n destructiveMethodCounts.set(cache, 0);\n wrapDestructiveCacheMethod(cache, \"evict\");\n wrapDestructiveCacheMethod(cache, \"modify\");\n wrapDestructiveCacheMethod(cache, \"reset\");\n }\n }\n QueryInfo.prototype.init = function (query) {\n var networkStatus = query.networkStatus || NetworkStatus.loading;\n if (this.variables &&\n this.networkStatus !== NetworkStatus.loading &&\n !equal(this.variables, query.variables)) {\n networkStatus = NetworkStatus.setVariables;\n }\n if (!equal(query.variables, this.variables)) {\n this.lastDiff = void 0;\n }\n Object.assign(this, {\n document: query.document,\n variables: query.variables,\n networkError: null,\n graphQLErrors: this.graphQLErrors || [],\n networkStatus: networkStatus,\n });\n if (query.observableQuery) {\n this.setObservableQuery(query.observableQuery);\n }\n if (query.lastRequestId) {\n this.lastRequestId = query.lastRequestId;\n }\n return this;\n };\n QueryInfo.prototype.reset = function () {\n cancelNotifyTimeout(this);\n this.dirty = false;\n };\n QueryInfo.prototype.getDiff = function () {\n var options = this.getDiffOptions();\n if (this.lastDiff && equal(options, this.lastDiff.options)) {\n return this.lastDiff.diff;\n }\n this.updateWatch(this.variables);\n var oq = this.observableQuery;\n if (oq && oq.options.fetchPolicy === \"no-cache\") {\n return { complete: false };\n }\n var diff = this.cache.diff(options);\n this.updateLastDiff(diff, options);\n return diff;\n };\n QueryInfo.prototype.updateLastDiff = function (diff, options) {\n this.lastDiff =\n diff ?\n {\n diff: diff,\n options: options || this.getDiffOptions(),\n }\n : void 0;\n };\n QueryInfo.prototype.getDiffOptions = function (variables) {\n var _a;\n if (variables === void 0) { variables = this.variables; }\n return {\n query: this.document,\n variables: variables,\n returnPartialData: true,\n optimistic: true,\n canonizeResults: (_a = this.observableQuery) === null || _a === void 0 ? void 0 : _a.options.canonizeResults,\n };\n };\n QueryInfo.prototype.setDiff = function (diff) {\n var _this = this;\n var oldDiff = this.lastDiff && this.lastDiff.diff;\n this.updateLastDiff(diff);\n if (!this.dirty && !equal(oldDiff && oldDiff.result, diff && diff.result)) {\n this.dirty = true;\n if (!this.notifyTimeout) {\n this.notifyTimeout = setTimeout(function () { return _this.notify(); }, 0);\n }\n }\n };\n QueryInfo.prototype.setObservableQuery = function (oq) {\n var _this = this;\n if (oq === this.observableQuery)\n return;\n if (this.oqListener) {\n this.listeners.delete(this.oqListener);\n }\n this.observableQuery = oq;\n if (oq) {\n oq[\"queryInfo\"] = this;\n this.listeners.add((this.oqListener = function () {\n var diff = _this.getDiff();\n if (diff.fromOptimisticTransaction) {\n // If this diff came from an optimistic transaction, deliver the\n // current cache data to the ObservableQuery, but don't perform a\n // reobservation, since oq.reobserveCacheFirst might make a network\n // request, and we never want to trigger network requests in the\n // middle of optimistic updates.\n oq[\"observe\"]();\n }\n else {\n // Otherwise, make the ObservableQuery \"reobserve\" the latest data\n // using a temporary fetch policy of \"cache-first\", so complete cache\n // results have a chance to be delivered without triggering additional\n // network requests, even when options.fetchPolicy is \"network-only\"\n // or \"cache-and-network\". All other fetch policies are preserved by\n // this method, and are handled by calling oq.reobserve(). If this\n // reobservation is spurious, isDifferentFromLastResult still has a\n // chance to catch it before delivery to ObservableQuery subscribers.\n reobserveCacheFirst(oq);\n }\n }));\n }\n else {\n delete this.oqListener;\n }\n };\n QueryInfo.prototype.notify = function () {\n var _this = this;\n cancelNotifyTimeout(this);\n if (this.shouldNotify()) {\n this.listeners.forEach(function (listener) { return listener(_this); });\n }\n this.dirty = false;\n };\n QueryInfo.prototype.shouldNotify = function () {\n if (!this.dirty || !this.listeners.size) {\n return false;\n }\n if (isNetworkRequestInFlight(this.networkStatus) && this.observableQuery) {\n var fetchPolicy = this.observableQuery.options.fetchPolicy;\n if (fetchPolicy !== \"cache-only\" && fetchPolicy !== \"cache-and-network\") {\n return false;\n }\n }\n return true;\n };\n QueryInfo.prototype.stop = function () {\n if (!this.stopped) {\n this.stopped = true;\n // Cancel the pending notify timeout\n this.reset();\n this.cancel();\n // Revert back to the no-op version of cancel inherited from\n // QueryInfo.prototype.\n this.cancel = QueryInfo.prototype.cancel;\n var oq = this.observableQuery;\n if (oq)\n oq.stopPolling();\n }\n };\n // This method is a no-op by default, until/unless overridden by the\n // updateWatch method.\n QueryInfo.prototype.cancel = function () { };\n QueryInfo.prototype.updateWatch = function (variables) {\n var _this = this;\n if (variables === void 0) { variables = this.variables; }\n var oq = this.observableQuery;\n if (oq && oq.options.fetchPolicy === \"no-cache\") {\n return;\n }\n var watchOptions = __assign(__assign({}, this.getDiffOptions(variables)), { watcher: this, callback: function (diff) { return _this.setDiff(diff); } });\n if (!this.lastWatch || !equal(watchOptions, this.lastWatch)) {\n this.cancel();\n this.cancel = this.cache.watch((this.lastWatch = watchOptions));\n }\n };\n QueryInfo.prototype.resetLastWrite = function () {\n this.lastWrite = void 0;\n };\n QueryInfo.prototype.shouldWrite = function (result, variables) {\n var lastWrite = this.lastWrite;\n return !(lastWrite &&\n // If cache.evict has been called since the last time we wrote this\n // data into the cache, there's a chance writing this result into\n // the cache will repair what was evicted.\n lastWrite.dmCount === destructiveMethodCounts.get(this.cache) &&\n equal(variables, lastWrite.variables) &&\n equal(result.data, lastWrite.result.data));\n };\n QueryInfo.prototype.markResult = function (result, document, options, cacheWriteBehavior) {\n var _this = this;\n var merger = new DeepMerger();\n var graphQLErrors = isNonEmptyArray(result.errors) ? result.errors.slice(0) : [];\n // Cancel the pending notify timeout (if it exists) to prevent extraneous network\n // requests. To allow future notify timeouts, diff and dirty are reset as well.\n this.reset();\n if (\"incremental\" in result && isNonEmptyArray(result.incremental)) {\n var mergedData = mergeIncrementalData(this.getDiff().result, result);\n result.data = mergedData;\n // Detect the first chunk of a deferred query and merge it with existing\n // cache data. This ensures a `cache-first` fetch policy that returns\n // partial cache data or a `cache-and-network` fetch policy that already\n // has full data in the cache does not complain when trying to merge the\n // initial deferred server data with existing cache data.\n }\n else if (\"hasNext\" in result && result.hasNext) {\n var diff = this.getDiff();\n result.data = merger.merge(diff.result, result.data);\n }\n this.graphQLErrors = graphQLErrors;\n if (options.fetchPolicy === \"no-cache\") {\n this.updateLastDiff({ result: result.data, complete: true }, this.getDiffOptions(options.variables));\n }\n else if (cacheWriteBehavior !== 0 /* CacheWriteBehavior.FORBID */) {\n if (shouldWriteResult(result, options.errorPolicy)) {\n // Using a transaction here so we have a chance to read the result\n // back from the cache before the watch callback fires as a result\n // of writeQuery, so we can store the new diff quietly and ignore\n // it when we receive it redundantly from the watch callback.\n this.cache.performTransaction(function (cache) {\n if (_this.shouldWrite(result, options.variables)) {\n cache.writeQuery({\n query: document,\n data: result.data,\n variables: options.variables,\n overwrite: cacheWriteBehavior === 1 /* CacheWriteBehavior.OVERWRITE */,\n });\n _this.lastWrite = {\n result: result,\n variables: options.variables,\n dmCount: destructiveMethodCounts.get(_this.cache),\n };\n }\n else {\n // If result is the same as the last result we received from\n // the network (and the variables match too), avoid writing\n // result into the cache again. The wisdom of skipping this\n // cache write is far from obvious, since any cache write\n // could be the one that puts the cache back into a desired\n // state, fixing corruption or missing data. However, if we\n // always write every network result into the cache, we enable\n // feuds between queries competing to update the same data in\n // incompatible ways, which can lead to an endless cycle of\n // cache broadcasts and useless network requests. As with any\n // feud, eventually one side must step back from the brink,\n // letting the other side(s) have the last word(s). There may\n // be other points where we could break this cycle, such as\n // silencing the broadcast for cache.writeQuery (not a good\n // idea, since it just delays the feud a bit) or somehow\n // avoiding the network request that just happened (also bad,\n // because the server could return useful new data). All\n // options considered, skipping this cache write seems to be\n // the least damaging place to break the cycle, because it\n // reflects the intuition that we recently wrote this exact\n // result into the cache, so the cache *should* already/still\n // contain this data. If some other query has clobbered that\n // data in the meantime, that's too bad, but there will be no\n // winners if every query blindly reverts to its own version\n // of the data. This approach also gives the network a chance\n // to return new data, which will be written into the cache as\n // usual, notifying only those queries that are directly\n // affected by the cache updates, as usual. In the future, an\n // even more sophisticated cache could perhaps prevent or\n // mitigate the clobbering somehow, but that would make this\n // particular cache write even less important, and thus\n // skipping it would be even safer than it is today.\n if (_this.lastDiff && _this.lastDiff.diff.complete) {\n // Reuse data from the last good (complete) diff that we\n // received, when possible.\n result.data = _this.lastDiff.diff.result;\n return;\n }\n // If the previous this.diff was incomplete, fall through to\n // re-reading the latest data with cache.diff, below.\n }\n var diffOptions = _this.getDiffOptions(options.variables);\n var diff = cache.diff(diffOptions);\n // In case the QueryManager stops this QueryInfo before its\n // results are delivered, it's important to avoid restarting the\n // cache watch when markResult is called. We also avoid updating\n // the watch if we are writing a result that doesn't match the current\n // variables to avoid race conditions from broadcasting the wrong\n // result.\n if (!_this.stopped && equal(_this.variables, options.variables)) {\n // Any time we're about to update this.diff, we need to make\n // sure we've started watching the cache.\n _this.updateWatch(options.variables);\n }\n // If we're allowed to write to the cache, and we can read a\n // complete result from the cache, update result.data to be the\n // result from the cache, rather than the raw network result.\n // Set without setDiff to avoid triggering a notify call, since\n // we have other ways of notifying for this result.\n _this.updateLastDiff(diff, diffOptions);\n if (diff.complete) {\n result.data = diff.result;\n }\n });\n }\n else {\n this.lastWrite = void 0;\n }\n }\n };\n QueryInfo.prototype.markReady = function () {\n this.networkError = null;\n return (this.networkStatus = NetworkStatus.ready);\n };\n QueryInfo.prototype.markError = function (error) {\n this.networkStatus = NetworkStatus.error;\n this.lastWrite = void 0;\n this.reset();\n if (error.graphQLErrors) {\n this.graphQLErrors = error.graphQLErrors;\n }\n if (error.networkError) {\n this.networkError = error.networkError;\n }\n return error;\n };\n return QueryInfo;\n}());\nexport { QueryInfo };\nexport function shouldWriteResult(result, errorPolicy) {\n if (errorPolicy === void 0) { errorPolicy = \"none\"; }\n var ignoreErrors = errorPolicy === \"ignore\" || errorPolicy === \"all\";\n var writeWithErrors = !graphQLResultHasError(result);\n if (!writeWithErrors && ignoreErrors && result.data) {\n writeWithErrors = true;\n }\n return writeWithErrors;\n}\n","/* Core */\nexport { ApolloClient, mergeOptions } from \"./ApolloClient.js\";\nexport { ObservableQuery } from \"./ObservableQuery.js\";\nexport { NetworkStatus, isNetworkRequestSettled } from \"./networkStatus.js\";\nexport * from \"./types.js\";\nexport { isApolloError, ApolloError } from \"../errors/index.js\";\nexport { Cache, ApolloCache, InMemoryCache, MissingFieldError, defaultDataIdFromObject, makeVar, } from \"../cache/index.js\";\nexport * from \"../cache/inmemory/types.js\";\n/* Link */\nexport * from \"../link/core/index.js\";\nexport * from \"../link/http/index.js\";\nexport { fromError, toPromise, fromPromise, throwServerError, } from \"../link/utils/index.js\";\nexport { DocumentTransform, Observable, isReference, makeReference, } from \"../utilities/index.js\";\n/* Supporting */\n// The verbosity of invariant.{log,warn,error} can be controlled globally\n// (for anyone using the same ts-invariant package) by passing \"log\",\n// \"warn\", \"error\", or \"silent\" to setVerbosity (\"log\" is the default).\n// Note that all invariant.* logging is hidden in production.\nimport { setVerbosity } from \"ts-invariant\";\nexport { setVerbosity as setLogVerbosity };\nsetVerbosity(globalThis.__DEV__ !== false ? \"log\" : \"silent\");\n// Note that importing `gql` by itself, then destructuring\n// additional properties separately before exporting, is intentional.\n// Due to the way the `graphql-tag` library is setup, certain bundlers\n// can't find the properties added to the exported `gql` function without\n// additional guidance (e.g. Rollup - see\n// https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module).\n// Instead of having people that are using bundlers with `@apollo/client` add\n// extra bundler config to help `graphql-tag` exports be found (which would be\n// awkward since they aren't importing `graphql-tag` themselves), this\n// workaround of pulling the extra properties off the `gql` function,\n// then re-exporting them separately, helps keeps bundlers happy without any\n// additional config changes.\nexport { gql, resetCaches, disableFragmentWarnings, enableExperimentalFragmentVariables, disableExperimentalFragmentVariables, } from \"graphql-tag\";\n","import { __assign } from \"tslib\";\nimport { parse } from 'graphql';\nvar docCache = new Map();\nvar fragmentSourceMap = new Map();\nvar printFragmentWarnings = true;\nvar experimentalFragmentVariables = false;\nfunction normalize(string) {\n return string.replace(/[\\s,]+/g, ' ').trim();\n}\nfunction cacheKeyFromLoc(loc) {\n return normalize(loc.source.body.substring(loc.start, loc.end));\n}\nfunction processFragments(ast) {\n var seenKeys = new Set();\n var definitions = [];\n ast.definitions.forEach(function (fragmentDefinition) {\n if (fragmentDefinition.kind === 'FragmentDefinition') {\n var fragmentName = fragmentDefinition.name.value;\n var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);\n var sourceKeySet = fragmentSourceMap.get(fragmentName);\n if (sourceKeySet && !sourceKeySet.has(sourceKey)) {\n if (printFragmentWarnings) {\n console.warn(\"Warning: fragment with name \" + fragmentName + \" already exists.\\n\"\n + \"graphql-tag enforces all fragment names across your application to be unique; read more about\\n\"\n + \"this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names\");\n }\n }\n else if (!sourceKeySet) {\n fragmentSourceMap.set(fragmentName, sourceKeySet = new Set);\n }\n sourceKeySet.add(sourceKey);\n if (!seenKeys.has(sourceKey)) {\n seenKeys.add(sourceKey);\n definitions.push(fragmentDefinition);\n }\n }\n else {\n definitions.push(fragmentDefinition);\n }\n });\n return __assign(__assign({}, ast), { definitions: definitions });\n}\nfunction stripLoc(doc) {\n var workSet = new Set(doc.definitions);\n workSet.forEach(function (node) {\n if (node.loc)\n delete node.loc;\n Object.keys(node).forEach(function (key) {\n var value = node[key];\n if (value && typeof value === 'object') {\n workSet.add(value);\n }\n });\n });\n var loc = doc.loc;\n if (loc) {\n delete loc.startToken;\n delete loc.endToken;\n }\n return doc;\n}\nfunction parseDocument(source) {\n var cacheKey = normalize(source);\n if (!docCache.has(cacheKey)) {\n var parsed = parse(source, {\n experimentalFragmentVariables: experimentalFragmentVariables,\n allowLegacyFragmentVariables: experimentalFragmentVariables\n });\n if (!parsed || parsed.kind !== 'Document') {\n throw new Error('Not a valid GraphQL document.');\n }\n docCache.set(cacheKey, stripLoc(processFragments(parsed)));\n }\n return docCache.get(cacheKey);\n}\nexport function gql(literals) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof literals === 'string') {\n literals = [literals];\n }\n var result = literals[0];\n args.forEach(function (arg, i) {\n if (arg && arg.kind === 'Document') {\n result += arg.loc.source.body;\n }\n else {\n result += arg;\n }\n result += literals[i + 1];\n });\n return parseDocument(result);\n}\nexport function resetCaches() {\n docCache.clear();\n fragmentSourceMap.clear();\n}\nexport function disableFragmentWarnings() {\n printFragmentWarnings = false;\n}\nexport function enableExperimentalFragmentVariables() {\n experimentalFragmentVariables = true;\n}\nexport function disableExperimentalFragmentVariables() {\n experimentalFragmentVariables = false;\n}\nvar extras = {\n gql: gql,\n resetCaches: resetCaches,\n disableFragmentWarnings: disableFragmentWarnings,\n enableExperimentalFragmentVariables: enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables: disableExperimentalFragmentVariables\n};\n(function (gql_1) {\n gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;\n})(gql || (gql = {}));\ngql[\"default\"] = gql;\nexport default gql;\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, Optional, Inject, NgModule } from '@angular/core';\nimport { Observable, queueScheduler, observable, from } from 'rxjs';\nimport { NetworkStatus, ApolloClient, gql as gql$1 } from '@apollo/client/core';\nimport { map, startWith, observeOn } from 'rxjs/operators';\nfunction fromPromise(promiseFn) {\n return new Observable(subscriber => {\n promiseFn().then(result => {\n if (!subscriber.closed) {\n subscriber.next(result);\n subscriber.complete();\n }\n }, error => {\n if (!subscriber.closed) {\n subscriber.error(error);\n }\n });\n return () => subscriber.unsubscribe();\n });\n}\nfunction useMutationLoading(source, enabled) {\n if (!enabled) {\n return source.pipe(map(result => ({\n ...result,\n loading: false\n })));\n }\n return source.pipe(startWith({\n loading: true\n }), map(result => ({\n ...result,\n loading: !!result.loading\n })));\n}\nclass ZoneScheduler {\n zone;\n constructor(zone) {\n this.zone = zone;\n }\n now = Date.now ? Date.now : () => +new Date();\n schedule(work, delay = 0, state) {\n return this.zone.run(() => queueScheduler.schedule(work, delay, state));\n }\n}\nfunction fixObservable(obs) {\n obs[observable] = () => obs;\n return obs;\n}\nfunction wrapWithZone(obs, ngZone) {\n return obs.pipe(observeOn(new ZoneScheduler(ngZone)));\n}\nfunction pickFlag(flags, flag, defaultValue) {\n return flags && typeof flags[flag] !== 'undefined' ? flags[flag] : defaultValue;\n}\nfunction useInitialLoading(obsQuery) {\n return function useInitialLoadingOperator(source) {\n return new Observable(function useInitialLoadingSubscription(subscriber) {\n const currentResult = obsQuery.getCurrentResult();\n const {\n loading,\n errors,\n error,\n partial,\n data\n } = currentResult;\n const {\n partialRefetch,\n fetchPolicy\n } = obsQuery.options;\n const hasError = errors || error;\n if (partialRefetch && partial && (!data || Object.keys(data).length === 0) && fetchPolicy !== 'cache-only' && !loading && !hasError) {\n subscriber.next({\n ...currentResult,\n loading: true,\n networkStatus: NetworkStatus.loading\n });\n }\n return source.subscribe(subscriber);\n });\n };\n}\nclass QueryRef {\n obsQuery;\n valueChanges;\n queryId;\n constructor(obsQuery, ngZone, options) {\n this.obsQuery = obsQuery;\n const wrapped = wrapWithZone(from(fixObservable(this.obsQuery)), ngZone);\n this.valueChanges = options.useInitialLoading ? wrapped.pipe(useInitialLoading(this.obsQuery)) : wrapped;\n this.queryId = this.obsQuery.queryId;\n }\n // ObservableQuery's methods\n get options() {\n return this.obsQuery.options;\n }\n get variables() {\n return this.obsQuery.variables;\n }\n result() {\n return this.obsQuery.result();\n }\n getCurrentResult() {\n return this.obsQuery.getCurrentResult();\n }\n getLastResult() {\n return this.obsQuery.getLastResult();\n }\n getLastError() {\n return this.obsQuery.getLastError();\n }\n resetLastResults() {\n return this.obsQuery.resetLastResults();\n }\n refetch(variables) {\n return this.obsQuery.refetch(variables);\n }\n fetchMore(fetchMoreOptions) {\n return this.obsQuery.fetchMore(fetchMoreOptions);\n }\n subscribeToMore(options) {\n // XXX: there's a bug in apollo-client typings\n // it should not inherit types from ObservableQuery\n return this.obsQuery.subscribeToMore(options);\n }\n updateQuery(mapFn) {\n return this.obsQuery.updateQuery(mapFn);\n }\n stopPolling() {\n return this.obsQuery.stopPolling();\n }\n startPolling(pollInterval) {\n return this.obsQuery.startPolling(pollInterval);\n }\n setOptions(opts) {\n return this.obsQuery.setOptions(opts);\n }\n setVariables(variables) {\n return this.obsQuery.setVariables(variables);\n }\n}\nconst APOLLO_FLAGS = new InjectionToken('APOLLO_FLAGS');\nconst APOLLO_OPTIONS = new InjectionToken('APOLLO_OPTIONS');\nconst APOLLO_NAMED_OPTIONS = new InjectionToken('APOLLO_NAMED_OPTIONS');\nclass ApolloBase {\n ngZone;\n flags;\n _client;\n useInitialLoading;\n useMutationLoading;\n constructor(ngZone, flags, _client) {\n this.ngZone = ngZone;\n this.flags = flags;\n this._client = _client;\n this.useInitialLoading = pickFlag(flags, 'useInitialLoading', false);\n this.useMutationLoading = pickFlag(flags, 'useMutationLoading', false);\n }\n watchQuery(options) {\n return new QueryRef(this.ensureClient().watchQuery({\n ...options\n }), this.ngZone, {\n useInitialLoading: this.useInitialLoading,\n ...options\n });\n }\n query(options) {\n return fromPromise(() => this.ensureClient().query({\n ...options\n }));\n }\n mutate(options) {\n return useMutationLoading(fromPromise(() => this.ensureClient().mutate({\n ...options\n })), options.useMutationLoading ?? this.useMutationLoading);\n }\n subscribe(options, extra) {\n const obs = from(fixObservable(this.ensureClient().subscribe({\n ...options\n })));\n return extra && extra.useZone !== true ? obs : wrapWithZone(obs, this.ngZone);\n }\n /**\n * Get an instance of ApolloClient\n * @deprecated use `apollo.client` instead\n */\n getClient() {\n return this.client;\n }\n /**\n * Set a new instance of ApolloClient\n * Remember to clean up the store before setting a new client.\n * @deprecated use `apollo.client = client` instead\n *\n * @param client ApolloClient instance\n */\n setClient(client) {\n this.client = client;\n }\n /**\n * Get an instance of ApolloClient\n */\n get client() {\n return this._client;\n }\n /**\n * Set a new instance of ApolloClient\n * Remember to clean up the store before setting a new client.\n *\n * @param client ApolloClient instance\n */\n set client(client) {\n if (this._client) {\n throw new Error('Client has been already defined');\n }\n this._client = client;\n }\n ensureClient() {\n this.checkInstance();\n return this._client;\n }\n checkInstance() {\n if (!this._client) {\n throw new Error('Client has not been defined yet');\n }\n }\n}\nclass Apollo extends ApolloBase {\n _ngZone;\n map = new Map();\n constructor(_ngZone, apolloOptions, apolloNamedOptions, flags) {\n super(_ngZone, flags);\n this._ngZone = _ngZone;\n if (apolloOptions) {\n this.createDefault(apolloOptions);\n }\n if (apolloNamedOptions && typeof apolloNamedOptions === 'object') {\n for (let name in apolloNamedOptions) {\n if (apolloNamedOptions.hasOwnProperty(name)) {\n const options = apolloNamedOptions[name];\n this.create(options, name);\n }\n }\n }\n }\n /**\n * Create an instance of ApolloClient\n * @param options Options required to create ApolloClient\n * @param name client's name\n */\n create(options, name) {\n if (isDefault(name)) {\n this.createDefault(options);\n } else {\n this.createNamed(name, options);\n }\n }\n /**\n * Use a default ApolloClient\n */\n default() {\n return this;\n }\n /**\n * Use a named ApolloClient\n * @param name client's name\n */\n use(name) {\n if (isDefault(name)) {\n return this.default();\n }\n return this.map.get(name);\n }\n /**\n * Create a default ApolloClient, same as `apollo.create(options)`\n * @param options ApolloClient's options\n */\n createDefault(options) {\n if (this.getClient()) {\n throw new Error('Apollo has been already created.');\n }\n return this.setClient(new ApolloClient(options));\n }\n /**\n * Create a named ApolloClient, same as `apollo.create(options, name)`\n * @param name client's name\n * @param options ApolloClient's options\n */\n createNamed(name, options) {\n if (this.map.has(name)) {\n throw new Error(`Client ${name} has been already created`);\n }\n this.map.set(name, new ApolloBase(this._ngZone, this.flags, new ApolloClient(options)));\n }\n /**\n * Remember to clean up the store before removing a client\n * @param name client's name\n */\n removeClient(name) {\n if (isDefault(name)) {\n this._client = undefined;\n } else {\n this.map.delete(name);\n }\n }\n static ɵfac = function Apollo_Factory(t) {\n return new (t || Apollo)(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(APOLLO_OPTIONS, 8), i0.ɵɵinject(APOLLO_NAMED_OPTIONS, 8), i0.ɵɵinject(APOLLO_FLAGS, 8));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: Apollo,\n factory: Apollo.ɵfac\n });\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(Apollo, [{\n type: Injectable\n }], () => [{\n type: i0.NgZone\n }, {\n type: undefined,\n decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [APOLLO_OPTIONS]\n }]\n }, {\n type: undefined,\n decorators: [{\n type: Inject,\n args: [APOLLO_NAMED_OPTIONS]\n }, {\n type: Optional\n }]\n }, {\n type: undefined,\n decorators: [{\n type: Inject,\n args: [APOLLO_FLAGS]\n }, {\n type: Optional\n }]\n }], null);\n})();\nfunction isDefault(name) {\n return !name || name === 'default';\n}\nconst PROVIDERS = [Apollo];\nclass ApolloModule {\n static ɵfac = function ApolloModule_Factory(t) {\n return new (t || ApolloModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: ApolloModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: PROVIDERS\n });\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(ApolloModule, [{\n type: NgModule,\n args: [{\n providers: PROVIDERS\n }]\n }], null, null);\n})();\nclass Query {\n apollo;\n document;\n client = 'default';\n constructor(apollo) {\n this.apollo = apollo;\n }\n watch(variables, options) {\n return this.apollo.use(this.client).watchQuery({\n ...options,\n variables,\n query: this.document\n });\n }\n fetch(variables, options) {\n return this.apollo.use(this.client).query({\n ...options,\n variables,\n query: this.document\n });\n }\n static ɵfac = function Query_Factory(t) {\n return new (t || Query)(i0.ɵɵinject(Apollo));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: Query,\n factory: Query.ɵfac\n });\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(Query, [{\n type: Injectable\n }], () => [{\n type: Apollo\n }], null);\n})();\nclass Mutation {\n apollo;\n document;\n client = 'default';\n constructor(apollo) {\n this.apollo = apollo;\n }\n mutate(variables, options) {\n return this.apollo.use(this.client).mutate({\n ...options,\n variables,\n mutation: this.document\n });\n }\n static ɵfac = function Mutation_Factory(t) {\n return new (t || Mutation)(i0.ɵɵinject(Apollo));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: Mutation,\n factory: Mutation.ɵfac\n });\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(Mutation, [{\n type: Injectable\n }], () => [{\n type: Apollo\n }], null);\n})();\nclass Subscription {\n apollo;\n document;\n client = 'default';\n constructor(apollo) {\n this.apollo = apollo;\n }\n subscribe(variables, options, extra) {\n return this.apollo.use(this.client).subscribe({\n ...options,\n variables,\n query: this.document\n }, extra);\n }\n static ɵfac = function Subscription_Factory(t) {\n return new (t || Subscription)(i0.ɵɵinject(Apollo));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: Subscription,\n factory: Subscription.ɵfac\n });\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(Subscription, [{\n type: Injectable\n }], () => [{\n type: Apollo\n }], null);\n})();\nfunction typedGQLTag(literals, ...placeholders) {\n return gql$1(literals, ...placeholders);\n}\nconst gql = typedGQLTag;\nconst graphql = typedGQLTag;\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { APOLLO_FLAGS, APOLLO_NAMED_OPTIONS, APOLLO_OPTIONS, Apollo, ApolloBase, ApolloModule, Mutation, Query, QueryRef, Subscription, gql, graphql };\n","import { Injectable } from '@angular/core';\r\nimport { ApolloCache, NormalizedCacheObject } from '@apollo/client';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class ApolloCacheManager {\r\n\tprivate caches = new Map>();\r\n\r\n\tpublic getApolloCache(name: string): ApolloCache | undefined {\r\n\t\treturn this.caches.get(name);\r\n\t}\r\n\r\n\tpublic addCache(name: string, cache: ApolloCache): void {\r\n\t\tthis.caches.set(name, cache);\r\n\t}\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\nimport { StoreObject, TypePolicies } from '@apollo/client';\r\n\r\nexport const APOLLO_TYPE_POLICY_PROVIDERS = new InjectionToken('ApolloTypePolicyProviders');\r\n\r\nexport interface ApolloTypePolicyProvider {\r\n\ttypePolicies(): TypePolicies;\r\n\ttypenameMap(): { [__typename: string]: (storeObject: Readonly) => string };\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { StoreObject, TypePolicies, TypePolicy } from '@apollo/client';\r\nimport { mergeDeep } from '@apollo/client/utilities';\r\n\r\nimport { ApolloTypePolicyProvider } from '../apollo-type-policy.provider';\r\n\r\nconst mergePolicyNoKey: TypePolicy = {\r\n\tkeyFields: false,\r\n\tmerge: true\r\n};\r\n\r\n// function/concept copied from DNG code.\r\nconst deepMergePolicyNoKey: TypePolicy = {\r\n\tkeyFields: false,\r\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n\tmerge: (existing, incoming): any => {\r\n\t\treturn mergeDeep(existing, incoming);\r\n\t}\r\n};\r\n\r\nconst mergePolicyNoKeyKeepTypename: TypePolicy = {\r\n\tkeyFields: false,\r\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n\tmerge: (existing, incoming): any => {\r\n\t\t// eslint-disable-next-line @typescript-eslint/naming-convention\r\n\t\tconst __typename = existing ? existing.__typename : incoming.__typename;\r\n\t\t// eslint-disable-next-line @typescript-eslint/naming-convention\r\n\t\treturn { ...existing, ...incoming, __typename };\r\n\t}\r\n};\r\n\r\nconst mergePolicyFixedTypename = (typename: string): TypePolicy => {\r\n\treturn {\r\n\t\tmerge: true,\r\n\t\tfields: {\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention\r\n\t\t\t__typename: {\r\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n\t\t\t\tmerge(_existing, _incoming) {\r\n\t\t\t\t\treturn typename;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n};\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class SysApiTypePolicyProvider implements ApolloTypePolicyProvider {\r\n\t// eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\r\n\ttypenameMap(): { [__typename: string]: (storeObject: Readonly) => string } {\r\n\t\treturn {\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tDeviceChange: (storeObject) => `Device:${storeObject['id']}`,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tRoomChange: (storeObject) => `Room:${storeObject['id']}`,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tAudioChannelChange: (storeObject) => `AudioChannel:${storeObject['id']}`,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tDeviceStatusChange: (storeObject) => `Device:${storeObject['id']}`\r\n\t\t};\r\n\t}\r\n\r\n\tpublic typePolicies(): TypePolicies {\r\n\t\treturn {\r\n\t\t\tRoomChange: mergePolicyFixedTypename('Room'),\r\n\r\n\t\t\t// Device\r\n\t\t\tDeviceChange: mergePolicyFixedTypename('Device'),\r\n\t\t\tDeviceStatusChange: mergePolicyFixedTypename('Device'),\r\n\r\n\t\t\t// First level in device which is not normalized (no id), need deep merge\r\n\t\t\tDeviceFeatures: deepMergePolicyNoKey,\r\n\t\t\tDeviceDescription: deepMergePolicyNoKey,\r\n\t\t\tDeviceSupportedFeatures: mergePolicyNoKey,\r\n\r\n\t\t\tDeviceAllEqualizersBypassChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceAllIntellimixBypassChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceDanteAudioEncryptionChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceAuthenticationChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceAutomixGainMeteringChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceAvailablePackagesChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceBatteryLevelChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceCallStatusChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceDanteAudioNetworkChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceDanteAudioNetworkAccessChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceEqualizerContourChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceEthernetLightsChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceIdentifyChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceMeteringModesChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceAudioMuteChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceMicStatusChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceNameChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceProxiedDevicesChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceUpdateProgressChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceUptimeChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceUserPresetsChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceCoveragePositionChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceRoutingPositionChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceLocalLicenseChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceServerLicenseChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceLicenseChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceLicenseChannelCountChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceCoverageModeChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceRotationChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceHeightChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceAudioMuteControlGroupChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceRoomChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tDeviceDoubleStuffProxiedTransmittersChange: mergePolicyNoKeyKeepTypename,\r\n\r\n\t\t\t// AudioChannel\r\n\t\t\tAudioChannelChange: mergePolicyFixedTypename('AudioChannel'),\r\n\t\t\tAudioChannelDescription: mergePolicyNoKey,\r\n\t\t\tAudioChannelSupportedFeatures: mergePolicyNoKey,\r\n\t\t\tAudioChannelFeatures: mergePolicyNoKey,\r\n\r\n\t\t\tAudioChannelAcousticEchoCancellationChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelAdvancedAutomixerChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelAecReferenceChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelAnalogInputChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelAnalogOutputChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelAutoFocusChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelAutoLevelChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelAutomaticGainControlChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelAutomixerChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelCompressorChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelDelayChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelMonitoringChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelDirectOutputChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelDanteEncryptionStatusChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelFaderGroupChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelGainChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelGateChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelIntellimixChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelLimiterChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelLobeChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelLogicChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelMixBusChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelMuteChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelMuteGroupChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelNameChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelNoiseReductionChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelPcInputChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelPcOutputChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelDanteRouteReceiverChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelDanteRouteTransmitterChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelSoloChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelSoloMixChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelThresholdLimiterChange: mergePolicyNoKeyKeepTypename,\r\n\t\t\tAudioChannelTalkerHeightChange: mergePolicyNoKeyKeepTypename,\r\n\r\n\t\t\t// EqualizerFilter\r\n\t\t\tEqualizerFilterChange: mergePolicyNoKeyKeepTypename,\r\n\r\n\t\t\tSubscription: {\r\n\t\t\t\tfields: {\r\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention\r\n\t\t\t\t\tdiscoveredDevices: {\r\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n\t\t\t\t\t\tmerge(_e, i) {\r\n\t\t\t\t\t\t\treturn i;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tQuery: {\r\n\t\t\t\tfields: {\r\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention\r\n\t\t\t\t\tdiscoveredDevices: {\r\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n\t\t\t\t\t\tmerge(_e, i) {\r\n\t\t\t\t\t\t\treturn i;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n}\r\n","import { HttpClientModule } from '@angular/common/http';\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { ApolloModule } from 'apollo-angular';\r\n\r\nimport { ApolloCacheManager } from './apollo-cache-manager.service';\r\nimport { APOLLO_TYPE_POLICY_PROVIDERS } from './apollo-type-policy.provider';\r\nimport { SysApiTypePolicyProvider } from './sys-api';\r\n\r\n@NgModule({\r\n\timports: [ApolloModule, HttpClientModule]\r\n})\r\nexport class ApolloSysApiCloudModule {\r\n\tpublic static forRoot(): ModuleWithProviders {\r\n\t\treturn {\r\n\t\t\tngModule: ApolloSysApiCloudModule,\r\n\t\t\tproviders: [\r\n\t\t\t\tApolloCacheManager,\r\n\t\t\t\t{\r\n\t\t\t\t\tprovide: APOLLO_TYPE_POLICY_PROVIDERS,\r\n\t\t\t\t\tmulti: true,\r\n\t\t\t\t\tuseClass: SysApiTypePolicyProvider\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t};\r\n\t}\r\n}\r\n","import { __rest } from \"tslib\";\nimport { ApolloLink } from \"../core/index.js\";\nimport { Observable } from \"../../utilities/index.js\";\nexport function setContext(setter) {\n return new ApolloLink(function (operation, forward) {\n var request = __rest(operation, []);\n return new Observable(function (observer) {\n var handle;\n var closed = false;\n Promise.resolve(request)\n .then(function (req) { return setter(req, operation.getContext()); })\n .then(operation.setContext)\n .then(function () {\n // if the observer is already closed, no need to subscribe.\n if (closed)\n return;\n handle = forward(operation).subscribe({\n next: observer.next.bind(observer),\n error: observer.error.bind(observer),\n complete: observer.complete.bind(observer),\n });\n })\n .catch(observer.error.bind(observer));\n return function () {\n closed = true;\n if (handle)\n handle.unsubscribe();\n };\n });\n });\n}\n","import { __extends } from \"tslib\";\nimport { Observable } from \"../../utilities/index.js\";\nimport { ApolloLink } from \"../core/index.js\";\nexport function onError(errorHandler) {\n return new ApolloLink(function (operation, forward) {\n return new Observable(function (observer) {\n var sub;\n var retriedSub;\n var retriedResult;\n try {\n sub = forward(operation).subscribe({\n next: function (result) {\n if (result.errors) {\n retriedResult = errorHandler({\n graphQLErrors: result.errors,\n response: result,\n operation: operation,\n forward: forward,\n });\n if (retriedResult) {\n retriedSub = retriedResult.subscribe({\n next: observer.next.bind(observer),\n error: observer.error.bind(observer),\n complete: observer.complete.bind(observer),\n });\n return;\n }\n }\n observer.next(result);\n },\n error: function (networkError) {\n retriedResult = errorHandler({\n operation: operation,\n networkError: networkError,\n //Network errors can return GraphQL errors on for example a 403\n graphQLErrors: networkError &&\n networkError.result &&\n networkError.result.errors,\n forward: forward,\n });\n if (retriedResult) {\n retriedSub = retriedResult.subscribe({\n next: observer.next.bind(observer),\n error: observer.error.bind(observer),\n complete: observer.complete.bind(observer),\n });\n return;\n }\n observer.error(networkError);\n },\n complete: function () {\n // disable the previous sub from calling complete on observable\n // if retry is in flight.\n if (!retriedResult) {\n observer.complete.bind(observer)();\n }\n },\n });\n }\n catch (e) {\n errorHandler({ networkError: e, operation: operation, forward: forward });\n observer.error(e);\n }\n return function () {\n if (sub)\n sub.unsubscribe();\n if (retriedSub)\n sub.unsubscribe();\n };\n });\n });\n}\nvar ErrorLink = /** @class */ (function (_super) {\n __extends(ErrorLink, _super);\n function ErrorLink(errorHandler) {\n var _this = _super.call(this) || this;\n _this.link = onError(errorHandler);\n return _this;\n }\n ErrorLink.prototype.request = function (operation, forward) {\n return this.link.request(operation, forward);\n };\n return ErrorLink;\n}(ApolloLink));\nexport { ErrorLink };\n","import { __awaiter, __extends, __generator } from \"tslib\";\nimport { ApolloLink } from \"../core/index.js\";\nimport { Observable } from \"../../utilities/index.js\";\nimport { buildDelayFunction } from \"./delayFunction.js\";\nimport { buildRetryFunction } from \"./retryFunction.js\";\n/**\n * Tracking and management of operations that may be (or currently are) retried.\n */\nvar RetryableOperation = /** @class */ (function () {\n function RetryableOperation(operation, nextLink, delayFor, retryIf) {\n var _this = this;\n this.operation = operation;\n this.nextLink = nextLink;\n this.delayFor = delayFor;\n this.retryIf = retryIf;\n this.retryCount = 0;\n this.values = [];\n this.complete = false;\n this.canceled = false;\n this.observers = [];\n this.currentSubscription = null;\n this.onNext = function (value) {\n _this.values.push(value);\n for (var _i = 0, _a = _this.observers; _i < _a.length; _i++) {\n var observer = _a[_i];\n if (!observer)\n continue;\n observer.next(value);\n }\n };\n this.onComplete = function () {\n _this.complete = true;\n for (var _i = 0, _a = _this.observers; _i < _a.length; _i++) {\n var observer = _a[_i];\n if (!observer)\n continue;\n observer.complete();\n }\n };\n this.onError = function (error) { return __awaiter(_this, void 0, void 0, function () {\n var shouldRetry, _i, _a, observer;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n this.retryCount += 1;\n return [4 /*yield*/, this.retryIf(this.retryCount, this.operation, error)];\n case 1:\n shouldRetry = _b.sent();\n if (shouldRetry) {\n this.scheduleRetry(this.delayFor(this.retryCount, this.operation, error));\n return [2 /*return*/];\n }\n this.error = error;\n for (_i = 0, _a = this.observers; _i < _a.length; _i++) {\n observer = _a[_i];\n if (!observer)\n continue;\n observer.error(error);\n }\n return [2 /*return*/];\n }\n });\n }); };\n }\n /**\n * Register a new observer for this operation.\n *\n * If the operation has previously emitted other events, they will be\n * immediately triggered for the observer.\n */\n RetryableOperation.prototype.subscribe = function (observer) {\n if (this.canceled) {\n throw new Error(\"Subscribing to a retryable link that was canceled is not supported\");\n }\n this.observers.push(observer);\n // If we've already begun, catch this observer up.\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\n var value = _a[_i];\n observer.next(value);\n }\n if (this.complete) {\n observer.complete();\n }\n else if (this.error) {\n observer.error(this.error);\n }\n };\n /**\n * Remove a previously registered observer from this operation.\n *\n * If no observers remain, the operation will stop retrying, and unsubscribe\n * from its downstream link.\n */\n RetryableOperation.prototype.unsubscribe = function (observer) {\n var index = this.observers.indexOf(observer);\n if (index < 0) {\n throw new Error(\"RetryLink BUG! Attempting to unsubscribe unknown observer!\");\n }\n // Note that we are careful not to change the order of length of the array,\n // as we are often mid-iteration when calling this method.\n this.observers[index] = null;\n // If this is the last observer, we're done.\n if (this.observers.every(function (o) { return o === null; })) {\n this.cancel();\n }\n };\n /**\n * Start the initial request.\n */\n RetryableOperation.prototype.start = function () {\n if (this.currentSubscription)\n return; // Already started.\n this.try();\n };\n /**\n * Stop retrying for the operation, and cancel any in-progress requests.\n */\n RetryableOperation.prototype.cancel = function () {\n if (this.currentSubscription) {\n this.currentSubscription.unsubscribe();\n }\n clearTimeout(this.timerId);\n this.timerId = undefined;\n this.currentSubscription = null;\n this.canceled = true;\n };\n RetryableOperation.prototype.try = function () {\n this.currentSubscription = this.nextLink(this.operation).subscribe({\n next: this.onNext,\n error: this.onError,\n complete: this.onComplete,\n });\n };\n RetryableOperation.prototype.scheduleRetry = function (delay) {\n var _this = this;\n if (this.timerId) {\n throw new Error(\"RetryLink BUG! Encountered overlapping retries\");\n }\n this.timerId = setTimeout(function () {\n _this.timerId = undefined;\n _this.try();\n }, delay);\n };\n return RetryableOperation;\n}());\nvar RetryLink = /** @class */ (function (_super) {\n __extends(RetryLink, _super);\n function RetryLink(options) {\n var _this = _super.call(this) || this;\n var _a = options || {}, attempts = _a.attempts, delay = _a.delay;\n _this.delayFor =\n typeof delay === \"function\" ? delay : buildDelayFunction(delay);\n _this.retryIf =\n typeof attempts === \"function\" ? attempts : buildRetryFunction(attempts);\n return _this;\n }\n RetryLink.prototype.request = function (operation, nextLink) {\n var retryable = new RetryableOperation(operation, nextLink, this.delayFor, this.retryIf);\n retryable.start();\n return new Observable(function (observer) {\n retryable.subscribe(observer);\n return function () {\n retryable.unsubscribe(observer);\n };\n });\n };\n return RetryLink;\n}(ApolloLink));\nexport { RetryLink };\n","export function buildDelayFunction(delayOptions) {\n var _a = delayOptions || {}, _b = _a.initial, initial = _b === void 0 ? 300 : _b, _c = _a.jitter, jitter = _c === void 0 ? true : _c, _d = _a.max, max = _d === void 0 ? Infinity : _d;\n // If we're jittering, baseDelay is half of the maximum delay for that\n // attempt (and is, on average, the delay we will encounter).\n // If we're not jittering, adjust baseDelay so that the first attempt\n // lines up with initialDelay, for everyone's sanity.\n var baseDelay = jitter ? initial : initial / 2;\n return function delayFunction(count) {\n var delay = Math.min(max, baseDelay * Math.pow(2, count));\n if (jitter) {\n // We opt for a full jitter approach for a mostly uniform distribution,\n // but bound it within initialDelay and delay for everyone's sanity.\n delay = Math.random() * delay;\n }\n return delay;\n };\n}\n","export function buildRetryFunction(retryOptions) {\n var _a = retryOptions || {}, retryIf = _a.retryIf, _b = _a.max, max = _b === void 0 ? 5 : _b;\n return function retryFunction(count, operation, error) {\n if (count >= max)\n return false;\n return retryIf ? retryIf(error, operation) : !!error;\n };\n}\n","// This file is adapted from the graphql-ws npm package:\n// https://github.com/enisdenjo/graphql-ws\n//\n// Most of the file comes from that package's README; some other parts (such as\n// isLikeCloseEvent) come from its source.\n//\n// Here's the license of the original code:\n//\n// The MIT License (MIT)\n//\n// Copyright (c) 2020-2021 Denis Badurina\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport { __assign, __extends } from \"tslib\";\nimport { print } from \"../../utilities/index.js\";\nimport { ApolloLink } from \"../core/index.js\";\nimport { isNonNullObject, Observable } from \"../../utilities/index.js\";\nimport { ApolloError } from \"../../errors/index.js\";\n// https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close_event\nfunction isLikeCloseEvent(val) {\n return isNonNullObject(val) && \"code\" in val && \"reason\" in val;\n}\n// https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/error_event\nfunction isLikeErrorEvent(err) {\n var _a;\n return isNonNullObject(err) && ((_a = err.target) === null || _a === void 0 ? void 0 : _a.readyState) === WebSocket.CLOSED;\n}\nvar GraphQLWsLink = /** @class */ (function (_super) {\n __extends(GraphQLWsLink, _super);\n function GraphQLWsLink(client) {\n var _this = _super.call(this) || this;\n _this.client = client;\n return _this;\n }\n GraphQLWsLink.prototype.request = function (operation) {\n var _this = this;\n return new Observable(function (observer) {\n return _this.client.subscribe(__assign(__assign({}, operation), { query: print(operation.query) }), {\n next: observer.next.bind(observer),\n complete: observer.complete.bind(observer),\n error: function (err) {\n if (err instanceof Error) {\n return observer.error(err);\n }\n var likeClose = isLikeCloseEvent(err);\n if (likeClose || isLikeErrorEvent(err)) {\n return observer.error(\n // reason will be available on clean closes\n new Error(\"Socket closed\".concat(likeClose ? \" with event \".concat(err.code) : \"\").concat(likeClose ? \" \".concat(err.reason) : \"\")));\n }\n return observer.error(new ApolloError({\n graphQLErrors: Array.isArray(err) ? err : [err],\n }));\n },\n });\n });\n };\n return GraphQLWsLink;\n}(ApolloLink));\nexport { GraphQLWsLink };\n","import {\r\n\tApolloClientOptions,\r\n\tApolloLink,\r\n\tcreateHttpLink,\r\n\tfrom,\r\n\tOperation,\r\n\tPossibleTypesMap,\r\n\tsplit\r\n} from '@apollo/client';\r\nimport { setContext } from '@apollo/client/link/context';\r\nimport { onError } from '@apollo/client/link/error';\r\nimport { RetryLink } from '@apollo/client/link/retry';\r\nimport { GraphQLWsLink } from '@apollo/client/link/subscriptions';\r\nimport { getMainDefinition } from '@apollo/client/utilities';\r\nimport { Kind, OperationTypeNode } from 'graphql';\r\nimport { createClient } from 'graphql-ws';\r\nimport { firstValueFrom, map, Observable } from 'rxjs';\r\n\r\nimport { OktaInterfaceService } from '@shure/cloud/shared/okta/data-access';\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { ApolloCacheFactory } from './apollo-cache-factory.service';\r\nimport { ApolloConnectInfo } from './apollo-connection.models';\r\n\r\nexport abstract class ApolloConnectionService {\r\n\tprivate retryCountLastSeenOk = 0;\r\n\tprivate retryCountLastSeen = 0;\r\n\r\n\tprivate readonly logger: ILogger;\r\n\tprivate apolloConnectInfo$: Observable;\r\n\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\tprivate readonly name: string,\r\n\t\tprivate readonly possibleTypes: PossibleTypesMap,\r\n\t\tprivate readonly retryCountMax: number,\r\n\t\tprivate readonly connectInfoProvider$: Observable<{ url: string; apiKey: string }>,\r\n\t\tprivate readonly apolloCacheFactory: ApolloCacheFactory,\r\n\t\tprivate readonly oktaIntfService: OktaInterfaceService\r\n\t) {\r\n\t\tthis.logger = logger.createScopedLogger(`ApolloConnectionService.${this.name}`);\r\n\t\tthis.apolloConnectInfo$ = this.connectInfoProvider$.pipe(\r\n\t\t\tmap((connectInfo: { url: string; apiKey: string }) => {\r\n\t\t\t\tconst apolloConnectInfo = {\r\n\t\t\t\t\tgqlHttpUrl: connectInfo.url,\r\n\t\t\t\t\tgqlWsUrl: connectInfo.url.replace('https', 'wss').replace('http', 'ws'),\r\n\t\t\t\t\tapiKey: connectInfo.apiKey\r\n\t\t\t\t};\r\n\t\t\t\t// so that when testing, we have a record in the output which BE was used.\r\n\t\t\t\tthis.logger.debug('constructor', 'apolloConnectionInfo', JSON.stringify(apolloConnectInfo));\r\n\t\t\t\treturn apolloConnectInfo;\r\n\t\t\t})\r\n\t\t);\r\n\t\tthis.doResetRetryCount();\r\n\t}\r\n\r\n\tpublic createApolloClientOptions(): ApolloClientOptions {\r\n\t\treturn {\r\n\t\t\tcache: this.apolloCacheFactory.createCache(this.name, this.possibleTypes),\r\n\t\t\tlink: this.createLink()\r\n\t\t};\r\n\t}\r\n\r\n\tprotected createLink(): ApolloLink {\r\n\t\tthis.logger.trace('createLink()', '', { name: this.name });\r\n\r\n\t\tconst wsLink = this.createWsLink();\r\n\t\tconst httpLink = this.createHttpLink();\r\n\r\n\t\treturn from([\r\n\t\t\tthis.createRetryLink(),\r\n\t\t\tthis.createSuccessLink(),\r\n\t\t\tthis.createErrorLink(),\r\n\t\t\tthis.createContextConnectInfo(),\r\n\t\t\tthis.createSplitLink(wsLink, httpLink)\r\n\t\t]);\r\n\t}\r\n\r\n\tprotected createContextConnectInfo(): ApolloLink {\r\n\t\treturn setContext(async () => {\r\n\t\t\tthis.logger.trace('withConnectInfo', 'waiting');\r\n\t\t\tconst connectInfo = await firstValueFrom(this.apolloConnectInfo$);\r\n\t\t\tthis.logger.trace('withConnectInfo', 'available', { connectInfo });\r\n\t\t\treturn { connectInfo };\r\n\t\t});\r\n\t}\r\n\r\n\tprotected createSuccessLink(): ApolloLink {\r\n\t\t// If data is coming back, we have verified that the connection to sysapi server is ok\r\n\t\t// and we can reset the retry counter.\r\n\t\treturn new ApolloLink((operation, forward) => {\r\n\t\t\toperation.setContext(({ headers = {} }) => ({\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t...headers,\r\n\t\t\t\t\tAuthorization: `Bearer ${this.oktaIntfService.getAccessTokenJWT()}`\r\n\t\t\t\t}\r\n\t\t\t}));\r\n\t\t\treturn forward(operation).map((data) => {\r\n\t\t\t\tthis.doResetRetryCount();\r\n\t\t\t\treturn data;\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tprotected createErrorLink(): ApolloLink {\r\n\t\treturn onError(({ networkError }) => {\r\n\t\t\tif (networkError) {\r\n\t\t\t\t// Catches http error codes, we are ignore this for now,\r\n\t\t\t\t// but could indicate authentication issues if used properly on server side\r\n\t\t\t\tif ('statusCode' in networkError) {\r\n\t\t\t\t\tthis.logger.trace('errorLink', 'httpError', { statusCode: networkError.statusCode });\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tthis.logger.trace('errorLink', 'networkError', JSON.stringify(networkError));\r\n\t\t\t\tthis.onNetworkError();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprotected createRetryLink(): ApolloLink {\r\n\t\t// for Details of the Retry Link\r\n\t\t// https://www.apollographql.com/docs/react/api/link/apollo-link-retry/#overview\r\n\t\t// https://www.apollographql.com/docs/react/api/link/apollo-link-retry/#avoiding-thundering-herd\r\n\t\treturn new RetryLink({\r\n\t\t\tattempts: (count, operation, error): boolean => {\r\n\t\t\t\treturn !!error;\r\n\t\t\t},\r\n\t\t\tdelay: (count, operation, error): number => {\r\n\t\t\t\tconst computedDelay = Math.min(10000, count * 1000 * Math.random());\r\n\t\t\t\tconst logMessage = `Operation: ${operation.operationName}, Variables: ${\r\n\t\t\t\t\t'variables' in operation ? JSON.stringify(operation.variables, null, 2) : 'n/a'\r\n\t\t\t\t}, Error: ${error}, count: ${count}, ComputedDelay: ${computedDelay}`;\r\n\t\t\t\tthis.logger.error('retryLink()', 'delay()', logMessage);\r\n\t\t\t\treturn computedDelay;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprotected createWsLink(): ApolloLink {\r\n\t\treturn new GraphQLWsLink(\r\n\t\t\t// https://the-guild.dev/graphql/ws/docs/interfaces/client.ClientOptions\r\n\t\t\tcreateClient({\r\n\t\t\t\turl: () =>\r\n\t\t\t\t\tfirstValueFrom(this.apolloConnectInfo$).then((connectInfo) => {\r\n\t\t\t\t\t\tconst uri = new URL(connectInfo.gqlWsUrl);\r\n\t\t\t\t\t\turi.searchParams.set('access_token', this.oktaIntfService.getAccessTokenJWT());\r\n\t\t\t\t\t\treturn uri.toString();\r\n\t\t\t\t\t}),\r\n\t\t\t\tlazy: true, // establish on first subscription, tear down on last unsubscribe.\r\n\t\t\t\tretryAttempts: 0xffff, // default is 5\r\n\t\t\t\tshouldRetry: () => true, // default is to only retry on \"close\", not errors\r\n\t\t\t\ton: {\r\n\t\t\t\t\tconnected: () => {\r\n\t\t\t\t\t\tthis.logger.debug('GraphQLWsLink:createClient', 'websocket connected');\r\n\t\t\t\t\t},\r\n\t\t\t\t\terror: (error) => {\r\n\t\t\t\t\t\tthis.logger.error('GraphQLWsLink:createClient', 'websocket error', JSON.stringify(error));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\r\n\tprotected createHttpLink(): ApolloLink {\r\n\t\treturn createHttpLink({\r\n\t\t\turi: (operation) => {\r\n\t\t\t\tconst { connectInfo } = operation.getContext();\r\n\t\t\t\treturn connectInfo.gqlHttpUrl;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprotected createSplitLink(wsLink: ApolloLink, httpLink: ApolloLink): ApolloLink {\r\n\t\t// split operation based on type. Queries and mutations use http and\r\n\t\t// subscriptions use websockets\r\n\t\treturn split(\r\n\t\t\t({ query }) => {\r\n\t\t\t\tconst definition = getMainDefinition(query);\r\n\t\t\t\treturn (\r\n\t\t\t\t\tdefinition.kind === Kind.OPERATION_DEFINITION &&\r\n\t\t\t\t\tdefinition.operation === OperationTypeNode.SUBSCRIPTION\r\n\t\t\t\t);\r\n\t\t\t},\r\n\t\t\twsLink,\r\n\t\t\thttpLink\r\n\t\t);\r\n\t}\r\n\r\n\tprivate onNetworkError(): void {\r\n\t\tthis.logger.trace('onNetworkError', '');\r\n\t\t// Currently we are not doing anything, but this indicate that the connection is broken,\r\n\t\t// and we should show this to the user to take action.\r\n\t}\r\n\r\n\tprivate shouldRetry(count: number, operation: Operation, error: unknown): boolean {\r\n\t\t// count comes from Apollo RetryLink and seems to occasionally being reset,\r\n\t\t// but the reset is not related to e.g. successfully subscriptions\r\n\t\tthis.retryCountLastSeen = count;\r\n\r\n\t\tconst retryCount = this.getRetryCount();\r\n\t\tthis.logger.trace('shouldRetry', '', {\r\n\t\t\tretryCount,\r\n\t\t\tretryCountLastSeen: this.retryCountLastSeen,\r\n\t\t\tretryCountLastSeenOk: this.retryCountLastSeenOk,\r\n\t\t\tcount,\r\n\t\t\toperation,\r\n\t\t\terror\r\n\t\t});\r\n\t\treturn retryCount < this.retryCountMax;\r\n\t}\r\n\r\n\tprivate getRetryDelay(_count: number): number {\r\n\t\treturn 2000 * Math.random();\r\n\t}\r\n\r\n\tprivate doResetRetryCount(): void {\r\n\t\tthis.retryCountLastSeenOk = this.retryCountLastSeen;\r\n\t}\r\n\r\n\tprivate getRetryCount(): number {\r\n\t\treturn Math.max(0, this.retryCountLastSeen - this.retryCountLastSeenOk);\r\n\t}\r\n}\r\n","/** @private */\nexport function extendedTypeof(val) {\n if (val === null) {\n return 'null';\n }\n if (Array.isArray(val)) {\n return 'array';\n }\n return typeof val;\n}\n/** @private */\nexport function isObject(val) {\n return extendedTypeof(val) === 'object';\n}\n/** @private */\nexport function isAsyncIterable(val) {\n return typeof Object(val)[Symbol.asyncIterator] === 'function';\n}\n/** @private */\nexport function isAsyncGenerator(val) {\n return (isObject(val) &&\n typeof Object(val)[Symbol.asyncIterator] === 'function' &&\n typeof val.return === 'function'\n // for lazy ones, we only need the return anyway\n // typeof val.throw === 'function' &&\n // typeof val.next === 'function'\n );\n}\n/** @private */\nexport function areGraphQLErrors(obj) {\n return (Array.isArray(obj) &&\n // must be at least one error\n obj.length > 0 &&\n // error has at least a message\n obj.every((ob) => 'message' in ob));\n}\n/**\n * Limits the WebSocket close event reason to not exceed a length of one frame.\n * Reference: https://datatracker.ietf.org/doc/html/rfc6455#section-5.2.\n *\n * @private\n */\nexport function limitCloseReason(reason, whenTooLong) {\n return reason.length < 124 ? reason : whenTooLong;\n}\n","/**\n *\n * common\n *\n */\nimport { areGraphQLErrors, extendedTypeof, isObject } from './utils.mjs';\n/**\n * The WebSocket sub-protocol used for the [GraphQL over WebSocket Protocol](https://github.com/graphql/graphql-over-http/blob/main/rfcs/GraphQLOverWebSocket.md).\n *\n * @category Common\n */\nexport const GRAPHQL_TRANSPORT_WS_PROTOCOL = 'graphql-transport-ws';\n/**\n * The deprecated subprotocol used by [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws).\n *\n * @private\n */\nexport const DEPRECATED_GRAPHQL_WS_PROTOCOL = 'graphql-ws';\n/**\n * `graphql-ws` expected and standard close codes of the [GraphQL over WebSocket Protocol](https://github.com/graphql/graphql-over-http/blob/main/rfcs/GraphQLOverWebSocket.md).\n *\n * @category Common\n */\nexport var CloseCode;\n(function (CloseCode) {\n CloseCode[CloseCode[\"InternalServerError\"] = 4500] = \"InternalServerError\";\n CloseCode[CloseCode[\"InternalClientError\"] = 4005] = \"InternalClientError\";\n CloseCode[CloseCode[\"BadRequest\"] = 4400] = \"BadRequest\";\n CloseCode[CloseCode[\"BadResponse\"] = 4004] = \"BadResponse\";\n /** Tried subscribing before connect ack */\n CloseCode[CloseCode[\"Unauthorized\"] = 4401] = \"Unauthorized\";\n CloseCode[CloseCode[\"Forbidden\"] = 4403] = \"Forbidden\";\n CloseCode[CloseCode[\"SubprotocolNotAcceptable\"] = 4406] = \"SubprotocolNotAcceptable\";\n CloseCode[CloseCode[\"ConnectionInitialisationTimeout\"] = 4408] = \"ConnectionInitialisationTimeout\";\n CloseCode[CloseCode[\"ConnectionAcknowledgementTimeout\"] = 4504] = \"ConnectionAcknowledgementTimeout\";\n /** Subscriber distinction is very important */\n CloseCode[CloseCode[\"SubscriberAlreadyExists\"] = 4409] = \"SubscriberAlreadyExists\";\n CloseCode[CloseCode[\"TooManyInitialisationRequests\"] = 4429] = \"TooManyInitialisationRequests\";\n})(CloseCode || (CloseCode = {}));\n/**\n * Types of messages allowed to be sent by the client/server over the WS protocol.\n *\n * @category Common\n */\nexport var MessageType;\n(function (MessageType) {\n MessageType[\"ConnectionInit\"] = \"connection_init\";\n MessageType[\"ConnectionAck\"] = \"connection_ack\";\n MessageType[\"Ping\"] = \"ping\";\n MessageType[\"Pong\"] = \"pong\";\n MessageType[\"Subscribe\"] = \"subscribe\";\n MessageType[\"Next\"] = \"next\";\n MessageType[\"Error\"] = \"error\";\n MessageType[\"Complete\"] = \"complete\";\n})(MessageType || (MessageType = {}));\n/**\n * Validates the message against the GraphQL over WebSocket Protocol.\n *\n * Invalid messages will throw descriptive errors.\n *\n * @category Common\n */\nexport function validateMessage(val) {\n if (!isObject(val)) {\n throw new Error(`Message is expected to be an object, but got ${extendedTypeof(val)}`);\n }\n if (!val.type) {\n throw new Error(`Message is missing the 'type' property`);\n }\n if (typeof val.type !== 'string') {\n throw new Error(`Message is expects the 'type' property to be a string, but got ${extendedTypeof(val.type)}`);\n }\n switch (val.type) {\n case MessageType.ConnectionInit:\n case MessageType.ConnectionAck:\n case MessageType.Ping:\n case MessageType.Pong: {\n if (val.payload != null && !isObject(val.payload)) {\n throw new Error(`\"${val.type}\" message expects the 'payload' property to be an object or nullish or missing, but got \"${val.payload}\"`);\n }\n break;\n }\n case MessageType.Subscribe: {\n if (typeof val.id !== 'string') {\n throw new Error(`\"${val.type}\" message expects the 'id' property to be a string, but got ${extendedTypeof(val.id)}`);\n }\n if (!val.id) {\n throw new Error(`\"${val.type}\" message requires a non-empty 'id' property`);\n }\n if (!isObject(val.payload)) {\n throw new Error(`\"${val.type}\" message expects the 'payload' property to be an object, but got ${extendedTypeof(val.payload)}`);\n }\n if (typeof val.payload.query !== 'string') {\n throw new Error(`\"${val.type}\" message payload expects the 'query' property to be a string, but got ${extendedTypeof(val.payload.query)}`);\n }\n if (val.payload.variables != null && !isObject(val.payload.variables)) {\n throw new Error(`\"${val.type}\" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${extendedTypeof(val.payload.variables)}`);\n }\n if (val.payload.operationName != null &&\n extendedTypeof(val.payload.operationName) !== 'string') {\n throw new Error(`\"${val.type}\" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${extendedTypeof(val.payload.operationName)}`);\n }\n if (val.payload.extensions != null && !isObject(val.payload.extensions)) {\n throw new Error(`\"${val.type}\" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${extendedTypeof(val.payload.extensions)}`);\n }\n break;\n }\n case MessageType.Next: {\n if (typeof val.id !== 'string') {\n throw new Error(`\"${val.type}\" message expects the 'id' property to be a string, but got ${extendedTypeof(val.id)}`);\n }\n if (!val.id) {\n throw new Error(`\"${val.type}\" message requires a non-empty 'id' property`);\n }\n if (!isObject(val.payload)) {\n throw new Error(`\"${val.type}\" message expects the 'payload' property to be an object, but got ${extendedTypeof(val.payload)}`);\n }\n break;\n }\n case MessageType.Error: {\n if (typeof val.id !== 'string') {\n throw new Error(`\"${val.type}\" message expects the 'id' property to be a string, but got ${extendedTypeof(val.id)}`);\n }\n if (!val.id) {\n throw new Error(`\"${val.type}\" message requires a non-empty 'id' property`);\n }\n if (!areGraphQLErrors(val.payload)) {\n throw new Error(`\"${val.type}\" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(val.payload)}`);\n }\n break;\n }\n case MessageType.Complete: {\n if (typeof val.id !== 'string') {\n throw new Error(`\"${val.type}\" message expects the 'id' property to be a string, but got ${extendedTypeof(val.id)}`);\n }\n if (!val.id) {\n throw new Error(`\"${val.type}\" message requires a non-empty 'id' property`);\n }\n break;\n }\n default:\n throw new Error(`Invalid message 'type' property \"${val.type}\"`);\n }\n return val;\n}\n/**\n * Checks if the provided value is a valid GraphQL over WebSocket message.\n *\n * @deprecated Use `validateMessage` instead.\n *\n * @category Common\n */\nexport function isMessage(val) {\n try {\n validateMessage(val);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\n/**\n * Parses the raw websocket message data to a valid message.\n *\n * @category Common\n */\nexport function parseMessage(data, reviver) {\n return validateMessage(typeof data === 'string' ? JSON.parse(data, reviver) : data);\n}\n/**\n * Stringifies a valid message ready to be sent through the socket.\n *\n * @category Common\n */\nexport function stringifyMessage(msg, replacer) {\n validateMessage(msg);\n return JSON.stringify(msg, replacer);\n}\n","/**\n *\n * client\n *\n */\nvar __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }\nvar __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n};\nimport { GRAPHQL_TRANSPORT_WS_PROTOCOL, CloseCode, MessageType, parseMessage, stringifyMessage, } from './common.mjs';\nimport { isObject, limitCloseReason } from './utils.mjs';\n/** This file is the entry point for browsers, re-export common elements. */\nexport * from './common.mjs';\n/**\n * Creates a disposable GraphQL over WebSocket client.\n *\n * @category Client\n */\nexport function createClient(options) {\n const { url, connectionParams, lazy = true, onNonLazyError = console.error, lazyCloseTimeout: lazyCloseTimeoutMs = 0, keepAlive = 0, disablePong, connectionAckWaitTimeout = 0, retryAttempts = 5, retryWait = async function randomisedExponentialBackoff(retries) {\n let retryDelay = 1000; // start with 1s delay\n for (let i = 0; i < retries; i++) {\n retryDelay *= 2;\n }\n await new Promise((resolve) => setTimeout(resolve, retryDelay +\n // add random timeout from 300ms to 3s\n Math.floor(Math.random() * (3000 - 300) + 300)));\n }, shouldRetry = isLikeCloseEvent, isFatalConnectionProblem, on, webSocketImpl, \n /**\n * Generates a v4 UUID to be used as the ID using `Math`\n * as the random number generator. Supply your own generator\n * in case you need more uniqueness.\n *\n * Reference: https://gist.github.com/jed/982883\n */\n generateID = function generateUUID() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n }, jsonMessageReplacer: replacer, jsonMessageReviver: reviver, } = options;\n let ws;\n if (webSocketImpl) {\n if (!isWebSocket(webSocketImpl)) {\n throw new Error('Invalid WebSocket implementation provided');\n }\n ws = webSocketImpl;\n }\n else if (typeof WebSocket !== 'undefined') {\n ws = WebSocket;\n }\n else if (typeof global !== 'undefined') {\n ws =\n global.WebSocket ||\n // @ts-expect-error: Support more browsers\n global.MozWebSocket;\n }\n else if (typeof window !== 'undefined') {\n ws =\n window.WebSocket ||\n // @ts-expect-error: Support more browsers\n window.MozWebSocket;\n }\n if (!ws)\n throw new Error(\"WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`\");\n const WebSocketImpl = ws;\n // websocket status emitter, subscriptions are handled differently\n const emitter = (() => {\n const message = (() => {\n const listeners = {};\n return {\n on(id, listener) {\n listeners[id] = listener;\n return () => {\n delete listeners[id];\n };\n },\n emit(message) {\n var _a;\n if ('id' in message)\n (_a = listeners[message.id]) === null || _a === void 0 ? void 0 : _a.call(listeners, message);\n },\n };\n })();\n const listeners = {\n connecting: (on === null || on === void 0 ? void 0 : on.connecting) ? [on.connecting] : [],\n opened: (on === null || on === void 0 ? void 0 : on.opened) ? [on.opened] : [],\n connected: (on === null || on === void 0 ? void 0 : on.connected) ? [on.connected] : [],\n ping: (on === null || on === void 0 ? void 0 : on.ping) ? [on.ping] : [],\n pong: (on === null || on === void 0 ? void 0 : on.pong) ? [on.pong] : [],\n message: (on === null || on === void 0 ? void 0 : on.message) ? [message.emit, on.message] : [message.emit],\n closed: (on === null || on === void 0 ? void 0 : on.closed) ? [on.closed] : [],\n error: (on === null || on === void 0 ? void 0 : on.error) ? [on.error] : [],\n };\n return {\n onMessage: message.on,\n on(event, listener) {\n const l = listeners[event];\n l.push(listener);\n return () => {\n l.splice(l.indexOf(listener), 1);\n };\n },\n emit(event, ...args) {\n // we copy the listeners so that unlistens dont \"pull the rug under our feet\"\n for (const listener of [...listeners[event]]) {\n // @ts-expect-error: The args should fit\n listener(...args);\n }\n },\n };\n })();\n // invokes the callback either when an error or closed event is emitted,\n // first one that gets called prevails, other emissions are ignored\n function errorOrClosed(cb) {\n const listening = [\n // errors are fatal and more critical than close events, throw them first\n emitter.on('error', (err) => {\n listening.forEach((unlisten) => unlisten());\n cb(err);\n }),\n // closes can be graceful and not fatal, throw them second (if error didnt throw)\n emitter.on('closed', (event) => {\n listening.forEach((unlisten) => unlisten());\n cb(event);\n }),\n ];\n }\n let connecting, locks = 0, lazyCloseTimeout, retrying = false, retries = 0, disposed = false;\n async function connect() {\n // clear the lazy close timeout immediatelly so that close gets debounced\n // see: https://github.com/enisdenjo/graphql-ws/issues/388\n clearTimeout(lazyCloseTimeout);\n const [socket, throwOnClose] = await (connecting !== null && connecting !== void 0 ? connecting : (connecting = new Promise((connected, denied) => (async () => {\n if (retrying) {\n await retryWait(retries);\n // subscriptions might complete while waiting for retry\n if (!locks) {\n connecting = undefined;\n return denied({ code: 1000, reason: 'All Subscriptions Gone' });\n }\n retries++;\n }\n emitter.emit('connecting', retrying);\n const socket = new WebSocketImpl(typeof url === 'function' ? await url() : url, GRAPHQL_TRANSPORT_WS_PROTOCOL);\n let connectionAckTimeout, queuedPing;\n function enqueuePing() {\n if (isFinite(keepAlive) && keepAlive > 0) {\n clearTimeout(queuedPing); // in case where a pong was received before a ping (this is valid behaviour)\n queuedPing = setTimeout(() => {\n if (socket.readyState === WebSocketImpl.OPEN) {\n socket.send(stringifyMessage({ type: MessageType.Ping }));\n emitter.emit('ping', false, undefined);\n }\n }, keepAlive);\n }\n }\n errorOrClosed((errOrEvent) => {\n connecting = undefined;\n clearTimeout(connectionAckTimeout);\n clearTimeout(queuedPing);\n denied(errOrEvent);\n if (errOrEvent instanceof TerminatedCloseEvent) {\n socket.close(4499, 'Terminated'); // close event is artificial and emitted manually, see `Client.terminate()` below\n socket.onerror = null;\n socket.onclose = null;\n }\n });\n socket.onerror = (err) => emitter.emit('error', err);\n socket.onclose = (event) => emitter.emit('closed', event);\n socket.onopen = async () => {\n try {\n emitter.emit('opened', socket);\n const payload = typeof connectionParams === 'function'\n ? await connectionParams()\n : connectionParams;\n // connectionParams might take too long causing the server to kick off the client\n // the necessary error/close event is already reported - simply stop execution\n if (socket.readyState !== WebSocketImpl.OPEN)\n return;\n socket.send(stringifyMessage(payload\n ? {\n type: MessageType.ConnectionInit,\n payload,\n }\n : {\n type: MessageType.ConnectionInit,\n // payload is completely absent if not provided\n }, replacer));\n if (isFinite(connectionAckWaitTimeout) &&\n connectionAckWaitTimeout > 0) {\n connectionAckTimeout = setTimeout(() => {\n socket.close(CloseCode.ConnectionAcknowledgementTimeout, 'Connection acknowledgement timeout');\n }, connectionAckWaitTimeout);\n }\n enqueuePing(); // enqueue ping (noop if disabled)\n }\n catch (err) {\n emitter.emit('error', err);\n socket.close(CloseCode.InternalClientError, limitCloseReason(err instanceof Error ? err.message : new Error(err).message, 'Internal client error'));\n }\n };\n let acknowledged = false;\n socket.onmessage = ({ data }) => {\n try {\n const message = parseMessage(data, reviver);\n emitter.emit('message', message);\n if (message.type === 'ping' || message.type === 'pong') {\n emitter.emit(message.type, true, message.payload); // received\n if (message.type === 'pong') {\n enqueuePing(); // enqueue next ping (noop if disabled)\n }\n else if (!disablePong) {\n // respond with pong on ping\n socket.send(stringifyMessage(message.payload\n ? {\n type: MessageType.Pong,\n payload: message.payload,\n }\n : {\n type: MessageType.Pong,\n // payload is completely absent if not provided\n }));\n emitter.emit('pong', false, message.payload);\n }\n return; // ping and pongs can be received whenever\n }\n if (acknowledged)\n return; // already connected and acknowledged\n if (message.type !== MessageType.ConnectionAck)\n throw new Error(`First message cannot be of type ${message.type}`);\n clearTimeout(connectionAckTimeout);\n acknowledged = true;\n emitter.emit('connected', socket, message.payload, retrying); // connected = socket opened + acknowledged\n retrying = false; // future lazy connects are not retries\n retries = 0; // reset the retries on connect\n connected([\n socket,\n new Promise((_, reject) => errorOrClosed(reject)),\n ]);\n }\n catch (err) {\n socket.onmessage = null; // stop reading messages as soon as reading breaks once\n emitter.emit('error', err);\n socket.close(CloseCode.BadResponse, limitCloseReason(err instanceof Error ? err.message : new Error(err).message, 'Bad response'));\n }\n };\n })())));\n // if the provided socket is in a closing state, wait for the throw on close\n if (socket.readyState === WebSocketImpl.CLOSING)\n await throwOnClose;\n let release = () => {\n // releases this connection\n };\n const released = new Promise((resolve) => (release = resolve));\n return [\n socket,\n release,\n Promise.race([\n // wait for\n released.then(() => {\n if (!locks) {\n // and if no more locks are present, complete the connection\n const complete = () => socket.close(1000, 'Normal Closure');\n if (isFinite(lazyCloseTimeoutMs) && lazyCloseTimeoutMs > 0) {\n // if the keepalive is set, allow for the specified calmdown time and\n // then complete if the socket is still open.\n lazyCloseTimeout = setTimeout(() => {\n if (socket.readyState === WebSocketImpl.OPEN)\n complete();\n }, lazyCloseTimeoutMs);\n }\n else {\n // otherwise complete immediately\n complete();\n }\n }\n }),\n // or\n throwOnClose,\n ]),\n ];\n }\n /**\n * Checks the `connect` problem and evaluates if the client should retry.\n */\n function shouldRetryConnectOrThrow(errOrCloseEvent) {\n // some close codes are worth reporting immediately\n if (isLikeCloseEvent(errOrCloseEvent) &&\n (isFatalInternalCloseCode(errOrCloseEvent.code) ||\n [\n CloseCode.InternalServerError,\n CloseCode.InternalClientError,\n CloseCode.BadRequest,\n CloseCode.BadResponse,\n CloseCode.Unauthorized,\n // CloseCode.Forbidden, might grant access out after retry\n CloseCode.SubprotocolNotAcceptable,\n // CloseCode.ConnectionInitialisationTimeout, might not time out after retry\n // CloseCode.ConnectionAcknowledgementTimeout, might not time out after retry\n CloseCode.SubscriberAlreadyExists,\n CloseCode.TooManyInitialisationRequests,\n // 4499, // Terminated, probably because the socket froze, we want to retry\n ].includes(errOrCloseEvent.code)))\n throw errOrCloseEvent;\n // client was disposed, no retries should proceed regardless\n if (disposed)\n return false;\n // normal closure (possibly all subscriptions have completed)\n // if no locks were acquired in the meantime, shouldnt try again\n if (isLikeCloseEvent(errOrCloseEvent) && errOrCloseEvent.code === 1000)\n return locks > 0;\n // retries are not allowed or we tried to many times, report error\n if (!retryAttempts || retries >= retryAttempts)\n throw errOrCloseEvent;\n // throw non-retryable connection problems\n if (!shouldRetry(errOrCloseEvent))\n throw errOrCloseEvent;\n // @deprecated throw fatal connection problems immediately\n if (isFatalConnectionProblem === null || isFatalConnectionProblem === void 0 ? void 0 : isFatalConnectionProblem(errOrCloseEvent))\n throw errOrCloseEvent;\n // looks good, start retrying\n return (retrying = true);\n }\n // in non-lazy (hot?) mode always hold one connection lock to persist the socket\n if (!lazy) {\n (async () => {\n locks++;\n for (;;) {\n try {\n const [, , throwOnClose] = await connect();\n await throwOnClose; // will always throw because releaser is not used\n }\n catch (errOrCloseEvent) {\n try {\n if (!shouldRetryConnectOrThrow(errOrCloseEvent))\n return;\n }\n catch (errOrCloseEvent) {\n // report thrown error, no further retries\n return onNonLazyError === null || onNonLazyError === void 0 ? void 0 : onNonLazyError(errOrCloseEvent);\n }\n }\n }\n })();\n }\n function subscribe(payload, sink) {\n const id = generateID(payload);\n let done = false, errored = false, releaser = () => {\n // for handling completions before connect\n locks--;\n done = true;\n };\n (async () => {\n locks++;\n for (;;) {\n try {\n const [socket, release, waitForReleaseOrThrowOnClose] = await connect();\n // if done while waiting for connect, release the connection lock right away\n if (done)\n return release();\n const unlisten = emitter.onMessage(id, (message) => {\n switch (message.type) {\n case MessageType.Next: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- payload will fit type\n sink.next(message.payload);\n return;\n }\n case MessageType.Error: {\n (errored = true), (done = true);\n sink.error(message.payload);\n releaser();\n return;\n }\n case MessageType.Complete: {\n done = true;\n releaser(); // release completes the sink\n return;\n }\n }\n });\n socket.send(stringifyMessage({\n id,\n type: MessageType.Subscribe,\n payload,\n }, replacer));\n releaser = () => {\n if (!done && socket.readyState === WebSocketImpl.OPEN)\n // if not completed already and socket is open, send complete message to server on release\n socket.send(stringifyMessage({\n id,\n type: MessageType.Complete,\n }, replacer));\n locks--;\n done = true;\n release();\n };\n // either the releaser will be called, connection completed and\n // the promise resolved or the socket closed and the promise rejected.\n // whatever happens though, we want to stop listening for messages\n await waitForReleaseOrThrowOnClose.finally(unlisten);\n return; // completed, shouldnt try again\n }\n catch (errOrCloseEvent) {\n if (!shouldRetryConnectOrThrow(errOrCloseEvent))\n return;\n }\n }\n })()\n .then(() => {\n // delivering either an error or a complete terminates the sequence\n if (!errored)\n sink.complete();\n }) // resolves on release or normal closure\n .catch((err) => {\n sink.error(err);\n }); // rejects on close events and errors\n return () => {\n // dispose only of active subscriptions\n if (!done)\n releaser();\n };\n }\n return {\n on: emitter.on,\n subscribe,\n iterate(request) {\n const pending = [];\n const deferred = {\n done: false,\n error: null,\n resolve: () => {\n // noop\n },\n };\n const dispose = subscribe(request, {\n next(val) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n pending.push(val);\n deferred.resolve();\n },\n error(err) {\n deferred.done = true;\n deferred.error = err;\n deferred.resolve();\n },\n complete() {\n deferred.done = true;\n deferred.resolve();\n },\n });\n const iterator = (function iterator() {\n return __asyncGenerator(this, arguments, function* iterator_1() {\n for (;;) {\n if (!pending.length) {\n // only wait if there are no pending messages available\n yield __await(new Promise((resolve) => (deferred.resolve = resolve)));\n }\n // first flush\n while (pending.length) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n yield yield __await(pending.shift());\n }\n // then error\n if (deferred.error) {\n throw deferred.error;\n }\n // or complete\n if (deferred.done) {\n return yield __await(void 0);\n }\n }\n });\n })();\n iterator.throw = async (err) => {\n if (!deferred.done) {\n deferred.done = true;\n deferred.error = err;\n deferred.resolve();\n }\n return { done: true, value: undefined };\n };\n iterator.return = async () => {\n dispose();\n return { done: true, value: undefined };\n };\n return iterator;\n },\n async dispose() {\n disposed = true;\n if (connecting) {\n // if there is a connection, close it\n const [socket] = await connecting;\n socket.close(1000, 'Normal Closure');\n }\n },\n terminate() {\n if (connecting) {\n // only if there is a connection\n emitter.emit('closed', new TerminatedCloseEvent());\n }\n },\n };\n}\n/**\n * A syntetic close event `4499: Terminated` is issued to the current to immediately\n * close the connection without waiting for the one coming from `WebSocket.onclose`.\n *\n * Terminating is not considered fatal and a connection retry will occur as expected.\n *\n * Useful in cases where the WebSocket is stuck and not emitting any events;\n * can happen on iOS Safari, see: https://github.com/enisdenjo/graphql-ws/discussions/290.\n */\nexport class TerminatedCloseEvent extends Error {\n constructor() {\n super(...arguments);\n this.name = 'TerminatedCloseEvent';\n this.message = '4499: Terminated';\n this.code = 4499;\n this.reason = 'Terminated';\n this.wasClean = false;\n }\n}\nfunction isLikeCloseEvent(val) {\n return isObject(val) && 'code' in val && 'reason' in val;\n}\nfunction isFatalInternalCloseCode(code) {\n if ([\n 1000,\n 1001,\n 1006,\n 1005,\n 1012,\n 1013,\n 1014, // Bad Gateway\n ].includes(code))\n return false;\n // all other internal errors are fatal\n return code >= 1000 && code <= 1999;\n}\nfunction isWebSocket(val) {\n return (typeof val === 'function' &&\n 'constructor' in val &&\n 'CLOSED' in val &&\n 'CLOSING' in val &&\n 'CONNECTING' in val &&\n 'OPEN' in val);\n}\n","import { Inject, Injectable } from '@angular/core';\r\nimport {\r\n\tApolloCache,\r\n\tdefaultDataIdFromObject,\r\n\tInMemoryCache,\r\n\tNormalizedCacheObject,\r\n\tPossibleTypesMap\r\n} from '@apollo/client';\r\nimport { mergeDeepArray } from '@apollo/client/utilities';\r\n\r\nimport { ApolloCacheManager } from './apollo-cache-manager.service';\r\nimport { ApolloTypePolicyProvider, APOLLO_TYPE_POLICY_PROVIDERS } from './apollo-type-policy.provider';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class ApolloCacheFactory {\r\n\tprivate _cache: InMemoryCache | undefined;\r\n\r\n\tconstructor(\r\n\t\t@Inject(APOLLO_TYPE_POLICY_PROVIDERS) private readonly typePolicyProviders: ApolloTypePolicyProvider[],\r\n\t\tprivate readonly apolloCacheManager: ApolloCacheManager\r\n\t) {}\r\n\r\n\tpublic createCache(name: string, possibleTypes: PossibleTypesMap): ApolloCache {\r\n\t\tconst typePolicies = mergeDeepArray(this.typePolicyProviders.map((x) => x.typePolicies()));\r\n\t\tconst typenameMap = mergeDeepArray(this.typePolicyProviders.map((x) => x.typenameMap()));\r\n\t\tthis._cache = new InMemoryCache({\r\n\t\t\tpossibleTypes,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n\t\t\tdataIdFromObject(responseObject) {\r\n\t\t\t\t// eslint-disable-next-line dot-notation\r\n\t\t\t\tconst typeNameMapper = responseObject.__typename;\r\n\t\t\t\tif (typeNameMapper !== undefined && typeNameMapper in typenameMap) {\r\n\t\t\t\t\treturn typenameMap[typeNameMapper](responseObject);\r\n\t\t\t\t}\r\n\t\t\t\treturn defaultDataIdFromObject(responseObject);\r\n\t\t\t},\r\n\t\t\ttypePolicies\r\n\t\t});\r\n\t\tthis.apolloCacheManager.addCache(name, this._cache);\r\n\r\n\t\tthis.resetCache();\r\n\t\treturn this._cache;\r\n\t}\r\n\r\n\tpublic get cache(): InMemoryCache | undefined {\r\n\t\treturn this._cache;\r\n\t}\r\n\r\n\tpublic resetCache(): void {\r\n\t\tthis._cache?.reset();\r\n\t}\r\n}\r\n","import { Subscription } from 'rxjs';\r\n\r\nexport interface SubscriptionManagerConfigCreate {\r\n\tid: string;\r\n\tretryCallback: () => void;\r\n}\r\nexport interface SubscriptionManagerConfig {\r\n\tsubscriptionType: 'inventory-devices' | 'property-panel';\r\n\tcreate: (config: SubscriptionManagerConfigCreate) => Subscription;\r\n\tretryWaitMs: number;\r\n\tmaxRetryAttempts: number;\r\n}\r\n\r\ninterface SubscriptionInfo {\r\n\tsubscription: Subscription;\r\n\tretryAttempts: number;\r\n}\r\nexport class SubscriptionManager {\r\n\tprivate readonly subscriptions = new Map();\r\n\r\n\tconstructor(private readonly config: SubscriptionManagerConfig) {}\r\n\r\n\tpublic register(keys: string[], deregKeysNotInInputList = false): number {\r\n\t\t// first, see if we should remove any keys not in the requested set of keys.\r\n\t\tlet numRegistered = 0;\r\n\t\tif (deregKeysNotInInputList) {\r\n\t\t\tconst currentKeys = Array.from(this.subscriptions.keys());\r\n\t\t\tconst keysToDereg = currentKeys.filter((ck) => !keys.includes(ck));\r\n\t\t\tkeysToDereg.forEach((key) => {\r\n\t\t\t\tthis.deregister(key);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// now, add the requested keys\r\n\t\tkeys.forEach((key) => {\r\n\t\t\tconst subscriptionInfo = this.subscriptions.get(key);\r\n\t\t\tif (subscriptionInfo) {\r\n\t\t\t\t// shouldn't happen, but just in case.\r\n\t\t\t\tif (subscriptionInfo.subscription.closed) {\r\n\t\t\t\t\tsubscriptionInfo.retryAttempts = 0;\r\n\t\t\t\t\tthis.reCreateSubscription(key);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst subscription = this.config.create({\r\n\t\t\t\t\tid: key,\r\n\t\t\t\t\tretryCallback: () => this.handleSubscriptionRetry(key)\r\n\t\t\t\t});\r\n\t\t\t\tthis.subscriptions.set(key, { subscription, retryAttempts: 0 });\r\n\r\n\t\t\t\tnumRegistered++;\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn numRegistered;\r\n\t}\r\n\r\n\tpublic deregister(key: string): number {\r\n\t\tlet numDeregistered = 0;\r\n\t\tconst subscriptionInfo = this.subscriptions.get(key);\r\n\t\tif (subscriptionInfo) {\r\n\t\t\tthis.subscriptions.delete(key);\r\n\t\t\tsubscriptionInfo.subscription.unsubscribe();\r\n\t\t\tnumDeregistered++;\r\n\t\t}\r\n\t\treturn numDeregistered;\r\n\t}\r\n\r\n\tpublic deregisterAll(): void {\r\n\t\tthis.subscriptions.forEach((subscriptionInfo, _) => {\r\n\t\t\tsubscriptionInfo.subscription.unsubscribe();\r\n\t\t});\r\n\t\tthis.subscriptions.clear();\r\n\t}\r\n\r\n\tprivate handleSubscriptionRetry(key: string): void {\r\n\t\tconst subscriptionInfo = this.subscriptions.get(key);\r\n\t\tif (!subscriptionInfo || subscriptionInfo.retryAttempts >= this.config.maxRetryAttempts) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.reCreateSubscription(key);\r\n\t\t}, this.config.retryWaitMs);\r\n\t}\r\n\r\n\tprivate reCreateSubscription(key: string): void {\r\n\t\tconst subscriptionInfo = this.subscriptions.get(key);\r\n\t\tif (subscriptionInfo) {\r\n\t\t\tsubscriptionInfo.subscription.unsubscribe();\r\n\t\t\tconst subscription = this.config.create({\r\n\t\t\t\tid: key,\r\n\t\t\t\tretryCallback: () => this.handleSubscriptionRetry(key)\r\n\t\t\t});\r\n\t\t\tthis.subscriptions.set(key, { subscription, retryAttempts: ++subscriptionInfo.retryAttempts });\r\n\t\t}\r\n\t}\r\n}\r\n","import { WritableSignal } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\n\r\nimport { UpdateRequestResponse, UpdateResponse } from '@shure/cloud/shared/models/http';\r\n\r\nimport { UpdateDeviceFirmwareInput } from '../api-instance-sys-api/graphql/generated/cloud-sys-api';\r\n\r\nexport abstract class CloudDeviceApiService {\r\n\tpublic abstract readonly lastFWUpdateTime: WritableSignal;\r\n\r\n\tpublic abstract setIdentify(deviceId: string, identify: boolean): Observable>;\r\n\tpublic abstract setMute(deviceId: string, deviceMute: boolean): Observable>;\r\n\tpublic abstract setDeviceName(deviceId: string, name: string): Observable>;\r\n\tpublic abstract rebootDevice$(deviceId: string): Observable>;\r\n\tpublic abstract updateFirmware$(updates: UpdateDeviceFirmwareInput[]): Observable>;\r\n}\r\n","import { Observable } from 'rxjs';\r\n\r\nimport { DetectionToken } from '@shure/cloud/shared/models/devices';\r\n\r\nexport abstract class DetectionTokenApiService {\r\n\tpublic abstract detectionToken$(): Observable;\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\nimport { BehaviorSubject, ReplaySubject } from 'rxjs';\r\n\r\nimport { DeviceDetection } from '@shure/cloud/shared/models/devices';\r\n\r\nexport const DEVICE_DISCOVERY_CLAIMING_SERVICE = new InjectionToken(\r\n\t'DEVICE_DISCOVERY_CLAIMING_SERVICE'\r\n);\r\n\r\nexport abstract class DeviceClaimingDiscoveryApiService {\r\n\tpublic abstract unclaimedDevices$: BehaviorSubject;\r\n\tpublic abstract scanInProgess$: BehaviorSubject;\r\n\tpublic abstract deviceDiscoveryError$: ReplaySubject;\r\n\tpublic abstract newScan(): void;\r\n\tpublic abstract destroy(): void;\r\n}\r\n","import { Signal } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\n\r\nimport { DeviceDiscoveryEvent } from '../api-instance-sys-api/sys-api-device-discovery-api.service';\r\n\r\nexport abstract class DeviceDiscoveryApiService {\r\n\t/**\r\n\t * Signals exposed by the service to communiate the state of device discovery.\r\n\t */\r\n\tpublic abstract deviceDiscoveryInProgress: Signal;\r\n\tpublic abstract numDiscoveredDevices: Signal;\r\n\r\n\t/**\r\n\t * Observable stream that emits a device ID whenever a device is added\r\n\t */\r\n\tpublic abstract deviceAdded$(): Observable;\r\n\r\n\t/**\r\n\t * Observable stream that emits a device ID whenever a device is removed\r\n\t */\r\n\tpublic abstract deviceRemoved$(): Observable;\r\n\r\n\t/**\r\n\t * Observable stream that emits device discovery events\r\n\t */\r\n\tpublic abstract discoveryEvents$(): Observable;\r\n\r\n\t/**\r\n\t * Observable stream that emits a new value whenever the discovered device count changes\r\n\t */\r\n\tpublic abstract discoveredDevicesCount$(): Observable;\r\n\r\n\t/**\r\n\t * This function is responsible for emitting a list of devices, and properites as determined by\r\n\t * the supplied query function, that have been discovered. Essentially, this function creates and\r\n\t * returns a new Observable the caller can subscribe that is a list of discovered Devices\r\n\t * along with their properties. As devices are added/removed, a new list is emitted on the observable.\r\n\t *\r\n\t * - This discovery service maintains a list of discovered devices, and then\r\n\t * keeps that list accurate as deviceAdded and deviceRemoved events are received.\r\n\t *\r\n\t * - When the service starts/initializes, a query is performed for every device currently claimed\r\n\t * Each device returned results in a deviceAdded event being added to the discoveryEvent subject\r\n\t *\r\n\t * - As deviceAdded and removed events are received, the events are added to the discoveryEvent subject\r\n\t *\r\n\t * - The contents and changes to the discoveryEvent subject drive this function.\r\n\t *\r\n\t * Within the creation of the Observable that's returned (a closure), is the storage of the returnedDevices\r\n\t * and their respective query handler.\r\n\t *\r\n\t * - When a deviceAdded event is received, the query is dispatched for the device. When the query\r\n\t * response is received, the device and it's data is added to the list of returned devices, then\r\n\t * the updated list of returned devices is emitted on the Observable. At this point, the device is avaiable\r\n\t * for anyone subscirbe to the over-all Observable. For book keeping purposes, the device to query handler\r\n\t * mapping is stored so we can unsubscribs from the query if a deviceRemoved event is received later on.\r\n\t *\r\n\t * - When a deviceRemoved event is received, we unsubscribe from the query, remove the device from the\r\n\t * list of returned devices, then emit the updated list of devices on the Observable.\r\n\t *\r\n\t * @param elementQueryFunction The query function to execute and subscribe to when a device is added.\r\n\t * @param elementFilterFunction A filter function to omit exeucting query fuction on some devices.\r\n\t * @returns\r\n\t */\r\n\tpublic abstract getDiscoveredDevicesByQuery$(\r\n\t\telementQueryFunction: (id: string) => Observable,\r\n\t\telementFilterFunction?: (element: ElementType) => boolean\r\n\t): Observable;\r\n}\r\n","import { InventoryDevice } from '@shure/cloud/shared/models/devices';\r\n\r\nexport abstract class DeviceRelationshipService {\r\n\t/**\r\n\t * Associate the given host device with each of its proxied devices.\r\n\t * @param hostDevice the host device for the proxied devices that will be registered\r\n\t */\r\n\tpublic abstract registerProxiedDevices(hostDevice: InventoryDevice): void;\r\n\r\n\t/**\r\n\t * Remove associations for a device.\r\n\t * @param deviceId the device ID to remove\r\n\t */\r\n\tpublic abstract removeDevice(deviceId: string): void;\r\n\r\n\t/**\r\n\t * Get the associated host device ID for a proxied device. If the device is not proxied or the\r\n\t * host has been removed, this will return `undefined`.\r\n\t * @param proxiedDeviceId the ID of the proxied device\r\n\t */\r\n\tpublic abstract getHostDevice(proxiedDeviceId: string): string | undefined;\r\n}\r\n","import { PercentPipe } from '@angular/common';\r\nimport { Inject, Injectable } from '@angular/core';\r\nimport { TranslocoService } from '@jsverse/transloco';\r\n\r\nimport {\r\n\tDeviceConditionSeverity,\r\n\tInventoryDevice,\r\n\tProxiedTransmitterForInventory,\r\n\tSortedDeviceConditionCollection\r\n} from '@shure/cloud/shared/models/devices';\r\nimport { APP_ENVIRONMENT, AppEnvironment } from '@shure/cloud/shared/utils/config';\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\n@Injectable()\r\nexport class DeviceStatusService {\r\n\tpublic static readonly lowBatteryThreshold = 0.05; // 5%\r\n\tpublic static readonly veryLowBatteryThreshold = 0.02; // 2%\r\n\r\n\tprivate logger: ILogger;\r\n\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\tprivate translocoService: TranslocoService,\r\n\t\tprivate percentPipe: PercentPipe,\r\n\t\t@Inject(APP_ENVIRONMENT) private appEnv: AppEnvironment\r\n\t) {\r\n\t\tthis.logger = logger.createScopedLogger('DeviceStatusService');\r\n\t}\r\n\r\n\tpublic conditionsFor(device: InventoryDevice): SortedDeviceConditionCollection {\r\n\t\treturn this.appEnv.showProxiedDevices\r\n\t\t\t? this.getConditionsFromBatteryLevel(device)\r\n\t\t\t: this.getConditionsFromDoublestuffProxiedTransmitters(device);\r\n\t}\r\n\r\n\tprivate getConditionsFromDoublestuffProxiedTransmitters(device: InventoryDevice): SortedDeviceConditionCollection {\r\n\t\tconst conditionCollection = new SortedDeviceConditionCollection();\r\n\r\n\t\tconst proxiedTransmitters = [\r\n\t\t\tdevice.features.doublestuffProxiedTransmitters?.mic1,\r\n\t\t\tdevice.features.doublestuffProxiedTransmitters?.mic2\r\n\t\t];\r\n\r\n\t\tproxiedTransmitters.forEach((mic) => {\r\n\t\t\tif (this.checkBatteryLevelAtOrBelow(DeviceStatusService.veryLowBatteryThreshold, mic)) {\r\n\t\t\t\tconditionCollection.add({\r\n\t\t\t\t\tseverity: DeviceConditionSeverity.High,\r\n\t\t\t\t\tdescription: this.translocoService.translate('mic-battery-very-low', {\r\n\t\t\t\t\t\tpercent: this.formatDoublestuffBatteryLevel(mic)\r\n\t\t\t\t\t})\r\n\t\t\t\t});\r\n\t\t\t} else if (this.checkBatteryLevelAtOrBelow(DeviceStatusService.lowBatteryThreshold, mic)) {\r\n\t\t\t\tconditionCollection.add({\r\n\t\t\t\t\tseverity: DeviceConditionSeverity.Moderate,\r\n\t\t\t\t\tdescription: this.translocoService.translate('mic-battery-low', {\r\n\t\t\t\t\t\tpercent: this.formatDoublestuffBatteryLevel(mic)\r\n\t\t\t\t\t})\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.logger.trace(\r\n\t\t\t'conditionsFor',\r\n\t\t\tdevice.name,\r\n\t\t\tJSON.stringify({\r\n\t\t\t\tconditions: conditionCollection.conditions,\r\n\t\t\t\tproxiedTransmitters: device.features.doublestuffProxiedTransmitters\r\n\t\t\t})\r\n\t\t);\r\n\t\treturn conditionCollection;\r\n\t}\r\n\r\n\tprivate checkBatteryLevelAtOrBelow(threshold: number, mic?: ProxiedTransmitterForInventory | void): boolean {\r\n\t\tconst currentBatteryLevel = mic?.batteryLevel ?? Number.NaN;\r\n\t\treturn currentBatteryLevel <= threshold;\r\n\t}\r\n\r\n\tprivate formatDoublestuffBatteryLevel(mic?: ProxiedTransmitterForInventory): string {\r\n\t\tif (mic?.batteryLevel === undefined) {\r\n\t\t\treturn '';\r\n\t\t}\r\n\r\n\t\treturn this.percentPipe.transform(mic?.batteryLevel) ?? '';\r\n\t}\r\n\r\n\tprivate getConditionsFromBatteryLevel(device: InventoryDevice): SortedDeviceConditionCollection {\r\n\t\tconst conditionCollection = new SortedDeviceConditionCollection();\r\n\r\n\t\tif (!device.features.batteryLevel?.isMissing) {\r\n\t\t\tconst batteryLevel = device.features.batteryLevel?.percentage ?? Number.NaN;\r\n\t\t\tif (batteryLevel <= DeviceStatusService.veryLowBatteryThreshold) {\r\n\t\t\t\tconditionCollection.add({\r\n\t\t\t\t\tseverity: DeviceConditionSeverity.High,\r\n\t\t\t\t\tdescription: this.translocoService.translate(\r\n\t\t\t\t\t\t'cloud.device-management.inventory.mic-battery-very-low',\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tpercent: this.formatBatteryLevel(batteryLevel)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t)\r\n\t\t\t\t});\r\n\t\t\t} else if (batteryLevel <= DeviceStatusService.lowBatteryThreshold) {\r\n\t\t\t\tconditionCollection.add({\r\n\t\t\t\t\tseverity: DeviceConditionSeverity.Moderate,\r\n\t\t\t\t\tdescription: this.translocoService.translate('cloud.device-management.inventory.mic-battery-low', {\r\n\t\t\t\t\t\tpercent: this.formatBatteryLevel(batteryLevel)\r\n\t\t\t\t\t})\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.logger.trace(\r\n\t\t\t'conditionsFor',\r\n\t\t\tdevice.name,\r\n\t\t\tJSON.stringify({\r\n\t\t\t\tconditions: conditionCollection.conditions,\r\n\t\t\t\tproxiedTransmitters: device.features.doublestuffProxiedTransmitters\r\n\t\t\t})\r\n\t\t);\r\n\t\treturn conditionCollection;\r\n\t}\r\n\r\n\tprivate formatBatteryLevel(batteryLevel: number): string {\r\n\t\treturn Number.isNaN(batteryLevel) ? '--' : `${batteryLevel}%`;\r\n\t}\r\n}\r\n","import { Observable } from 'rxjs';\r\n\r\nimport { FirmwarePackage, PropertyPanelDevice } from '@shure/cloud/shared/models/devices';\r\nimport { UpdateResponse } from '@shure/cloud/shared/models/http';\r\n\r\nexport abstract class DevicePropertyPanelApiService {\r\n\t/**\r\n\t * get device by id\r\n\t */\r\n\tpublic abstract getDevice$(deviceId: string): Observable;\r\n\r\n\t/*\r\n\t * forget/unsubscribe to a device\r\n\t */\r\n\tpublic abstract forgetDevice(deviceId: string): void;\r\n\r\n\t/**\r\n\t * Set mute for a device.\r\n\t */\r\n\tpublic abstract setMute(deviceId: string, mute: boolean): Observable>;\r\n\r\n\t/**\r\n\t * Set device name.\r\n\t */\r\n\tpublic abstract setDeviceName(deviceId: string, name: string): Observable>;\r\n\r\n\t/**\r\n\t * Set device identifying state.\r\n\t */\r\n\tpublic abstract setIdentify(deviceId: string, identify: boolean): Observable>;\r\n\r\n\t/**\r\n\t * Reboot device\r\n\t */\r\n\tpublic abstract rebootDevice(deviceId: string): Observable>;\r\n\r\n\t/**\r\n\t * Request a device firmware update\r\n\t */\r\n\tpublic abstract updateFirmware(\r\n\t\tdeviceId: string,\r\n\t\tfirmwarePkg: FirmwarePackage\r\n\t): Observable>;\r\n}\r\n","export enum UpdateState {\r\n\tUpdating = 'Updating',\r\n\tDone = 'Done',\r\n\tError = 'ERROR'\r\n}\r\n\r\nexport interface UpdateResponse {\r\n\tstate: UpdateState;\r\n\tdone?: DoneType;\r\n\terror?: ErrorType;\r\n}\r\n\r\nexport interface UpdateRequestResponse {\r\n\tstate: UpdateState;\r\n\terror?: ErrorType;\r\n}\r\n\r\nexport enum CreateState {\r\n\tCreating = 'Creating',\r\n\tDone = 'Done',\r\n\tError = 'ERROR'\r\n}\r\n\r\nexport interface CreateResponse {\r\n\tstate: CreateState;\r\n\tdone?: DoneType;\r\n\terror?: ErrorType;\r\n}\r\n\r\nexport enum DeleteState {\r\n\tDeleting = 'Deleting',\r\n\tDone = 'Done',\r\n\tError = 'ERROR'\r\n}\r\n\r\nexport interface DeleteResponse {\r\n\tstate: DeleteState;\r\n\tdone?: DoneType;\r\n\terror?: ErrorType;\r\n}\r\n","/* eslint-disable */\r\n/* istanbul ignore file */\r\n/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\r\nimport { gql } from 'apollo-angular';\r\nimport { Injectable } from '@angular/core';\r\nimport * as Apollo from 'apollo-angular';\r\nexport type Maybe = T | null;\r\nexport type InputMaybe = T | null;\r\nexport type Exact = { [K in keyof T]: T[K] };\r\nexport type MakeOptional = Omit & { [SubKey in K]?: Maybe };\r\nexport type MakeMaybe = Omit & { [SubKey in K]: Maybe };\r\nexport type MakeEmpty = { [_ in K]?: never };\r\nexport type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\r\n\r\nexport interface PossibleTypesResultData {\r\n\tpossibleTypes: {\r\n\t\t[key: string]: string[];\r\n\t};\r\n}\r\nconst result: PossibleTypesResultData = {\r\n\tpossibleTypes: {\r\n\t\tAudioChannelFeatureChange: [\r\n\t\t\t'AudioChannelAcousticEchoCancellationChange',\r\n\t\t\t'AudioChannelAcousticEchoCancellationMonoReferenceChange',\r\n\t\t\t'AudioChannelAcousticEchoCancellationStereoReferenceChange',\r\n\t\t\t'AudioChannelAnalogLevelChange',\r\n\t\t\t'AudioChannelAutoLevelChange',\r\n\t\t\t'AudioChannelAutoMuteChange',\r\n\t\t\t'AudioChannelAutoPositionChange',\r\n\t\t\t'AudioChannelAutomaticGainControlChange',\r\n\t\t\t'AudioChannelAutomixSourceSelectorChange',\r\n\t\t\t'AudioChannelAutomixerChange',\r\n\t\t\t'AudioChannelAutomixerInputChange',\r\n\t\t\t'AudioChannelAutomixerVoiceActivityDetectionChange',\r\n\t\t\t'AudioChannelCompressorChange',\r\n\t\t\t'AudioChannelDanteEncryptionStatusChange',\r\n\t\t\t'AudioChannelDanteRouteReceiverChange',\r\n\t\t\t'AudioChannelDanteRouteTransmitterChange',\r\n\t\t\t'AudioChannelDelayChange',\r\n\t\t\t'AudioChannelDenoiserChange',\r\n\t\t\t'AudioChannelDeverbChange',\r\n\t\t\t'AudioChannelDeviceSpecificEqualizerContourChange',\r\n\t\t\t'AudioChannelDirectOutputTapPointChange',\r\n\t\t\t'AudioChannelEqualizerChange',\r\n\t\t\t'AudioChannelEqualizerContourChange',\r\n\t\t\t'AudioChannelEqualizerPresetChange',\r\n\t\t\t'AudioChannelFaderGroupChange',\r\n\t\t\t'AudioChannelGainChange',\r\n\t\t\t'AudioChannelGainLockChange',\r\n\t\t\t'AudioChannelIdentifyChange',\r\n\t\t\t'AudioChannelInputSourceChange',\r\n\t\t\t'AudioChannelLightingBehaviorChange',\r\n\t\t\t'AudioChannelLimiterChange',\r\n\t\t\t'AudioChannelLobeConfigurationChange',\r\n\t\t\t'AudioChannelLobePositionChange',\r\n\t\t\t'AudioChannelLobeTalkerHeightChange',\r\n\t\t\t'AudioChannelLobeWidthChange',\r\n\t\t\t'AudioChannelLogicReceiverChange',\r\n\t\t\t'AudioChannelMicOptimizationChange',\r\n\t\t\t'AudioChannelMicPolarPatternChange',\r\n\t\t\t'AudioChannelMicrophoneAngleChange',\r\n\t\t\t'AudioChannelMonitorMixChange',\r\n\t\t\t'AudioChannelMonitorMixReverbChange',\r\n\t\t\t'AudioChannelMuteChange',\r\n\t\t\t'AudioChannelMuteGroupChange',\r\n\t\t\t'AudioChannelMuteLockChange',\r\n\t\t\t'AudioChannelNameChange',\r\n\t\t\t'AudioChannelNoiseReductionChange',\r\n\t\t\t'AudioChannelOutputPathChange',\r\n\t\t\t'AudioChannelPcPeripheralChange',\r\n\t\t\t'AudioChannelPhantomPowerChange',\r\n\t\t\t'AudioChannelPlosiveReductionChange',\r\n\t\t\t'AudioChannelPostGateGainChange',\r\n\t\t\t'AudioChannelPostGateMuteChange',\r\n\t\t\t'AudioChannelPostGateSoloChange',\r\n\t\t\t'AudioChannelReverbChange',\r\n\t\t\t'AudioChannelSignalGeneratorChange',\r\n\t\t\t'AudioChannelSoloChange',\r\n\t\t\t'AudioChannelStereoReverseChange',\r\n\t\t\t'AudioChannelStereoWidthChange',\r\n\t\t\t'AudioChannelTalkerHeightChange'\r\n\t\t],\r\n\t\tAudioCoverageAreaFeatureChange: [\r\n\t\t\t'AudioCoverageAreaConfigurationChange',\r\n\t\t\t'AudioCoverageAreaGainChange',\r\n\t\t\t'AudioCoverageAreaMuteChange'\r\n\t\t],\r\n\t\tChargerBayFeatureChange: [\r\n\t\t\t'ChargerBayAssociationChange',\r\n\t\t\t'ChargerBayBatteryPresentChange',\r\n\t\t\t'ChargerBayChargingModeChange',\r\n\t\t\t'ChargerBayDockedDeviceChange'\r\n\t\t],\r\n\t\tClaimedDevicesEvent: ['DeviceClaimed', 'DeviceUnclaimed'],\r\n\t\tClearedAssociation: ['ChargerBay', 'RfChannel'],\r\n\t\tCloneRoomEvent: [\r\n\t\t\t'CloneRoomAudioRouteUpdateEvent',\r\n\t\t\t'CloneRoomControlRouteUpdateEvent',\r\n\t\t\t'CloneRoomDeviceUpdateEvent',\r\n\t\t\t'CloneRoomResultEvent',\r\n\t\t\t'CloneRoomStartedEvent'\r\n\t\t],\r\n\t\tCrossPointFeatureChange: ['CrossPointConfigurationChange', 'CrossPointGainChange'],\r\n\t\tCrossPointInputAudioChannel: ['AudioChannel', 'StereoAudioChannel'],\r\n\t\tDeviceFeatureChange: [\r\n\t\t\t'ConnectedDeviceLabelChange',\r\n\t\t\t'DeviceActivePresetChange',\r\n\t\t\t'DeviceAllEqualizersBypassChange',\r\n\t\t\t'DeviceAllIntellimixBypassChange',\r\n\t\t\t'DeviceAnalogAudioOutputModeChange',\r\n\t\t\t'DeviceAnalogLogicChange',\r\n\t\t\t'DeviceAnalogLogicPresetSwitchChange',\r\n\t\t\t'DeviceAudioAutoFocusChange',\r\n\t\t\t'DeviceAudioChannelCountChange',\r\n\t\t\t'DeviceAudioChannelsChange',\r\n\t\t\t'DeviceAudioMuteChange',\r\n\t\t\t'DeviceAudioMuteControlChange',\r\n\t\t\t'DeviceAudioMuteControlGroupChange',\r\n\t\t\t'DeviceAudioMuteDefaultChange',\r\n\t\t\t'DeviceAudioMuteLockChange',\r\n\t\t\t'DeviceAudioNetworkInterfaceChange',\r\n\t\t\t'DeviceAuthenticationChange',\r\n\t\t\t'DeviceAutomixGainMeteringChange',\r\n\t\t\t'DeviceAvailablePackagesChange',\r\n\t\t\t'DeviceBatteryHealthChange',\r\n\t\t\t'DeviceBatteryLevelChange',\r\n\t\t\t'DeviceCallStatusChange',\r\n\t\t\t'DeviceCommandStringsServiceChange',\r\n\t\t\t'DeviceConfigurationLockChange',\r\n\t\t\t'DeviceControlNetworkInterfaceChange',\r\n\t\t\t'DeviceCoverageModeChange',\r\n\t\t\t'DeviceCoveragePositionChange',\r\n\t\t\t'DeviceDanteAudioEncryptionChange',\r\n\t\t\t'DeviceDanteAudioNetworkAccessChange',\r\n\t\t\t'DeviceDanteAudioNetworkChange',\r\n\t\t\t'DeviceDeploymentCandidatesChange',\r\n\t\t\t'DeviceDoubleStuffProxiedTransmittersChange',\r\n\t\t\t'DeviceEqualizerContourChange',\r\n\t\t\t'DeviceEthernetLightsChange',\r\n\t\t\t'DeviceFirmwareUpdatePolicyChange',\r\n\t\t\t'DeviceGlobalMicStatusChange',\r\n\t\t\t'DeviceHeightChange',\r\n\t\t\t'DeviceIdentifyChange',\r\n\t\t\t'DeviceLicenseChange',\r\n\t\t\t'DeviceLightingAudioMetersChange',\r\n\t\t\t'DeviceLightingAudioMuteIndicatorOverrideChange',\r\n\t\t\t'DeviceLightingAutomixGatingChange',\r\n\t\t\t'DeviceLightingBehaviorChange',\r\n\t\t\t'DeviceLightingBrightnessChange',\r\n\t\t\t'DeviceLightingLiveAudioMetersChange',\r\n\t\t\t'DeviceLightingMuteBehaviorChange',\r\n\t\t\t'DeviceLightingRingChange',\r\n\t\t\t'DeviceLightingUnmuteBehaviorChange',\r\n\t\t\t'DeviceLinkedAccessPointChange',\r\n\t\t\t'DeviceListenerHeightChange',\r\n\t\t\t'DeviceLogicMuteChange',\r\n\t\t\t'DeviceLogicReceiverChange',\r\n\t\t\t'DeviceLogicTransmitterChange',\r\n\t\t\t'DeviceLoudspeakerChange',\r\n\t\t\t'DeviceMdnsServiceChange',\r\n\t\t\t'DeviceMeteringModesChange',\r\n\t\t\t'DeviceMicStatusChange',\r\n\t\t\t'DeviceNameChange',\r\n\t\t\t'DevicePlacementChange',\r\n\t\t\t'DeviceProxiedDevicesChange',\r\n\t\t\t'DeviceRoomChange',\r\n\t\t\t'DeviceRotationChange',\r\n\t\t\t'DeviceRoutingPositionChange',\r\n\t\t\t'DeviceSecurity8021XChange',\r\n\t\t\t'DeviceStereoAudioChange',\r\n\t\t\t'DeviceSwitchConfigurationChange',\r\n\t\t\t'DeviceUpdateProgressChange',\r\n\t\t\t'DeviceUptimeChange',\r\n\t\t\t'DeviceUsbMuteSyncChange',\r\n\t\t\t'DeviceUsbTerminalTypeChange',\r\n\t\t\t'DeviceUserPresetsChange',\r\n\t\t\t'DeviceVirtualAcousticBoundaryChange',\r\n\t\t\t'DeviceWebServiceChange'\r\n\t\t],\r\n\t\tDiscoveredDevicesEvent: ['DeviceAdded', 'DeviceRemoved'],\r\n\t\tDiscoveredRoomEvent: ['RoomAddedEvent', 'RoomRemovedEvent'],\r\n\t\tEqualizerFilterFeatureChange: [\r\n\t\t\t'EqualizerFilterBandwidthChange',\r\n\t\t\t'EqualizerFilterConfigurationChange',\r\n\t\t\t'EqualizerFilterFrequencyChange',\r\n\t\t\t'EqualizerFilterGainChange',\r\n\t\t\t'EqualizerFilterQFactorChange'\r\n\t\t],\r\n\t\tFragment: [\r\n\t\t\t'AudioChannel',\r\n\t\t\t'AudioCoverageArea',\r\n\t\t\t'ChargerBay',\r\n\t\t\t'CrossPoint',\r\n\t\t\t'EqualizerFilter',\r\n\t\t\t'RfChannel',\r\n\t\t\t'UserPreset'\r\n\t\t],\r\n\t\tIDurationRangeConstraints: ['AudioChannelDelayFieldConstraints', 'AutomixHoldTimeConstraints'],\r\n\t\tIFieldSupportInfo: [\r\n\t\t\t'AudioChannelCompressorLevelConstraints',\r\n\t\t\t'AudioChannelCompressorRatioConstraints',\r\n\t\t\t'AudioChannelCompressorThresholdConstraints',\r\n\t\t\t'AudioChannelLimiterThresholdConstraints',\r\n\t\t\t'AudioChannelLobePositionAutoFocusConstraints',\r\n\t\t\t'AudioChannelMicrophoneAngleAutoFocusConstraints',\r\n\t\t\t'AudioChannelTalkerHeightAutoFocusConstraints',\r\n\t\t\t'AutoLevelConfigurationConstraints',\r\n\t\t\t'AutoLevelModeConstraints',\r\n\t\t\t'AutoLevelPositionConstraints',\r\n\t\t\t'AutoLevelToneConstraints',\r\n\t\t\t'EqualizerEnabledConstraints',\r\n\t\t\t'EqualizerFiltersConstraints',\r\n\t\t\t'EqualizerToneConstraints',\r\n\t\t\t'FieldSupport',\r\n\t\t\t'NoiseReductionLevelConstraints'\r\n\t\t],\r\n\t\tIFloatPositionRangeConstraints: ['AudioChannelLobePositionFixedConstraints'],\r\n\t\tIFloatRangeConstraints: [\r\n\t\t\t'AudioChannelAcousticEchoCancellationErleLevelConstraints',\r\n\t\t\t'AudioChannelAcousticEchoCancellationPeakMeterLevelConstraints',\r\n\t\t\t'AudioChannelAcousticEchoCancellationRmsMeterLevelConstraints',\r\n\t\t\t'AudioChannelAutomaticGainControlPeakMeterLevelConstraints',\r\n\t\t\t'AudioChannelAutomaticGainControlRmsMeterLevelConstraints',\r\n\t\t\t'AudioChannelAutomaticGainMaxBoostConstraints',\r\n\t\t\t'AudioChannelAutomaticGainMaxCutConstraints',\r\n\t\t\t'AudioChannelAutomaticGainTargetLevelConstraints',\r\n\t\t\t'AudioChannelAutomixGainConstraints',\r\n\t\t\t'AudioChannelAutomixerInputPeakLevelConstraints',\r\n\t\t\t'AudioChannelAutomixerInputRmsLevelConstraints',\r\n\t\t\t'AudioChannelGainFieldConstraints',\r\n\t\t\t'AudioChannelMatrixMixerInputPeakLevelConstraints',\r\n\t\t\t'AudioChannelMatrixMixerInputRmsLevelConstraints',\r\n\t\t\t'AudioChannelMatrixMixerOutputPeakLevelConstraints',\r\n\t\t\t'AudioChannelMatrixMixerOutputRmsLevelConstraints',\r\n\t\t\t'AudioChannelMatrixMixerStereoInputPeakLevelConstraints',\r\n\t\t\t'AudioChannelMatrixMixerStereoInputRmsLevelConstraints',\r\n\t\t\t'AudioChannelPostGateFieldConstraints',\r\n\t\t\t'AudioChannelRmsLevelConstraints',\r\n\t\t\t'AudioChannelStereoPeakLevelConstraints',\r\n\t\t\t'AudioChannelStereoRmsLevelConstraints',\r\n\t\t\t'AudioChannelTalkerHeightFieldConstraints',\r\n\t\t\t'AudioChannelTalkerHeightFixedConstraints',\r\n\t\t\t'AudioCoverageAreaGainFieldConstraints',\r\n\t\t\t'AudioCoverageAreaPeakMeterLevelConstraints',\r\n\t\t\t'AudioCoverageRmsMeterLevelConstraints',\r\n\t\t\t'AutomixOffAttenuationConstraints',\r\n\t\t\t'CrossPointGainFieldConstraints',\r\n\t\t\t'DeviceHeightFieldConstraints',\r\n\t\t\t'DeviceListenerHeightFieldConstraints',\r\n\t\t\t'EqualizerFilterFrequencyFieldConstraints',\r\n\t\t\t'EqualizerFilterGainFieldConstraints',\r\n\t\t\t'RectangularAreaFieldConstraints'\r\n\t\t],\r\n\t\tIIntRangeConstraints: [\r\n\t\t\t'AudioChannelAutomaticGainConstraints',\r\n\t\t\t'AudioChannelMicrophoneAngleFixedConstraints',\r\n\t\t\t'AudioChannelMonitorMixTypeConstraints',\r\n\t\t\t'AudioChannelReverbIntensityConstraints',\r\n\t\t\t'AudioChannelStereoWidthAngleConstraints',\r\n\t\t\t'AutomixGatingSensitivityConstraints',\r\n\t\t\t'AutomixMaximumOpenChannelsConstraints',\r\n\t\t\t'DeviceBatteryHealthPercentageConstraints',\r\n\t\t\t'DeviceBatteryLevelPercentageConstraints',\r\n\t\t\t'DeviceCommandStringsServicePortConstraints',\r\n\t\t\t'DeviceLightingBrightnessFieldConstraints',\r\n\t\t\t'DeviceRotationAxisConstraints',\r\n\t\t\t'DeviceVirtualAcousticBoundarySensitivityConstraints',\r\n\t\t\t'RgbColorMixFieldConstraints'\r\n\t\t],\r\n\t\tINullableDurationRangeConstraints: [],\r\n\t\tINullableFloatPositionRangeConstraints: ['AudioChannelLobePositionAutoFocusConstraints'],\r\n\t\tINullableFloatRangeConstraints: [\r\n\t\t\t'AudioChannelLimiterThresholdConstraints',\r\n\t\t\t'AudioChannelTalkerHeightAutoFocusConstraints'\r\n\t\t],\r\n\t\tINullableIntRangeConstraints: ['AudioChannelMicrophoneAngleAutoFocusConstraints', 'EqualizerToneConstraints'],\r\n\t\tIStringPatternRangeConstraints: [\r\n\t\t\t'AudioChannelDanteRouteReceiverDanteChannelNameConstraints',\r\n\t\t\t'AudioChannelDanteRouteTransmitterDanteChannelNameConstraints',\r\n\t\t\t'AudioChannelNameFieldConstraints',\r\n\t\t\t'DeviceDanteAudioNetworkNameConstraints',\r\n\t\t\t'DeviceNameFieldConstraints',\r\n\t\t\t'DeviceSecurity8021XAnonymousIdConstraints',\r\n\t\t\t'DeviceSecurity8021XPasswordConstraints',\r\n\t\t\t'DeviceSecurity8021XUserNameConstraints',\r\n\t\t\t'UserPresetCoreNameConstraints'\r\n\t\t],\r\n\t\tIUtf8StringMaxBytesConstraints: ['ConnectedDeviceLabelFieldConstraints', 'DeviceNameFieldConstraints'],\r\n\t\tMeterChange: ['AudioChannelMeterChange', 'AudioCoverageAreaMeterChange', 'RfChannelMeterChange'],\r\n\t\tNode: [\r\n\t\t\t'AudioChannel',\r\n\t\t\t'AudioCoverageArea',\r\n\t\t\t'ChargerBay',\r\n\t\t\t'CrossPoint',\r\n\t\t\t'Device',\r\n\t\t\t'EqualizerFilter',\r\n\t\t\t'FirmwareUpdateProgress',\r\n\t\t\t'FirmwareUpdateRequestProgress',\r\n\t\t\t'RfChannel',\r\n\t\t\t'Room',\r\n\t\t\t'RoomManifestDevice',\r\n\t\t\t'StereoAudioChannel',\r\n\t\t\t'UserPreset'\r\n\t\t],\r\n\t\tNodeChange: [\r\n\t\t\t'AudioChannel',\r\n\t\t\t'AudioChannelChange',\r\n\t\t\t'AudioCoverageArea',\r\n\t\t\t'AudioCoverageAreaChange',\r\n\t\t\t'ChargerBay',\r\n\t\t\t'ChargerBayChange',\r\n\t\t\t'CrossPoint',\r\n\t\t\t'CrossPointChange',\r\n\t\t\t'Device',\r\n\t\t\t'DeviceChange',\r\n\t\t\t'DeviceStatusChange',\r\n\t\t\t'EqualizerFilter',\r\n\t\t\t'EqualizerFilterChange',\r\n\t\t\t'FirmwareUpdateProgress',\r\n\t\t\t'FirmwareUpdateRequestProgress',\r\n\t\t\t'RfChannel',\r\n\t\t\t'RfChannelChange',\r\n\t\t\t'Room',\r\n\t\t\t'UserPreset',\r\n\t\t\t'UserPresetChange'\r\n\t\t],\r\n\t\tNodeOperationResult: [\r\n\t\t\t'AudioChannelOperationResult',\r\n\t\t\t'AudioCoverageAreaOperationResult',\r\n\t\t\t'ChargerBayOperationResult',\r\n\t\t\t'ClearAssociationResult',\r\n\t\t\t'CreateRouteOperationResult',\r\n\t\t\t'CrossPointOperationResult',\r\n\t\t\t'DeleteRouteOperationResult',\r\n\t\t\t'DeviceOperationResult',\r\n\t\t\t'EqualizerFilterOperationResult',\r\n\t\t\t'MacAndSerialClaimOperationResult',\r\n\t\t\t'PendingDeviceClaimRemovalResult',\r\n\t\t\t'RfChannelOperationResult',\r\n\t\t\t'RoomOperationResult',\r\n\t\t\t'UserPresetOperationResult'\r\n\t\t],\r\n\t\tOptimizeRoomProgress: ['OptimizeRoomProgressEvent', 'OptimizeRoomResult'],\r\n\t\tQFactorConstraint: ['EqualizerFilterValidQFactors', 'FloatRange'],\r\n\t\tResetDeviceResult: ['DeviceOperationResult', 'OperationResult'],\r\n\t\tRfChannelFeatureChange: [\r\n\t\t\t'RfChannelAssociationChange',\r\n\t\t\t'RfChannelLinkedTransmitterChange',\r\n\t\t\t'RfChannelPrimaryGroupChanNameChange'\r\n\t\t],\r\n\t\tRoomDeploymentProgress: ['RoomDeploymentProgressEvent', 'RoomDeploymentResult'],\r\n\t\tUserPresetFeatureChange: ['UserPresetCoreChange']\r\n\t}\r\n};\r\nexport default result;\r\n\r\n/** All built-in and custom scalars, mapped to their actual values */\r\nexport type Scalars = {\r\n\tID: { input: string; output: string };\r\n\tString: { input: string; output: string };\r\n\tBoolean: { input: boolean; output: boolean };\r\n\tInt: { input: number; output: number };\r\n\tFloat: { input: number; output: number };\r\n\t/** A DateTime in ISO-8601 format. (https://wikipedia.org/wiki/ISO_8601) */\r\n\tDateTime: { input: string; output: string };\r\n\t/**\r\n\t * Corresponds to a period of time, as specified by https://en.wikipedia.org/wiki/ISO_8601#Durations\r\n\t * E.g. PT1S is one second. PT0.1S is 100 milliseconds.\r\n\t */\r\n\tDuration: { input: string; output: string };\r\n\t/**\r\n\t * Guid stands for Globally Unique Identifier. Also referred to as UUIDs or Universaly Unique Identifiers.\r\n\t * - Technically they are 128-bit unique reference numbers which are highly unlikely to repeat.\r\n\t * - A Guid follows a specific structure defined in RFC `4122` and come in a few different\r\n\t * versions and variants. All variants follow the same structure xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx\r\n\t * where M represents the version and the most significant bits of N represent the variant.\r\n\t */\r\n\tGuid: { input: string; output: string };\r\n\t/**\r\n\t * The `IpAddress` scalar represents a dotted quad string notation of\r\n\t * an IPv4 address.\r\n\t */\r\n\tIpAddress: { input: string; output: string };\r\n\tRegex: { input: string; output: string };\r\n\tSemanticVersion: { input: string; output: string };\r\n\tUpload: { input: string; output: string };\r\n};\r\n\r\nexport type ActivateLicenseInput = {\r\n\tactivationKey: Scalars['String']['input'];\r\n\tcount: Scalars['Int']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum AnalogAudioOutputMode {\r\n\t/**\r\n\t * For use with low impedance speakers (a.k.a Low Z), such as 8-ohm or 16-ohm speakers.\r\n\t * Speakers will be wired individually to each audio channel.\r\n\t */\r\n\tLowImpedance = 'LOW_IMPEDANCE',\r\n\t/**\r\n\t * For use with 70V speakers with step-up / step-down transformers inside.\r\n\t * Speakers are wired in a daisy-chained way to a single audio channel.\r\n\t */\r\n\tSeventyVolt = 'SEVENTY_VOLT'\r\n}\r\n\r\nexport enum AnalogLevel {\r\n\tAux = 'AUX',\r\n\tLine = 'LINE',\r\n\tMic = 'MIC'\r\n}\r\n\r\nexport enum AnalogLogicPresetSwitch {\r\n\t/** Mode A: relay open = mode A (preset 1), relay closed = mode B (preset 2), this is the default selection when there is no signal, the device is in mode A (preset 1), when there is signal, the device switches to mode B (preset 2) */\r\n\tModeA = 'MODE_A',\r\n\t/** Mode B: relay closed = mode A (preset 1), relay open = mode B (preset 2) when there is no signal, the device is in mode B (preset 2), when there is signal, the device switches to mode A (preset 1) */\r\n\tModeB = 'MODE_B'\r\n}\r\n\r\nexport enum AssociationStatus {\r\n\t/** Access point is not discoverable */\r\n\tAccessPointDeviceNotFound = 'ACCESS_POINT_DEVICE_NOT_FOUND',\r\n\t/** Charger device is not discoverable */\r\n\tChargerDeviceNotFound = 'CHARGER_DEVICE_NOT_FOUND',\r\n\t/** Failure occured on pre-processing a Charger Bay. This include failure in clearing existing association duing re-association */\r\n\tFailurePreProcessingChargerBay = 'FAILURE_PRE_PROCESSING_CHARGER_BAY',\r\n\t/** Failure occured on pre-processing a RF Channel. This include failure in clearing existing association duing re-association */\r\n\tFailurePreProcessingRfChannel = 'FAILURE_PRE_PROCESSING_RF_CHANNEL',\r\n\t/** Failure occured when processing association request on Charger Bay. This includes failed opeartions on Charger Bay */\r\n\tFailureProcessingChargerBay = 'FAILURE_PROCESSING_CHARGER_BAY',\r\n\t/** Failure occured when processing association request on RF Channel. This includes failed opeartions on RF Channel */\r\n\tFailureProcessingRfChannel = 'FAILURE_PROCESSING_RF_CHANNEL',\r\n\t/** Input node id(s) provided in association request is not valid */\r\n\tInvalidInput = 'INVALID_INPUT',\r\n\t/** Provided input devices either does not support association feature or not a valid input for this operation */\r\n\tInvalidOperation = 'INVALID_OPERATION',\r\n\t/** Successfully associated RF channel and Charger bay */\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport enum AudioActivityLevel {\r\n\tClipping = 'CLIPPING',\r\n\tGood = 'GOOD',\r\n\tLow = 'LOW'\r\n}\r\n\r\nexport type AudioChannelAcousticEchoCancellationInput = {\r\n\tenabled?: InputMaybe;\r\n\tnonLinearProcessingLevel?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationMonoReferenceInput = {\r\n\t/** Audio channel which can configure the 'acousticEchoCancellationMonoReference' feature */\r\n\tid: Scalars['ID']['input'];\r\n\t/** Audio channel to be selected as acoustic echo cancellation mono reference source */\r\n\tsource: Scalars['ID']['input'];\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationStereoReferenceInput = {\r\n\t/** Audio channel which can congfigure the 'acousticEchoCancellationStereoReference' feature */\r\n\tid: Scalars['ID']['input'];\r\n\t/** Audio channel to be selected as acoustic echo cancellation stereo reference source */\r\n\tsource: Scalars['ID']['input'];\r\n\t/** Audio channel spatial separation information which can configure the 'acousticEchoCancellationStereoReference' feature */\r\n\tstereoAudioChannelSpatialSeparation: StereoAudioChannelSpatialSeparation | `${StereoAudioChannelSpatialSeparation}`;\r\n};\r\n\r\nexport type AudioChannelAnalogLevelInput = {\r\n\tlevel: AnalogLevel | `${AnalogLevel}`;\r\n};\r\n\r\nexport type AudioChannelAutoLevelUpdateInput = {\r\n\tconfiguration?: InputMaybe;\r\n\tmode?: InputMaybe;\r\n\tposition?: InputMaybe;\r\n\ttone?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelAutoMuteUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelAutomaticGainControlUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tmaxBoost?: InputMaybe;\r\n\tmaxCut?: InputMaybe;\r\n\ttargetLevel?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelAutomixerInputUpdateInput = {\r\n\talwaysOn?: InputMaybe;\r\n\tpriority?: InputMaybe;\r\n\tsendToMix?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelAutomixerUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tgatingSensitivity?: InputMaybe;\r\n\tholdTime?: InputMaybe;\r\n\tleaveLastChannelOn?: InputMaybe;\r\n\tmaximumOpenChannels?: InputMaybe;\r\n\tmode?: InputMaybe;\r\n\toffAttenuation?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelAutomixerVoiceActivityDetectionUpdateInput = {\r\n\tnoiseDetectionSensitivity?: InputMaybe;\r\n\tnoiseRemovalLevel?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelCompressorUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tlevel?: InputMaybe;\r\n\tratio?: InputMaybe;\r\n\tthreshold?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelCountInput = {\r\n\tcount: Scalars['Int']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type AudioChannelDanteRouteReceiverUpdateInput = {\r\n\tdanteChannelName: Scalars['String']['input'];\r\n};\r\n\r\nexport type AudioChannelDanteRouteTransmitterUpdateInput = {\r\n\tdanteChannelName: Scalars['String']['input'];\r\n};\r\n\r\nexport type AudioChannelDelayUpdateInput = {\r\n\tdelay?: InputMaybe;\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelDenoiserUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tlevel?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelDeverbUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tintensity?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelDeviceSpecificEqualizerContourUpdateInput = {\r\n\tdeviceSpecificEqualizerContour: DeviceSpecificEqualizerContour | `${DeviceSpecificEqualizerContour}`;\r\n};\r\n\r\nexport type AudioChannelDirectOutputTapPointUpdateInput = {\r\n\ttapPoint: DirectOutputTapPoint | `${DirectOutputTapPoint}`;\r\n};\r\n\r\nexport type AudioChannelEqualizerContourUpdateInput = {\r\n\tequalizerContour: EqualizerContour | `${EqualizerContour}`;\r\n};\r\n\r\nexport type AudioChannelEqualizerPresetUpdateInput = {\r\n\tequalizerPreset: EqualizerPreset | `${EqualizerPreset}`;\r\n};\r\n\r\nexport type AudioChannelEqualizerUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\ttone?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelFaderGroupUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelFeatureUpdateInput = {\r\n\tacousticEchoCancellation?: InputMaybe;\r\n\tanalogLevel?: InputMaybe;\r\n\tautoLevel?: InputMaybe;\r\n\tautoMute?: InputMaybe;\r\n\tautomaticGainControl?: InputMaybe;\r\n\tautomixer?: InputMaybe;\r\n\tautomixerInput?: InputMaybe;\r\n\tautomixerVoiceActivityDetection?: InputMaybe;\r\n\tcompressor?: InputMaybe;\r\n\tdanteRouteReceiver?: InputMaybe;\r\n\tdanteRouteTransmitter?: InputMaybe;\r\n\tdelay?: InputMaybe;\r\n\tdenoiser?: InputMaybe;\r\n\tdeverb?: InputMaybe;\r\n\tdeviceSpecificEqualizerContour?: InputMaybe;\r\n\tdirectOutputTapPoint?: InputMaybe;\r\n\tequalizer?: InputMaybe;\r\n\tequalizerContour?: InputMaybe;\r\n\tequalizerPreset?: InputMaybe;\r\n\tfaderGroup?: InputMaybe;\r\n\tgain?: InputMaybe;\r\n\tgainLock?: InputMaybe;\r\n\tinputSource?: InputMaybe;\r\n\tlimiter?: InputMaybe;\r\n\tlobeConfiguration?: InputMaybe;\r\n\tlobePosition?: InputMaybe;\r\n\tlobeTalkerHeight?: InputMaybe;\r\n\tlobeWidth?: InputMaybe;\r\n\tmicOptimization?: InputMaybe;\r\n\tmicPolarPattern?: InputMaybe;\r\n\tmicrophoneAngle?: InputMaybe;\r\n\tmonitorMix?: InputMaybe;\r\n\tmonitorMixReverb?: InputMaybe;\r\n\tmute?: InputMaybe;\r\n\tmuteGroup?: InputMaybe;\r\n\tmuteLock?: InputMaybe;\r\n\tname?: InputMaybe;\r\n\tnoiseReduction?: InputMaybe;\r\n\toutputPath?: InputMaybe;\r\n\tpcPeripheral?: InputMaybe;\r\n\tphantomPower?: InputMaybe;\r\n\tplosiveReduction?: InputMaybe;\r\n\tpostGateGain?: InputMaybe;\r\n\tpostGateMute?: InputMaybe;\r\n\tpostGateSolo?: InputMaybe;\r\n\treverb?: InputMaybe;\r\n\tsignalGenerator?: InputMaybe;\r\n\tsolo?: InputMaybe;\r\n\tstereoReverse?: InputMaybe;\r\n\tstereoWidth?: InputMaybe;\r\n\ttalkerHeight?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelFixedLobeTalkerHeightUpdateInput = {\r\n\tfixed: AudioChannelLobeTalkerHeightUpdateInput;\r\n};\r\n\r\nexport type AudioChannelFixedMicrophoneAngleUpdateInput = {\r\n\tfixed: AudioChannelMicrophoneAngleUpdateInput;\r\n};\r\n\r\nexport type AudioChannelGainLockUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelGainUpdateInput = {\r\n\tgain: Scalars['Float']['input'];\r\n};\r\n\r\nexport enum AudioChannelGroup {\r\n\tAecReference = 'AEC_REFERENCE',\r\n\tAnalog_70VOutput = 'ANALOG_70V_OUTPUT',\r\n\tAnalogAuxInput = 'ANALOG_AUX_INPUT',\r\n\tAnalogOutput = 'ANALOG_OUTPUT',\r\n\tAutomix = 'AUTOMIX',\r\n\tAuxInput = 'AUX_INPUT',\r\n\tAuxOutput = 'AUX_OUTPUT',\r\n\tBack = 'BACK',\r\n\tBluetoothInput = 'BLUETOOTH_INPUT',\r\n\tBluetoothOutput = 'BLUETOOTH_OUTPUT',\r\n\tDanteAnalogInput = 'DANTE_ANALOG_INPUT',\r\n\tDanteAuxInput = 'DANTE_AUX_INPUT',\r\n\tDanteInput = 'DANTE_INPUT',\r\n\tDanteLineInput = 'DANTE_LINE_INPUT',\r\n\tDanteLineOutput = 'DANTE_LINE_OUTPUT',\r\n\tDanteMicInput = 'DANTE_MIC_INPUT',\r\n\tDanteOutput = 'DANTE_OUTPUT',\r\n\tDirectOutput = 'DIRECT_OUTPUT',\r\n\tGeneric = 'GENERIC',\r\n\tHeadphone = 'HEADPHONE',\r\n\tLobe = 'LOBE',\r\n\tLoudspeaker = 'LOUDSPEAKER',\r\n\tMic = 'MIC',\r\n\tMixOutput = 'MIX_OUTPUT',\r\n\tMobileInput = 'MOBILE_INPUT',\r\n\tMobileOutput = 'MOBILE_OUTPUT',\r\n\tPcInput = 'PC_INPUT',\r\n\tPcOutput = 'PC_OUTPUT',\r\n\tSignalGeneratorInput = 'SIGNAL_GENERATOR_INPUT',\r\n\tSum = 'SUM',\r\n\tUsbInput = 'USB_INPUT',\r\n\tUsbOutput = 'USB_OUTPUT',\r\n\tVirtualAudioInput = 'VIRTUAL_AUDIO_INPUT',\r\n\tVirtualAudioOutput = 'VIRTUAL_AUDIO_OUTPUT'\r\n}\r\n\r\nexport enum AudioChannelInputSourceType {\r\n\tAnalog = 'ANALOG',\r\n\tDigital = 'DIGITAL'\r\n}\r\n\r\nexport type AudioChannelInputSourceUpdateInput = {\r\n\tsource?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelLimiterUpdateInput = {\r\n\tbypassed?: InputMaybe;\r\n\tenabled?: InputMaybe;\r\n\tthreshold?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelLobeConfigurationUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelLobePositionUpdateInput = {\r\n\tfixed?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelLobeTalkerHeightUpdateInput = {\r\n\theight?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelLobeWidthUpdateInput = {\r\n\twidth?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelMicOptimizationUpdateInput = {\r\n\tmode: MicOptimizationMode | `${MicOptimizationMode}`;\r\n};\r\n\r\nexport type AudioChannelMicPolarPatternUpdateInput = {\r\n\tpattern: MicPolarPattern | `${MicPolarPattern}`;\r\n};\r\n\r\nexport type AudioChannelMicrophoneAngleUpdateInput = {\r\n\tangle?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelMonitorMixReverbUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelMonitorMixUpdateInput = {\r\n\tpercentage: Scalars['Int']['input'];\r\n};\r\n\r\nexport type AudioChannelMuteGroupUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelMuteLockUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelMuteUpdateInput = {\r\n\tmuted: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelNameUpdateInput = {\r\n\tname: Scalars['String']['input'];\r\n};\r\n\r\nexport type AudioChannelNoiseReductionUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tlevel?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelOutputPathUpdateInput = {\r\n\tpath: OutputSignalPath | `${OutputSignalPath}`;\r\n};\r\n\r\nexport type AudioChannelPcPeripheralIdUpdateInput = {\r\n\tid: Scalars['String']['input'];\r\n};\r\n\r\nexport type AudioChannelPcPeripheralUpdateInput = {\r\n\tselectedPeripheral: AudioChannelPcPeripheralIdUpdateInput;\r\n};\r\n\r\nexport type AudioChannelPhantomPowerUpdateInput = {\r\n\tvolts: Scalars['Int']['input'];\r\n};\r\n\r\nexport type AudioChannelPlosiveReductionUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelPostGateGainUpdateInput = {\r\n\tgain: Scalars['Float']['input'];\r\n};\r\n\r\nexport type AudioChannelPostGateMuteUpdateInput = {\r\n\tmuted: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelPostGateSoloUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelReverbUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tintensity?: InputMaybe;\r\n\ttype?: InputMaybe;\r\n};\r\n\r\nexport enum AudioChannelRole {\r\n\tFilter = 'FILTER',\r\n\tSink = 'SINK',\r\n\tSource = 'SOURCE'\r\n}\r\n\r\nexport type AudioChannelSignalGeneratorUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tfrequency?: InputMaybe;\r\n\tgain?: InputMaybe;\r\n\tsignalType?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelSoloUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelStereoReverseUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelStereoWidthUpdateInput = {\r\n\tangle: Scalars['Int']['input'];\r\n};\r\n\r\nexport type AudioChannelTalkerHeightUpdateInput = {\r\n\theight: Scalars['Float']['input'];\r\n};\r\n\r\nexport type AudioChannelUpdateInput = {\r\n\tfeatures?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type AudioCoverageAreaFeatureUpdateInput = {\r\n\tgain?: InputMaybe;\r\n\tmute?: InputMaybe;\r\n};\r\n\r\nexport type AudioCoverageAreaGainUpdateInput = {\r\n\tgain: Scalars['Float']['input'];\r\n};\r\n\r\nexport type AudioCoverageAreaMuteUpdateInput = {\r\n\tmuted: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport enum AudioCoverageAreaType {\r\n\tDedicated = 'DEDICATED',\r\n\tDynamic = 'DYNAMIC'\r\n}\r\n\r\nexport type AudioCoverageAreaUpdateInput = {\r\n\tfeatures?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type AudioEncryptionSettingsInput = {\r\n\tid: Scalars['ID']['input'];\r\n\tpassphrase: Scalars['String']['input'];\r\n};\r\n\r\nexport enum AudioMetersLightingMode {\r\n\tBreathing = 'BREATHING',\r\n\tLive = 'LIVE',\r\n\tSolid = 'SOLID'\r\n}\r\n\r\nexport type AudioNetworkNameSyncInput = {\r\n\tid: Scalars['ID']['input'];\r\n\t/**\r\n\t * By default, prior to setting Audio Network Channel Names, Shure (generic) channel names will be checked for conflicts.\r\n\t * This validation can be skipped (if, perhaps, it has already been performed prior to invoking\r\n\t * synchronization).\r\n\t */\r\n\tvalidateChannelNameConflicts?: InputMaybe;\r\n\t/**\r\n\t * By default, prior to setting Audio Network Device Name, discovered devices will be checked for conflicts.\r\n\t * This validation can be skipped (if, perhaps, it has already been performed prior to invoking synchronization).\r\n\t */\r\n\tvalidateDeviceNameConflicts?: InputMaybe;\r\n};\r\n\r\nexport enum AutoLevelConfiguration {\r\n\tLoud = 'LOUD',\r\n\tNormal = 'NORMAL',\r\n\tQuiet = 'QUIET'\r\n}\r\n\r\nexport enum AutoLevelMode {\r\n\tAuto = 'AUTO',\r\n\tManual = 'MANUAL'\r\n}\r\n\r\nexport enum AutoLevelPosition {\r\n\tFar = 'FAR',\r\n\tNear = 'NEAR'\r\n}\r\n\r\nexport enum AutoLevelTone {\r\n\tBright = 'BRIGHT',\r\n\tDark = 'DARK',\r\n\tNatural = 'NATURAL'\r\n}\r\n\r\nexport enum AutoPositionStatus {\r\n\tFailed = 'FAILED',\r\n\tInactive = 'INACTIVE',\r\n\tProcessing = 'PROCESSING',\r\n\tRecording = 'RECORDING'\r\n}\r\n\r\nexport enum AutomixMode {\r\n\t/**\r\n\t * Emulates the Shure SCM820 automixer default settings. It is renowned for fast-acting, seamless channel gating and consistent perceived ambient sound levels.\r\n\t * Off-attenuation in this mode is fixed at -12dB per channel, regardless of the number of open channels.\r\n\t */\r\n\tClassic = 'CLASSIC',\r\n\t/** Provides manual control over all automixing parameters. This mode is useful when adjustments must be made to one of the preset modes to fit a particular application. */\r\n\tCustom = 'CUSTOM',\r\n\t/**\r\n\t * Dynamically balances system gain between open and closed audio channels.\r\n\t * The system gain remains consistent by distributing gain across audio channels to equal one open audio channel.\r\n\t * The scaled gain structure helps to reduce noise when there is a high audio channel count.\r\n\t * When fewer audio channels are used, the off attenuation setting is lower and provides transparent gating.\r\n\t */\r\n\tGainSharing = 'GAIN_SHARING',\r\n\t/**\r\n\t * Delivers fast-acting, seamless audio channel gating and consistent perceived ambient sound levels.\r\n\t * Off attenuation is fixed at -20 dB, regardless of the number of open audio channels.\r\n\t */\r\n\tGating = 'GATING',\r\n\t/**\r\n\t * Sums all active audio channels and sends the summed signal over a single Dante output.\r\n\t * The gain of all audio channels apply to the summed output.\r\n\t */\r\n\tManual = 'MANUAL',\r\n\t/**\r\n\t * Off-attenuation settings for each channel are scaled, depending on the number of open channels.\r\n\t * The scaled gain structure helps to reduce noise when there is a high channel count.\r\n\t * When fewer channels are used, the lower off-attenuation provides transparent gating.\r\n\t */\r\n\tSmooth = 'SMOOTH'\r\n}\r\n\r\nexport type AutomixSourceSelectorInput = {\r\n\t/** Node Id of the channel where automixing is performed on a source channel */\r\n\tautomix: Scalars['ID']['input'];\r\n\t/** Node Id of the source channel to be used as selector for automixing. Optional/Null represents a behavior to deselect a source channel if selected */\r\n\tsource?: InputMaybe;\r\n};\r\n\r\nexport enum AutomixerInputDisengagedBehavior {\r\n\tFollowMuteColor = 'FOLLOW_MUTE_COLOR',\r\n\tOff = 'OFF'\r\n}\r\n\r\n/** The state machine describing the lifecycle of a battery-powered device. */\r\nexport enum BatteryState {\r\n\tCalculating = 'CALCULATING',\r\n\tCharging = 'CHARGING',\r\n\tDischarging = 'DISCHARGING',\r\n\tEmpty = 'EMPTY',\r\n\tFull = 'FULL',\r\n\tOptimalStorage = 'OPTIMAL_STORAGE'\r\n}\r\n\r\nexport type BetaDeviceIdentitity = {\r\n\tcategory: Scalars['String']['input'];\r\n\tversions: Array;\r\n};\r\n\r\nexport type CancelPendingActivationLicenseInput = {\r\n\tactivationKey: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type CertificateInput = {\r\n\tanonymousId?: InputMaybe;\r\n\tclientCertificate?: InputMaybe;\r\n\tpassphrase: Scalars['String']['input'];\r\n\trootCertificate: Scalars['String']['input'];\r\n\tusername: Scalars['String']['input'];\r\n};\r\n\r\nexport enum ChargingMode {\r\n\tCalculating = 'CALCULATING',\r\n\tFull = 'FULL',\r\n\tNormal = 'NORMAL',\r\n\tWarm = 'WARM',\r\n\tWarmandfull = 'WARMANDFULL'\r\n}\r\n\r\nexport type CloneRoomInput = {\r\n\tcloningStrategy?: InputMaybe;\r\n\tdescription?: InputMaybe;\r\n\tname?: InputMaybe;\r\n\tsourceRoom: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum CloneRoomStatus {\r\n\tAudioRouteCloningFailed = 'AUDIO_ROUTE_CLONING_FAILED',\r\n\tCanceled = 'CANCELED',\r\n\tControlRouteCloningFailed = 'CONTROL_ROUTE_CLONING_FAILED',\r\n\tDeviceCloningFailed = 'DEVICE_CLONING_FAILED',\r\n\tInternalPrecondFailed = 'INTERNAL_PRECOND_FAILED',\r\n\tOriginRoomCompletePrecondFailed = 'ORIGIN_ROOM_COMPLETE_PRECOND_FAILED',\r\n\tOriginRoomConflictPrecondFailed = 'ORIGIN_ROOM_CONFLICT_PRECOND_FAILED',\r\n\tOriginRoomExistsprecondFailed = 'ORIGIN_ROOM_EXISTSPRECOND_FAILED',\r\n\tOriginRoomUnavailablePrecondFailed = 'ORIGIN_ROOM_UNAVAILABLE_PRECOND_FAILED',\r\n\tOrigRoomNonEmptyPrecondFailed = 'ORIG_ROOM_NON_EMPTY_PRECOND_FAILED',\r\n\tRoomCloningTimeout = 'ROOM_CLONING_TIMEOUT',\r\n\tRoomCreationFailed = 'ROOM_CREATION_FAILED',\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport enum ColorTheme {\r\n\tCustom = 'CUSTOM',\r\n\tDefault = 'DEFAULT',\r\n\tFruity = 'FRUITY',\r\n\tSeaside = 'SEASIDE',\r\n\tShure = 'SHURE',\r\n\tSpace = 'SPACE'\r\n}\r\n\r\n/**\r\n * Describes the state of compatibility between this software, and the discovered device.\r\n * Different states may indicate a need to upgrade either the device firmware, or this software,\r\n * in order to use the latest available features.\r\n */\r\nexport enum CompatibilityLevel {\r\n\t/** The device firmware is the latest version tested with this software version. */\r\n\tCompatibleLatest = 'COMPATIBLE_LATEST',\r\n\t/**\r\n\t * The device firmware is ahead of the latest version this software was tested with, but can be completely interacted with.\r\n\t * There may be newer versions of this software which may interact with new features of this device.\r\n\t */\r\n\tCompatibleNew = 'COMPATIBLE_NEW',\r\n\t/**\r\n\t * The device firmware is behind the latest available, but can be completely interacted with.\r\n\t * There are likely newer versions of firmware available for this device which may have additional features which could be interacted with.\r\n\t * Updating the device's firmware is recommended.\r\n\t */\r\n\tCompatibleOld = 'COMPATIBLE_OLD',\r\n\t/**\r\n\t * The device firmware is not supported, and therefore no capability interaction is supported.\r\n\t * Update this software to interact with the device.\r\n\t */\r\n\tIncompatibleTooNew = 'INCOMPATIBLE_TOO_NEW',\r\n\t/**\r\n\t * The device firmware is not supported, and therefore no capability interaction is supported.\r\n\t * Update the device's firmware to interact with the device.\r\n\t */\r\n\tIncompatibleTooOld = 'INCOMPATIBLE_TOO_OLD'\r\n}\r\n\r\nexport enum CompressorLevel {\r\n\tHeavy = 'HEAVY',\r\n\tLight = 'LIGHT',\r\n\tMedium = 'MEDIUM',\r\n\tOff = 'OFF'\r\n}\r\n\r\nexport type ConfigInput8021X = {\r\n\teapMd5?: InputMaybe;\r\n\tpeapGtc?: InputMaybe;\r\n\tpeapMschapv2?: InputMaybe;\r\n\tpwd?: InputMaybe;\r\n\ttls?: InputMaybe;\r\n\tttlsGtc?: InputMaybe;\r\n\tttlsMd5?: InputMaybe;\r\n\tttlsMschapv2?: InputMaybe;\r\n\tttlsPap?: InputMaybe;\r\n};\r\n\r\nexport type ConnectedDeviceLabelUpdateInput = {\r\n\tlabel: Scalars['String']['input'];\r\n};\r\n\r\nexport enum CoverageMode {\r\n\tAutomatic = 'AUTOMATIC',\r\n\tManual = 'MANUAL'\r\n}\r\n\r\nexport type CreateCredentialsInput = {\r\n\taccessLevel: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n\tpassphrase: Scalars['String']['input'];\r\n};\r\n\r\nexport type CreateRoomInput = {\r\n\tcreated?: InputMaybe;\r\n\tdescription: Scalars['String']['input'];\r\n\tdevices: Array;\r\n\tdimensions?: InputMaybe;\r\n\tname: Scalars['String']['input'];\r\n};\r\n\r\nexport enum CredentialsState {\r\n\tInitializedNotSet = 'INITIALIZED_NOT_SET',\r\n\tSet = 'SET',\r\n\tUninitialized = 'UNINITIALIZED'\r\n}\r\n\r\nexport type CrossPointConfigurationUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type CrossPointFeatureUpdateInput = {\r\n\tconfiguration?: InputMaybe;\r\n\tgain?: InputMaybe;\r\n};\r\n\r\nexport type CrossPointGainUpdateInput = {\r\n\tgain?: InputMaybe;\r\n};\r\n\r\nexport type CrossPointUpdateInput = {\r\n\tfeatures?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum DanteAudioEncryptionStatus {\r\n\t/** Audio encryption is enabled between the routed devices, and the symmetric encryption/decryiption key matches between the routed devices. */\r\n\tActive = 'ACTIVE',\r\n\t/**\r\n\t * Audio encryption is inactive because of one or more of the following:\r\n\t * 1) It is not enabled on this device, and/or the routed device\r\n\t * 2) There is no route between this audio channel and another Shure device which supports Dante audio encryption.\r\n\t */\r\n\tInactive = 'INACTIVE',\r\n\t/**\r\n\t * Audio encryption is enabled on this audio channel, but the symmetric encryption/decryiption does not match between the devices. No audio shall pass.\r\n\t * This state will be represented on the audio receive channel, and not on the transmit audio channel (as the transmit audio channel can go to multiple receive channels, and the key may be a match for other receivers).\r\n\t */\r\n\tKeyMismatch = 'KEY_MISMATCH'\r\n}\r\n\r\nexport type DeactivateLicenseInput = {\r\n\tactivationKey: Scalars['String']['input'];\r\n\tcount: Scalars['Int']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum DenoiserLevel {\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM'\r\n}\r\n\r\nexport enum DeverbIntensity {\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM'\r\n}\r\n\r\nexport type DeviceAllEqualizersBypassUpdateInput = {\r\n\tbypassed: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAllIntellimixBypassUpdateInput = {\r\n\tbypassed: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAnalogAudioOutputModeUpdateInput = {\r\n\tmode: AnalogAudioOutputMode | `${AnalogAudioOutputMode}`;\r\n};\r\n\r\nexport type DeviceAnalogLogicPresetSwitchUpdateInput = {\r\n\tmode: AnalogLogicPresetSwitch | `${AnalogLogicPresetSwitch}`;\r\n};\r\n\r\nexport type DeviceAnalogLogicUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAssociationInput = {\r\n\tchargerBay: Scalars['ID']['input'];\r\n\trfChannel: Scalars['ID']['input'];\r\n};\r\n\r\nexport type DeviceAudioAutoFocusUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAudioMuteControlUpdateInput = {\r\n\tfunction?: InputMaybe;\r\n\tmode?: InputMaybe;\r\n};\r\n\r\nexport type DeviceAudioMuteDefaultUpdateInput = {\r\n\tmuted: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAudioMuteLockUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAudioMuteUpdateInput = {\r\n\tmuted: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAutomixGainMeteringUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceCallStatusUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceCommandStringsServiceUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n\tport?: InputMaybe;\r\n};\r\n\r\nexport type DeviceConfigurationLockUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceCoverageModeUpdateInput = {\r\n\tcoverageMode: CoverageMode | `${CoverageMode}`;\r\n};\r\n\r\nexport type DeviceCoveragePositionInput = {\r\n\txPosition: Scalars['Float']['input'];\r\n\tyPosition: Scalars['Float']['input'];\r\n};\r\n\r\nexport type DeviceDanteAudioNetworkUpdateInput = {\r\n\tname: Scalars['String']['input'];\r\n};\r\n\r\nexport type DeviceDeploymentInput = {\r\n\t/** Determines the name of the target device after deployment. If not set, the target device name will not change. */\r\n\tdeviceName?: InputMaybe;\r\n\tsourceDevice: Scalars['ID']['input'];\r\n\t/**\r\n\t * Syncs the Shure device and Channel names with the Dante device and channel names.\r\n\t * If not set, Dante names on the target device will remain the same.\r\n\t */\r\n\tsyncDanteNamesWithShureNames?: InputMaybe;\r\n\ttargetDevice?: InputMaybe;\r\n};\r\n\r\nexport enum DeviceDeploymentStage {\r\n\t/** Inter-device deployment(Eg: Routing) */\r\n\tAssociationDeployment = 'ASSOCIATION_DEPLOYMENT',\r\n\t/** Generic handling of a device(Eg: Name) */\r\n\tGenericDeployment = 'GENERIC_DEPLOYMENT',\r\n\t/** Specialized handling of a device */\r\n\tSpecificDeployment = 'SPECIFIC_DEPLOYMENT'\r\n}\r\n\r\nexport type DeviceDisassociationInput = {\r\n\tchargerBay: Scalars['ID']['input'];\r\n\trfChannel: Scalars['ID']['input'];\r\n};\r\n\r\nexport type DeviceEqualizerContourUpdateInput = {\r\n\tequalizerContour: EqualizerContour | `${EqualizerContour}`;\r\n};\r\n\r\nexport type DeviceEthernetLightsUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceFeatureUpdateInput = {\r\n\tallEqualizersBypass?: InputMaybe;\r\n\tallIntellimixBypass?: InputMaybe;\r\n\tanalogAudioOutputMode?: InputMaybe;\r\n\tanalogLogic?: InputMaybe;\r\n\tanalogLogicPresetSwitch?: InputMaybe;\r\n\taudioAutoFocus?: InputMaybe;\r\n\taudioMute?: InputMaybe;\r\n\taudioMuteControl?: InputMaybe;\r\n\taudioMuteDefault?: InputMaybe;\r\n\taudioMuteLock?: InputMaybe;\r\n\tautomixGainMetering?: InputMaybe;\r\n\tcallStatus?: InputMaybe;\r\n\tcommandStringsService?: InputMaybe;\r\n\tconfigurationLock?: InputMaybe;\r\n\tconnectedDeviceLabel?: InputMaybe;\r\n\tcoverageMode?: InputMaybe;\r\n\tcoveragePosition?: InputMaybe;\r\n\tdanteAudioNetwork?: InputMaybe;\r\n\tequalizerContour?: InputMaybe;\r\n\tethernetLights?: InputMaybe;\r\n\tfirmwareUpdatePolicy?: InputMaybe;\r\n\theight?: InputMaybe;\r\n\tlightingAudioMeters?: InputMaybe;\r\n\tlightingAudioMuteIndicatorOverride?: InputMaybe;\r\n\tlightingAutomixGating?: InputMaybe;\r\n\tlightingLiveAudioMeters?: InputMaybe;\r\n\tlightingMuteBehavior?: InputMaybe;\r\n\tlightingRing?: InputMaybe;\r\n\tlightingUnmuteBehavior?: InputMaybe;\r\n\tlistenerHeight?: InputMaybe;\r\n\tlogicMute?: InputMaybe;\r\n\tlogicReceiver?: InputMaybe;\r\n\tloudspeaker?: InputMaybe;\r\n\tmdnsService?: InputMaybe;\r\n\tmeteringModes?: InputMaybe;\r\n\tmicStatus?: InputMaybe;\r\n\tname?: InputMaybe;\r\n\tplacement?: InputMaybe;\r\n\trotation?: InputMaybe;\r\n\troutingPosition?: InputMaybe;\r\n\tstereoAudio?: InputMaybe;\r\n\tswitchConfiguration?: InputMaybe;\r\n\tusbMuteSync?: InputMaybe;\r\n\tusbTerminalType?: InputMaybe;\r\n\tvirtualAcousticBoundary?: InputMaybe;\r\n\twebService?: InputMaybe;\r\n};\r\n\r\nexport type DeviceFirmwareUpdatePolicyUpdateInput = {\r\n\tdowngradeAllowed: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceGlobalMicStatusUpdateInput = {\r\n\tid: Scalars['ID']['input'];\r\n\tstatus: GlobalMicStatusInput | `${GlobalMicStatusInput}`;\r\n};\r\n\r\nexport type DeviceHeightUpdateInput = {\r\n\theight: Scalars['Float']['input'];\r\n};\r\n\r\nexport type DeviceLightingAudioMetersUpdateInput = {\r\n\tbreathingMeterColor?: InputMaybe;\r\n\tliveMeterColor?: InputMaybe;\r\n\tmode?: InputMaybe;\r\n\tsolidMeterColor?: InputMaybe;\r\n};\r\n\r\nexport type DeviceLightingAudioMuteIndicatorOverrideUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceLightingAutomixGatingUpdateInput = {\r\n\tautomixerInputDisengagedBehavior?: InputMaybe<\r\n\t\tAutomixerInputDisengagedBehavior | `${AutomixerInputDisengagedBehavior}`\r\n\t>;\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type DeviceLightingBehaviorUpdateInput = {\r\n\tcolor?: InputMaybe;\r\n\tmode?: InputMaybe;\r\n};\r\n\r\nexport type DeviceLightingBrightnessUpdateInput = {\r\n\tid: Scalars['ID']['input'];\r\n\tlevel: Scalars['Int']['input'];\r\n};\r\n\r\nexport type DeviceLightingLiveAudioMetersUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceLightingRingUpdateInput = {\r\n\tstyle?: InputMaybe;\r\n};\r\n\r\nexport type DeviceLinkingInput = {\r\n\tchargerBay: Scalars['ID']['input'];\r\n\trfChannel: Scalars['ID']['input'];\r\n};\r\n\r\nexport type DeviceListenerHeightUpdateInput = {\r\n\theight: Scalars['Float']['input'];\r\n};\r\n\r\nexport type DeviceLogicMuteUpdateInput = {\r\n\tmuted: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceLogicReceiverUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceLoudspeakerUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type DeviceMdnsServiceUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceMeteringModesUpdateInput = {\r\n\tinputMode?: InputMaybe;\r\n\toutputMode?: InputMaybe;\r\n};\r\n\r\nexport type DeviceMicStatusUpdateInput = {\r\n\tstatus: MicStatusInput | `${MicStatusInput}`;\r\n};\r\n\r\nexport type DeviceNameUpdateInput = {\r\n\tname: Scalars['String']['input'];\r\n};\r\n\r\nexport enum DeviceOptimizationStatus {\r\n\tConflict = 'CONFLICT',\r\n\tDeviceUnavailable = 'DEVICE_UNAVAILABLE',\r\n\tFailure = 'FAILURE',\r\n\tPartialSuccess = 'PARTIAL_SUCCESS',\r\n\tSuccess = 'SUCCESS',\r\n\tUnsupported = 'UNSUPPORTED'\r\n}\r\n\r\nexport type DevicePlacementUpdateInput = {\r\n\tplacement: Placement | `${Placement}`;\r\n};\r\n\r\nexport type DevicePropertyFilter = {\r\n\tget?: InputMaybe;\r\n\tpropertyKeys?: InputMaybe>;\r\n\tpublic?: InputMaybe;\r\n};\r\n\r\nexport enum DeviceResetScope {\r\n\t/** use audio channel id as request id for resetDevice mutation */\r\n\tAutomixer = 'AUTOMIXER',\r\n\t/** use device id as request id for resetDevice mutation */\r\n\tCoverageAreas = 'COVERAGE_AREAS',\r\n\t/** use audio channel id as request id for resetDevice mutation */\r\n\tEqualizerFilters = 'EQUALIZER_FILTERS',\r\n\t/** use device id as request id for resetDevice mutation */\r\n\tFactory = 'FACTORY',\r\n\t/** use device id as request id for resetDevice mutation */\r\n\tNetworks = 'NETWORKS',\r\n\t/** use device id as request id for resetDevice mutation */\r\n\tUserPresetable = 'USER_PRESETABLE'\r\n}\r\n\r\nexport type DeviceRotationUpdateInput = {\r\n\txAxis?: InputMaybe;\r\n\tyAxis?: InputMaybe;\r\n\tzAxis?: InputMaybe;\r\n};\r\n\r\nexport type DeviceRoutingPositionInput = {\r\n\txPosition: Scalars['Float']['input'];\r\n\tyPosition: Scalars['Float']['input'];\r\n};\r\n\r\nexport enum DeviceSpecificEqualizerContour {\r\n\tMxa310 = 'MXA310',\r\n\tMxa710LowShelf = 'MXA710_LOW_SHELF',\r\n\tMxa901HighPass = 'MXA901_HIGH_PASS',\r\n\tMxa902HighPass = 'MXA902_HIGH_PASS',\r\n\tMxa910 = 'MXA910',\r\n\tMxa910HighPass = 'MXA910_HIGH_PASS',\r\n\tMxa910MultiBand = 'MXA910_MULTI_BAND',\r\n\tMxa920HighPass = 'MXA920_HIGH_PASS',\r\n\tOff = 'OFF'\r\n}\r\n\r\nexport enum DeviceStatus {\r\n\t/**\r\n\t * The device was discovered by a particular communication protocol,\r\n\t * but is yet not ready to be interacted with. This state is normally transient.\r\n\t *\r\n\t * Factory reset and reboot operations are allowed if applicable, but with no guarantees of success.\r\n\t */\r\n\tDiscovered = 'DISCOVERED',\r\n\t/**\r\n\t * The device was discovered, but is in an unusable state for further feature interaction.\r\n\t *\r\n\t * Factory reset and reboot operations are allowed if applicable, but with no guarantees of success.\r\n\t */\r\n\tError = 'ERROR',\r\n\t/**\r\n\t * A connection can no logner be established with the device.\r\n\t *\r\n\t * This state may be transient when performing an operation which reboots the device.\r\n\t * (e.g. factory reset, rebooting the ethernet switch a device is powered by, etc)\r\n\t */\r\n\tOffline = 'OFFLINE',\r\n\t/** The device and all of its features can be interacted with */\r\n\tOnline = 'ONLINE'\r\n}\r\n\r\nexport type DeviceStereoAudioUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceSwitchConfigurationUpdateInput = {\r\n\tmode: NetworkMode | `${NetworkMode}`;\r\n};\r\n\r\nexport type DeviceUpdateInput = {\r\n\tfeatures?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type DeviceUsbMuteSyncUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceUsbTerminalTypeUpdateInput = {\r\n\tterminalType: UsbTerminalType | `${UsbTerminalType}`;\r\n};\r\n\r\nexport type DeviceVirtualAcousticBoundaryUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tsensitivity?: InputMaybe;\r\n};\r\n\r\nexport type DeviceWebServiceUpdateInput = {\r\n\t/** When the Web Service is disabled, the device api services are also disabled */\r\n\tdeviceRestApi?: InputMaybe;\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport enum DirectOutputTapPoint {\r\n\t/** Sends a signal with automixer gating, AEC, and noise reduction, but without AGC, to the matrix mixer. */\r\n\tPostProcessingPostGate = 'POST_PROCESSING_POST_GATE',\r\n\t/** Sends a signal with AEC and noise reduction, but without automixer gating or AGC, to the matrix mixer. */\r\n\tPostProcessingPreGate = 'POST_PROCESSING_PRE_GATE',\r\n\t/** Sends a signal with automixer gating, but without AEC, noise reduction, or AGC, to the matrix mixer. */\r\n\tPreProcessingPostGate = 'PRE_PROCESSING_POST_GATE',\r\n\t/** Sends a signal without AEC, noise reduction, or AGC to the matrix mixer. */\r\n\tPreProcessingPreGate = 'PRE_PROCESSING_PRE_GATE'\r\n}\r\n\r\nexport enum DisassociationStatus {\r\n\t/** Access point is not discoverable */\r\n\tAccessPointDeviceNotFound = 'ACCESS_POINT_DEVICE_NOT_FOUND',\r\n\t/** Charger device is not discoverable */\r\n\tChargerDeviceNotFound = 'CHARGER_DEVICE_NOT_FOUND',\r\n\t/** Failed to disassociate RF Channel and Charger Bay */\r\n\tFailure = 'FAILURE',\r\n\t/** Input node id(s) provided in association request is not valid */\r\n\tInvalidInput = 'INVALID_INPUT',\r\n\t/** Provided input device(s) either does not support association feature or not a valid input for this operation */\r\n\tInvalidOperation = 'INVALID_OPERATION',\r\n\t/** Association is cleared successfully on Charger Bay */\r\n\tPartialSuccessChargerBay = 'PARTIAL_SUCCESS_CHARGER_BAY',\r\n\t/** Association is cleared successfully on RF Channel */\r\n\tPartialSuccessRfChannel = 'PARTIAL_SUCCESS_RF_CHANNEL',\r\n\t/** Successfully disassociated RF Channel and Charger Bay */\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport enum DoubleStuffProxiedTransmitterStatus {\r\n\tActive = 'ACTIVE',\r\n\tCharging = 'CHARGING',\r\n\tUnknown = 'UNKNOWN'\r\n}\r\n\r\nexport enum EapMethod8021X {\r\n\tDisabled = 'DISABLED',\r\n\tEapMd5 = 'EAP_MD5',\r\n\tPeapGtc = 'PEAP_GTC',\r\n\tPeapMschapv2 = 'PEAP_MSCHAPV2',\r\n\tPwd = 'PWD',\r\n\tTls = 'TLS',\r\n\tTtlsGtc = 'TTLS_GTC',\r\n\tTtlsMd5 = 'TTLS_MD5',\r\n\tTtlsMschapv2 = 'TTLS_MSCHAPV2',\r\n\tTtlsPap = 'TTLS_PAP'\r\n}\r\n\r\nexport enum EqFilterType {\r\n\t/** Rolls off the audio signal above the selected frequency */\r\n\tHighCut = 'HIGH_CUT',\r\n\t/** Attenuates or boosts the audio signal above the selected frequency */\r\n\tHighShelf = 'HIGH_SHELF',\r\n\t/** Rolls off the audio signal below the selected frequency */\r\n\tLowCut = 'LOW_CUT',\r\n\t/** Attenuates or boost the audio signal below the selected frequency */\r\n\tLowShelf = 'LOW_SHELF',\r\n\t/** Attenuates or boost the audio signal within a customizable frequency range */\r\n\tParametric = 'PARAMETRIC'\r\n}\r\n\r\nexport enum EqualizerContour {\r\n\tHighPass = 'HIGH_PASS',\r\n\tHighPassAndPresenceBoost = 'HIGH_PASS_AND_PRESENCE_BOOST',\r\n\tHpf_75Hz = 'HPF_75_HZ',\r\n\tHpf_150Hz = 'HPF_150_HZ',\r\n\tLowShelf = 'LOW_SHELF',\r\n\tMultiBand = 'MULTI_BAND',\r\n\tOff = 'OFF',\r\n\tPresenceBoost = 'PRESENCE_BOOST'\r\n}\r\n\r\nexport type EqualizerFilterBandwidthUpdateInput = {\r\n\tdenominator: Scalars['Int']['input'];\r\n\tnumerator: Scalars['Int']['input'];\r\n};\r\n\r\nexport type EqualizerFilterConfigurationUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tfilterType?: InputMaybe;\r\n};\r\n\r\nexport type EqualizerFilterFeatureUpdateInput = {\r\n\tbandwidth?: InputMaybe;\r\n\tconfiguration?: InputMaybe;\r\n\tfrequency?: InputMaybe;\r\n\tgain?: InputMaybe;\r\n\tqFactor?: InputMaybe;\r\n};\r\n\r\nexport type EqualizerFilterFrequencyUpdateInput = {\r\n\tfrequency?: InputMaybe;\r\n};\r\n\r\nexport type EqualizerFilterGainUpdateInput = {\r\n\tgain?: InputMaybe;\r\n};\r\n\r\nexport type EqualizerFilterQFactorUpdateInput = {\r\n\tqFactor?: InputMaybe;\r\n};\r\n\r\nexport type EqualizerFilterUpdateInput = {\r\n\tfeatures?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum EqualizerPreset {\r\n\tAcoustic = 'ACOUSTIC',\r\n\tBand = 'BAND',\r\n\tFlat = 'FLAT',\r\n\tSinging = 'SINGING',\r\n\tSpeech = 'SPEECH'\r\n}\r\n\r\nexport enum ErrorCode {\r\n\tConflict = 'CONFLICT',\r\n\tDeviceNotFound = 'DEVICE_NOT_FOUND',\r\n\tDeviceUnauthenticated = 'DEVICE_UNAUTHENTICATED',\r\n\tInvalidInput = 'INVALID_INPUT',\r\n\tInvalidOperation = 'INVALID_OPERATION',\r\n\tNotImplemented = 'NOT_IMPLEMENTED',\r\n\tTimeoutExceeded = 'TIMEOUT_EXCEEDED',\r\n\tUnknown = 'UNKNOWN'\r\n}\r\n\r\nexport enum EthernetPowerSourceType {\r\n\tPoe = 'POE',\r\n\tPoePlus = 'POE_PLUS',\r\n\tUnknown = 'UNKNOWN'\r\n}\r\n\r\nexport enum FirmwareUpdateRequestState {\r\n\t/** The firmware update request was canceled. */\r\n\tCanceled = 'CANCELED',\r\n\t/** The firmware update request failed. */\r\n\tFailed = 'FAILED',\r\n\t/** The firmware update request is in progress. */\r\n\tInProgress = 'IN_PROGRESS',\r\n\t/** The firmware update request was received, but has not started. */\r\n\tPending = 'PENDING',\r\n\t/** The firmware update request is complete. */\r\n\tSuccessful = 'SUCCESSFUL'\r\n}\r\n\r\nexport enum FirmwareUpdateStage {\r\n\t/** The firmware update was canceled. */\r\n\tCanceled = 'CANCELED',\r\n\t/** The firmware update is complete. */\r\n\tComplete = 'COMPLETE',\r\n\t/** The device is being reserved for a firmware update. */\r\n\tDeviceReserved = 'DEVICE_RESERVED',\r\n\t/** An error occurred during the firmware update. */\r\n\tError = 'ERROR',\r\n\t/** The device is available for a firmware update. */\r\n\tIdle = 'IDLE',\r\n\t/** The device is installing the firmware package. */\r\n\tInstalling = 'INSTALLING',\r\n\t/** The request to update the device was received, but has not started yet. */\r\n\tPending = 'PENDING',\r\n\t/** The firmware package is being validated by the device before installation. */\r\n\tPreInstallValidating = 'PRE_INSTALL_VALIDATING',\r\n\t/** The device is rebooting. */\r\n\tRebooting = 'REBOOTING',\r\n\t/** The firmware package is being transferred to the device. */\r\n\tTransferringFiles = 'TRANSFERRING_FILES',\r\n\t/** The device is verifying that the firmware package was installed correctly. */\r\n\tVerifying = 'VERIFYING'\r\n}\r\n\r\nexport enum FirmwareUpdateStatus {\r\n\t/** The device aborted the firmware update. */\r\n\tAborted = 'ABORTED',\r\n\t/** The firmware update was canceled. */\r\n\tCanceled = 'CANCELED',\r\n\t/** There was a connectivity issue. */\r\n\tConnectivityLoss = 'CONNECTIVITY_LOSS',\r\n\t/** The firmware package was corrupted locally or in transfer to the device. */\r\n\tCorruptPackage = 'CORRUPT_PACKAGE',\r\n\t/** The device is unavailable for a firmware update. */\r\n\tDeviceBusy = 'DEVICE_BUSY',\r\n\t/** The device cannot be found. */\r\n\tDeviceNotFound = 'DEVICE_NOT_FOUND',\r\n\tDeviceRejectedPackage = 'DEVICE_REJECTED_PACKAGE',\r\n\t/** An error occurred while transferring the firmware package to the device. */\r\n\tFileTransferError = 'FILE_TRANSFER_ERROR',\r\n\t/** An error occurred while the device was installing the firmware package. */\r\n\tInstallationError = 'INSTALLATION_ERROR',\r\n\t/** The device does not support the specified firmware package. */\r\n\tInvalidPackage = 'INVALID_PACKAGE',\r\n\t/** The firmware update is complete. */\r\n\tSuccess = 'SUCCESS',\r\n\t/** An unknown error occurred. */\r\n\tUnknownError = 'UNKNOWN_ERROR',\r\n\t/** An error occurred while the device was verifying the installation. */\r\n\tVerificationError = 'VERIFICATION_ERROR'\r\n}\r\n\r\nexport type FloatPositionUpdateInput = {\r\n\txPosition?: InputMaybe;\r\n\tyPosition?: InputMaybe;\r\n\tzPosition?: InputMaybe;\r\n};\r\n\r\nexport enum GlobalMicStatus {\r\n\tActive = 'ACTIVE',\r\n\tMute = 'MUTE',\r\n\tNonUniform = 'NON_UNIFORM',\r\n\tOff = 'OFF',\r\n\tStandby = 'STANDBY'\r\n}\r\n\r\nexport enum GlobalMicStatusInput {\r\n\tActive = 'ACTIVE',\r\n\tMute = 'MUTE',\r\n\tOff = 'OFF',\r\n\tStandby = 'STANDBY'\r\n}\r\n\r\nexport enum GroupAssociationStatus {\r\n\tAllAssociationsUnsuccessful = 'ALL_ASSOCIATIONS_UNSUCCESSFUL',\r\n\tConflict = 'CONFLICT',\r\n\tDevicesUnavailable = 'DEVICES_UNAVAILABLE',\r\n\tFailure = 'FAILURE',\r\n\tIncompatibleDevice = 'INCOMPATIBLE_DEVICE',\r\n\tNoApplicableRoutesForStereoAecProcessor = 'NO_APPLICABLE_ROUTES_FOR_STEREO_AEC_PROCESSOR',\r\n\tSuccess = 'SUCCESS',\r\n\tSuccessWithWarnings = 'SUCCESS_WITH_WARNINGS',\r\n\tTimeout = 'TIMEOUT'\r\n}\r\n\r\nexport enum GroupAssociationWarning {\r\n\tAllNetworkAudioAssociationsUnsuccessful = 'ALL_NETWORK_AUDIO_ASSOCIATIONS_UNSUCCESSFUL',\r\n\tNonImxMixOutputsUsedToFitDevices = 'NON_IMX_MIX_OUTPUTS_USED_TO_FIT_DEVICES',\r\n\tNoApplicableRoutesForStereoAecProcessor = 'NO_APPLICABLE_ROUTES_FOR_STEREO_AEC_PROCESSOR',\r\n\tSomeNetworkAudioAssociationsUnsuccessful = 'SOME_NETWORK_AUDIO_ASSOCIATIONS_UNSUCCESSFUL',\r\n\tTooManyMicrophones = 'TOO_MANY_MICROPHONES',\r\n\tTooManyMicrophonesForStereoAecProcessor = 'TOO_MANY_MICROPHONES_FOR_STEREO_AEC_PROCESSOR',\r\n\tTooManyProcessors = 'TOO_MANY_PROCESSORS'\r\n}\r\n\r\nexport enum GroupOptimizationStatus {\r\n\tConflict = 'CONFLICT',\r\n\tDevicesUnavailable = 'DEVICES_UNAVAILABLE',\r\n\tFailure = 'FAILURE',\r\n\tNoDevicesToOptimize = 'NO_DEVICES_TO_OPTIMIZE',\r\n\tPartialSuccess = 'PARTIAL_SUCCESS',\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport enum IpMode {\r\n\tDhcp = 'DHCP',\r\n\tStatic = 'STATIC'\r\n}\r\n\r\nexport type KeyringInput = {\r\n\tid: Scalars['ID']['input'];\r\n\tpassphrase: Scalars['String']['input'];\r\n};\r\n\r\nexport enum LastAuthenticationStatus8021X {\r\n\tFailure = 'FAILURE',\r\n\tNeverAttempted = 'NEVER_ATTEMPTED',\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport enum LicenseActivationState {\r\n\tActivated = 'ACTIVATED',\r\n\tCanceled = 'CANCELED',\r\n\tHostMismatchError = 'HOST_MISMATCH_ERROR',\r\n\tInsufficientFailure = 'INSUFFICIENT_FAILURE',\r\n\tInternalError = 'INTERNAL_ERROR',\r\n\tInvalidConfigurationFailure = 'INVALID_CONFIGURATION_FAILURE',\r\n\tKeyNotfoundFailure = 'KEY_NOTFOUND_FAILURE',\r\n\tNetworkFailure = 'NETWORK_FAILURE',\r\n\tParameterError = 'PARAMETER_ERROR',\r\n\tPending = 'PENDING',\r\n\tPendingInsufficient = 'PENDING_INSUFFICIENT',\r\n\tPendingNetwork = 'PENDING_NETWORK'\r\n}\r\n\r\nexport enum LicenseCancelationState {\r\n\tCanceled = 'CANCELED',\r\n\tFailed = 'FAILED',\r\n\tInternalError = 'INTERNAL_ERROR',\r\n\tParameterError = 'PARAMETER_ERROR',\r\n\tPending = 'PENDING'\r\n}\r\n\r\nexport enum LicenseDeactivationState {\r\n\tDeactivated = 'DEACTIVATED',\r\n\tInternalError = 'INTERNAL_ERROR',\r\n\tNetworkFailure = 'NETWORK_FAILURE',\r\n\tParameterError = 'PARAMETER_ERROR',\r\n\tPending = 'PENDING'\r\n}\r\n\r\nexport enum LicenseState {\r\n\tClockwindback = 'CLOCKWINDBACK',\r\n\tExpired = 'EXPIRED',\r\n\tFailedActivationKeyError = 'FAILED_ACTIVATION_KEY_ERROR',\r\n\tGrace = 'GRACE',\r\n\tInternalError = 'INTERNAL_ERROR',\r\n\tPendingActivationInsufficient = 'PENDING_ACTIVATION_INSUFFICIENT',\r\n\tPendingActivationNetwork = 'PENDING_ACTIVATION_NETWORK',\r\n\tPendingActivationOffline = 'PENDING_ACTIVATION_OFFLINE',\r\n\tPendingDeactivation = 'PENDING_DEACTIVATION',\r\n\tPendingExpiration = 'PENDING_EXPIRATION',\r\n\tTampered = 'TAMPERED',\r\n\tValid = 'VALID'\r\n}\r\n\r\nexport enum LicenseType {\r\n\tDemo = 'DEMO',\r\n\tPaid = 'PAID',\r\n\tTrial = 'TRIAL'\r\n}\r\n\r\nexport enum LightingColor {\r\n\tBlue = 'BLUE',\r\n\tCyan = 'CYAN',\r\n\tGold = 'GOLD',\r\n\tGreen = 'GREEN',\r\n\tLightPurple = 'LIGHT_PURPLE',\r\n\tOrange = 'ORANGE',\r\n\tOrchid = 'ORCHID',\r\n\tPink = 'PINK',\r\n\tPowderBlue = 'POWDER_BLUE',\r\n\tPurple = 'PURPLE',\r\n\tRed = 'RED',\r\n\tSkyBlue = 'SKY_BLUE',\r\n\tTurquoise = 'TURQUOISE',\r\n\tViolet = 'VIOLET',\r\n\tWhite = 'WHITE',\r\n\tYellow = 'YELLOW',\r\n\tYellowGreen = 'YELLOW_GREEN'\r\n}\r\n\r\nexport enum LightingMode {\r\n\tFlashing = 'FLASHING',\r\n\tOff = 'OFF',\r\n\tOn = 'ON'\r\n}\r\n\r\nexport enum LightingState {\r\n\tMuted = 'MUTED',\r\n\tUnmuted = 'UNMUTED'\r\n}\r\n\r\nexport enum LightingStyle {\r\n\tRing = 'RING',\r\n\tSegment = 'SEGMENT'\r\n}\r\n\r\nexport enum LinkingOperationResult {\r\n\t/** Device is not discoverable. */\r\n\tDeviceNotFound = 'DEVICE_NOT_FOUND',\r\n\t/** Failed to link RF channel(s) and transmitter(s) */\r\n\tFailure = 'FAILURE',\r\n\t/** Input node id(s) provided in linking request is not valid. */\r\n\tInvalidInput = 'INVALID_INPUT',\r\n\t/** Provided input devices either does not support linking feature or not a valid input for this operation. */\r\n\tInvalidOperation = 'INVALID_OPERATION',\r\n\t/** No transmitter is discovered for the charger bay. */\r\n\tNoTransmittersOnCharger = 'NO_TRANSMITTERS_ON_CHARGER',\r\n\t/** Successfully linked RF channel(s) and transmitter(s) */\r\n\tSuccess = 'SUCCESS',\r\n\t/** Failed to receive linking result within the timeout */\r\n\tTimeoutExceeded = 'TIMEOUT_EXCEEDED'\r\n}\r\n\r\nexport enum LinkingStatus {\r\n\t/**\r\n\t * An unknown reason caused the failure.\r\n\t * This means the middleware receive a linking result that is not expected such as BAN_SECONDARY_MIC or INVALID_APT_CHANNEL\r\n\t */\r\n\tFailure = 'FAILURE',\r\n\t/** Linking failed due to audio protocol mismatch */\r\n\tFailureAudioProtocolMismatch = 'FAILURE_AUDIO_PROTOCOL_MISMATCH',\r\n\t/**\r\n\t * Linking failed due to mismatched access point/charger/transmitter firmware version\r\n\t * Major and minor version of firmware for devices should be matched to perform linking operation\r\n\t */\r\n\tFailureFirmwareVersionMismatch = 'FAILURE_FIRMWARE_VERSION_MISMATCH',\r\n\t/** Linking failed due to RF band mismatch */\r\n\tFailureRfBandMismatch = 'FAILURE_RF_BAND_MISMATCH',\r\n\t/** Successfully linked RF channel and transmitter */\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport type LiveMeterColorThemeInfoInput = {\r\n\tcustomThemeLightColorGradient?: InputMaybe;\r\n\ttheme?: InputMaybe;\r\n};\r\n\r\nexport type LiveMeterCustomThemeLightColorGradientInput = {\r\n\tcenterLightColor?: InputMaybe;\r\n\tclippingLightColor?: InputMaybe;\r\n\toutermostLightColor?: InputMaybe;\r\n};\r\n\r\nexport enum LobeWidth {\r\n\tMedium = 'MEDIUM',\r\n\tNarrow = 'NARROW',\r\n\tWide = 'WIDE'\r\n}\r\n\r\nexport type MacAndSerialClaimInput = {\r\n\tmacAddress: Scalars['String']['input'];\r\n\tserialNumber: Scalars['String']['input'];\r\n};\r\n\r\nexport enum MeterChangeType {\r\n\tAudioChannelAcousticEchoCancellationErle = 'AUDIO_CHANNEL_ACOUSTIC_ECHO_CANCELLATION_ERLE',\r\n\tAudioChannelAcousticEchoCancellationPeak = 'AUDIO_CHANNEL_ACOUSTIC_ECHO_CANCELLATION_PEAK',\r\n\tAudioChannelAcousticEchoCancellationRms = 'AUDIO_CHANNEL_ACOUSTIC_ECHO_CANCELLATION_RMS',\r\n\tAudioChannelActivity = 'AUDIO_CHANNEL_ACTIVITY',\r\n\tAudioChannelAutomaticGain = 'AUDIO_CHANNEL_AUTOMATIC_GAIN',\r\n\tAudioChannelAutomaticGainControlPeak = 'AUDIO_CHANNEL_AUTOMATIC_GAIN_CONTROL_PEAK',\r\n\tAudioChannelAutomaticGainControlRms = 'AUDIO_CHANNEL_AUTOMATIC_GAIN_CONTROL_RMS',\r\n\tAudioChannelAutomixerGate = 'AUDIO_CHANNEL_AUTOMIXER_GATE',\r\n\tAudioChannelAutomixerInputPeak = 'AUDIO_CHANNEL_AUTOMIXER_INPUT_PEAK',\r\n\tAudioChannelAutomixerInputRms = 'AUDIO_CHANNEL_AUTOMIXER_INPUT_RMS',\r\n\tAudioChannelAutomixGain = 'AUDIO_CHANNEL_AUTOMIX_GAIN',\r\n\tAudioChannelClip = 'AUDIO_CHANNEL_CLIP',\r\n\tAudioChannelCompressorEngaged = 'AUDIO_CHANNEL_COMPRESSOR_ENGAGED',\r\n\tAudioChannelDenoiserNoiseReduction = 'AUDIO_CHANNEL_DENOISER_NOISE_REDUCTION',\r\n\tAudioChannelLimiterEngaged = 'AUDIO_CHANNEL_LIMITER_ENGAGED',\r\n\tAudioChannelMatrixMixerInputPeak = 'AUDIO_CHANNEL_MATRIX_MIXER_INPUT_PEAK',\r\n\tAudioChannelMatrixMixerInputRms = 'AUDIO_CHANNEL_MATRIX_MIXER_INPUT_RMS',\r\n\tAudioChannelMatrixMixerOutputPeak = 'AUDIO_CHANNEL_MATRIX_MIXER_OUTPUT_PEAK',\r\n\tAudioChannelMatrixMixerOutputRms = 'AUDIO_CHANNEL_MATRIX_MIXER_OUTPUT_RMS',\r\n\tAudioChannelMatrixMixerStereoInputPeak = 'AUDIO_CHANNEL_MATRIX_MIXER_STEREO_INPUT_PEAK',\r\n\tAudioChannelMatrixMixerStereoInputRms = 'AUDIO_CHANNEL_MATRIX_MIXER_STEREO_INPUT_RMS',\r\n\tAudioChannelPeak = 'AUDIO_CHANNEL_PEAK',\r\n\tAudioChannelRms = 'AUDIO_CHANNEL_RMS',\r\n\tAudioChannelStereoPeak = 'AUDIO_CHANNEL_STEREO_PEAK',\r\n\tAudioChannelStereoRms = 'AUDIO_CHANNEL_STEREO_RMS',\r\n\tAudioCoverageAreaAutomixerGate = 'AUDIO_COVERAGE_AREA_AUTOMIXER_GATE',\r\n\tAudioCoverageAreaPeak = 'AUDIO_COVERAGE_AREA_PEAK',\r\n\tAudioCoverageAreaRms = 'AUDIO_COVERAGE_AREA_RMS',\r\n\tRfChannelActivity = 'RF_CHANNEL_ACTIVITY',\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\tRfChannelReceiveLevelAntA = 'RF_CHANNEL_RECEIVE_LEVEL_ANT_A',\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\tRfChannelReceiveLevelAntB = 'RF_CHANNEL_RECEIVE_LEVEL_ANT_B'\r\n}\r\n\r\nexport type MeterColorThemeInfoInput = {\r\n\tcustomThemeLightColor?: InputMaybe;\r\n\ttheme?: InputMaybe;\r\n};\r\n\r\nexport enum MeteringMode {\r\n\tPostFader = 'POST_FADER',\r\n\tPreFader = 'PRE_FADER'\r\n}\r\n\r\nexport enum MicOptimizationMode {\r\n\tMxa310 = 'MXA310',\r\n\tMxa710 = 'MXA710',\r\n\tMxa901 = 'MXA901',\r\n\tMxa902 = 'MXA902',\r\n\tMxa910 = 'MXA910',\r\n\tMxa920 = 'MXA920',\r\n\tNormal = 'NORMAL'\r\n}\r\n\r\n/**\r\n * The microphone polar pattern determines how much audio signal is picked up from the direction from which the signal originates from.\r\n * RAW_MID_SIDE: Combines Cardioid and Bi-directional polar pattern. Refer to the following youtube video for more information on its usage: https://youtu.be/HXpHcO8RG1M\r\n */\r\nexport enum MicPolarPattern {\r\n\tBidirectional = 'BIDIRECTIONAL',\r\n\tCardioid = 'CARDIOID',\r\n\tHypercardioid = 'HYPERCARDIOID',\r\n\tOmnidirectional = 'OMNIDIRECTIONAL',\r\n\tRawMidSide = 'RAW_MID_SIDE',\r\n\tStereo = 'STEREO',\r\n\tSupercardioid = 'SUPERCARDIOID',\r\n\tToroid = 'TOROID'\r\n}\r\n\r\nexport enum MicStatus {\r\n\tActive = 'ACTIVE',\r\n\tMute = 'MUTE',\r\n\tOff = 'OFF',\r\n\tOnCharger = 'ON_CHARGER',\r\n\tOutOfRange = 'OUT_OF_RANGE',\r\n\tStandby = 'STANDBY',\r\n\tUnknown = 'UNKNOWN'\r\n}\r\n\r\nexport enum MicStatusInput {\r\n\tActive = 'ACTIVE',\r\n\tMute = 'MUTE',\r\n\tOff = 'OFF',\r\n\tStandby = 'STANDBY'\r\n}\r\n\r\nexport enum MuteButtonMode {\r\n\tPushToMute = 'PUSH_TO_MUTE',\r\n\tPushToTalk = 'PUSH_TO_TALK',\r\n\tToggle = 'TOGGLE'\r\n}\r\n\r\nexport enum MuteControlFunction {\r\n\tDisabled = 'DISABLED',\r\n\tLocal = 'LOCAL',\r\n\tLogicOut = 'LOGIC_OUT'\r\n}\r\n\r\nexport enum NetworkMode {\r\n\tRedundant = 'REDUNDANT',\r\n\tSplit = 'SPLIT',\r\n\tSwitched = 'SWITCHED',\r\n\tUplink = 'UPLINK'\r\n}\r\n\r\nexport enum NodeChangeType {\r\n\tAudioChannelAcousticEchoCancellation = 'AUDIO_CHANNEL_ACOUSTIC_ECHO_CANCELLATION',\r\n\tAudioChannelAcousticEchoCancellationMonoReference = 'AUDIO_CHANNEL_ACOUSTIC_ECHO_CANCELLATION_MONO_REFERENCE',\r\n\tAudioChannelAcousticEchoCancellationStereoReference = 'AUDIO_CHANNEL_ACOUSTIC_ECHO_CANCELLATION_STEREO_REFERENCE',\r\n\tAudioChannelAnalogLevel = 'AUDIO_CHANNEL_ANALOG_LEVEL',\r\n\tAudioChannelAutomaticGainControl = 'AUDIO_CHANNEL_AUTOMATIC_GAIN_CONTROL',\r\n\tAudioChannelAutomixer = 'AUDIO_CHANNEL_AUTOMIXER',\r\n\tAudioChannelAutomixerInput = 'AUDIO_CHANNEL_AUTOMIXER_INPUT',\r\n\tAudioChannelAutomixerVoiceActivityDetection = 'AUDIO_CHANNEL_AUTOMIXER_VOICE_ACTIVITY_DETECTION',\r\n\tAudioChannelAutomixSourceSelector = 'AUDIO_CHANNEL_AUTOMIX_SOURCE_SELECTOR',\r\n\tAudioChannelAutoLevel = 'AUDIO_CHANNEL_AUTO_LEVEL',\r\n\tAudioChannelAutoMute = 'AUDIO_CHANNEL_AUTO_MUTE',\r\n\tAudioChannelAutoPosition = 'AUDIO_CHANNEL_AUTO_POSITION',\r\n\tAudioChannelCompressor = 'AUDIO_CHANNEL_COMPRESSOR',\r\n\tAudioChannelDanteEncryptionStatus = 'AUDIO_CHANNEL_DANTE_ENCRYPTION_STATUS',\r\n\tAudioChannelDanteRouteReceiver = 'AUDIO_CHANNEL_DANTE_ROUTE_RECEIVER',\r\n\tAudioChannelDanteRouteTransmitter = 'AUDIO_CHANNEL_DANTE_ROUTE_TRANSMITTER',\r\n\tAudioChannelDelay = 'AUDIO_CHANNEL_DELAY',\r\n\tAudioChannelDenoiser = 'AUDIO_CHANNEL_DENOISER',\r\n\tAudioChannelDeverb = 'AUDIO_CHANNEL_DEVERB',\r\n\tAudioChannelDeviceSpecificEqualizerContour = 'AUDIO_CHANNEL_DEVICE_SPECIFIC_EQUALIZER_CONTOUR',\r\n\tAudioChannelDirectOutputTapPoint = 'AUDIO_CHANNEL_DIRECT_OUTPUT_TAP_POINT',\r\n\tAudioChannelEqualizer = 'AUDIO_CHANNEL_EQUALIZER',\r\n\tAudioChannelEqualizerContour = 'AUDIO_CHANNEL_EQUALIZER_CONTOUR',\r\n\tAudioChannelEqualizerPreset = 'AUDIO_CHANNEL_EQUALIZER_PRESET',\r\n\tAudioChannelFaderGroup = 'AUDIO_CHANNEL_FADER_GROUP',\r\n\tAudioChannelGain = 'AUDIO_CHANNEL_GAIN',\r\n\tAudioChannelGainLock = 'AUDIO_CHANNEL_GAIN_LOCK',\r\n\tAudioChannelIdentify = 'AUDIO_CHANNEL_IDENTIFY',\r\n\tAudioChannelInputSource = 'AUDIO_CHANNEL_INPUT_SOURCE',\r\n\tAudioChannelLightingBehavior = 'AUDIO_CHANNEL_LIGHTING_BEHAVIOR',\r\n\tAudioChannelLimiter = 'AUDIO_CHANNEL_LIMITER',\r\n\tAudioChannelLobeConfiguration = 'AUDIO_CHANNEL_LOBE_CONFIGURATION',\r\n\tAudioChannelLobePosition = 'AUDIO_CHANNEL_LOBE_POSITION',\r\n\tAudioChannelLobeTalkerHeight = 'AUDIO_CHANNEL_LOBE_TALKER_HEIGHT',\r\n\tAudioChannelLobeWidth = 'AUDIO_CHANNEL_LOBE_WIDTH',\r\n\tAudioChannelLogicReceiver = 'AUDIO_CHANNEL_LOGIC_RECEIVER',\r\n\tAudioChannelMicrophoneAngle = 'AUDIO_CHANNEL_MICROPHONE_ANGLE',\r\n\tAudioChannelMicOptimization = 'AUDIO_CHANNEL_MIC_OPTIMIZATION',\r\n\tAudioChannelMicPolarPattern = 'AUDIO_CHANNEL_MIC_POLAR_PATTERN',\r\n\tAudioChannelMonitorMix = 'AUDIO_CHANNEL_MONITOR_MIX',\r\n\tAudioChannelMonitorMixReverb = 'AUDIO_CHANNEL_MONITOR_MIX_REVERB',\r\n\tAudioChannelMute = 'AUDIO_CHANNEL_MUTE',\r\n\tAudioChannelMuteGroup = 'AUDIO_CHANNEL_MUTE_GROUP',\r\n\tAudioChannelMuteLock = 'AUDIO_CHANNEL_MUTE_LOCK',\r\n\tAudioChannelName = 'AUDIO_CHANNEL_NAME',\r\n\tAudioChannelNoiseReduction = 'AUDIO_CHANNEL_NOISE_REDUCTION',\r\n\tAudioChannelOutputPath = 'AUDIO_CHANNEL_OUTPUT_PATH',\r\n\tAudioChannelPcPeripheral = 'AUDIO_CHANNEL_PC_PERIPHERAL',\r\n\tAudioChannelPhantomPower = 'AUDIO_CHANNEL_PHANTOM_POWER',\r\n\tAudioChannelPlosiveReduction = 'AUDIO_CHANNEL_PLOSIVE_REDUCTION',\r\n\tAudioChannelPostGateGain = 'AUDIO_CHANNEL_POST_GATE_GAIN',\r\n\tAudioChannelPostGateMute = 'AUDIO_CHANNEL_POST_GATE_MUTE',\r\n\tAudioChannelPostGateSolo = 'AUDIO_CHANNEL_POST_GATE_SOLO',\r\n\tAudioChannelReverb = 'AUDIO_CHANNEL_REVERB',\r\n\tAudioChannelSignalGenerator = 'AUDIO_CHANNEL_SIGNAL_GENERATOR',\r\n\tAudioChannelSolo = 'AUDIO_CHANNEL_SOLO',\r\n\tAudioChannelStereoReverse = 'AUDIO_CHANNEL_STEREO_REVERSE',\r\n\tAudioChannelStereoWidth = 'AUDIO_CHANNEL_STEREO_WIDTH',\r\n\tAudioChannelTalkerHeight = 'AUDIO_CHANNEL_TALKER_HEIGHT',\r\n\tAudioCoverageAreaConfiguration = 'AUDIO_COVERAGE_AREA_CONFIGURATION',\r\n\tAudioCoverageAreaGain = 'AUDIO_COVERAGE_AREA_GAIN',\r\n\tAudioCoverageAreaMute = 'AUDIO_COVERAGE_AREA_MUTE',\r\n\tChargerBayAssociation = 'CHARGER_BAY_ASSOCIATION',\r\n\tChargerBayBatteryPresent = 'CHARGER_BAY_BATTERY_PRESENT',\r\n\t/** @deprecated Proof of concept of charger bay on device. Do not use. */\r\n\tChargerBayChargingMode = 'CHARGER_BAY_CHARGING_MODE',\r\n\tChargerBayDockedDevice = 'CHARGER_BAY_DOCKED_DEVICE',\r\n\tCrossPointConfiguration = 'CROSS_POINT_CONFIGURATION',\r\n\tCrossPointGain = 'CROSS_POINT_GAIN',\r\n\tDeviceActivePreset = 'DEVICE_ACTIVE_PRESET',\r\n\tDeviceAllEqualizersBypass = 'DEVICE_ALL_EQUALIZERS_BYPASS',\r\n\tDeviceAllIntellimixBypass = 'DEVICE_ALL_INTELLIMIX_BYPASS',\r\n\tDeviceAnalogAudioOutputMode = 'DEVICE_ANALOG_AUDIO_OUTPUT_MODE',\r\n\tDeviceAnalogLogic = 'DEVICE_ANALOG_LOGIC',\r\n\tDeviceAnalogLogicPresetSwitch = 'DEVICE_ANALOG_LOGIC_PRESET_SWITCH',\r\n\tDeviceAudioAutoFocus = 'DEVICE_AUDIO_AUTO_FOCUS',\r\n\tDeviceAudioChannels = 'DEVICE_AUDIO_CHANNELS',\r\n\tDeviceAudioChannelCount = 'DEVICE_AUDIO_CHANNEL_COUNT',\r\n\tDeviceAudioMute = 'DEVICE_AUDIO_MUTE',\r\n\tDeviceAudioMuteControl = 'DEVICE_AUDIO_MUTE_CONTROL',\r\n\tDeviceAudioMuteControlGroup = 'DEVICE_AUDIO_MUTE_CONTROL_GROUP',\r\n\tDeviceAudioMuteDefault = 'DEVICE_AUDIO_MUTE_DEFAULT',\r\n\tDeviceAudioMuteLock = 'DEVICE_AUDIO_MUTE_LOCK',\r\n\tDeviceAudioNetworkInterface = 'DEVICE_AUDIO_NETWORK_INTERFACE',\r\n\tDeviceAuthentication = 'DEVICE_AUTHENTICATION',\r\n\tDeviceAutomixGainMetering = 'DEVICE_AUTOMIX_GAIN_METERING',\r\n\tDeviceAvailablePackages = 'DEVICE_AVAILABLE_PACKAGES',\r\n\tDeviceBatteryHealth = 'DEVICE_BATTERY_HEALTH',\r\n\tDeviceBatteryLevel = 'DEVICE_BATTERY_LEVEL',\r\n\tDeviceCallStatus = 'DEVICE_CALL_STATUS',\r\n\tDeviceCommandStringsService = 'DEVICE_COMMAND_STRINGS_SERVICE',\r\n\tDeviceConfigurationLock = 'DEVICE_CONFIGURATION_LOCK',\r\n\tDeviceConnectedDeviceLabel = 'DEVICE_CONNECTED_DEVICE_LABEL',\r\n\tDeviceControlNetworkInterface = 'DEVICE_CONTROL_NETWORK_INTERFACE',\r\n\tDeviceCoverageMode = 'DEVICE_COVERAGE_MODE',\r\n\tDeviceCoveragePosition = 'DEVICE_COVERAGE_POSITION',\r\n\tDeviceDanteAudioEncryption = 'DEVICE_DANTE_AUDIO_ENCRYPTION',\r\n\tDeviceDanteAudioNetwork = 'DEVICE_DANTE_AUDIO_NETWORK',\r\n\tDeviceDanteAudioNetworkAccess = 'DEVICE_DANTE_AUDIO_NETWORK_ACCESS',\r\n\tDeviceDeploymentCandidates = 'DEVICE_DEPLOYMENT_CANDIDATES',\r\n\t/** @deprecated For Cloud Managed Rooms Use Only. */\r\n\tDeviceDoubleStuffProxiedTransmitters = 'DEVICE_DOUBLE_STUFF_PROXIED_TRANSMITTERS',\r\n\tDeviceEqualizerContour = 'DEVICE_EQUALIZER_CONTOUR',\r\n\tDeviceEthernetLights = 'DEVICE_ETHERNET_LIGHTS',\r\n\tDeviceFirmwareUpdatePolicy = 'DEVICE_FIRMWARE_UPDATE_POLICY',\r\n\tDeviceGlobalMicStatus = 'DEVICE_GLOBAL_MIC_STATUS',\r\n\tDeviceHeight = 'DEVICE_HEIGHT',\r\n\tDeviceIdentify = 'DEVICE_IDENTIFY',\r\n\tDeviceLicense = 'DEVICE_LICENSE',\r\n\tDeviceLightingAudioMeters = 'DEVICE_LIGHTING_AUDIO_METERS',\r\n\tDeviceLightingAudioMuteIndicatorOverride = 'DEVICE_LIGHTING_AUDIO_MUTE_INDICATOR_OVERRIDE',\r\n\tDeviceLightingAutomixGating = 'DEVICE_LIGHTING_AUTOMIX_GATING',\r\n\tDeviceLightingBehavior = 'DEVICE_LIGHTING_BEHAVIOR',\r\n\tDeviceLightingBrightness = 'DEVICE_LIGHTING_BRIGHTNESS',\r\n\tDeviceLightingLiveAudioMeters = 'DEVICE_LIGHTING_LIVE_AUDIO_METERS',\r\n\tDeviceLightingMuteBehavior = 'DEVICE_LIGHTING_MUTE_BEHAVIOR',\r\n\tDeviceLightingRing = 'DEVICE_LIGHTING_RING',\r\n\tDeviceLightingUnmuteBehavior = 'DEVICE_LIGHTING_UNMUTE_BEHAVIOR',\r\n\tDeviceLinkedAccessPoint = 'DEVICE_LINKED_ACCESS_POINT',\r\n\tDeviceListenerHeight = 'DEVICE_LISTENER_HEIGHT',\r\n\tDeviceLogicMute = 'DEVICE_LOGIC_MUTE',\r\n\tDeviceLogicReceiver = 'DEVICE_LOGIC_RECEIVER',\r\n\tDeviceLogicTransmitter = 'DEVICE_LOGIC_TRANSMITTER',\r\n\tDeviceLoudspeaker = 'DEVICE_LOUDSPEAKER',\r\n\tDeviceMdnsService = 'DEVICE_MDNS_SERVICE',\r\n\tDeviceMeteringModes = 'DEVICE_METERING_MODES',\r\n\tDeviceMicStatus = 'DEVICE_MIC_STATUS',\r\n\tDeviceName = 'DEVICE_NAME',\r\n\tDevicePlacement = 'DEVICE_PLACEMENT',\r\n\tDeviceProxiedDevices = 'DEVICE_PROXIED_DEVICES',\r\n\tDeviceRoom = 'DEVICE_ROOM',\r\n\tDeviceRotation = 'DEVICE_ROTATION',\r\n\tDeviceRoutingPosition = 'DEVICE_ROUTING_POSITION',\r\n\tDeviceSecurity_8021X = 'DEVICE_SECURITY_8021X',\r\n\tDeviceStereoAudio = 'DEVICE_STEREO_AUDIO',\r\n\tDeviceSwitchConfiguration = 'DEVICE_SWITCH_CONFIGURATION',\r\n\tDeviceUpdateProgress = 'DEVICE_UPDATE_PROGRESS',\r\n\tDeviceUptime = 'DEVICE_UPTIME',\r\n\tDeviceUsbMuteSync = 'DEVICE_USB_MUTE_SYNC',\r\n\tDeviceUsbTerminalType = 'DEVICE_USB_TERMINAL_TYPE',\r\n\tDeviceUserPreset = 'DEVICE_USER_PRESET',\r\n\tDeviceVirtualAcousticBoundary = 'DEVICE_VIRTUAL_ACOUSTIC_BOUNDARY',\r\n\tDeviceWebService = 'DEVICE_WEB_SERVICE',\r\n\tEqualizerFilterBandwidth = 'EQUALIZER_FILTER_BANDWIDTH',\r\n\tEqualizerFilterConfiguration = 'EQUALIZER_FILTER_CONFIGURATION',\r\n\tEqualizerFilterFrequency = 'EQUALIZER_FILTER_FREQUENCY',\r\n\tEqualizerFilterGain = 'EQUALIZER_FILTER_GAIN',\r\n\tEqualizerFilterQFactor = 'EQUALIZER_FILTER_Q_FACTOR',\r\n\tFirmwareUpdateProgress = 'FIRMWARE_UPDATE_PROGRESS',\r\n\tFirmwareUpdateRequestProgress = 'FIRMWARE_UPDATE_REQUEST_PROGRESS',\r\n\tRfChannelAssociation = 'RF_CHANNEL_ASSOCIATION',\r\n\tRfChannelLinkedTransmitter = 'RF_CHANNEL_LINKED_TRANSMITTER',\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\tRfChannelPrimaryGroupChanName = 'RF_CHANNEL_PRIMARY_GROUP_CHAN_NAME',\r\n\tRoom = 'ROOM',\r\n\tUserPreset = 'USER_PRESET'\r\n}\r\n\r\nexport type NodeUpdateInput = {\r\n\taudioChannel?: InputMaybe;\r\n\taudioCoverageArea?: InputMaybe;\r\n\tcrossPoint?: InputMaybe;\r\n\tdevice?: InputMaybe;\r\n\tequalizerFilters?: InputMaybe;\r\n\trfChannel?: InputMaybe;\r\n};\r\n\r\nexport enum NoiseDetectionSensitivity {\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM',\r\n\tOff = 'OFF'\r\n}\r\n\r\nexport enum NoiseReductionLevel {\r\n\tAuto = 'AUTO',\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM'\r\n}\r\n\r\nexport enum NoiseRemovalLevel {\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM',\r\n\tOff = 'OFF'\r\n}\r\n\r\nexport enum NonLinearProcessingLevel {\r\n\tAuto = 'AUTO',\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM'\r\n}\r\n\r\nexport type OptimizeRoomInput = {\r\n\t/**\r\n\t * Indicates whether audio setting should be applied to room devices.\r\n\t * If not provided, true is assumed (audio settings will be applied to associated room devices).\r\n\t */\r\n\tadjustAudioSettings?: InputMaybe;\r\n\t/**\r\n\t * Indicates whether optimizing the room should happen even if one or more room devices are offline.\r\n\t * If not provided, false is assumed (room optimization would fail if one or more devices are offline).\r\n\t */\r\n\tallowUnavailableDevices?: InputMaybe;\r\n\t/**\r\n\t * Indicates whether mute synchronization should be enabled on processor while optimizaing room.\r\n\t * If not provided, true is assumed (mute synchronization will be enabled on the processor).\r\n\t */\r\n\tenableMuteSynchronization?: InputMaybe;\r\n};\r\n\r\nexport enum OptimizeRoomProgressType {\r\n\tOptimizeRoomProgress = 'OPTIMIZE_ROOM_PROGRESS',\r\n\tOptimizeRoomResult = 'OPTIMIZE_ROOM_RESULT'\r\n}\r\n\r\nexport enum OutputSignalPath {\r\n\tPostDigitalSignalProcessing = 'POST_DIGITAL_SIGNAL_PROCESSING',\r\n\tPreDigitalSignalProcessing = 'PRE_DIGITAL_SIGNAL_PROCESSING'\r\n}\r\n\r\nexport enum PcPeripheralStatus {\r\n\tAvailable = 'AVAILABLE',\r\n\tBegin = 'BEGIN',\r\n\tEnd = 'END',\r\n\tInProgress = 'IN_PROGRESS',\r\n\tNone = 'NONE',\r\n\tUnavailable = 'UNAVAILABLE'\r\n}\r\n\r\nexport enum PendingClaimStatus {\r\n\tCreated = 'CREATED',\r\n\tDeleted = 'DELETED'\r\n}\r\n\r\nexport enum Placement {\r\n\tCeiling = 'CEILING',\r\n\tTable = 'TABLE',\r\n\tWallHorizontal = 'WALL_HORIZONTAL',\r\n\tWallVertical = 'WALL_VERTICAL'\r\n}\r\n\r\nexport type PresetExportToFilePathInput = {\r\n\t/**\r\n\t * Full file path, where preset file should be exported to, including file name;\r\n\t * file name is expected in path to ensure naming conventions, which might be different\r\n\t * for different clients, are satisfied\r\n\t */\r\n\tfilePath: Scalars['String']['input'];\r\n\t/** Preset Id to be exported */\r\n\tpresetId: Scalars['ID']['input'];\r\n};\r\n\r\n/** This input is intended for REST interface */\r\nexport type PresetImportFromFileContentsInput = {\r\n\t/** Full path to JSON preset file to be imported */\r\n\tfileContents: Scalars['Upload']['input'];\r\n\t/** Preset Id, to which imported preset should be applied */\r\n\tpresetId: Scalars['ID']['input'];\r\n};\r\n\r\nexport type PresetImportFromFilePathInput = {\r\n\t/** Provided path to a JSON preset file to be imported */\r\n\tfilePath: Scalars['String']['input'];\r\n\t/** Preset Id, to which imported preset should be applied */\r\n\tpresetId: Scalars['ID']['input'];\r\n};\r\n\r\nexport type PresetUpdateInput = {\r\n\tname: Scalars['String']['input'];\r\n\tpresetId: Scalars['ID']['input'];\r\n};\r\n\r\nexport type ProductionDeviceIdentity = {\r\n\tcategory: Scalars['String']['input'];\r\n\tminVersions: Array;\r\n};\r\n\r\nexport type RectangularCoordinatesInput = {\r\n\t/** Maximum x-coordinate of the rectangular bounds, in millimeters */\r\n\txMax: Scalars['Float']['input'];\r\n\t/** Minimum x-coordinate of the rectangular bounds, in millimeters */\r\n\txMin: Scalars['Float']['input'];\r\n\t/** Maximum y-coordinate of the rectangular bounds, in millimeters */\r\n\tyMax: Scalars['Float']['input'];\r\n\t/** Minimum y-coordinate of the rectangular bounds, in millimeters */\r\n\tyMin: Scalars['Float']['input'];\r\n};\r\n\r\nexport type RemoveCredentialsInput = {\r\n\taccessLevel: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum ReverbType {\r\n\tHall = 'HALL',\r\n\tPlate = 'PLATE',\r\n\tStudio = 'STUDIO'\r\n}\r\n\r\nexport enum RfActivityLevel {\r\n\tAdequate = 'ADEQUATE',\r\n\tGood = 'GOOD',\r\n\tNone = 'NONE',\r\n\tOverload = 'OVERLOAD',\r\n\tPoor = 'POOR'\r\n}\r\n\r\nexport type RfChannelFeatureUpdateInput = {\r\n\tprimaryGroupChanName?: InputMaybe;\r\n};\r\n\r\nexport type RfChannelPrimaryGroupChanNameUpdateInput = {\r\n\tprimaryGroupChanName: Scalars['String']['input'];\r\n};\r\n\r\nexport type RfChannelUpdateInput = {\r\n\tfeatures?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type RgbColorMixInput = {\r\n\tblue: Scalars['Int']['input'];\r\n\tgreen: Scalars['Int']['input'];\r\n\tred: Scalars['Int']['input'];\r\n};\r\n\r\nexport enum RoomCloningStrategy {\r\n\t/**\r\n\t * Cloned device has origin ID set to the ID of the device from which it is cloned\r\n\t * Cloning of virtual device with CLONE_AS_CHILD strategy would always result\r\n\t * in the clone with nill origin ID (identical to CLONE_AS_ORPHAN) due to the rule\r\n\t * of \"clone of a clone is pure virtual with no origin\"\r\n\t */\r\n\tCloneAsChild = 'CLONE_AS_CHILD',\r\n\t/**\r\n\t * Cloned device has no origin ID (null UUID)\r\n\t * Cloning of virtual device with CLONE_AS_CHILD strategy would always result\r\n\t * in the clone with nill origin ID (identical to CLONE_AS_ORPHAN)\r\n\t * due to the rule of \"clone of a clone is pure virtual with no origin\"\r\n\t */\r\n\tCloneAsOrphan = 'CLONE_AS_ORPHAN',\r\n\t/**\r\n\t * Cloned device has origin ID set to the origin ID of the original device\r\n\t * Notice that for real devices this will result in the same originId as in\r\n\t * CLONE_AS_CHILD strategy. Real devices have origin ID equal their ID\r\n\t */\r\n\tCloneAsSibling = 'CLONE_AS_SIBLING'\r\n}\r\n\r\nexport type RoomDeploymentInput = {\r\n\tdestinationRoom?: InputMaybe;\r\n\tdestinationRoomDescription?: InputMaybe;\r\n\tdestinationRoomName?: InputMaybe;\r\n\tdevices: Array;\r\n\tsourceRoom: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum RoomDeploymentOverallResult {\r\n\t/**\r\n\t * Room deployment failed, device deployment failed and no room placement was attempted\r\n\t * @deprecated Use the more specific failure modes instead\r\n\t */\r\n\tDeploymentFailed = 'DEPLOYMENT_FAILED',\r\n\t/** Room deployment succeeded, devices were deployed and placed into a room */\r\n\tDeploymentSuccess = 'DEPLOYMENT_SUCCESS',\r\n\t/** Failed at creating the destination room for the target devices */\r\n\tFailedCreatingDestinationRoom = 'FAILED_CREATING_DESTINATION_ROOM',\r\n\t/** Failed at deploying audio routes between devices in room */\r\n\tFailedDeployingAudioRoutes = 'FAILED_DEPLOYING_AUDIO_ROUTES',\r\n\t/** Failed at deploying control routes (i.e. mute routes) between devices in room */\r\n\tFailedDeployingControlRoutes = 'FAILED_DEPLOYING_CONTROL_ROUTES',\r\n\t/** Failed at deploying device state from sources to targets */\r\n\tFailedDeployingDeviceState = 'FAILED_DEPLOYING_DEVICE_STATE',\r\n\t/** Failed at cleaning up and validating the room deployment */\r\n\tFailedFinalizing = 'FAILED_FINALIZING',\r\n\t/** Failed at preparing the devices and rooms for room deployment */\r\n\tFailedPreparing = 'FAILED_PREPARING',\r\n\t/** Failed for unknown reasons */\r\n\tFailedUnknown = 'FAILED_UNKNOWN',\r\n\t/**\r\n\t * Room deployment failed, devices were successfully deployed, but could not be placed in a room\r\n\t * @deprecated Use the more specific failure modes instead\r\n\t */\r\n\tPlacementFailed = 'PLACEMENT_FAILED'\r\n}\r\n\r\nexport enum RoomDeploymentProgressType {\r\n\tRoomDeploymentResult = 'ROOM_DEPLOYMENT_RESULT'\r\n}\r\n\r\nexport enum RoomDeploymentStage {\r\n\t/** Creating the destination room for the target devices */\r\n\tCreatingDestinationRoom = 'CREATING_DESTINATION_ROOM',\r\n\t/** Deploying audio routes between devices in room */\r\n\tDeployingAudioRoutes = 'DEPLOYING_AUDIO_ROUTES',\r\n\t/** Deploying control routes (i.e. mute routes) between devices in room */\r\n\tDeployingControlRoutes = 'DEPLOYING_CONTROL_ROUTES',\r\n\t/** Deploying device state from sources to targets */\r\n\tDeployingDeviceState = 'DEPLOYING_DEVICE_STATE',\r\n\t/** Cleaning up and validating the room deployment */\r\n\tFinalizing = 'FINALIZING',\r\n\t/** The deployment request has been accepted and is pending execution */\r\n\tPending = 'PENDING',\r\n\t/** Preparing the devices and rooms for room deployment */\r\n\tPreparing = 'PREPARING'\r\n}\r\n\r\nexport type RoomDimensionsInput = {\r\n\t/** height values are scaled to represent in millimeters (mm) */\r\n\theight: Scalars['Float']['input'];\r\n\t/** length values are scaled to represent in millimeters (mm) */\r\n\tlength: Scalars['Float']['input'];\r\n\t/** width values are scaled to represent in millimeters (mm) */\r\n\twidth: Scalars['Float']['input'];\r\n};\r\n\r\nexport enum RoomOptimizationStage {\r\n\t/** Creating audio/control routes between devices */\r\n\tCreatingAssociations = 'CREATING_ASSOCIATIONS',\r\n\t/** Applying device settings for optimal audio */\r\n\tOptimizingDeviceSettings = 'OPTIMIZING_DEVICE_SETTINGS'\r\n}\r\n\r\nexport enum RoomOptimizationStatus {\r\n\tConflict = 'CONFLICT',\r\n\tDevicesUnavailable = 'DEVICES_UNAVAILABLE',\r\n\tFailure = 'FAILURE',\r\n\tIncompatibleDevice = 'INCOMPATIBLE_DEVICE',\r\n\tMissingMicrophone = 'MISSING_MICROPHONE',\r\n\tMissingProcessor = 'MISSING_PROCESSOR',\r\n\tPartialSuccess = 'PARTIAL_SUCCESS',\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport enum SignalType {\r\n\tPinkNoise = 'PINK_NOISE',\r\n\tSineWave = 'SINE_WAVE',\r\n\tSweep = 'SWEEP',\r\n\tWhiteNoise = 'WHITE_NOISE'\r\n}\r\n\r\nexport enum StereoAudioChannelSpatialSeparation {\r\n\tLeft = 'LEFT',\r\n\tRight = 'RIGHT'\r\n}\r\n\r\nexport type TlsCertificateInput = {\r\n\tanonymousId?: InputMaybe;\r\n\tclientCertificate: Scalars['String']['input'];\r\n\tpassphrase?: InputMaybe;\r\n\trootCertificate: Scalars['String']['input'];\r\n\tusername?: InputMaybe;\r\n};\r\n\r\nexport enum UnlinkingOperationResult {\r\n\t/** Device is not discoverable. */\r\n\tDeviceNotFound = 'DEVICE_NOT_FOUND',\r\n\t/** Failed to unlink RF channel(s) and transmitter(s). */\r\n\tFailure = 'FAILURE',\r\n\t/** Input node id(s) provided in linking request is not valid. */\r\n\tInvalidInput = 'INVALID_INPUT',\r\n\t/** Provided input devices either does not support linking feature or not a valid input for this operation. */\r\n\tInvalidOperation = 'INVALID_OPERATION',\r\n\t/** Successfully unlinked RF channel(s) and transmitter(s) */\r\n\tSuccess = 'SUCCESS',\r\n\t/** Failed to receive unlinking result within the timeout */\r\n\tTimeoutExceeded = 'TIMEOUT_EXCEEDED'\r\n}\r\n\r\nexport type UpdateAudioNetworkInput = {\r\n\tgateway?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n\tipAddress?: InputMaybe;\r\n\tipMode: IpMode | `${IpMode}`;\r\n\tsubnetMask?: InputMaybe;\r\n};\r\n\r\nexport type UpdateAudioNetworkInterfaceInput = {\r\n\tid: Scalars['ID']['input'];\r\n\tnetworkInterfaceId: Scalars['String']['input'];\r\n};\r\n\r\nexport type UpdateControlNetworkInput = {\r\n\tgateway?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n\tipAddress?: InputMaybe;\r\n\tipMode: IpMode | `${IpMode}`;\r\n\tsubnetMask?: InputMaybe;\r\n};\r\n\r\nexport type UpdateControlNetworkInterfaceInput = {\r\n\tid: Scalars['ID']['input'];\r\n\tnetworkInterfaceId: Scalars['String']['input'];\r\n};\r\n\r\nexport type UpdateCredentialsInput = {\r\n\taccessLevel: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n\tnewPassphrase: Scalars['String']['input'];\r\n};\r\n\r\nexport type UpdateDeviceFirmwareInput = {\r\n\tfirmwarePackageKey: Scalars['String']['input'];\r\n\tfirmwarePackageVersion: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type UpdateRoomInput = {\r\n\tdescription?: InputMaybe;\r\n\tdimensions?: InputMaybe;\r\n\thold?: InputMaybe;\r\n\tname?: InputMaybe;\r\n\troom: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum UsbTerminalType {\r\n\tEchoCancelingSpeakerphone = 'ECHO_CANCELING_SPEAKERPHONE',\r\n\tSpeakerphoneNoEchoReduction = 'SPEAKERPHONE_NO_ECHO_REDUCTION'\r\n}\r\n\r\nexport type UsernamePassphraseInput = {\r\n\tpassphrase: Scalars['String']['input'];\r\n\tusername: Scalars['String']['input'];\r\n};\r\n\r\nexport type VerifyCredentialsInput = {\r\n\taccessLevel: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n\tpassphrase: Scalars['String']['input'];\r\n};\r\n\r\nexport type VirtualDeviceAdditionFromStateFileContentsInput = {\r\n\t/** Device ID to assign to the virtual device (optional) */\r\n\tdeviceId?: InputMaybe;\r\n\t/** Uploaded contents of a JSON state file */\r\n\tfileContents: Scalars['Upload']['input'];\r\n\t/** Device ID of the original device represented by the state file (optional) */\r\n\toriginDeviceId?: InputMaybe;\r\n};\r\n\r\nexport type VirtualDeviceAdditionFromStateFileUriInput = {\r\n\t/** Device ID to assign to the virtual device (optional) */\r\n\tdeviceId?: InputMaybe;\r\n\t/** URI of a JSON state file */\r\n\tfileUri: Scalars['String']['input'];\r\n\t/** Device ID of the original device represented by the state file (optional) */\r\n\toriginDeviceId?: InputMaybe;\r\n};\r\n\r\nexport type VirtualDeviceAdditionInput = {\r\n\t/** Number of identical virtual devices to add */\r\n\tcount: Scalars['Int']['input'];\r\n\t/** Device category */\r\n\tdeviceCategory: Scalars['String']['input'];\r\n\t/** Device type ID */\r\n\tdeviceType: Scalars['Guid']['input'];\r\n\t/**\r\n\t * Property interface ID (optional)\r\n\t *\r\n\t * If one is not provided, the latest supported interface will be used\r\n\t */\r\n\tinterfaceId?: InputMaybe;\r\n};\r\n\r\nexport type VirtualDeviceRemovalInput = {\r\n\t/** Node IDs of the virtual devices to remove */\r\n\tids: Array;\r\n};\r\n\r\nexport type ClaimDeviceVariables = Exact<{\r\n\tdeviceNodeId: Scalars['ID']['input'];\r\n\ttokenId: Scalars['Guid']['input'];\r\n}>;\r\n\r\nexport type ClaimDeviceOpResult = { claimDevice: boolean };\r\n\r\nexport type UnclaimDeviceVariables = Exact<{\r\n\tdeviceNodeId: Scalars['ID']['input'];\r\n}>;\r\n\r\nexport type UnclaimDeviceOpResult = { unclaimDevice: boolean };\r\n\r\nexport type ClaimDeviceByMacSerialNumberVariables = Exact<{\r\n\tclaimRequests: Array | MacAndSerialClaimInput;\r\n}>;\r\n\r\nexport type ClaimDeviceByMacSerialNumberOpResult = {\r\n\tclaimDeviceUsingMacAndSerial: Array<{\r\n\t\tmacAndSerialClaim: { macAddress: string; serialNumber: string };\r\n\t\terror: { code: ErrorCode; message: string } | null;\r\n\t}>;\r\n};\r\n\r\nexport type ClaimedDeviceFragment = {\r\n\tid: string;\r\n\thardwareId: string;\r\n\tstatus: DeviceStatus;\r\n\tisDevice: 'Device';\r\n\tdescription: { model: string };\r\n};\r\n\r\nexport type ClaimedDevicesSubscriptionVariables = Exact<{ [key: string]: never }>;\r\n\r\nexport type ClaimedDevicesSubscriptionOpResult = {\r\n\tclaimedDevices: { claimed: ClaimedDeviceFragment } | { unclaimed: string };\r\n};\r\n\r\nexport type DeletePendingClaimVariables = Exact<{\r\n\tpendingClaimId: Scalars['ID']['input'];\r\n}>;\r\n\r\nexport type DeletePendingClaimOpResult = {\r\n\tdeletePendingDeviceClaim: { id: string; error: { code: ErrorCode; message: string } | null };\r\n};\r\n\r\nexport type ListPendingClaimsVariables = Exact<{ [key: string]: never }>;\r\n\r\nexport type ListPendingClaimsOpResult = {\r\n\tpendingDeviceClaims: Array<{ id: string; macAddress: string; serialNumber: string; createdAt: string }>;\r\n};\r\n\r\nexport type PendingClaimStatusVariables = Exact<{ [key: string]: never }>;\r\n\r\nexport type PendingClaimStatusOpResult = {\r\n\tpendingClaims: { id: string; serialNumber: string; macAddress: string; status: PendingClaimStatus };\r\n};\r\n\r\nexport type OnDetectedDevicesVariables = Exact<{\r\n\ttokenId: Scalars['Guid']['input'];\r\n}>;\r\n\r\nexport type OnDetectedDevicesOpResult = {\r\n\tdetectedDevices: {\r\n\t\tdetectionToken: string;\r\n\t\tdetectedAt: string;\r\n\t\texpiresAt: string;\r\n\t\tclaimable: boolean;\r\n\t\tdevice: {\r\n\t\t\tid: string;\r\n\t\t\thardwareId: string;\r\n\t\t\tcategory: string;\r\n\t\t\tmodel: string;\r\n\t\t\tserialNumber: string;\r\n\t\t\tmacAddress: string;\r\n\t\t\tfirmwareVersion: string;\r\n\t\t\tfirmwareValid: boolean;\r\n\t\t\tname: string;\r\n\t\t\tipAddress: string;\r\n\t\t\tinterface: { interfaceId: number; version: string; beta: boolean };\r\n\t\t};\r\n\t};\r\n};\r\n\r\nexport type DoublestuffProxiedTransmitterFragment = {\r\n\tname: string;\r\n\tstatus: DoubleStuffProxiedTransmitterStatus | null;\r\n\tonline: boolean;\r\n\tbatteryLevelPercentage: number | null;\r\n\tmuted: boolean | null;\r\n};\r\n\r\nexport type DoublestuffProxiedTransmittersFragment = {\r\n\tmic1: DoublestuffProxiedTransmitterFragment | null;\r\n\tmic2: DoublestuffProxiedTransmitterFragment | null;\r\n};\r\n\r\nexport type DeviceLicenseInfoFragment = { state: LicenseState; count: number; expirationDate: string | null };\r\n\r\nexport type PropertyPanelDeviceFragment = {\r\n\tid: string;\r\n\tvirtual: boolean;\r\n\tstatus: DeviceStatus;\r\n\tisDeviceNode: 'Device';\r\n\tprotocol: { dmp: { ipAddress: string } | null };\r\n\tinterface: { category: string; model: string | null };\r\n\tdescription: {\r\n\t\tfeatures: {\r\n\t\t\taudioChannelCount: { supported: boolean };\r\n\t\t\taudioMute: { supported: boolean };\r\n\t\t\taudioNetwork: { supported: boolean };\r\n\t\t\tavailablePackages: { supported: boolean };\r\n\t\t\tbatteryLevel?: { supported: boolean };\r\n\t\t\tcontrolNetwork: { supported: boolean };\r\n\t\t\tdanteAudioNetwork: { supported: boolean };\r\n\t\t\tdoublestuffProxiedTransmitters: { supported: boolean };\r\n\t\t\tfirmware: { supported: boolean };\r\n\t\t\tidentify: { supported: boolean };\r\n\t\t\tlicense: { supported: boolean };\r\n\t\t\tmicStatus?: { supported: boolean };\r\n\t\t\tserialNumber: { supported: boolean };\r\n\t\t\tuptime: { supported: boolean };\r\n\t\t};\r\n\t};\r\n\tfeatures: {\r\n\t\taudioChannelCount: { count: number } | null;\r\n\t\taudioMute: { muted: boolean } | null;\r\n\t\taudioNetwork: {\r\n\t\t\tinterface: {\r\n\t\t\t\tgateway: string | null;\r\n\t\t\t\tipAddress: string | null;\r\n\t\t\t\tipMode: IpMode;\r\n\t\t\t\tmacAddress: string;\r\n\t\t\t\tsubnetMask: string | null;\r\n\t\t\t};\r\n\t\t} | null;\r\n\t\tavailablePackages?: { primaryPackages: Array<{ key: string; version: string }> } | null;\r\n\t\tbatteryLevel?: {\r\n\t\t\tpercentage: number;\r\n\t\t\tstatus: { currentState: BatteryState; targetState: BatteryState | null; timeToTargetState: string | null };\r\n\t\t} | null;\r\n\t\tcontrolNetwork: {\r\n\t\t\tinterface: {\r\n\t\t\t\tgateway: string | null;\r\n\t\t\t\tipAddress: string | null;\r\n\t\t\t\tipMode: IpMode;\r\n\t\t\t\tmacAddress: string;\r\n\t\t\t\tsubnetMask: string | null;\r\n\t\t\t};\r\n\t\t} | null;\r\n\t\tdanteAudioNetwork: { name: string } | null;\r\n\t\tdoublestuffProxiedTransmitters: DoublestuffProxiedTransmittersFragment | null;\r\n\t\tfirmware: { valid: boolean; version: string } | null;\r\n\t\tidentify: { identifying: boolean } | null;\r\n\t\tlicense: { info: Array } | null;\r\n\t\tmicStatus?: { status: MicStatus } | null;\r\n\t\tname: { name: string } | null;\r\n\t\tserialNumber: { serialNumber: string } | null;\r\n\t\tuptime: { uptime: string } | null;\r\n\t};\r\n};\r\n\r\nexport type PropertyPanelDeviceUpdateFragment = {\r\n\tid: string;\r\n\tfeatures:\r\n\t\t| { audioMute: { muted: boolean } | null }\r\n\t\t| { availablePackages: { primaryPackages: Array<{ key: string; version: string }> } | null }\r\n\t\t| {\r\n\t\t\t\tbatteryLevel: {\r\n\t\t\t\t\tpercentage: number;\r\n\t\t\t\t\tstatus: {\r\n\t\t\t\t\t\tcurrentState: BatteryState;\r\n\t\t\t\t\t\ttargetState: BatteryState | null;\r\n\t\t\t\t\t\ttimeToTargetState: string | null;\r\n\t\t\t\t\t};\r\n\t\t\t\t} | null;\r\n\t\t }\r\n\t\t| { doublestuffProxiedTransmitters: DoublestuffProxiedTransmittersFragment | null }\r\n\t\t| { identify: { identifying: boolean } | null }\r\n\t\t| { micStatus: { status: MicStatus } | null }\r\n\t\t| { name: { name: string } | null }\r\n\t\t| { uptime: { uptime: string } | null }\r\n\t\t| {};\r\n};\r\n\r\nexport type PropertyPanelDeviceQueryVariables = Exact<{\r\n\tnodeId: Scalars['ID']['input'];\r\n\trequestFirmwareFields: Scalars['Boolean']['input'];\r\n\trequestProxiedDevices: Scalars['Boolean']['input'];\r\n}>;\r\n\r\nexport type PropertyPanelDeviceQueryOpResult = { node: PropertyPanelDeviceFragment | {} };\r\n\r\nexport type PropertyPanelDeviceSubscriptionVariables = Exact<{\r\n\tid: Scalars['ID']['input'];\r\n\ttypes: Array | NodeChangeType;\r\n\trequestFirmwareFields: Scalars['Boolean']['input'];\r\n\trequestProxiedDevices: Scalars['Boolean']['input'];\r\n}>;\r\n\r\nexport type PropertyPanelDeviceSubscriptionOpResult = {\r\n\tnodeChanges:\r\n\t\t| PropertyPanelDeviceFragment\r\n\t\t| PropertyPanelDeviceUpdateFragment\r\n\t\t| { id: string; status: DeviceStatus }\r\n\t\t| {};\r\n};\r\n\r\nexport type DeviceSupportedFeaturesFragment = {\r\n\taudioMute: { supported: boolean };\r\n\taudioNetwork: { supported: boolean };\r\n\tavailablePackages: { supported: boolean };\r\n\tbatteryLevel?: { supported: boolean };\r\n\tcontrolNetwork: { supported: boolean };\r\n\tdanteAudioNetwork: { supported: boolean };\r\n\tdoublestuffProxiedTransmitters: { supported: boolean };\r\n\tfirmware: { supported: boolean };\r\n\tidentify: { supported: boolean };\r\n\tmicStatus?: { supported: boolean };\r\n\tname: { supported: boolean };\r\n\tproxiedDevices?: { supported: boolean };\r\n\tserialNumber: { supported: boolean };\r\n\tuptime: { supported: boolean };\r\n\tupdateProgress: { supported: boolean };\r\n};\r\n\r\nexport type DeviceStartIdentifyMutationVariables = Exact<{\r\n\tstartIdentifyId: Scalars['ID']['input'];\r\n}>;\r\n\r\nexport type DeviceStartIdentifyMutationOpResult = {\r\n\tstartIdentify: { error: { code: ErrorCode; message: string } | null };\r\n};\r\n\r\nexport type DeviceStopIdentifyMutationVariables = Exact<{\r\n\tstopIdentifyId: Scalars['ID']['input'];\r\n}>;\r\n\r\nexport type DeviceStopIdentifyMutationOpResult = {\r\n\tstopIdentify: { error: { code: ErrorCode; message: string } | null };\r\n};\r\n\r\nexport type DeviceRebootMutationVariables = Exact<{\r\n\trebootDeviceId: Scalars['ID']['input'];\r\n}>;\r\n\r\nexport type DeviceRebootMutationOpResult = { rebootDevice: { error: { code: ErrorCode; message: string } | null } };\r\n\r\nexport type DeviceUpdateMutationVariables = Exact<{\r\n\tupdates: Array | NodeUpdateInput;\r\n}>;\r\n\r\nexport type DeviceUpdateMutationOpResult = {\r\n\tupdateNodes: Array<{ error: { code: ErrorCode; message: string } | null } | {}>;\r\n};\r\n\r\nexport type DeviceUpdateFirmwareMutationVariables = Exact<{\r\n\tinput: Array | UpdateDeviceFirmwareInput;\r\n}>;\r\n\r\nexport type DeviceUpdateFirmwareMutationOpResult = {\r\n\tupdateFirmware: { requestId: string; state: FirmwareUpdateRequestState };\r\n};\r\n\r\nexport type DiscoveryDeviceFragment = {\r\n\tid: string;\r\n\tvirtual: boolean;\r\n\tstatus: DeviceStatus;\r\n\tisDevice: 'Device';\r\n\tinterface: { category: string; model: string | null };\r\n\tprotocol: { dmp: { ipAddress: string } | null };\r\n};\r\n\r\nexport type DiscoveredDevicesQueryVariables = Exact<{\r\n\tfirst: InputMaybe;\r\n\tafter: InputMaybe;\r\n\tdeviceModels: InputMaybe | Scalars['String']['input']>;\r\n}>;\r\n\r\nexport type DiscoveredDevicesQueryOpResult = {\r\n\tdiscoveredDevicesConnection: {\r\n\t\tpageInfo: { hasNextPage: boolean; endCursor: string };\r\n\t\tedges: Array<{ node: DiscoveryDeviceFragment | null }>;\r\n\t};\r\n};\r\n\r\nexport type DiscoveredDevicesSubscriptionVariables = Exact<{ [key: string]: never }>;\r\n\r\nexport type DiscoveredDevicesSubscriptionOpResult = {\r\n\tdiscoveredDevices: { added: DiscoveryDeviceFragment } | { removed: string };\r\n};\r\n\r\nexport type DiscoveredDeviceSubscriptionVariables = Exact<{\r\n\tid: Scalars['ID']['input'];\r\n\ttypes: Array | NodeChangeType;\r\n}>;\r\n\r\nexport type DiscoveredDeviceSubscriptionOpResult = { nodeChanges: DiscoveryDeviceFragment | {} };\r\n\r\nexport type GenerateDetectionTokenVariables = Exact<{ [key: string]: never }>;\r\n\r\nexport type GenerateDetectionTokenOpResult = {\r\n\tgenerateDetectionToken: { generatedAt: string; expiresAt: string; token: string };\r\n};\r\n\r\nexport type UpdateProgressFragment = {\r\n\tdeviceProgressPercentage: number;\r\n\tfirmwarePackageKey: string;\r\n\tfirmwarePackageVersion: string;\r\n\tstageProgressPercentage: number;\r\n\tupdateStage: FirmwareUpdateStage;\r\n\tupdateStatus: FirmwareUpdateStatus;\r\n};\r\n\r\nexport type ProxiedTransmitterStatusFragment = { batteryLevelPercentage: number | null };\r\n\r\nexport type ProxiedTransmittersStatusFragment = {\r\n\tmic1: ProxiedTransmitterStatusFragment | null;\r\n\tmic2: ProxiedTransmitterStatusFragment | null;\r\n};\r\n\r\nexport type ProxiedDeviceFragment = { id: string; isDevice: 'Device' };\r\n\r\nexport type InventoryDeviceFragment = {\r\n\tid: string;\r\n\thardwareId: string;\r\n\tvirtual: boolean;\r\n\tstatus: DeviceStatus;\r\n\tisDevice: 'Device';\r\n\tdescription: { features: DeviceSupportedFeaturesFragment };\r\n\tinterface: { category: string; model: string | null };\r\n\tfeatures: {\r\n\t\tavailablePackages?: { primaryPackages: Array<{ key: string; version: string }> } | null;\r\n\t\tbatteryLevel?: {\r\n\t\t\tpercentage: number;\r\n\t\t\tstatus: { currentState: BatteryState; targetState: BatteryState | null; timeToTargetState: string | null };\r\n\t\t} | null;\r\n\t\tcontrolNetwork: { interface: { ipAddress: string | null; macAddress: string } } | null;\r\n\t\tdoublestuffProxiedTransmitters: ProxiedTransmittersStatusFragment | null;\r\n\t\tfirmware: { valid: boolean; version: string } | null;\r\n\t\tidentify: { identifying: boolean } | null;\r\n\t\tname: { name: string } | null;\r\n\t\tproxiedDevices?: { proxiedDevices: Array | null } | null;\r\n\t\tserialNumber: { serialNumber: string } | null;\r\n\t\tupdateProgress?: UpdateProgressFragment | null;\r\n\t};\r\n\tprotocol: { dmp: { ipAddress: string } | null };\r\n};\r\n\r\nexport type InventoryDeviceUpdateFragment = {\r\n\tid: string;\r\n\tfeatures:\r\n\t\t| { availablePackages: { primaryPackages: Array<{ key: string; version: string }> } | null }\r\n\t\t| {\r\n\t\t\t\tbatteryLevel: {\r\n\t\t\t\t\tpercentage: number;\r\n\t\t\t\t\tstatus: {\r\n\t\t\t\t\t\tcurrentState: BatteryState;\r\n\t\t\t\t\t\ttargetState: BatteryState | null;\r\n\t\t\t\t\t\ttimeToTargetState: string | null;\r\n\t\t\t\t\t};\r\n\t\t\t\t} | null;\r\n\t\t }\r\n\t\t| { doublestuffProxiedTransmitters: ProxiedTransmittersStatusFragment | null }\r\n\t\t| { identify: { identifying: boolean } | null }\r\n\t\t| { name: { name: string } | null }\r\n\t\t| { proxiedDevices: { proxiedDevices: Array | null } | null }\r\n\t\t| { updateProgress: UpdateProgressFragment | null }\r\n\t\t| {};\r\n};\r\n\r\nexport type InventoryDeviceByIdQueryVariables = Exact<{\r\n\tnodeId: Scalars['ID']['input'];\r\n\trequestFirmwareFields: Scalars['Boolean']['input'];\r\n\trequestProxiedDevices: Scalars['Boolean']['input'];\r\n}>;\r\n\r\nexport type InventoryDeviceByIdQueryOpResult = { node: InventoryDeviceFragment | {} };\r\n\r\nexport type InventoryDeviceSubscriptionVariables = Exact<{\r\n\tid: Scalars['ID']['input'];\r\n\ttypes: Array | NodeChangeType;\r\n\trequestFirmwareFields: Scalars['Boolean']['input'];\r\n\trequestProxiedDevices: Scalars['Boolean']['input'];\r\n}>;\r\n\r\nexport type InventoryDeviceSubscriptionOpResult = {\r\n\tnodeChanges: InventoryDeviceFragment | InventoryDeviceUpdateFragment | { id: string; status: DeviceStatus } | {};\r\n};\r\n\r\nexport type DetectedDevicesFragment = {\r\n\tid: string;\r\n\thardwareId: string;\r\n\tcategory: string;\r\n\tmodel: string;\r\n\tserialNumber: string;\r\n\tmacAddress: string;\r\n\tfirmwareVersion: string;\r\n\tfirmwareValid: boolean;\r\n\tname: string;\r\n\tipAddress: string;\r\n\tisDetectedDevice: 'DetectedDevice';\r\n\tinterface: { interfaceId: number; version: string; beta: boolean };\r\n};\r\n\r\nexport type DetectedDeviceVariables = Exact<{\r\n\ttokenId: Scalars['Guid']['input'];\r\n}>;\r\n\r\nexport type DetectedDeviceOpResult = {\r\n\tdetectedDevices: Array<{\r\n\t\tdetectionToken: string;\r\n\t\tdetectedAt: string;\r\n\t\texpiresAt: string;\r\n\t\tclaimable: boolean;\r\n\t\tdevice: DetectedDevicesFragment;\r\n\t}>;\r\n};\r\n\r\nexport const ClaimedDeviceFragment = gql`\r\n\tfragment ClaimedDeviceFragment on Device {\r\n\t\tisDevice: __typename\r\n\t\tid\r\n\t\thardwareId\r\n\t\tstatus\r\n\t\tdescription {\r\n\t\t\tmodel\r\n\t\t}\r\n\t}\r\n`;\r\nexport const DoublestuffProxiedTransmitterFragment = gql`\r\n\tfragment DoublestuffProxiedTransmitterFragment on DoubleStuffProxiedTransmitter {\r\n\t\tname\r\n\t\tstatus\r\n\t\tonline\r\n\t\tbatteryLevelPercentage\r\n\t\tmuted\r\n\t}\r\n`;\r\nexport const DoublestuffProxiedTransmittersFragment = gql`\r\n\tfragment DoublestuffProxiedTransmittersFragment on DeviceDoubleStuffProxiedTransmitters {\r\n\t\tmic1 {\r\n\t\t\t...DoublestuffProxiedTransmitterFragment\r\n\t\t}\r\n\t\tmic2 {\r\n\t\t\t...DoublestuffProxiedTransmitterFragment\r\n\t\t}\r\n\t}\r\n\t${DoublestuffProxiedTransmitterFragment}\r\n`;\r\nexport const DeviceLicenseInfoFragment = gql`\r\n\tfragment DeviceLicenseInfoFragment on DeviceLicenseInfo {\r\n\t\tstate\r\n\t\tcount\r\n\t\texpirationDate\r\n\t}\r\n`;\r\nexport const PropertyPanelDeviceFragment = gql`\r\n\tfragment PropertyPanelDeviceFragment on Device {\r\n\t\tisDeviceNode: __typename\r\n\t\tid\r\n\t\tvirtual\r\n\t\tstatus\r\n\t\tprotocol {\r\n\t\t\tdmp {\r\n\t\t\t\tipAddress\r\n\t\t\t}\r\n\t\t}\r\n\t\tinterface {\r\n\t\t\tcategory\r\n\t\t\tmodel\r\n\t\t}\r\n\t\tdescription {\r\n\t\t\tfeatures {\r\n\t\t\t\taudioChannelCount {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\taudioMute {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\taudioNetwork {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\tavailablePackages {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\tbatteryLevel @include(if: $requestProxiedDevices) {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\tcontrolNetwork {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\tdanteAudioNetwork {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\tdoublestuffProxiedTransmitters {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\tfirmware {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\tidentify {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\tlicense {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\tmicStatus @include(if: $requestProxiedDevices) {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\tserialNumber {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t\tuptime {\r\n\t\t\t\t\tsupported\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfeatures {\r\n\t\t\taudioChannelCount {\r\n\t\t\t\tcount\r\n\t\t\t}\r\n\t\t\taudioMute {\r\n\t\t\t\tmuted\r\n\t\t\t}\r\n\t\t\taudioNetwork {\r\n\t\t\t\tinterface {\r\n\t\t\t\t\tgateway\r\n\t\t\t\t\tipAddress\r\n\t\t\t\t\tipMode\r\n\t\t\t\t\tmacAddress\r\n\t\t\t\t\tsubnetMask\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tavailablePackages @include(if: $requestFirmwareFields) {\r\n\t\t\t\tprimaryPackages {\r\n\t\t\t\t\tkey\r\n\t\t\t\t\tversion\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbatteryLevel @include(if: $requestProxiedDevices) {\r\n\t\t\t\tpercentage\r\n\t\t\t\tstatus {\r\n\t\t\t\t\tcurrentState\r\n\t\t\t\t\ttargetState\r\n\t\t\t\t\ttimeToTargetState\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcontrolNetwork {\r\n\t\t\t\tinterface {\r\n\t\t\t\t\tgateway\r\n\t\t\t\t\tipAddress\r\n\t\t\t\t\tipMode\r\n\t\t\t\t\tmacAddress\r\n\t\t\t\t\tsubnetMask\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdanteAudioNetwork {\r\n\t\t\t\tname\r\n\t\t\t}\r\n\t\t\tdoublestuffProxiedTransmitters {\r\n\t\t\t\t...DoublestuffProxiedTransmittersFragment\r\n\t\t\t}\r\n\t\t\tfirmware {\r\n\t\t\t\tvalid\r\n\t\t\t\tversion\r\n\t\t\t}\r\n\t\t\tidentify {\r\n\t\t\t\tidentifying\r\n\t\t\t}\r\n\t\t\tlicense {\r\n\t\t\t\tinfo {\r\n\t\t\t\t\t...DeviceLicenseInfoFragment\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmicStatus @include(if: $requestProxiedDevices) {\r\n\t\t\t\tstatus\r\n\t\t\t}\r\n\t\t\tname {\r\n\t\t\t\tname\r\n\t\t\t}\r\n\t\t\tserialNumber {\r\n\t\t\t\tserialNumber\r\n\t\t\t}\r\n\t\t\tuptime {\r\n\t\t\t\tuptime\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t${DoublestuffProxiedTransmittersFragment}\r\n\t${DeviceLicenseInfoFragment}\r\n`;\r\nexport const PropertyPanelDeviceUpdateFragment = gql`\r\n\tfragment PropertyPanelDeviceUpdateFragment on DeviceChange {\r\n\t\tid\r\n\t\tfeatures {\r\n\t\t\t... on DeviceAudioMuteChange {\r\n\t\t\t\taudioMute {\r\n\t\t\t\t\tmuted\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceAvailablePackagesChange @include(if: $requestFirmwareFields) {\r\n\t\t\t\tavailablePackages {\r\n\t\t\t\t\tprimaryPackages {\r\n\t\t\t\t\t\tkey\r\n\t\t\t\t\t\tversion\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceBatteryLevelChange @include(if: $requestProxiedDevices) {\r\n\t\t\t\tbatteryLevel {\r\n\t\t\t\t\tpercentage\r\n\t\t\t\t\tstatus {\r\n\t\t\t\t\t\tcurrentState\r\n\t\t\t\t\t\ttargetState\r\n\t\t\t\t\t\ttimeToTargetState\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceDoubleStuffProxiedTransmittersChange {\r\n\t\t\t\tdoublestuffProxiedTransmitters {\r\n\t\t\t\t\t...DoublestuffProxiedTransmittersFragment\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceIdentifyChange {\r\n\t\t\t\tidentify {\r\n\t\t\t\t\tidentifying\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceMicStatusChange @include(if: $requestProxiedDevices) {\r\n\t\t\t\tmicStatus {\r\n\t\t\t\t\tstatus\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceNameChange {\r\n\t\t\t\tname {\r\n\t\t\t\t\tname\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceUptimeChange {\r\n\t\t\t\tuptime {\r\n\t\t\t\t\tuptime\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t${DoublestuffProxiedTransmittersFragment}\r\n`;\r\nexport const DiscoveryDeviceFragment = gql`\r\n\tfragment DiscoveryDeviceFragment on Device {\r\n\t\tisDevice: __typename\r\n\t\tid\r\n\t\tinterface {\r\n\t\t\tcategory\r\n\t\t\tmodel\r\n\t\t}\r\n\t\tvirtual\r\n\t\tstatus\r\n\t\tprotocol {\r\n\t\t\tdmp {\r\n\t\t\t\tipAddress\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n`;\r\nexport const DeviceSupportedFeaturesFragment = gql`\r\n\tfragment DeviceSupportedFeaturesFragment on DeviceSupportedFeatures {\r\n\t\taudioMute {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\taudioNetwork {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tavailablePackages {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tbatteryLevel @include(if: $requestProxiedDevices) {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tcontrolNetwork {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tdanteAudioNetwork {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tdoublestuffProxiedTransmitters {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tfirmware {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tidentify {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tmicStatus @include(if: $requestProxiedDevices) {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tname {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tproxiedDevices @include(if: $requestProxiedDevices) {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tserialNumber {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tuptime {\r\n\t\t\tsupported\r\n\t\t}\r\n\t\tupdateProgress {\r\n\t\t\tsupported\r\n\t\t}\r\n\t}\r\n`;\r\nexport const ProxiedTransmitterStatusFragment = gql`\r\n\tfragment ProxiedTransmitterStatusFragment on DoubleStuffProxiedTransmitter {\r\n\t\tbatteryLevelPercentage\r\n\t}\r\n`;\r\nexport const ProxiedTransmittersStatusFragment = gql`\r\n\tfragment ProxiedTransmittersStatusFragment on DeviceDoubleStuffProxiedTransmitters {\r\n\t\tmic1 {\r\n\t\t\t...ProxiedTransmitterStatusFragment\r\n\t\t}\r\n\t\tmic2 {\r\n\t\t\t...ProxiedTransmitterStatusFragment\r\n\t\t}\r\n\t}\r\n\t${ProxiedTransmitterStatusFragment}\r\n`;\r\nexport const ProxiedDeviceFragment = gql`\r\n\tfragment ProxiedDeviceFragment on Device {\r\n\t\tisDevice: __typename\r\n\t\tid\r\n\t}\r\n`;\r\nexport const UpdateProgressFragment = gql`\r\n\tfragment UpdateProgressFragment on DeviceUpdateProgress {\r\n\t\tdeviceProgressPercentage\r\n\t\tfirmwarePackageKey\r\n\t\tfirmwarePackageVersion\r\n\t\tstageProgressPercentage\r\n\t\tupdateStage\r\n\t\tupdateStatus\r\n\t}\r\n`;\r\nexport const InventoryDeviceFragment = gql`\r\n\tfragment InventoryDeviceFragment on Device {\r\n\t\tisDevice: __typename\r\n\t\tid\r\n\t\thardwareId\r\n\t\tvirtual\r\n\t\tstatus\r\n\t\tdescription {\r\n\t\t\tfeatures {\r\n\t\t\t\t...DeviceSupportedFeaturesFragment\r\n\t\t\t}\r\n\t\t}\r\n\t\tinterface {\r\n\t\t\tcategory\r\n\t\t\tmodel\r\n\t\t}\r\n\t\tfeatures {\r\n\t\t\tavailablePackages @include(if: $requestFirmwareFields) {\r\n\t\t\t\tprimaryPackages {\r\n\t\t\t\t\tkey\r\n\t\t\t\t\tversion\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbatteryLevel @include(if: $requestProxiedDevices) {\r\n\t\t\t\tpercentage\r\n\t\t\t\tstatus {\r\n\t\t\t\t\tcurrentState\r\n\t\t\t\t\ttargetState\r\n\t\t\t\t\ttimeToTargetState\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcontrolNetwork {\r\n\t\t\t\tinterface {\r\n\t\t\t\t\tipAddress\r\n\t\t\t\t\tmacAddress\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdoublestuffProxiedTransmitters {\r\n\t\t\t\t...ProxiedTransmittersStatusFragment\r\n\t\t\t}\r\n\t\t\tfirmware {\r\n\t\t\t\tvalid\r\n\t\t\t\tversion\r\n\t\t\t}\r\n\t\t\tidentify {\r\n\t\t\t\tidentifying\r\n\t\t\t}\r\n\t\t\tname {\r\n\t\t\t\tname\r\n\t\t\t}\r\n\t\t\tproxiedDevices @include(if: $requestProxiedDevices) {\r\n\t\t\t\tproxiedDevices {\r\n\t\t\t\t\t...ProxiedDeviceFragment\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tserialNumber {\r\n\t\t\t\tserialNumber\r\n\t\t\t}\r\n\t\t\tupdateProgress @include(if: $requestFirmwareFields) {\r\n\t\t\t\t...UpdateProgressFragment\r\n\t\t\t}\r\n\t\t}\r\n\t\tprotocol {\r\n\t\t\tdmp {\r\n\t\t\t\tipAddress\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t${DeviceSupportedFeaturesFragment}\r\n\t${ProxiedTransmittersStatusFragment}\r\n\t${ProxiedDeviceFragment}\r\n\t${UpdateProgressFragment}\r\n`;\r\nexport const InventoryDeviceUpdateFragment = gql`\r\n\tfragment InventoryDeviceUpdateFragment on DeviceChange {\r\n\t\tid\r\n\t\tfeatures {\r\n\t\t\t... on DeviceAvailablePackagesChange @include(if: $requestFirmwareFields) {\r\n\t\t\t\tavailablePackages {\r\n\t\t\t\t\tprimaryPackages {\r\n\t\t\t\t\t\tkey\r\n\t\t\t\t\t\tversion\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceBatteryLevelChange @include(if: $requestProxiedDevices) {\r\n\t\t\t\tbatteryLevel {\r\n\t\t\t\t\tpercentage\r\n\t\t\t\t\tstatus {\r\n\t\t\t\t\t\tcurrentState\r\n\t\t\t\t\t\ttargetState\r\n\t\t\t\t\t\ttimeToTargetState\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceDoubleStuffProxiedTransmittersChange {\r\n\t\t\t\tdoublestuffProxiedTransmitters {\r\n\t\t\t\t\t...ProxiedTransmittersStatusFragment\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceIdentifyChange {\r\n\t\t\t\tidentify {\r\n\t\t\t\t\tidentifying\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceNameChange {\r\n\t\t\t\tname {\r\n\t\t\t\t\tname\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceProxiedDevicesChange @include(if: $requestProxiedDevices) {\r\n\t\t\t\tproxiedDevices {\r\n\t\t\t\t\tproxiedDevices {\r\n\t\t\t\t\t\t...ProxiedDeviceFragment\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceUpdateProgressChange @include(if: $requestFirmwareFields) {\r\n\t\t\t\tupdateProgress {\r\n\t\t\t\t\t...UpdateProgressFragment\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t${ProxiedTransmittersStatusFragment}\r\n\t${ProxiedDeviceFragment}\r\n\t${UpdateProgressFragment}\r\n`;\r\nexport const DetectedDevicesFragment = gql`\r\n\tfragment DetectedDevicesFragment on DetectedDevice {\r\n\t\tisDetectedDevice: __typename\r\n\t\tid\r\n\t\thardwareId\r\n\t\tinterface {\r\n\t\t\tinterfaceId\r\n\t\t\tversion\r\n\t\t\tbeta\r\n\t\t}\r\n\t\tcategory\r\n\t\tmodel\r\n\t\tserialNumber\r\n\t\tmacAddress\r\n\t\tfirmwareVersion\r\n\t\tfirmwareValid\r\n\t\tname\r\n\t\tipAddress\r\n\t}\r\n`;\r\nexport const ClaimDeviceDocument = gql`\r\n\tmutation ClaimDevice($deviceNodeId: ID!, $tokenId: Guid!) {\r\n\t\tclaimDevice(id: $deviceNodeId, tokenId: $tokenId)\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class ClaimDeviceGQL extends Apollo.Mutation {\r\n\toverride document = ClaimDeviceDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const UnclaimDeviceDocument = gql`\r\n\tmutation UnclaimDevice($deviceNodeId: ID!) {\r\n\t\tunclaimDevice(id: $deviceNodeId)\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class UnclaimDeviceGQL extends Apollo.Mutation {\r\n\toverride document = UnclaimDeviceDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const ClaimDeviceByMacSerialNumberDocument = gql`\r\n\tmutation ClaimDeviceByMacSerialNumber($claimRequests: [MacAndSerialClaimInput!]!) {\r\n\t\tclaimDeviceUsingMacAndSerial(claims: $claimRequests) {\r\n\t\t\tmacAndSerialClaim {\r\n\t\t\t\tmacAddress\r\n\t\t\t\tserialNumber\r\n\t\t\t}\r\n\t\t\terror {\r\n\t\t\t\tcode\r\n\t\t\t\tmessage\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class ClaimDeviceByMacSerialNumberGQL extends Apollo.Mutation<\r\n\tClaimDeviceByMacSerialNumberOpResult,\r\n\tClaimDeviceByMacSerialNumberVariables\r\n> {\r\n\toverride document = ClaimDeviceByMacSerialNumberDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const ClaimedDevicesSubscriptionDocument = gql`\r\n\tsubscription ClaimedDevicesSubscription {\r\n\t\tclaimedDevices {\r\n\t\t\t... on DeviceClaimed {\r\n\t\t\t\tclaimed {\r\n\t\t\t\t\t...ClaimedDeviceFragment\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceUnclaimed {\r\n\t\t\t\tunclaimed\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t${ClaimedDeviceFragment}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class ClaimedDevicesSubscriptionGQL extends Apollo.Subscription<\r\n\tClaimedDevicesSubscriptionOpResult,\r\n\tClaimedDevicesSubscriptionVariables\r\n> {\r\n\toverride document = ClaimedDevicesSubscriptionDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const DeletePendingClaimDocument = gql`\r\n\tmutation DeletePendingClaim($pendingClaimId: ID!) {\r\n\t\tdeletePendingDeviceClaim(id: $pendingClaimId) {\r\n\t\t\tid\r\n\t\t\terror {\r\n\t\t\t\tcode\r\n\t\t\t\tmessage\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class DeletePendingClaimGQL extends Apollo.Mutation {\r\n\toverride document = DeletePendingClaimDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const ListPendingClaimsDocument = gql`\r\n\tquery ListPendingClaims {\r\n\t\tpendingDeviceClaims {\r\n\t\t\tid\r\n\t\t\tmacAddress\r\n\t\t\tserialNumber\r\n\t\t\tcreatedAt\r\n\t\t}\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class ListPendingClaimsGQL extends Apollo.Query {\r\n\toverride document = ListPendingClaimsDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const PendingClaimStatusDocument = gql`\r\n\tsubscription PendingClaimStatus {\r\n\t\tpendingClaims {\r\n\t\t\tid\r\n\t\t\tserialNumber\r\n\t\t\tmacAddress\r\n\t\t\tstatus\r\n\t\t}\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class PendingClaimStatusGQL extends Apollo.Subscription<\r\n\tPendingClaimStatusOpResult,\r\n\tPendingClaimStatusVariables\r\n> {\r\n\toverride document = PendingClaimStatusDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const OnDetectedDevicesDocument = gql`\r\n\tsubscription OnDetectedDevices($tokenId: Guid!) {\r\n\t\tdetectedDevices(tokenId: $tokenId) {\r\n\t\t\tdevice {\r\n\t\t\t\tid\r\n\t\t\t\thardwareId\r\n\t\t\t\tinterface {\r\n\t\t\t\t\tinterfaceId\r\n\t\t\t\t\tversion\r\n\t\t\t\t\tbeta\r\n\t\t\t\t}\r\n\t\t\t\tcategory\r\n\t\t\t\tmodel\r\n\t\t\t\tserialNumber\r\n\t\t\t\tmacAddress\r\n\t\t\t\tfirmwareVersion\r\n\t\t\t\tfirmwareValid\r\n\t\t\t\tname\r\n\t\t\t\tipAddress\r\n\t\t\t}\r\n\t\t\tdetectionToken\r\n\t\t\tdetectedAt\r\n\t\t\texpiresAt\r\n\t\t\tclaimable\r\n\t\t}\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class OnDetectedDevicesGQL extends Apollo.Subscription {\r\n\toverride document = OnDetectedDevicesDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const PropertyPanelDeviceQueryDocument = gql`\r\n\tquery PropertyPanelDeviceQuery($nodeId: ID!, $requestFirmwareFields: Boolean!, $requestProxiedDevices: Boolean!) {\r\n\t\tnode(id: $nodeId) {\r\n\t\t\t...PropertyPanelDeviceFragment\r\n\t\t}\r\n\t}\r\n\t${PropertyPanelDeviceFragment}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class PropertyPanelDeviceQueryGQL extends Apollo.Query<\r\n\tPropertyPanelDeviceQueryOpResult,\r\n\tPropertyPanelDeviceQueryVariables\r\n> {\r\n\toverride document = PropertyPanelDeviceQueryDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const PropertyPanelDeviceSubscriptionDocument = gql`\r\n\tsubscription PropertyPanelDeviceSubscription(\r\n\t\t$id: ID!\r\n\t\t$types: [NodeChangeType!]!\r\n\t\t$requestFirmwareFields: Boolean!\r\n\t\t$requestProxiedDevices: Boolean!\r\n\t) {\r\n\t\tnodeChanges(id: $id, types: $types) {\r\n\t\t\t... on DeviceStatusChange {\r\n\t\t\t\tid\r\n\t\t\t\tstatus\r\n\t\t\t}\r\n\t\t\t...PropertyPanelDeviceFragment\r\n\t\t\t...PropertyPanelDeviceUpdateFragment\r\n\t\t}\r\n\t}\r\n\t${PropertyPanelDeviceFragment}\r\n\t${PropertyPanelDeviceUpdateFragment}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class PropertyPanelDeviceSubscriptionGQL extends Apollo.Subscription<\r\n\tPropertyPanelDeviceSubscriptionOpResult,\r\n\tPropertyPanelDeviceSubscriptionVariables\r\n> {\r\n\toverride document = PropertyPanelDeviceSubscriptionDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const DeviceStartIdentifyMutationDocument = gql`\r\n\tmutation DeviceStartIdentifyMutation($startIdentifyId: ID!) {\r\n\t\tstartIdentify(id: $startIdentifyId) {\r\n\t\t\terror {\r\n\t\t\t\tcode\r\n\t\t\t\tmessage\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class DeviceStartIdentifyMutationGQL extends Apollo.Mutation<\r\n\tDeviceStartIdentifyMutationOpResult,\r\n\tDeviceStartIdentifyMutationVariables\r\n> {\r\n\toverride document = DeviceStartIdentifyMutationDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const DeviceStopIdentifyMutationDocument = gql`\r\n\tmutation DeviceStopIdentifyMutation($stopIdentifyId: ID!) {\r\n\t\tstopIdentify(id: $stopIdentifyId) {\r\n\t\t\terror {\r\n\t\t\t\tcode\r\n\t\t\t\tmessage\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class DeviceStopIdentifyMutationGQL extends Apollo.Mutation<\r\n\tDeviceStopIdentifyMutationOpResult,\r\n\tDeviceStopIdentifyMutationVariables\r\n> {\r\n\toverride document = DeviceStopIdentifyMutationDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const DeviceRebootMutationDocument = gql`\r\n\tmutation DeviceRebootMutation($rebootDeviceId: ID!) {\r\n\t\trebootDevice(id: $rebootDeviceId) {\r\n\t\t\terror {\r\n\t\t\t\tcode\r\n\t\t\t\tmessage\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class DeviceRebootMutationGQL extends Apollo.Mutation<\r\n\tDeviceRebootMutationOpResult,\r\n\tDeviceRebootMutationVariables\r\n> {\r\n\toverride document = DeviceRebootMutationDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const DeviceUpdateMutationDocument = gql`\r\n\tmutation DeviceUpdateMutation($updates: [NodeUpdateInput!]!) {\r\n\t\tupdateNodes(updates: $updates) {\r\n\t\t\t... on DeviceOperationResult {\r\n\t\t\t\terror {\r\n\t\t\t\t\tcode\r\n\t\t\t\t\tmessage\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class DeviceUpdateMutationGQL extends Apollo.Mutation<\r\n\tDeviceUpdateMutationOpResult,\r\n\tDeviceUpdateMutationVariables\r\n> {\r\n\toverride document = DeviceUpdateMutationDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const DeviceUpdateFirmwareMutationDocument = gql`\r\n\tmutation DeviceUpdateFirmwareMutation($input: [UpdateDeviceFirmwareInput!]!) {\r\n\t\tupdateFirmware(input: $input) {\r\n\t\t\trequestId\r\n\t\t\tstate\r\n\t\t}\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class DeviceUpdateFirmwareMutationGQL extends Apollo.Mutation<\r\n\tDeviceUpdateFirmwareMutationOpResult,\r\n\tDeviceUpdateFirmwareMutationVariables\r\n> {\r\n\toverride document = DeviceUpdateFirmwareMutationDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const DiscoveredDevicesQueryDocument = gql`\r\n\tquery DiscoveredDevicesQuery($first: Int, $after: String, $deviceModels: [String!]) {\r\n\t\tdiscoveredDevicesConnection(first: $first, after: $after, deviceModels: $deviceModels) {\r\n\t\t\tpageInfo {\r\n\t\t\t\thasNextPage\r\n\t\t\t\tendCursor\r\n\t\t\t}\r\n\t\t\tedges {\r\n\t\t\t\tnode {\r\n\t\t\t\t\t...DiscoveryDeviceFragment\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t${DiscoveryDeviceFragment}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class DiscoveredDevicesQueryGQL extends Apollo.Query<\r\n\tDiscoveredDevicesQueryOpResult,\r\n\tDiscoveredDevicesQueryVariables\r\n> {\r\n\toverride document = DiscoveredDevicesQueryDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const DiscoveredDevicesSubscriptionDocument = gql`\r\n\tsubscription DiscoveredDevicesSubscription {\r\n\t\tdiscoveredDevices {\r\n\t\t\t... on DeviceAdded {\r\n\t\t\t\tadded {\r\n\t\t\t\t\t...DiscoveryDeviceFragment\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t... on DeviceRemoved {\r\n\t\t\t\tremoved\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t${DiscoveryDeviceFragment}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class DiscoveredDevicesSubscriptionGQL extends Apollo.Subscription<\r\n\tDiscoveredDevicesSubscriptionOpResult,\r\n\tDiscoveredDevicesSubscriptionVariables\r\n> {\r\n\toverride document = DiscoveredDevicesSubscriptionDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const DiscoveredDeviceSubscriptionDocument = gql`\r\n\tsubscription DiscoveredDeviceSubscription($id: ID!, $types: [NodeChangeType!]!) {\r\n\t\tnodeChanges(id: $id, types: $types) {\r\n\t\t\t...DiscoveryDeviceFragment\r\n\t\t}\r\n\t}\r\n\t${DiscoveryDeviceFragment}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class DiscoveredDeviceSubscriptionGQL extends Apollo.Subscription<\r\n\tDiscoveredDeviceSubscriptionOpResult,\r\n\tDiscoveredDeviceSubscriptionVariables\r\n> {\r\n\toverride document = DiscoveredDeviceSubscriptionDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const GenerateDetectionTokenDocument = gql`\r\n\tmutation GenerateDetectionToken {\r\n\t\tgenerateDetectionToken {\r\n\t\t\tgeneratedAt\r\n\t\t\texpiresAt\r\n\t\t\ttoken\r\n\t\t}\r\n\t}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class GenerateDetectionTokenGQL extends Apollo.Mutation<\r\n\tGenerateDetectionTokenOpResult,\r\n\tGenerateDetectionTokenVariables\r\n> {\r\n\toverride document = GenerateDetectionTokenDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const InventoryDeviceByIdQueryDocument = gql`\r\n\tquery InventoryDeviceByIdQuery($nodeId: ID!, $requestFirmwareFields: Boolean!, $requestProxiedDevices: Boolean!) {\r\n\t\tnode(id: $nodeId) {\r\n\t\t\t...InventoryDeviceFragment\r\n\t\t}\r\n\t}\r\n\t${InventoryDeviceFragment}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class InventoryDeviceByIdQueryGQL extends Apollo.Query<\r\n\tInventoryDeviceByIdQueryOpResult,\r\n\tInventoryDeviceByIdQueryVariables\r\n> {\r\n\toverride document = InventoryDeviceByIdQueryDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const InventoryDeviceSubscriptionDocument = gql`\r\n\tsubscription InventoryDeviceSubscription(\r\n\t\t$id: ID!\r\n\t\t$types: [NodeChangeType!]!\r\n\t\t$requestFirmwareFields: Boolean!\r\n\t\t$requestProxiedDevices: Boolean!\r\n\t) {\r\n\t\tnodeChanges(id: $id, types: $types) {\r\n\t\t\t... on DeviceStatusChange {\r\n\t\t\t\tid\r\n\t\t\t\tstatus\r\n\t\t\t}\r\n\t\t\t...InventoryDeviceFragment\r\n\t\t\t...InventoryDeviceUpdateFragment\r\n\t\t}\r\n\t}\r\n\t${InventoryDeviceFragment}\r\n\t${InventoryDeviceUpdateFragment}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class InventoryDeviceSubscriptionGQL extends Apollo.Subscription<\r\n\tInventoryDeviceSubscriptionOpResult,\r\n\tInventoryDeviceSubscriptionVariables\r\n> {\r\n\toverride document = InventoryDeviceSubscriptionDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\nexport const DetectedDeviceDocument = gql`\r\n\tquery DetectedDevice($tokenId: Guid!) {\r\n\t\tdetectedDevices(tokenId: $tokenId) {\r\n\t\t\tdevice {\r\n\t\t\t\t...DetectedDevicesFragment\r\n\t\t\t}\r\n\t\t\tdetectionToken\r\n\t\t\tdetectedAt\r\n\t\t\texpiresAt\r\n\t\t\tclaimable\r\n\t\t}\r\n\t}\r\n\t${DetectedDevicesFragment}\r\n`;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class DetectedDeviceGQL extends Apollo.Query {\r\n\toverride document = DetectedDeviceDocument;\r\n\toverride client = 'sysApi';\r\n\tconstructor(apollo: Apollo.Apollo) {\r\n\t\tsuper(apollo);\r\n\t}\r\n}\r\n","import { Injectable, signal } from '@angular/core';\r\nimport { Observable, map, catchError, of } from 'rxjs';\r\n\r\nimport { UpdateRequestResponse, UpdateResponse, UpdateState } from '@shure/cloud/shared/models/http';\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { CloudDeviceApiService } from '../api/cloud-device-api.service';\r\n\r\nimport {\r\n\tDeviceRebootMutationGQL,\r\n\tDeviceStartIdentifyMutationGQL,\r\n\tDeviceStopIdentifyMutationGQL,\r\n\tDeviceUpdateFirmwareMutationGQL,\r\n\tDeviceUpdateMutationGQL,\r\n\tFirmwareUpdateRequestState,\r\n\tUpdateDeviceFirmwareInput\r\n} from './graphql/generated/cloud-sys-api';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class SysApiCloudDeviceApiService extends CloudDeviceApiService {\r\n\tprivate readonly logger: ILogger;\r\n\tpublic override readonly lastFWUpdateTime = signal(0);\r\n\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\tprivate readonly deviceStopIdentifyMutationGQL: DeviceStopIdentifyMutationGQL,\r\n\t\tprivate readonly deviceStartIdentifyMutationGQL: DeviceStartIdentifyMutationGQL,\r\n\t\tprivate readonly deviceRebootMutationGQL: DeviceRebootMutationGQL,\r\n\t\tprivate readonly deviceUpdateMutationGQL: DeviceUpdateMutationGQL,\r\n\t\tprivate readonly deviceUpdateFirmwareMutationGQL: DeviceUpdateFirmwareMutationGQL\r\n\t) {\r\n\t\tsuper();\r\n\r\n\t\tthis.logger = logger.createScopedLogger('DaiCloudDeviceService');\r\n\t}\r\n\r\n\t/**\r\n\t * Toggle identify for a device.\r\n\t * @param deviceId\r\n\t * @param identify\r\n\t * @returns\r\n\t */\r\n\tpublic setIdentify(deviceId: string, identify: boolean): Observable> {\r\n\t\tthis.logger.trace('toggleIdentify', 'Toggling identify', { deviceId, identify });\r\n\t\tconst mutation$: Observable = identify\r\n\t\t\t? this.deviceStartIdentifyMutationGQL.mutate({ startIdentifyId: deviceId })\r\n\t\t\t: this.deviceStopIdentifyMutationGQL.mutate({ stopIdentifyId: deviceId });\r\n\r\n\t\treturn mutation$.pipe(\r\n\t\t\tmap(() => {\r\n\t\t\t\tthis.logger.trace('toggleIdentify', 'Done', { deviceId });\r\n\t\t\t\treturn { state: UpdateState.Done };\r\n\t\t\t}),\r\n\t\t\tcatchError((error: Error) => {\r\n\t\t\t\tthis.logger.error('toggleIdentify', 'Error', { error });\r\n\t\t\t\treturn of({ state: UpdateState.Error, error: error.message });\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Set mute for a device.\r\n\t * @param deviceId\r\n\t * @param deviceMute\r\n\t * @returns\r\n\t */\r\n\tpublic setMute(deviceId: string, deviceMute: boolean): Observable> {\r\n\t\tthis.logger.trace('setMute', 'Setting mute', { deviceId, deviceMute });\r\n\t\treturn this.deviceUpdateMutationGQL\r\n\t\t\t.mutate({\r\n\t\t\t\tupdates: [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdevice: {\r\n\t\t\t\t\t\t\tfeatures: {\r\n\t\t\t\t\t\t\t\taudioMute: {\r\n\t\t\t\t\t\t\t\t\tmuted: deviceMute\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tid: deviceId\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t]\r\n\t\t\t})\r\n\t\t\t.pipe(\r\n\t\t\t\tmap((result) => {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\tresult.data?.updateNodes &&\r\n\t\t\t\t\t\t'error' in result.data.updateNodes[0] &&\r\n\t\t\t\t\t\tresult.data.updateNodes[0].error !== null\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tthis.logger.error('setMute', 'Error', {\r\n\t\t\t\t\t\t\tdeviceId,\r\n\t\t\t\t\t\t\tresult\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn { state: UpdateState.Error, error: result.data.updateNodes[0].error?.message };\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.logger.trace('setMute', 'Done', { deviceId });\r\n\t\t\t\t\treturn { state: UpdateState.Done };\r\n\t\t\t\t}),\r\n\t\t\t\tcatchError((error: Error) => {\r\n\t\t\t\t\tthis.logger.error('setMute', 'Error', { error });\r\n\t\t\t\t\treturn of({ state: UpdateState.Error, error: error.message });\r\n\t\t\t\t})\r\n\t\t\t);\r\n\t}\r\n\r\n\tpublic setDeviceName(deviceId: string, name: string): Observable> {\r\n\t\tthis.logger.trace('setName()', 'Setting name', { deviceId, name });\r\n\t\treturn this.deviceUpdateMutationGQL\r\n\t\t\t.mutate({\r\n\t\t\t\tupdates: [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdevice: {\r\n\t\t\t\t\t\t\tfeatures: {\r\n\t\t\t\t\t\t\t\tname: {\r\n\t\t\t\t\t\t\t\t\tname\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tid: deviceId\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t]\r\n\t\t\t})\r\n\t\t\t.pipe(\r\n\t\t\t\tmap((result) => {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\tresult.data?.updateNodes &&\r\n\t\t\t\t\t\t'error' in result.data.updateNodes[0] &&\r\n\t\t\t\t\t\tresult.data.updateNodes[0].error !== null\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tthis.logger.error('setName', 'Error', {\r\n\t\t\t\t\t\t\tdeviceId,\r\n\t\t\t\t\t\t\tresult\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn { state: UpdateState.Error, error: result.data.updateNodes[0].error?.message };\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.logger.trace('setName()', 'Done', { deviceId });\r\n\t\t\t\t\treturn { state: UpdateState.Done };\r\n\t\t\t\t}),\r\n\t\t\t\tcatchError((error: Error) => {\r\n\t\t\t\t\tthis.logger.error('setName()', 'Error', { error });\r\n\t\t\t\t\treturn of({ state: UpdateState.Error, error: error.message });\r\n\t\t\t\t})\r\n\t\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Reboot a device\r\n\t * @param deviceId\r\n\t * @returns\r\n\t */\r\n\tpublic rebootDevice$(deviceId: string): Observable> {\r\n\t\tthis.logger.trace('rebootDevice()', 'Rebooting device', { deviceId });\r\n\t\treturn this.deviceRebootMutationGQL.mutate({ rebootDeviceId: deviceId }).pipe(\r\n\t\t\tmap((result) => {\r\n\t\t\t\tif (result.data?.rebootDevice.error) {\r\n\t\t\t\t\tthis.logger.error('rebootDevice', 'error', result.data?.rebootDevice.error);\r\n\t\t\t\t\tthrow new Error(result.data?.rebootDevice.error.message);\r\n\t\t\t\t}\r\n\t\t\t\tthis.logger.trace('rebootDevice', 'Done', { deviceId });\r\n\t\t\t\treturn { state: UpdateState.Done };\r\n\t\t\t}),\r\n\t\t\tcatchError((error: Error) => {\r\n\t\t\t\tthis.logger.error('rebootDevice', 'Error', { error });\r\n\t\t\t\treturn of({ state: UpdateState.Error, error: error.message });\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\r\n\tpublic updateFirmware$(updates: UpdateDeviceFirmwareInput[]): Observable> {\r\n\t\tthis.logger.debug('updateFirmware', 'Requesting updates', updates);\r\n\r\n\t\tthis.lastFWUpdateTime.set(Date.now());\r\n\r\n\t\treturn this.deviceUpdateFirmwareMutationGQL.mutate({ input: updates }).pipe(\r\n\t\t\tmap((result) => {\r\n\t\t\t\tif ('error' in result) {\r\n\t\t\t\t\tthrow result.error;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst { requestId, state: requestState } = result.data?.updateFirmware ?? {\r\n\t\t\t\t\trequestId: null,\r\n\t\t\t\t\tstate: null\r\n\t\t\t\t};\r\n\t\t\t\tif (this.isFirmwareUpdateRequestFailed(requestState)) {\r\n\t\t\t\t\tthis.logger.debug('updateFirmware', 'received GraphQL response with error(s)', { result });\r\n\t\t\t\t\tthrow new Error(`Update failed with state ${requestState}: ${requestId}`);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.logger.debug('updateFirmware', 'Request done', {\r\n\t\t\t\t\trequestId,\r\n\t\t\t\t\trequestState,\r\n\t\t\t\t\tupdates\r\n\t\t\t\t});\r\n\t\t\t\treturn { state: UpdateState.Done };\r\n\t\t\t}),\r\n\t\t\tcatchError((error: Error) => {\r\n\t\t\t\tthis.logger.error('updateFirmware', 'Error', { error });\r\n\t\t\t\treturn of({ state: UpdateState.Error, error: error.message });\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\r\n\tprivate isFirmwareUpdateRequestFailed(requestState: FirmwareUpdateRequestState | null | undefined): boolean {\r\n\t\tif (requestState === null || requestState === undefined) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tconst successStates = [\r\n\t\t\tFirmwareUpdateRequestState.Pending,\r\n\t\t\tFirmwareUpdateRequestState.InProgress,\r\n\t\t\tFirmwareUpdateRequestState.Successful\r\n\t\t];\r\n\r\n\t\treturn !successStates.includes(requestState);\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { ApolloCacheFactory, ApolloConnectionService } from '@shure/cloud/shared/apollo';\r\nimport { OktaInterfaceService, monitorLoginState } from '@shure/cloud/shared/okta/data-access';\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { SystemService } from '../api';\r\n\r\nimport result from './graphql/generated/cloud-sys-api';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class SysApiConnectionService extends ApolloConnectionService {\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\tsystemService: SystemService,\r\n\t\tapolloCacheFactory: ApolloCacheFactory,\r\n\t\toktaIntfService: OktaInterfaceService\r\n\t) {\r\n\t\tsuper(\r\n\t\t\tlogger,\r\n\t\t\t'sysApi',\r\n\t\t\tresult.possibleTypes,\r\n\t\t\t4,\r\n\t\t\tsystemService.getSysApiConnectInfo(),\r\n\t\t\tapolloCacheFactory,\r\n\t\t\toktaIntfService\r\n\t\t);\r\n\r\n\t\tmonitorLoginState(oktaIntfService, {\r\n\t\t\tonLogOut: apolloCacheFactory.resetCache.bind(this)\r\n\t\t});\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { MutationResult } from 'apollo-angular';\r\nimport { Observable, throwError } from 'rxjs';\r\nimport { catchError, filter, map, take } from 'rxjs/operators';\r\n\r\nimport { DetectionToken } from '@shure/cloud/shared/models/devices';\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { DetectionTokenApiService } from '../api/detection-token-api.service';\r\n\r\nimport { GenerateDetectionTokenGQL, GenerateDetectionTokenOpResult } from './graphql/generated/cloud-sys-api';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class SysApiDetectionTokenApiService implements DetectionTokenApiService {\r\n\tprivate readonly logger: ILogger;\r\n\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\tprivate readonly detectionTokenGQL: GenerateDetectionTokenGQL\r\n\t) {\r\n\t\tthis.logger = logger.createScopedLogger('SysApiDetectionTokenApiService');\r\n\t}\r\n\r\n\t/**\r\n\t * Initiates a call to the BE for a detection token\r\n\t * @returns an observable to the resulting detection token string\r\n\t */\r\n\tpublic detectionToken$(): Observable {\r\n\t\tthis.logger.trace('detectionToken', 'Requesting detection token');\r\n\t\treturn this.detectionTokenGQL.mutate().pipe(\r\n\t\t\ttake(1),\r\n\t\t\tfilter((result) => !!result),\r\n\t\t\tmap((result: MutationResult) => {\r\n\t\t\t\tthis.logger.trace('detectionToken', 'Token created', result);\r\n\t\t\t\treturn result.data?.generateDetectionToken;\r\n\t\t\t}),\r\n\t\t\tcatchError((error: Error) => {\r\n\t\t\t\tthis.logger.error('detectionTokenMutation', 'Failed to generate a detection token', {\r\n\t\t\t\t\terror\r\n\t\t\t\t});\r\n\t\t\t\treturn throwError(() => error);\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n}\r\n","/* eslint-disable */\r\n/* istanbul ignore file */\r\n/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\r\nexport type Maybe = T | null;\r\nexport type InputMaybe = T | null;\r\nexport type Exact = { [K in keyof T]: T[K] };\r\nexport type MakeOptional = Omit & { [SubKey in K]?: Maybe };\r\nexport type MakeMaybe = Omit & { [SubKey in K]: Maybe };\r\nexport type MakeEmpty = { [_ in K]?: never };\r\nexport type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\r\n\r\nexport interface PossibleTypesResultData {\r\n\tpossibleTypes: {\r\n\t\t[key: string]: string[];\r\n\t};\r\n}\r\nconst result: PossibleTypesResultData = {\r\n\tpossibleTypes: {\r\n\t\tAudioChannelFeatureChange: [\r\n\t\t\t'AudioChannelAcousticEchoCancellationChange',\r\n\t\t\t'AudioChannelAcousticEchoCancellationMonoReferenceChange',\r\n\t\t\t'AudioChannelAcousticEchoCancellationStereoReferenceChange',\r\n\t\t\t'AudioChannelAnalogLevelChange',\r\n\t\t\t'AudioChannelAutoLevelChange',\r\n\t\t\t'AudioChannelAutoMuteChange',\r\n\t\t\t'AudioChannelAutoPositionChange',\r\n\t\t\t'AudioChannelAutomaticGainControlChange',\r\n\t\t\t'AudioChannelAutomixSourceSelectorChange',\r\n\t\t\t'AudioChannelAutomixerChange',\r\n\t\t\t'AudioChannelAutomixerInputChange',\r\n\t\t\t'AudioChannelAutomixerVoiceActivityDetectionChange',\r\n\t\t\t'AudioChannelChannelConfigurationChange',\r\n\t\t\t'AudioChannelCompressorChange',\r\n\t\t\t'AudioChannelDanteEncryptionStatusChange',\r\n\t\t\t'AudioChannelDanteRouteReceiverChange',\r\n\t\t\t'AudioChannelDanteRouteTransmitterChange',\r\n\t\t\t'AudioChannelDelayChange',\r\n\t\t\t'AudioChannelDenoiserChange',\r\n\t\t\t'AudioChannelDeverbChange',\r\n\t\t\t'AudioChannelDeviceSpecificEqualizerContourChange',\r\n\t\t\t'AudioChannelDirectOutputTapPointChange',\r\n\t\t\t'AudioChannelEqualizerChange',\r\n\t\t\t'AudioChannelEqualizerContourChange',\r\n\t\t\t'AudioChannelEqualizerPresetChange',\r\n\t\t\t'AudioChannelFaderGroupChange',\r\n\t\t\t'AudioChannelGainChange',\r\n\t\t\t'AudioChannelGainLockChange',\r\n\t\t\t'AudioChannelIdentifyChange',\r\n\t\t\t'AudioChannelInputSourceChange',\r\n\t\t\t'AudioChannelLightingBehaviorChange',\r\n\t\t\t'AudioChannelLimiterChange',\r\n\t\t\t'AudioChannelLobeConfigurationChange',\r\n\t\t\t'AudioChannelLobePositionChange',\r\n\t\t\t'AudioChannelLobeTalkerHeightChange',\r\n\t\t\t'AudioChannelLobeWidthChange',\r\n\t\t\t'AudioChannelLogicReceiverChange',\r\n\t\t\t'AudioChannelMicOptimizationChange',\r\n\t\t\t'AudioChannelMicPolarPatternChange',\r\n\t\t\t'AudioChannelMicrophoneAngleChange',\r\n\t\t\t'AudioChannelMonitorMixChange',\r\n\t\t\t'AudioChannelMonitorMixReverbChange',\r\n\t\t\t'AudioChannelMuteChange',\r\n\t\t\t'AudioChannelMuteGroupChange',\r\n\t\t\t'AudioChannelMuteLockChange',\r\n\t\t\t'AudioChannelNameChange',\r\n\t\t\t'AudioChannelNoiseReductionChange',\r\n\t\t\t'AudioChannelOutputPathChange',\r\n\t\t\t'AudioChannelPcPeripheralChange',\r\n\t\t\t'AudioChannelPhantomPowerChange',\r\n\t\t\t'AudioChannelPlosiveReductionChange',\r\n\t\t\t'AudioChannelPostGateGainChange',\r\n\t\t\t'AudioChannelPostGateMuteChange',\r\n\t\t\t'AudioChannelPostGateSoloChange',\r\n\t\t\t'AudioChannelReverbChange',\r\n\t\t\t'AudioChannelSelectedLoudspeakerChange',\r\n\t\t\t'AudioChannelSignalGeneratorChange',\r\n\t\t\t'AudioChannelSoloChange',\r\n\t\t\t'AudioChannelStereoReverseChange',\r\n\t\t\t'AudioChannelStereoWidthChange',\r\n\t\t\t'AudioChannelTalkerHeightChange'\r\n\t\t],\r\n\t\tAudioCoverageAreaFeatureChange: [\r\n\t\t\t'AudioCoverageAreaConfigurationChange',\r\n\t\t\t'AudioCoverageAreaGainChange',\r\n\t\t\t'AudioCoverageAreaMuteChange'\r\n\t\t],\r\n\t\tChargerBayFeatureChange: [\r\n\t\t\t'ChargerBayAssociationChange',\r\n\t\t\t'ChargerBayBatteryPresentChange',\r\n\t\t\t'ChargerBayChargingModeChange',\r\n\t\t\t'ChargerBayDockedDeviceChange'\r\n\t\t],\r\n\t\tClearedAssociation: ['ChargerBay', 'RfChannel'],\r\n\t\tCloneRoomEvent: [\r\n\t\t\t'CloneRoomAudioRouteUpdateEvent',\r\n\t\t\t'CloneRoomControlRouteUpdateEvent',\r\n\t\t\t'CloneRoomDeviceUpdateEvent',\r\n\t\t\t'CloneRoomResultEvent',\r\n\t\t\t'CloneRoomStartedEvent'\r\n\t\t],\r\n\t\tCrossPointFeatureChange: ['CrossPointConfigurationChange', 'CrossPointGainChange'],\r\n\t\tCrossPointInputAudioChannel: ['AudioChannel', 'StereoAudioChannel'],\r\n\t\tDeviceFeatureChange: [\r\n\t\t\t'ConnectedDeviceLabelChange',\r\n\t\t\t'DeviceActivePresetChange',\r\n\t\t\t'DeviceAllEqualizersBypassChange',\r\n\t\t\t'DeviceAllIntellimixBypassChange',\r\n\t\t\t'DeviceAnalogAudioOutputModeChange',\r\n\t\t\t'DeviceAnalogLogicChange',\r\n\t\t\t'DeviceAnalogLogicPresetSwitchChange',\r\n\t\t\t'DeviceAnalogLogicPresetSwitchStatusChange',\r\n\t\t\t'DeviceAudioAutoFocusChange',\r\n\t\t\t'DeviceAudioChannelCountChange',\r\n\t\t\t'DeviceAudioChannelsChange',\r\n\t\t\t'DeviceAudioMuteChange',\r\n\t\t\t'DeviceAudioMuteControlChange',\r\n\t\t\t'DeviceAudioMuteControlGroupChange',\r\n\t\t\t'DeviceAudioMuteDefaultChange',\r\n\t\t\t'DeviceAudioMuteLockChange',\r\n\t\t\t'DeviceAudioNetworkInterfaceChange',\r\n\t\t\t'DeviceAuthenticationChange',\r\n\t\t\t'DeviceAutomixGainMeteringChange',\r\n\t\t\t'DeviceAvailablePackagesChange',\r\n\t\t\t'DeviceBatteryHealthChange',\r\n\t\t\t'DeviceBatteryLevelChange',\r\n\t\t\t'DeviceCallStatusChange',\r\n\t\t\t'DeviceCommandStringsServiceChange',\r\n\t\t\t'DeviceConferencingOperationModeChange',\r\n\t\t\t'DeviceConfigurationLockChange',\r\n\t\t\t'DeviceControlNetworkInterfaceChange',\r\n\t\t\t'DeviceCoverageModeChange',\r\n\t\t\t'DeviceCoveragePositionChange',\r\n\t\t\t'DeviceDanteAudioEncryptionChange',\r\n\t\t\t'DeviceDanteAudioNetworkAccessChange',\r\n\t\t\t'DeviceDanteAudioNetworkChange',\r\n\t\t\t'DeviceDeploymentCandidatesChange',\r\n\t\t\t'DeviceDoubleStuffProxiedTransmittersChange',\r\n\t\t\t'DeviceEqualizerContourChange',\r\n\t\t\t'DeviceEthernetLightsChange',\r\n\t\t\t'DeviceFirmwareUpdatePolicyChange',\r\n\t\t\t'DeviceGlobalMicStatusChange',\r\n\t\t\t'DeviceHeightChange',\r\n\t\t\t'DeviceIdentifyChange',\r\n\t\t\t'DeviceLicenseChange',\r\n\t\t\t'DeviceLicenseChangeV2',\r\n\t\t\t'DeviceLightingAudioMetersChange',\r\n\t\t\t'DeviceLightingAudioMuteIndicatorOverrideChange',\r\n\t\t\t'DeviceLightingAutomixGatingChange',\r\n\t\t\t'DeviceLightingBehaviorChange',\r\n\t\t\t'DeviceLightingBrightnessChange',\r\n\t\t\t'DeviceLightingLiveAudioMetersChange',\r\n\t\t\t'DeviceLightingMuteBehaviorChange',\r\n\t\t\t'DeviceLightingRingChange',\r\n\t\t\t'DeviceLightingUnmuteBehaviorChange',\r\n\t\t\t'DeviceLinkedAccessPointChange',\r\n\t\t\t'DeviceListenerHeightChange',\r\n\t\t\t'DeviceLogicMuteChange',\r\n\t\t\t'DeviceLogicReceiverChange',\r\n\t\t\t'DeviceLogicTransmitterChange',\r\n\t\t\t'DeviceLoudspeakerChange',\r\n\t\t\t'DeviceMdnsServiceChange',\r\n\t\t\t'DeviceMeteringModesChange',\r\n\t\t\t'DeviceMicStatusChange',\r\n\t\t\t'DeviceNameChange',\r\n\t\t\t'DevicePlacementChange',\r\n\t\t\t'DeviceProxiedDevicesChange',\r\n\t\t\t'DeviceRedundantAudioNetworkChange',\r\n\t\t\t'DeviceRfDensityModeChange',\r\n\t\t\t'DeviceRfPowerChange',\r\n\t\t\t'DeviceRoomChange',\r\n\t\t\t'DeviceRotationChange',\r\n\t\t\t'DeviceRoutingPositionChange',\r\n\t\t\t'DeviceSecurity8021XChange',\r\n\t\t\t'DeviceStereoAudioChange',\r\n\t\t\t'DeviceSwitchConfigurationChange',\r\n\t\t\t'DeviceTransmitterIdentifyBehaviorChange',\r\n\t\t\t'DeviceTransmitterLightingBehaviorChange',\r\n\t\t\t'DeviceTransmitterOutOfRangeBehaviorChange',\r\n\t\t\t'DeviceTransmitterRejoinBehaviorChange',\r\n\t\t\t'DeviceTransmitterSwitchBehaviorChange',\r\n\t\t\t'DeviceUpdateProgressChange',\r\n\t\t\t'DeviceUptimeChange',\r\n\t\t\t'DeviceUsbMuteSyncChange',\r\n\t\t\t'DeviceUsbTerminalTypeChange',\r\n\t\t\t'DeviceUserPresetsChange',\r\n\t\t\t'DeviceVirtualAcousticBoundaryChange',\r\n\t\t\t'DeviceWebServiceChange'\r\n\t\t],\r\n\t\tDeviceUnlinkingDetailResult: ['DeviceUnlinkingChargerBayResult', 'DeviceUnlinkingRfChannelResult'],\r\n\t\tDiscoveredDevicesEvent: ['DeviceAdded', 'DeviceRemoved'],\r\n\t\tDiscoveredRoomEvent: ['RoomAddedEvent', 'RoomRemovedEvent'],\r\n\t\tEqualizerFilterFeatureChange: [\r\n\t\t\t'EqualizerFilterBandwidthChange',\r\n\t\t\t'EqualizerFilterConfigurationChange',\r\n\t\t\t'EqualizerFilterFrequencyChange',\r\n\t\t\t'EqualizerFilterGainChange',\r\n\t\t\t'EqualizerFilterQFactorChange'\r\n\t\t],\r\n\t\tFragment: [\r\n\t\t\t'AudioChannel',\r\n\t\t\t'AudioCoverageArea',\r\n\t\t\t'ChargerBay',\r\n\t\t\t'CrossPoint',\r\n\t\t\t'EqualizerFilter',\r\n\t\t\t'RfChannel',\r\n\t\t\t'UserPreset'\r\n\t\t],\r\n\t\tIDurationRangeConstraints: ['AudioChannelDelayFieldConstraints', 'AutomixHoldTimeConstraints'],\r\n\t\tIFieldSupportInfo: [\r\n\t\t\t'AudioChannelCompressorLevelConstraints',\r\n\t\t\t'AudioChannelCompressorRatioConstraints',\r\n\t\t\t'AudioChannelCompressorThresholdConstraints',\r\n\t\t\t'AudioChannelLimiterThresholdConstraints',\r\n\t\t\t'AudioChannelLobePositionAutoFocusConstraints',\r\n\t\t\t'AudioChannelMicrophoneAngleAutoFocusConstraints',\r\n\t\t\t'AudioChannelTalkerHeightAutoFocusConstraints',\r\n\t\t\t'AutoLevelConfigurationConstraints',\r\n\t\t\t'AutoLevelModeConstraints',\r\n\t\t\t'AutoLevelPositionConstraints',\r\n\t\t\t'AutoLevelToneConstraints',\r\n\t\t\t'EqualizerEnabledConstraints',\r\n\t\t\t'EqualizerFiltersConstraints',\r\n\t\t\t'EqualizerToneConstraints',\r\n\t\t\t'FieldSupport',\r\n\t\t\t'NoiseReductionLevelConstraints'\r\n\t\t],\r\n\t\tIFloatPositionRangeConstraints: ['AudioChannelLobePositionFixedConstraints'],\r\n\t\tIFloatRangeConstraints: [\r\n\t\t\t'AudioChannelAcousticEchoCancellationErleLevelConstraints',\r\n\t\t\t'AudioChannelAcousticEchoCancellationPeakMeterLevelConstraints',\r\n\t\t\t'AudioChannelAcousticEchoCancellationRmsMeterLevelConstraints',\r\n\t\t\t'AudioChannelAutomaticGainControlPeakMeterLevelConstraints',\r\n\t\t\t'AudioChannelAutomaticGainControlRmsMeterLevelConstraints',\r\n\t\t\t'AudioChannelAutomaticGainMaxBoostConstraints',\r\n\t\t\t'AudioChannelAutomaticGainMaxCutConstraints',\r\n\t\t\t'AudioChannelAutomaticGainTargetLevelConstraints',\r\n\t\t\t'AudioChannelAutomixGainConstraints',\r\n\t\t\t'AudioChannelAutomixerInputPeakLevelConstraints',\r\n\t\t\t'AudioChannelAutomixerInputRmsLevelConstraints',\r\n\t\t\t'AudioChannelGainFieldConstraints',\r\n\t\t\t'AudioChannelMatrixMixerInputPeakLevelConstraints',\r\n\t\t\t'AudioChannelMatrixMixerInputRmsLevelConstraints',\r\n\t\t\t'AudioChannelMatrixMixerOutputPeakLevelConstraints',\r\n\t\t\t'AudioChannelMatrixMixerOutputRmsLevelConstraints',\r\n\t\t\t'AudioChannelMatrixMixerStereoInputPeakLevelConstraints',\r\n\t\t\t'AudioChannelMatrixMixerStereoInputRmsLevelConstraints',\r\n\t\t\t'AudioChannelPostGateFieldConstraints',\r\n\t\t\t'AudioChannelRmsLevelConstraints',\r\n\t\t\t'AudioChannelStereoPeakLevelConstraints',\r\n\t\t\t'AudioChannelStereoRmsLevelConstraints',\r\n\t\t\t'AudioChannelTalkerHeightFieldConstraints',\r\n\t\t\t'AudioChannelTalkerHeightFixedConstraints',\r\n\t\t\t'AudioCoverageAreaGainFieldConstraints',\r\n\t\t\t'AudioCoverageAreaPeakMeterLevelConstraints',\r\n\t\t\t'AudioCoverageRmsMeterLevelConstraints',\r\n\t\t\t'AutomixOffAttenuationConstraints',\r\n\t\t\t'CrossPointGainFieldConstraints',\r\n\t\t\t'DeviceHeightFieldConstraints',\r\n\t\t\t'DeviceListenerHeightFieldConstraints',\r\n\t\t\t'EqualizerFilterFrequencyFieldConstraints',\r\n\t\t\t'EqualizerFilterGainFieldConstraints',\r\n\t\t\t'RectangularAreaFieldConstraints'\r\n\t\t],\r\n\t\tIIntRangeConstraints: [\r\n\t\t\t'AudioChannelAutomaticGainConstraints',\r\n\t\t\t'AudioChannelMicrophoneAngleFixedConstraints',\r\n\t\t\t'AudioChannelMonitorMixTypeConstraints',\r\n\t\t\t'AudioChannelReverbIntensityConstraints',\r\n\t\t\t'AudioChannelStereoWidthAngleConstraints',\r\n\t\t\t'AutomixGatingSensitivityConstraints',\r\n\t\t\t'AutomixMaximumOpenChannelsConstraints',\r\n\t\t\t'DeviceBatteryHealthPercentageConstraints',\r\n\t\t\t'DeviceBatteryLevelPercentageConstraints',\r\n\t\t\t'DeviceCommandStringsServicePortConstraints',\r\n\t\t\t'DeviceLightingBrightnessFieldConstraints',\r\n\t\t\t'DeviceRotationAxisConstraints',\r\n\t\t\t'DeviceVirtualAcousticBoundarySensitivityConstraints',\r\n\t\t\t'RgbColorMixFieldConstraints'\r\n\t\t],\r\n\t\tINullableDurationRangeConstraints: [],\r\n\t\tINullableFloatPositionRangeConstraints: ['AudioChannelLobePositionAutoFocusConstraints'],\r\n\t\tINullableFloatRangeConstraints: [\r\n\t\t\t'AudioChannelLimiterThresholdConstraints',\r\n\t\t\t'AudioChannelTalkerHeightAutoFocusConstraints'\r\n\t\t],\r\n\t\tINullableIntRangeConstraints: ['AudioChannelMicrophoneAngleAutoFocusConstraints', 'EqualizerToneConstraints'],\r\n\t\tIStringPatternRangeConstraints: [\r\n\t\t\t'AudioChannelDanteRouteReceiverDanteChannelNameConstraints',\r\n\t\t\t'AudioChannelDanteRouteTransmitterDanteChannelNameConstraints',\r\n\t\t\t'AudioChannelNameFieldConstraints',\r\n\t\t\t'DeviceDanteAudioNetworkNameConstraints',\r\n\t\t\t'DeviceNameFieldConstraints',\r\n\t\t\t'DeviceSecurity8021XAnonymousIdConstraints',\r\n\t\t\t'DeviceSecurity8021XPasswordConstraints',\r\n\t\t\t'DeviceSecurity8021XUserNameConstraints',\r\n\t\t\t'UserPresetCoreNameConstraints'\r\n\t\t],\r\n\t\tIUtf8StringMaxBytesConstraints: ['ConnectedDeviceLabelFieldConstraints', 'DeviceNameFieldConstraints'],\r\n\t\tMeterChange: ['AudioChannelMeterChange', 'AudioCoverageAreaMeterChange', 'RfChannelMeterChange'],\r\n\t\tNode: [\r\n\t\t\t'AudioChannel',\r\n\t\t\t'AudioCoverageArea',\r\n\t\t\t'ChargerBay',\r\n\t\t\t'CrossPoint',\r\n\t\t\t'Device',\r\n\t\t\t'EqualizerFilter',\r\n\t\t\t'FirmwarePackageDownloadProgress',\r\n\t\t\t'FirmwarePackageDownloadRequestProgress',\r\n\t\t\t'FirmwareUpdateProgress',\r\n\t\t\t'FirmwareUpdateRequestProgress',\r\n\t\t\t'RfChannel',\r\n\t\t\t'Room',\r\n\t\t\t'RoomManifestDevice',\r\n\t\t\t'StereoAudioChannel',\r\n\t\t\t'UserPreset'\r\n\t\t],\r\n\t\tNodeChange: [\r\n\t\t\t'AudioChannel',\r\n\t\t\t'AudioChannelChange',\r\n\t\t\t'AudioCoverageArea',\r\n\t\t\t'AudioCoverageAreaChange',\r\n\t\t\t'ChargerBay',\r\n\t\t\t'ChargerBayChange',\r\n\t\t\t'CrossPoint',\r\n\t\t\t'CrossPointChange',\r\n\t\t\t'Device',\r\n\t\t\t'DeviceChange',\r\n\t\t\t'DeviceStatusChange',\r\n\t\t\t'EqualizerFilter',\r\n\t\t\t'EqualizerFilterChange',\r\n\t\t\t'FirmwarePackageDownloadProgress',\r\n\t\t\t'FirmwarePackageDownloadRequestProgress',\r\n\t\t\t'FirmwareUpdateProgress',\r\n\t\t\t'FirmwareUpdateRequestProgress',\r\n\t\t\t'RfChannel',\r\n\t\t\t'RfChannelChange',\r\n\t\t\t'Room',\r\n\t\t\t'UserPreset',\r\n\t\t\t'UserPresetChange'\r\n\t\t],\r\n\t\tNodeOperationResult: [\r\n\t\t\t'AudioChannelOperationResult',\r\n\t\t\t'AudioCoverageAreaOperationResult',\r\n\t\t\t'ChargerBayOperationResult',\r\n\t\t\t'ClearAssociationResult',\r\n\t\t\t'CreateRouteOperationResult',\r\n\t\t\t'CrossPointOperationResult',\r\n\t\t\t'DeleteRouteOperationResult',\r\n\t\t\t'DeviceOperationResult',\r\n\t\t\t'EqualizerFilterOperationResult',\r\n\t\t\t'RfChannelOperationResult',\r\n\t\t\t'RoomOperationResult',\r\n\t\t\t'UserPresetOperationResult'\r\n\t\t],\r\n\t\tOptimizeRoomProgress: ['OptimizeRoomProgressEvent', 'OptimizeRoomResult'],\r\n\t\tQFactorConstraint: ['EqualizerFilterValidQFactors', 'FloatRange'],\r\n\t\tResetDeviceResult: ['DeviceOperationResult', 'OperationResult'],\r\n\t\tRfChannelFeatureChange: [\r\n\t\t\t'RfChannelAssociationChange',\r\n\t\t\t'RfChannelLinkedTransmitterChange',\r\n\t\t\t'RfChannelPrimaryGroupChanNameChange'\r\n\t\t],\r\n\t\tRoomDeploymentProgress: ['RoomDeploymentProgressEvent', 'RoomDeploymentResult'],\r\n\t\tUserPresetFeatureChange: ['UserPresetCoreChange']\r\n\t}\r\n};\r\nexport default result;\r\n\r\n/** All built-in and custom scalars, mapped to their actual values */\r\nexport type Scalars = {\r\n\tID: { input: string; output: string };\r\n\tString: { input: string; output: string };\r\n\tBoolean: { input: boolean; output: boolean };\r\n\tInt: { input: number; output: number };\r\n\tFloat: { input: number; output: number };\r\n\t/** A DateTime in ISO-8601 format. (https://wikipedia.org/wiki/ISO_8601) */\r\n\tDateTime: { input: string; output: string };\r\n\t/**\r\n\t * Corresponds to a period of time, as specified by https://en.wikipedia.org/wiki/ISO_8601#Durations\r\n\t * E.g. PT1S is one second. PT0.1S is 100 milliseconds.\r\n\t */\r\n\tDuration: { input: string; output: string };\r\n\t/**\r\n\t * Guid stands for Globally Unique Identifier. Also referred to as UUIDs or Universaly Unique Identifiers.\r\n\t * - Technically they are 128-bit unique reference numbers which are highly unlikely to repeat.\r\n\t * - A Guid follows a specific structure defined in RFC `4122` and come in a few different\r\n\t * versions and variants. All variants follow the same structure xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx\r\n\t * where M represents the version and the most significant bits of N represent the variant.\r\n\t */\r\n\tGuid: { input: string; output: string };\r\n\t/**\r\n\t * The `IpAddress` scalar represents a dotted quad string notation of\r\n\t * an IPv4 address.\r\n\t */\r\n\tIpAddress: { input: string; output: string };\r\n\tRegex: { input: string; output: string };\r\n\tSemanticVersion: { input: string; output: string };\r\n\tUpload: { input: string; output: string };\r\n};\r\n\r\nexport type AcousticEchoCancellationConstraints = {\r\n\tnonLinearProcessingLevel: Maybe;\r\n};\r\n\r\nexport type ActivateLicenseInput = {\r\n\tactivationKey: Scalars['String']['input'];\r\n\tcount: Scalars['Int']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum AnalogAudioOutputMode {\r\n\t/**\r\n\t * For use with low impedance speakers (a.k.a Low Z), such as 8-ohm or 16-ohm speakers.\r\n\t * Speakers will be wired individually to each audio channel.\r\n\t */\r\n\tLowImpedance = 'LOW_IMPEDANCE',\r\n\t/**\r\n\t * For use with 70V speakers with step-up / step-down transformers inside.\r\n\t * Speakers are wired in a daisy-chained way to a single audio channel.\r\n\t */\r\n\tSeventyVolt = 'SEVENTY_VOLT'\r\n}\r\n\r\nexport type AnalogAudioOutputModeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport enum AnalogLevel {\r\n\tAux = 'AUX',\r\n\tLine = 'LINE',\r\n\tMic = 'MIC'\r\n}\r\n\r\nexport type AnalogLevelConstraints = {\r\n\tlevel: AnalogLevelModeConstraints;\r\n};\r\n\r\nexport type AnalogLevelModeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport enum AnalogLogicPresetSwitch {\r\n\t/** Mode A: This is the default selection. When there is no signal, the device loads Preset 1. When there is signal, the device switches to Preset 2. */\r\n\tModeA = 'MODE_A',\r\n\t/** Mode B: When there is no signal, the device loads Preset 2. When there is signal, the device switches to Preset 1. */\r\n\tModeB = 'MODE_B'\r\n}\r\n\r\nexport enum AnalogLogicPresetSwitchStatus {\r\n\tNoSignal = 'NO_SIGNAL',\r\n\tSignal = 'SIGNAL'\r\n}\r\n\r\nexport type AnalogLogicPresetSwitchStatusConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport enum AssociationStatus {\r\n\t/** Access point is not discoverable */\r\n\tAccessPointDeviceNotFound = 'ACCESS_POINT_DEVICE_NOT_FOUND',\r\n\t/** Charger device is not discoverable */\r\n\tChargerDeviceNotFound = 'CHARGER_DEVICE_NOT_FOUND',\r\n\t/** Failure occured on pre-processing a Charger Bay. This include failure in clearing existing association duing re-association */\r\n\tFailurePreProcessingChargerBay = 'FAILURE_PRE_PROCESSING_CHARGER_BAY',\r\n\t/** Failure occured on pre-processing a RF Channel. This include failure in clearing existing association duing re-association */\r\n\tFailurePreProcessingRfChannel = 'FAILURE_PRE_PROCESSING_RF_CHANNEL',\r\n\t/** Failure occured when processing association request on Charger Bay. This includes failed opeartions on Charger Bay */\r\n\tFailureProcessingChargerBay = 'FAILURE_PROCESSING_CHARGER_BAY',\r\n\t/** Failure occured when processing association request on RF Channel. This includes failed opeartions on RF Channel */\r\n\tFailureProcessingRfChannel = 'FAILURE_PROCESSING_RF_CHANNEL',\r\n\t/** Input node id(s) provided in association request is not valid */\r\n\tInvalidInput = 'INVALID_INPUT',\r\n\t/** Provided input devices either does not support association feature or not a valid input for this operation */\r\n\tInvalidOperation = 'INVALID_OPERATION',\r\n\t/** Successfully associated RF channel and Charger bay */\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport enum AudioActivityLevel {\r\n\tClipping = 'CLIPPING',\r\n\tGood = 'GOOD',\r\n\tLow = 'LOW'\r\n}\r\n\r\nexport type AudioChannel = Fragment &\r\n\tNode & {\r\n\t\tdescription: AudioChannelDescription;\r\n\t\tfeatures: AudioChannelFeatures;\r\n\t\tfragmentId: Scalars['ID']['output'];\r\n\t\tid: Scalars['ID']['output'];\r\n\t};\r\n\r\nexport type AudioChannelAcousticEchoCancellation = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n\tnonLinearProcessingLevel: NonLinearProcessingLevel | `${NonLinearProcessingLevel}`;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationChange = {\r\n\tacousticEchoCancellation: Maybe;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationErleLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationErleMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationErleMeterConstraints = {\r\n\tlevel: AudioChannelAcousticEchoCancellationErleLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationInput = {\r\n\tenabled?: InputMaybe;\r\n\tnonLinearProcessingLevel?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationMonoReference = {\r\n\t/** An audio channel of the device used for monitoring the selected reference source. */\r\n\treference: AudioChannel;\r\n\t/** A list of audio channels within this device that can be used as a mono reference for acoustic echo cancellation. */\r\n\treferenceSourceOptions: Maybe>;\r\n\t/**\r\n\t * The audio channel used as a far end mono reference signal.\r\n\t * For best results, use the signal that also feeds your local reinforcement system (e.g. conference room loudspeakers).\r\n\t * On MXA mics, route a far-end signal to the AEC Reference In channel.\r\n\t * On digital signal processors, choose an option from 'referenceSourceOptions'.\r\n\t */\r\n\tselectedReferenceSource: AudioChannel;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationMonoReferenceChange = {\r\n\tacousticEchoCancellationMonoReference: Maybe;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationMonoReferenceConstraints = {\r\n\treferenceSourceOptions: FieldSupport;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationMonoReferenceInput = {\r\n\t/** Audio channel which can configure the 'acousticEchoCancellationMonoReference' feature */\r\n\tid: Scalars['ID']['input'];\r\n\t/** Audio channel to be selected as acoustic echo cancellation mono reference source */\r\n\tsource: Scalars['ID']['input'];\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationPeakMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationPeakMeterConstraints = {\r\n\tlevel: AudioChannelAcousticEchoCancellationPeakMeterLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationPeakMeterLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationRmsMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationRmsMeterConstraints = {\r\n\tlevel: AudioChannelAcousticEchoCancellationRmsMeterLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationRmsMeterLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationStereoReference = {\r\n\t/**\r\n\t * An internal audio channel of the device used for monitoring the selected reference source.\r\n\t * Use stereoRms and stereoPeak(or matrixMixerStereoInputRms and matrixMixerStereoInputPeak) features for reference channel meters\r\n\t */\r\n\treference: AudioChannel;\r\n\t/** A list of audio channels within this device that can be used as a stereo reference for acoustic echo cancellation. */\r\n\treferenceSourceOptions: Array;\r\n\t/**\r\n\t * The audio channel used as a far end stereo left reference signal.\r\n\t * Choose an option from 'referenceSourceOptions'.\r\n\t */\r\n\tselectedLeftReferenceSource: AudioChannel;\r\n\t/**\r\n\t * The audio channel used as a far end stereo right reference signal.\r\n\t * Choose an option from 'referenceSourceOptions'.\r\n\t */\r\n\tselectedRightReferenceSource: AudioChannel;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationStereoReferenceChange = {\r\n\tacousticEchoCancellationStereoReference: Maybe;\r\n};\r\n\r\nexport type AudioChannelAcousticEchoCancellationStereoReferenceInput = {\r\n\t/** Audio channel which can congfigure the 'acousticEchoCancellationStereoReference' feature */\r\n\tid: Scalars['ID']['input'];\r\n\t/** Audio channel to be selected as acoustic echo cancellation stereo reference source */\r\n\tsource: Scalars['ID']['input'];\r\n\t/** Audio channel spatial separation information which can configure the 'acousticEchoCancellationStereoReference' feature */\r\n\tstereoAudioChannelSpatialSeparation: StereoAudioChannelSpatialSeparation | `${StereoAudioChannelSpatialSeparation}`;\r\n};\r\n\r\nexport type AudioChannelActivityMeter = {\r\n\tlevel: AudioActivityLevel | `${AudioActivityLevel}`;\r\n};\r\n\r\n/**\r\n * The level which the audio channel is expected to receive signal at.\r\n * This is used to perform additional amplification within the device as needed\r\n * for signal to be intelligible.\r\n */\r\nexport type AudioChannelAnalogLevel = {\r\n\t/** Refer to https://www.shure.com/en-MEA/conferencing-meetings/ignite/tell-me-about-mic-and-line-level for the differences between levels */\r\n\tlevel: AnalogLevel | `${AnalogLevel}`;\r\n};\r\n\r\nexport type AudioChannelAnalogLevelChange = {\r\n\tanalogLevel: Maybe;\r\n};\r\n\r\nexport type AudioChannelAnalogLevelInput = {\r\n\tlevel: AnalogLevel | `${AnalogLevel}`;\r\n};\r\n\r\nexport type AudioChannelAutoLevel = {\r\n\tconfiguration: Maybe;\r\n\tmode: Maybe;\r\n\tposition: Maybe;\r\n\ttone: Maybe;\r\n};\r\n\r\nexport type AudioChannelAutoLevelChange = {\r\n\tautoLevel: Maybe;\r\n};\r\n\r\nexport type AudioChannelAutoLevelConstraints = {\r\n\tconfiguration: AutoLevelConfigurationConstraints;\r\n\tmode: AutoLevelModeConstraints;\r\n\tposition: AutoLevelPositionConstraints;\r\n\ttone: AutoLevelToneConstraints;\r\n};\r\n\r\nexport type AudioChannelAutoLevelUpdateInput = {\r\n\tconfiguration?: InputMaybe;\r\n\tmode?: InputMaybe;\r\n\tposition?: InputMaybe;\r\n\ttone?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelAutoMute = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelAutoMuteChange = {\r\n\tautoMute: Maybe;\r\n};\r\n\r\nexport type AudioChannelAutoMuteUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelAutoPosition = {\r\n\tstatus: AutoPositionStatus | `${AutoPositionStatus}`;\r\n};\r\n\r\nexport type AudioChannelAutoPositionChange = {\r\n\tautoPosition: Maybe;\r\n};\r\n\r\nexport type AudioChannelAutoPositionConstraints = {\r\n\tstatus: AudioChannelAutoPositionStatusConstraints;\r\n};\r\n\r\nexport type AudioChannelAutoPositionStatusConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioChannelAutomaticGainConstraints = IIntRangeConstraints & {\r\n\trange: IntRange;\r\n};\r\n\r\n/**\r\n * Automatic gain control adjusts audio channel levels to ensure consistent volume for all talkers, in all scenarios.\r\n * For quieter voices, it increases gain; for louder voices, it attenuates the signal.\r\n *\r\n * Automatic gain control is postfader, and adjusts the audio channel level after the input level has been adjusted.\r\n * Enable it on audio channels where the distance between the talker and the microphone may vary, or in rooms where many different\r\n * people will use the conferencing system.\r\n */\r\nexport type AudioChannelAutomaticGainControl = {\r\n\t/** Indicates whether or not the AGC feature is enabled on the audio channel. */\r\n\tenabled: Scalars['Boolean']['output'];\r\n\t/** The maximum amount of gain that can be applied (dB). */\r\n\tmaxBoost: Scalars['Float']['output'];\r\n\t/** The maximum amount of attenuation that can be applied (dB). */\r\n\tmaxCut: Scalars['Float']['output'];\r\n\t/**\r\n\t * The level that you want the signal to be normalized to (dBFS).\r\n\t * This level is different from adjusting the input fader according to peak levels to avoid clipping.\r\n\t */\r\n\ttargetLevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelAutomaticGainControlChange = {\r\n\tautomaticGainControl: Maybe;\r\n};\r\n\r\nexport type AudioChannelAutomaticGainControlConstraints = {\r\n\t/** Describes the range of values for the maximum gain that can be applied to the audio channel (dB). */\r\n\tmaxBoost: AudioChannelAutomaticGainMaxBoostConstraints;\r\n\t/** Describes the range of values for the maximum attenuation that can be applied to the audio channel (dB). */\r\n\tmaxCut: AudioChannelAutomaticGainMaxCutConstraints;\r\n\t/** Describes the range of values which the AGC can target for the audio channel by applying gain or attenutation. (dB) */\r\n\ttargetLevel: AudioChannelAutomaticGainTargetLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelAutomaticGainControlPeakMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelAutomaticGainControlPeakMeterConstraints = {\r\n\tlevel: AudioChannelAutomaticGainControlPeakMeterLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelAutomaticGainControlPeakMeterLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelAutomaticGainControlRmsMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelAutomaticGainControlRmsMeterConstraints = {\r\n\tlevel: AudioChannelAutomaticGainControlRmsMeterLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelAutomaticGainControlRmsMeterLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelAutomaticGainControlUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tmaxBoost?: InputMaybe;\r\n\tmaxCut?: InputMaybe;\r\n\ttargetLevel?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelAutomaticGainMaxBoostConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelAutomaticGainMaxCutConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelAutomaticGainMeter = {\r\n\tgain: Scalars['Int']['output'];\r\n};\r\n\r\nexport type AudioChannelAutomaticGainMeterConstraints = {\r\n\tgain: AudioChannelAutomaticGainConstraints;\r\n};\r\n\r\nexport type AudioChannelAutomaticGainTargetLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelAutomixGainConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelAutomixGainMeter = {\r\n\tgain: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelAutomixGainMeterConstraints = {\r\n\tgain: AudioChannelAutomixGainConstraints;\r\n};\r\n\r\nexport type AudioChannelAutomixSourceSelector = {\r\n\t/**\r\n\t * When an audio channel is selected, the corresponding automixed content will be replaced with the source.\r\n\t * When null, the automixer will decide which channels it mixes based on the automixer capability.\r\n\t */\r\n\tsource: Maybe;\r\n\tsourceOptions: Array;\r\n};\r\n\r\nexport type AudioChannelAutomixSourceSelectorChange = {\r\n\tautomixSourceSelector: Maybe;\r\n};\r\n\r\n/**\r\n * Automixer takes in multiple audio channels and automatically mixes them into a singular output channel.\r\n * This helps improve intelligibility of meeting audio by focusing on the most relevant audio content, and removing\r\n * less relevant audio content.\r\n */\r\nexport type AudioChannelAutomixer = {\r\n\tenabled: Maybe;\r\n\t/**\r\n\t * The threshold of the level at which the gate is opened, as a numeric level.\r\n\t * Lower is less sensitive (meaning fewer false detections due to room noise or talkers outside the meeting room, at the expense of missing desired talkers).\r\n\t * Higher is more sensitive (meaning more false detections due to room noise or talkers outside the meeting room, but better at catching the start of every talker).\r\n\t */\r\n\tgatingSensitivity: Scalars['Int']['output'];\r\n\t/** The duration for which the audio channel remains open after the level drops below the gate threshold. */\r\n\tholdTime: Scalars['Duration']['output'];\r\n\t/**\r\n\t * Indicates whether or not the most recently used audio channel should remain active.\r\n\t * This keeps natural room sound in the signal so that meeting participants at the far end know the\r\n\t * audio signal has not been interrupted.\r\n\t */\r\n\tleaveLastChannelOn: Scalars['Boolean']['output'];\r\n\t/** The maximum number of simultaneously active audio channels. */\r\n\tmaximumOpenChannels: Scalars['Int']['output'];\r\n\t/** How the automix should be performed */\r\n\tmode: AutomixMode | `${AutomixMode}`;\r\n\t/** The amount of signal reduction that is applied when an audio channel is not active (dB). */\r\n\toffAttenuation: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelAutomixerChange = {\r\n\tautomixer: Maybe;\r\n};\r\n\r\nexport type AudioChannelAutomixerConstraints = {\r\n\tenabled: FieldSupport;\r\n\t/**\r\n\t * Describes the range of thresholds at which the gate is opened.\r\n\t * Lower is less sensitive, and higher is more sensitive.\r\n\t */\r\n\tgatingSensitivity: AutomixGatingSensitivityConstraints;\r\n\t/** Describes the range of values for the hold time. */\r\n\tholdTime: AutomixHoldTimeConstraints;\r\n\t/** Describes the range of audio channels which can remain simultaneously active. */\r\n\tmaximumOpenChannels: AutomixMaximumOpenChannelsConstraints;\r\n\t/** Describes the supported automix modes on this audio channel's automixer. */\r\n\tmode: AutomixModeConstraints;\r\n\t/** Describes the range of attenutation that can be applied when an audio channel is not active (dB). */\r\n\toffAttenuation: AutomixOffAttenuationConstraints;\r\n};\r\n\r\nexport type AudioChannelAutomixerGateMeter = {\r\n\topen: Scalars['Boolean']['output'];\r\n};\r\n\r\n/** Automixer input describes the features which correspond to an audio channel's participation in the device's automixer. */\r\nexport type AudioChannelAutomixerInput = {\r\n\t/**\r\n\t * When enabled, this audio channel will always be active in the automixer.\r\n\t * When the capability exists, but this field is null, the audio channel cannot be assumed to always be sent to the automix.\r\n\t */\r\n\talwaysOn: Maybe;\r\n\t/**\r\n\t * When enabled, this audio channel's gate activates within the automixer,\r\n\t * regardless of the number of maximum open channels configured on this device's automixer.\r\n\t */\r\n\tpriority: Scalars['Boolean']['output'];\r\n\t/**\r\n\t * When enabled, sends this channel to the automix channel.\r\n\t * When this capability exists, but this field is null, the audio channel is always assumed to be sent to the automix.\r\n\t */\r\n\tsendToMix: Maybe;\r\n};\r\n\r\nexport type AudioChannelAutomixerInputChange = {\r\n\tautomixerInput: Maybe;\r\n};\r\n\r\nexport type AudioChannelAutomixerInputConstraints = {\r\n\t/** Describes whether or not this audio channel can always be active in the automixer. */\r\n\talwaysOn: FieldSupport;\r\n\t/** Describes whether or not this audio channel supports being conditionally sent to the automixer. */\r\n\tsendToMix: FieldSupport;\r\n};\r\n\r\nexport type AudioChannelAutomixerInputPeakLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelAutomixerInputPeakMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelAutomixerInputPeakMeterConstraints = {\r\n\tlevel: AudioChannelAutomixerInputPeakLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelAutomixerInputRmsLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelAutomixerInputRmsMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelAutomixerInputRmsMeterConstraints = {\r\n\tlevel: AudioChannelAutomixerInputRmsLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelAutomixerInputUpdateInput = {\r\n\talwaysOn?: InputMaybe;\r\n\tpriority?: InputMaybe;\r\n\tsendToMix?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelAutomixerUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tgatingSensitivity?: InputMaybe;\r\n\tholdTime?: InputMaybe;\r\n\tleaveLastChannelOn?: InputMaybe;\r\n\tmaximumOpenChannels?: InputMaybe;\r\n\tmode?: InputMaybe;\r\n\toffAttenuation?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelAutomixerVoiceActivityDetection = {\r\n\tnoiseDetectionSensitivity: NoiseDetectionSensitivity | `${NoiseDetectionSensitivity}`;\r\n\tnoiseRemovalLevel: NoiseRemovalLevel | `${NoiseRemovalLevel}`;\r\n};\r\n\r\nexport type AudioChannelAutomixerVoiceActivityDetectionChange = {\r\n\tautomixerVoiceActivityDetection: Maybe;\r\n};\r\n\r\nexport type AudioChannelAutomixerVoiceActivityDetectionConstraints = {\r\n\tnoiseDetectionSensitivity: NoiseDetectionSensitivityConstraints;\r\n\tnoiseRemovalLevel: NoiseRemovalLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelAutomixerVoiceActivityDetectionUpdateInput = {\r\n\tnoiseDetectionSensitivity?: InputMaybe;\r\n\tnoiseRemovalLevel?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelChange = {\r\n\tfeatures: AudioChannelFeatureChange;\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type AudioChannelChannelConfiguration = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelChannelConfigurationChange = {\r\n\tchannelConfiguration: Maybe;\r\n};\r\n\r\nexport type AudioChannelClipMeter = {\r\n\tclip: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelCompressor = {\r\n\t/** Indicates whether or not the compressor is enabled. */\r\n\tenabled: Maybe;\r\n\t/** Level of compression applied to the audio signal */\r\n\tlevel: Maybe;\r\n\t/**\r\n\t * The amount of attenuation that is applied when the signal exceeds the threshold.\r\n\t *\r\n\t * A lower ratio of 2:1 means that for every 2 dB above the threshold, the output signal will only exceed the threshold by 1 dB.\r\n\t *\r\n\t * A higher ratio of 10:1 means a loud sound that exceeds the threshold by 10 dB will only exceed the threshold by 1 dB, effectively reducing the signal by 9 dB.\r\n\t */\r\n\tratio: Maybe;\r\n\t/** The signal level at which compressor takes effect (dB). */\r\n\tthreshold: Maybe;\r\n};\r\n\r\nexport type AudioChannelCompressorChange = {\r\n\tcompressor: Maybe;\r\n};\r\n\r\nexport type AudioChannelCompressorConstraints = {\r\n\t/** Indicates whether compressor can be enabled on the audio channel. */\r\n\tenabled: FieldSupport;\r\n\t/** Describes the range of supported values for the compressor level on the audio channel. */\r\n\tlevel: AudioChannelCompressorLevelConstraints;\r\n\t/** Describes the range of supported values for the compressor ratio on the audio channel. */\r\n\tratio: AudioChannelCompressorRatioConstraints;\r\n\t/** Describes the range of supported values for the compressor threshold on the audio channel. */\r\n\tthreshold: AudioChannelCompressorThresholdConstraints;\r\n};\r\n\r\nexport type AudioChannelCompressorEngagedMeter = {\r\n\tengaged: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelCompressorLevelConstraints = IFieldSupportInfo & {\r\n\toptions: Maybe>;\r\n\tsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelCompressorRatioConstraints = IFieldSupportInfo & {\r\n\trange: Maybe;\r\n\tsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelCompressorThresholdConstraints = IFieldSupportInfo & {\r\n\trange: Maybe;\r\n\tsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelCompressorUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tlevel?: InputMaybe;\r\n\tratio?: InputMaybe;\r\n\tthreshold?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelConstraints = {\r\n\tacousticEchoCancellation: Maybe;\r\n\tacousticEchoCancellationErle: Maybe;\r\n\tacousticEchoCancellationMonoReference: Maybe;\r\n\tacousticEchoCancellationPeak: Maybe;\r\n\tacousticEchoCancellationRms: Maybe;\r\n\tanalogLevel: Maybe;\r\n\tautoLevel: Maybe;\r\n\tautoPosition: Maybe;\r\n\tautomaticGain: Maybe;\r\n\tautomaticGainControl: Maybe;\r\n\tautomaticGainControlPeak: Maybe;\r\n\tautomaticGainControlRms: Maybe;\r\n\tautomixGain: Maybe;\r\n\tautomixer: Maybe;\r\n\tautomixerInput: Maybe;\r\n\tautomixerInputPeak: Maybe;\r\n\tautomixerInputRms: Maybe;\r\n\tautomixerVoiceActivityDetection: Maybe;\r\n\tcompressor: Maybe;\r\n\tdanteRouteReceiver: Maybe;\r\n\tdanteRouteTransmitter: Maybe;\r\n\tdelay: Maybe;\r\n\tdenoiser: Maybe;\r\n\tdeverb: Maybe;\r\n\tdeviceSpecificEqualizerContour: Maybe;\r\n\tequalizer: Maybe;\r\n\tequalizerContour: Maybe;\r\n\tequalizerPreset: Maybe;\r\n\tgain: Maybe;\r\n\tinputSource: Maybe;\r\n\tlightingBehavior: Maybe;\r\n\tlimiter: Maybe;\r\n\tlobePosition: Maybe;\r\n\tlobeTalkerHeight: Maybe;\r\n\tlobeWidth: Maybe;\r\n\tmatrixMixerInputPeak: Maybe;\r\n\tmatrixMixerInputRms: Maybe;\r\n\tmatrixMixerOutputPeak: Maybe;\r\n\tmatrixMixerOutputRms: Maybe;\r\n\tmatrixMixerStereoInputPeak: Maybe;\r\n\tmatrixMixerStereoInputRms: Maybe;\r\n\tmicOptimization: Maybe;\r\n\tmicPolarPattern: Maybe;\r\n\tmicrophoneAngle: Maybe;\r\n\tmonitorMix: Maybe;\r\n\tname: Maybe;\r\n\tnoiseReduction: Maybe;\r\n\toutputPath: Maybe;\r\n\tpeak: Maybe;\r\n\tphantomPower: Maybe;\r\n\tpostGateGain: Maybe;\r\n\treverb: Maybe;\r\n\trms: Maybe;\r\n\tselectedLoudspeaker: Maybe;\r\n\tsignalGenerator: Maybe;\r\n\tstereoPeak: Maybe;\r\n\tstereoRms: Maybe;\r\n\tstereoWidth: Maybe;\r\n\t/** @deprecated Use 'lobeTalkerHeight' constraints instead. */\r\n\ttalkerHeight: Maybe;\r\n};\r\n\r\nexport type AudioChannelCountInput = {\r\n\tcount: Scalars['Int']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type AudioChannelDanteEncryptionStatus = {\r\n\t/** Status of audio encryption for a routed audio channel over Dante. */\r\n\tstatus: DanteAudioEncryptionStatus | `${DanteAudioEncryptionStatus}`;\r\n};\r\n\r\nexport type AudioChannelDanteEncryptionStatusChange = {\r\n\tdanteEncryptionStatus: Maybe;\r\n};\r\n\r\nexport type AudioChannelDanteRouteReceiver = {\r\n\t/**\r\n\t * The Dante channel name for uniquely identifying a channel within this device.\r\n\t * Dante channel names are not guaranteed unique throughout a network.\r\n\t */\r\n\tdanteChannelName: Scalars['String']['output'];\r\n\t/** The subscription which the receiver is listening to. Null when no subscription exists. */\r\n\tsubscription: Maybe;\r\n};\r\n\r\nexport type AudioChannelDanteRouteReceiverChange = {\r\n\tdanteRouteReceiver: Maybe;\r\n};\r\n\r\nexport type AudioChannelDanteRouteReceiverConstraints = {\r\n\tdanteChannelName: AudioChannelDanteRouteReceiverDanteChannelNameConstraints;\r\n};\r\n\r\nexport type AudioChannelDanteRouteReceiverDanteChannelNameConstraints = IStringPatternRangeConstraints & {\r\n\tpattern: Scalars['Regex']['output'];\r\n};\r\n\r\nexport type AudioChannelDanteRouteReceiverUpdateInput = {\r\n\tdanteChannelName: Scalars['String']['input'];\r\n};\r\n\r\nexport type AudioChannelDanteRouteTransmitter = {\r\n\t/**\r\n\t * The Dante channel name for uniquely identifying a channel within this device.\r\n\t * Dante channel names are not guaranteed unique throughout a network.\r\n\t */\r\n\tdanteChannelName: Scalars['String']['output'];\r\n};\r\n\r\nexport type AudioChannelDanteRouteTransmitterChange = {\r\n\tdanteRouteTransmitter: Maybe;\r\n};\r\n\r\nexport type AudioChannelDanteRouteTransmitterConstraints = {\r\n\tdanteChannelName: AudioChannelDanteRouteTransmitterDanteChannelNameConstraints;\r\n};\r\n\r\nexport type AudioChannelDanteRouteTransmitterDanteChannelNameConstraints = IStringPatternRangeConstraints & {\r\n\tpattern: Scalars['Regex']['output'];\r\n};\r\n\r\nexport type AudioChannelDanteRouteTransmitterUpdateInput = {\r\n\tdanteChannelName: Scalars['String']['input'];\r\n};\r\n\r\nexport type AudioChannelDelay = {\r\n\t/**\r\n\t * The amount of signal delay being applied to the channel (ms).\r\n\t *\r\n\t * This is used for synchronizing audio and video, or audio from multiple talkers.\r\n\t */\r\n\tdelay: Scalars['Duration']['output'];\r\n\t/** Indicates whether or not the delay feature is enabled */\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelDelayChange = {\r\n\tdelay: Maybe;\r\n};\r\n\r\nexport type AudioChannelDelayConstraints = {\r\n\t/** Describes the range of values for the signal delay that are supported on the channel. */\r\n\tdelay: AudioChannelDelayFieldConstraints;\r\n};\r\n\r\nexport type AudioChannelDelayFieldConstraints = IDurationRangeConstraints & {\r\n\t/** Describes the range of values for the signal delay that are supported on the channel. */\r\n\trange: DurationRange;\r\n};\r\n\r\nexport type AudioChannelDelayUpdateInput = {\r\n\tdelay?: InputMaybe;\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelDenoiser = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n\tlevel: DenoiserLevel | `${DenoiserLevel}`;\r\n};\r\n\r\nexport type AudioChannelDenoiserChange = {\r\n\tdenoiser: Maybe;\r\n};\r\n\r\nexport type AudioChannelDenoiserLevelConstraints = {\r\n\tlevel: AudioChannelValidDenoiserLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelDenoiserNoiseReductionMeter = {\r\n\tpercentage: Scalars['Int']['output'];\r\n};\r\n\r\nexport type AudioChannelDenoiserUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tlevel?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelDescription = {\r\n\tconstraints: AudioChannelConstraints;\r\n\tfeatures: AudioChannelSupportedFeatures;\r\n\tgroup: AudioChannelGroup | `${AudioChannelGroup}`;\r\n\trole: AudioChannelRole | `${AudioChannelRole}`;\r\n};\r\n\r\nexport type AudioChannelDeverb = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n\tintensity: DeverbIntensity | `${DeverbIntensity}`;\r\n};\r\n\r\nexport type AudioChannelDeverbChange = {\r\n\tdeverb: Maybe;\r\n};\r\n\r\nexport type AudioChannelDeverbConstraints = {\r\n\tintensity: AudioChannelDeverbIntensityConstraints;\r\n};\r\n\r\nexport type AudioChannelDeverbIntensityConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioChannelDeverbUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tintensity?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelDeviceSpecificEqualizerContour = {\r\n\t/**\r\n\t * Built-in equalizer contours optimized to routed audio from the devices specified by the contour options.\r\n\t * Applying both the device-level 'equalizerContour' as well as any audio-channel level 'equalizer' changes will be cumulative.\r\n\t *\r\n\t * Refer to your device's user guide for more. E.g. https://pubs.shure.com/guide/IntelliMixRoom/en-US\r\n\t */\r\n\tdeviceSpecificEqualizerContour: DeviceSpecificEqualizerContour | `${DeviceSpecificEqualizerContour}`;\r\n};\r\n\r\nexport type AudioChannelDeviceSpecificEqualizerContourChange = {\r\n\tdeviceSpecificEqualizerContour: Maybe;\r\n};\r\n\r\nexport type AudioChannelDeviceSpecificEqualizerContourConstraints = {\r\n\tdeviceSpecificEqualizerContour: Maybe;\r\n};\r\n\r\nexport type AudioChannelDeviceSpecificEqualizerContourTypeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioChannelDeviceSpecificEqualizerContourUpdateInput = {\r\n\tdeviceSpecificEqualizerContour: DeviceSpecificEqualizerContour | `${DeviceSpecificEqualizerContour}`;\r\n};\r\n\r\nexport type AudioChannelDirectOutputTapPoint = {\r\n\t/** Indicates where the signal to the matrix mixer should come from. */\r\n\ttapPoint: DirectOutputTapPoint | `${DirectOutputTapPoint}`;\r\n};\r\n\r\nexport type AudioChannelDirectOutputTapPointChange = {\r\n\tdirectOutputTapPoint: Maybe;\r\n};\r\n\r\nexport type AudioChannelDirectOutputTapPointUpdateInput = {\r\n\ttapPoint: DirectOutputTapPoint | `${DirectOutputTapPoint}`;\r\n};\r\n\r\nexport type AudioChannelEqualizer = {\r\n\tenabled: Maybe;\r\n\tfilters: Array;\r\n\ttone: Maybe;\r\n};\r\n\r\nexport type AudioChannelEqualizerChange = {\r\n\tequalizer: Maybe;\r\n};\r\n\r\nexport type AudioChannelEqualizerConstraints = {\r\n\tenabled: EqualizerEnabledConstraints;\r\n\tfilters: EqualizerFiltersConstraints;\r\n\ttone: EqualizerToneConstraints;\r\n};\r\n\r\nexport type AudioChannelEqualizerContour = {\r\n\tequalizerContour: EqualizerContour | `${EqualizerContour}`;\r\n};\r\n\r\nexport type AudioChannelEqualizerContourChange = {\r\n\tequalizerContour: Maybe;\r\n};\r\n\r\nexport type AudioChannelEqualizerContourConstraints = {\r\n\tequalizerContour: Maybe;\r\n};\r\n\r\nexport type AudioChannelEqualizerContourTypeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioChannelEqualizerContourUpdateInput = {\r\n\tequalizerContour: EqualizerContour | `${EqualizerContour}`;\r\n};\r\n\r\nexport type AudioChannelEqualizerPreset = {\r\n\tequalizerPreset: EqualizerPreset | `${EqualizerPreset}`;\r\n};\r\n\r\nexport type AudioChannelEqualizerPresetChange = {\r\n\tequalizerPreset: Maybe;\r\n};\r\n\r\nexport type AudioChannelEqualizerPresetConstraints = {\r\n\tequalizerPreset: Maybe;\r\n};\r\n\r\nexport type AudioChannelEqualizerPresetTypeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioChannelEqualizerPresetUpdateInput = {\r\n\tequalizerPreset: EqualizerPreset | `${EqualizerPreset}`;\r\n};\r\n\r\nexport type AudioChannelEqualizerUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\ttone?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelFaderGroup = {\r\n\t/** Indicates whether or not the audio channel is participating in the fader group for linking gain adjustments across multiple audio channels */\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelFaderGroupChange = {\r\n\tfaderGroup: Maybe;\r\n};\r\n\r\nexport type AudioChannelFaderGroupUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelFeatureChange =\r\n\t| AudioChannelAcousticEchoCancellationChange\r\n\t| AudioChannelAcousticEchoCancellationMonoReferenceChange\r\n\t| AudioChannelAcousticEchoCancellationStereoReferenceChange\r\n\t| AudioChannelAnalogLevelChange\r\n\t| AudioChannelAutoLevelChange\r\n\t| AudioChannelAutoMuteChange\r\n\t| AudioChannelAutoPositionChange\r\n\t| AudioChannelAutomaticGainControlChange\r\n\t| AudioChannelAutomixSourceSelectorChange\r\n\t| AudioChannelAutomixerChange\r\n\t| AudioChannelAutomixerInputChange\r\n\t| AudioChannelAutomixerVoiceActivityDetectionChange\r\n\t| AudioChannelChannelConfigurationChange\r\n\t| AudioChannelCompressorChange\r\n\t| AudioChannelDanteEncryptionStatusChange\r\n\t| AudioChannelDanteRouteReceiverChange\r\n\t| AudioChannelDanteRouteTransmitterChange\r\n\t| AudioChannelDelayChange\r\n\t| AudioChannelDenoiserChange\r\n\t| AudioChannelDeverbChange\r\n\t| AudioChannelDeviceSpecificEqualizerContourChange\r\n\t| AudioChannelDirectOutputTapPointChange\r\n\t| AudioChannelEqualizerChange\r\n\t| AudioChannelEqualizerContourChange\r\n\t| AudioChannelEqualizerPresetChange\r\n\t| AudioChannelFaderGroupChange\r\n\t| AudioChannelGainChange\r\n\t| AudioChannelGainLockChange\r\n\t| AudioChannelIdentifyChange\r\n\t| AudioChannelInputSourceChange\r\n\t| AudioChannelLightingBehaviorChange\r\n\t| AudioChannelLimiterChange\r\n\t| AudioChannelLobeConfigurationChange\r\n\t| AudioChannelLobePositionChange\r\n\t| AudioChannelLobeTalkerHeightChange\r\n\t| AudioChannelLobeWidthChange\r\n\t| AudioChannelLogicReceiverChange\r\n\t| AudioChannelMicOptimizationChange\r\n\t| AudioChannelMicPolarPatternChange\r\n\t| AudioChannelMicrophoneAngleChange\r\n\t| AudioChannelMonitorMixChange\r\n\t| AudioChannelMonitorMixReverbChange\r\n\t| AudioChannelMuteChange\r\n\t| AudioChannelMuteGroupChange\r\n\t| AudioChannelMuteLockChange\r\n\t| AudioChannelNameChange\r\n\t| AudioChannelNoiseReductionChange\r\n\t| AudioChannelOutputPathChange\r\n\t| AudioChannelPcPeripheralChange\r\n\t| AudioChannelPhantomPowerChange\r\n\t| AudioChannelPlosiveReductionChange\r\n\t| AudioChannelPostGateGainChange\r\n\t| AudioChannelPostGateMuteChange\r\n\t| AudioChannelPostGateSoloChange\r\n\t| AudioChannelReverbChange\r\n\t| AudioChannelSelectedLoudspeakerChange\r\n\t| AudioChannelSignalGeneratorChange\r\n\t| AudioChannelSoloChange\r\n\t| AudioChannelStereoReverseChange\r\n\t| AudioChannelStereoWidthChange\r\n\t| AudioChannelTalkerHeightChange;\r\n\r\nexport type AudioChannelFeatureUpdateInput = {\r\n\tacousticEchoCancellation?: InputMaybe;\r\n\tanalogLevel?: InputMaybe;\r\n\tautoLevel?: InputMaybe;\r\n\tautoMute?: InputMaybe;\r\n\tautomaticGainControl?: InputMaybe;\r\n\tautomixer?: InputMaybe;\r\n\tautomixerInput?: InputMaybe;\r\n\tautomixerVoiceActivityDetection?: InputMaybe;\r\n\tcompressor?: InputMaybe;\r\n\tdanteRouteReceiver?: InputMaybe;\r\n\tdanteRouteTransmitter?: InputMaybe;\r\n\tdelay?: InputMaybe;\r\n\tdenoiser?: InputMaybe;\r\n\tdeverb?: InputMaybe;\r\n\tdeviceSpecificEqualizerContour?: InputMaybe;\r\n\tdirectOutputTapPoint?: InputMaybe;\r\n\tequalizer?: InputMaybe;\r\n\tequalizerContour?: InputMaybe;\r\n\tequalizerPreset?: InputMaybe;\r\n\tfaderGroup?: InputMaybe;\r\n\tgain?: InputMaybe;\r\n\tgainLock?: InputMaybe;\r\n\tinputSource?: InputMaybe;\r\n\tlimiter?: InputMaybe;\r\n\tlobeConfiguration?: InputMaybe;\r\n\tlobePosition?: InputMaybe;\r\n\tlobeTalkerHeight?: InputMaybe;\r\n\tlobeWidth?: InputMaybe;\r\n\tmicOptimization?: InputMaybe;\r\n\tmicPolarPattern?: InputMaybe;\r\n\tmicrophoneAngle?: InputMaybe;\r\n\tmonitorMix?: InputMaybe;\r\n\tmonitorMixReverb?: InputMaybe;\r\n\tmute?: InputMaybe;\r\n\tmuteGroup?: InputMaybe;\r\n\tmuteLock?: InputMaybe;\r\n\tname?: InputMaybe;\r\n\tnoiseReduction?: InputMaybe;\r\n\toutputPath?: InputMaybe;\r\n\tpcPeripheral?: InputMaybe;\r\n\tphantomPower?: InputMaybe;\r\n\tplosiveReduction?: InputMaybe;\r\n\tpostGateGain?: InputMaybe;\r\n\tpostGateMute?: InputMaybe;\r\n\tpostGateSolo?: InputMaybe;\r\n\treverb?: InputMaybe;\r\n\tselectedLoudspeaker?: InputMaybe;\r\n\tsignalGenerator?: InputMaybe;\r\n\tsolo?: InputMaybe;\r\n\tstereoReverse?: InputMaybe;\r\n\tstereoWidth?: InputMaybe;\r\n\ttalkerHeight?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelFeatures = {\r\n\tacousticEchoCancellation: Maybe;\r\n\t/** Acoustic Echo Cancellation Echo Return Loss Enhancement Meter level (dB) */\r\n\tacousticEchoCancellationErle: Maybe;\r\n\tacousticEchoCancellationMonoReference: Maybe;\r\n\tacousticEchoCancellationPeak: Maybe;\r\n\tacousticEchoCancellationRms: Maybe;\r\n\tacousticEchoCancellationStereoReference: Maybe;\r\n\tactivity: Maybe;\r\n\tanalogLevel: Maybe;\r\n\tautoLevel: Maybe;\r\n\tautoMute: Maybe;\r\n\tautoPosition: Maybe;\r\n\tautomaticGain: Maybe;\r\n\tautomaticGainControl: Maybe;\r\n\tautomaticGainControlPeak: Maybe;\r\n\tautomaticGainControlRms: Maybe;\r\n\tautomixGain: Maybe;\r\n\tautomixSourceSelector: Maybe;\r\n\tautomixer: Maybe;\r\n\tautomixerGate: Maybe;\r\n\tautomixerInput: Maybe;\r\n\t/**\r\n\t * The preferred metering point for input channels participating in automixing.\r\n\t * For devices that don't support this feature, an earlier metering point must be used, such as peak.\r\n\t */\r\n\tautomixerInputPeak: Maybe;\r\n\t/**\r\n\t * The preferred metering point for input channels participating in automixing.\r\n\t * For devices that don't support this feature, an earlier metering point must be used, such as rms.\r\n\t */\r\n\tautomixerInputRms: Maybe;\r\n\tautomixerVoiceActivityDetection: Maybe;\r\n\tchannelConfiguration: Maybe;\r\n\tclip: Maybe;\r\n\tcompressor: Maybe;\r\n\tcompressorEngaged: Maybe;\r\n\tdanteEncryptionStatus: Maybe;\r\n\tdanteRouteReceiver: Maybe;\r\n\tdanteRouteTransmitter: Maybe;\r\n\tdelay: Maybe;\r\n\tdenoiser: Maybe;\r\n\tdenoiserNoiseReduction: Maybe;\r\n\tdeverb: Maybe;\r\n\tdeviceSpecificEqualizerContour: Maybe;\r\n\tdirectOutputTapPoint: Maybe;\r\n\tequalizer: Maybe;\r\n\tequalizerContour: Maybe;\r\n\tequalizerPreset: Maybe;\r\n\tfaderGroup: Maybe;\r\n\tgain: Maybe;\r\n\tgainLock: Maybe;\r\n\tidentify: Maybe;\r\n\tinputSource: Maybe;\r\n\tlightingBehavior: Maybe;\r\n\tlimiter: Maybe;\r\n\tlimiterEngaged: Maybe;\r\n\tlobeConfiguration: Maybe;\r\n\tlobePosition: Maybe;\r\n\tlobeTalkerHeight: Maybe;\r\n\tlobeWidth: Maybe;\r\n\tlogicReceiver: Maybe;\r\n\t/**\r\n\t * The preferred metering point for input channels participating in matrix mixing.\r\n\t * For devices that don't support this feature, an earlier metering point must be used, such as peak.\r\n\t */\r\n\tmatrixMixerInputPeak: Maybe;\r\n\t/**\r\n\t * The preferred metering point for input channels participating in matrix mixing.\r\n\t * For devices that don't support this feature, an earlier metering point must be used, such as rms.\r\n\t */\r\n\tmatrixMixerInputRms: Maybe;\r\n\tmatrixMixerOutput: Maybe;\r\n\t/**\r\n\t * The preferred metering point for output channels participating in matrix mixing.\r\n\t * For devices that don't support this feature, a later metering point must be used, such as peak.\r\n\t */\r\n\tmatrixMixerOutputPeak: Maybe;\r\n\t/**\r\n\t * The preferred metering point for output channels participating in matrix mixing.\r\n\t * For devices that don't support this feature, a later metering point must be used, such as rms.\r\n\t */\r\n\tmatrixMixerOutputRms: Maybe;\r\n\t/** When the related device feature, 'stereoAudio''s enabled field is 'false', the 'rightLevel' field will be \"negative infinity\" and unchanging (e.g -60 dBFS on IMX-R). E.g. The 'leftLevel' will continue to return the Mono signal for the audio channel. */\r\n\tmatrixMixerStereoInputPeak: Maybe;\r\n\t/** When the related device feature, 'stereoAudio''s enabled field is 'false', the 'rightLevel' field will be \"negative infinity\" and unchanging (e.g -60 dBFS on IMX-R). E.g. The 'leftLevel' will continue to return the Mono signal for the audio channel. */\r\n\tmatrixMixerStereoInputRms: Maybe;\r\n\tmicOptimization: Maybe;\r\n\tmicPolarPattern: Maybe;\r\n\tmicrophoneAngle: Maybe;\r\n\tmonitorMix: Maybe;\r\n\tmonitorMixReverb: Maybe;\r\n\tmute: Maybe;\r\n\tmuteGroup: Maybe;\r\n\tmuteLock: Maybe;\r\n\tname: Maybe;\r\n\tnoiseReduction: Maybe;\r\n\toutputPath: Maybe;\r\n\tpcPeripheral: Maybe;\r\n\t/**\r\n\t * When the device-level feature stereoAudio's enabled field is true, the left channel of that stereo signal will be available here and in the stereoPeak capability.\r\n\t * This capability always represents a mono send (a.k.a L/Mono).\r\n\t */\r\n\tpeak: Maybe;\r\n\tphantomPower: Maybe;\r\n\tplosiveReduction: Maybe;\r\n\tpostGateGain: Maybe;\r\n\tpostGateMute: Maybe;\r\n\tpostGateSolo: Maybe;\r\n\treverb: Maybe;\r\n\t/**\r\n\t * When the device-level feature stereoAudio's enabled field is true, the left channel of that stereo signal will be available here and in the stereoPeak capability.\r\n\t * This capability always represents a mono send (a.k.a L/Mono).\r\n\t */\r\n\trms: Maybe;\r\n\tselectedLoudspeaker: Maybe;\r\n\tsignalGenerator: Maybe;\r\n\tsolo: Maybe;\r\n\t/** When the related device feature, 'stereoAudio''s enabled field is 'false', the 'rightLevel' field will be \"negative infinity\" and unchanging (e.g -110 dBFS on IMX-R). E.g. The 'leftLevel' will continue to return the Mono signal for the audio channel. */\r\n\tstereoPeak: Maybe;\r\n\t/** Reverse stereo - also known as Left-Right (L/R) Swap - indicates whether the left and right stereo audio is swapped */\r\n\tstereoReverse: Maybe;\r\n\t/** When the related device feature, 'stereoAudio''s enabled field is 'false', the 'rightLevel' field will be \"negative infinity\" and unchanging (e.g -110 dBFS on IMX-R). E.g. The 'leftLevel' will continue to return the Mono signal for the audio channel. */\r\n\tstereoRms: Maybe;\r\n\tstereoWidth: Maybe;\r\n\t/** @deprecated Use 'lobeTalkerHeight' feature instead. */\r\n\ttalkerHeight: Maybe;\r\n};\r\n\r\nexport type AudioChannelFixedLobeTalkerHeightUpdateInput = {\r\n\tfixed: AudioChannelLobeTalkerHeightUpdateInput;\r\n};\r\n\r\nexport type AudioChannelFixedMicrophoneAngleUpdateInput = {\r\n\tfixed: AudioChannelMicrophoneAngleUpdateInput;\r\n};\r\n\r\nexport type AudioChannelGain = {\r\n\t/** Signal gain (dB) */\r\n\tgain: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelGainChange = {\r\n\tgain: Maybe;\r\n};\r\n\r\nexport type AudioChannelGainConstraints = {\r\n\t/** Describes the range of values for the signal gain that are supported on the channel. */\r\n\tgain: AudioChannelGainFieldConstraints;\r\n};\r\n\r\nexport type AudioChannelGainFieldConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelGainLock = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelGainLockChange = {\r\n\tgainLock: Maybe;\r\n};\r\n\r\nexport type AudioChannelGainLockUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelGainUpdateInput = {\r\n\tgain: Scalars['Float']['input'];\r\n};\r\n\r\nexport enum AudioChannelGroup {\r\n\tAecReference = 'AEC_REFERENCE',\r\n\tAnalog_70VOutput = 'ANALOG_70V_OUTPUT',\r\n\tAnalogAuxInput = 'ANALOG_AUX_INPUT',\r\n\tAnalogOutput = 'ANALOG_OUTPUT',\r\n\tAutomix = 'AUTOMIX',\r\n\tAuxInput = 'AUX_INPUT',\r\n\tAuxOutput = 'AUX_OUTPUT',\r\n\tBack = 'BACK',\r\n\tBluetoothInput = 'BLUETOOTH_INPUT',\r\n\tBluetoothOutput = 'BLUETOOTH_OUTPUT',\r\n\tDanteAnalogInput = 'DANTE_ANALOG_INPUT',\r\n\tDanteAuxInput = 'DANTE_AUX_INPUT',\r\n\tDanteInput = 'DANTE_INPUT',\r\n\tDanteLineInput = 'DANTE_LINE_INPUT',\r\n\tDanteLineOutput = 'DANTE_LINE_OUTPUT',\r\n\tDanteMicInput = 'DANTE_MIC_INPUT',\r\n\tDanteOutput = 'DANTE_OUTPUT',\r\n\tDirectOutput = 'DIRECT_OUTPUT',\r\n\tGeneric = 'GENERIC',\r\n\tHeadphone = 'HEADPHONE',\r\n\tLobe = 'LOBE',\r\n\tLoudspeaker = 'LOUDSPEAKER',\r\n\tMic = 'MIC',\r\n\tMixOutput = 'MIX_OUTPUT',\r\n\tMobileInput = 'MOBILE_INPUT',\r\n\tMobileOutput = 'MOBILE_OUTPUT',\r\n\tPcInput = 'PC_INPUT',\r\n\tPcOutput = 'PC_OUTPUT',\r\n\tSignalGeneratorInput = 'SIGNAL_GENERATOR_INPUT',\r\n\tSum = 'SUM',\r\n\tUsbInput = 'USB_INPUT',\r\n\tUsbOutput = 'USB_OUTPUT',\r\n\tVirtualAudioInput = 'VIRTUAL_AUDIO_INPUT',\r\n\tVirtualAudioOutput = 'VIRTUAL_AUDIO_OUTPUT'\r\n}\r\n\r\nexport type AudioChannelIdentify = {\r\n\tidentifying: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelIdentifyChange = {\r\n\tidentify: Maybe;\r\n};\r\n\r\n/**\r\n * Determines the source of the input for this audio channel.\r\n * This feature is only supported for audio channels which have multiple input sources\r\n * (e.g. digital and analog input sources, combination inputs, etc)\r\n */\r\nexport type AudioChannelInputSource = {\r\n\tsource: AudioChannelInputSourceType | `${AudioChannelInputSourceType}`;\r\n};\r\n\r\nexport type AudioChannelInputSourceChange = {\r\n\tinputSource: Maybe;\r\n};\r\n\r\nexport type AudioChannelInputSourceConstraints = {\r\n\tsource: Maybe;\r\n};\r\n\r\nexport enum AudioChannelInputSourceType {\r\n\tAnalog = 'ANALOG',\r\n\tDigital = 'DIGITAL'\r\n}\r\n\r\nexport type AudioChannelInputSourceTypeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioChannelInputSourceUpdateInput = {\r\n\tsource?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelLightingBehavior = {\r\n\tcolor: Maybe;\r\n\tmode: Maybe;\r\n\tstate: Maybe;\r\n};\r\n\r\nexport type AudioChannelLightingBehaviorChange = {\r\n\tlightingBehavior: Maybe;\r\n};\r\n\r\nexport type AudioChannelLightingBehaviorColorConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioChannelLightingBehaviorConstraints = {\r\n\tcolor: AudioChannelLightingBehaviorColorConstraints;\r\n\tmode: AudioChannelLightingBehaviorModeConstraints;\r\n\tstate: AudioChannelLightingBehaviorStateConstraints;\r\n};\r\n\r\nexport type AudioChannelLightingBehaviorModeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioChannelLightingBehaviorStateConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\n/** Automixer input describes the features which correspond to an audio channel's participation in the device's automixer. */\r\nexport type AudioChannelLimiter = {\r\n\tbypassed: Maybe;\r\n\tenabled: Scalars['Boolean']['output'];\r\n\tthreshold: Maybe;\r\n};\r\n\r\nexport type AudioChannelLimiterChange = {\r\n\tlimiter: Maybe;\r\n};\r\n\r\nexport type AudioChannelLimiterConstraints = {\r\n\tbypassed: FieldSupport;\r\n\tthreshold: AudioChannelLimiterThresholdConstraints;\r\n};\r\n\r\nexport type AudioChannelLimiterEngagedMeter = {\r\n\tengaged: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelLimiterThresholdConstraints = IFieldSupportInfo &\r\n\tINullableFloatRangeConstraints & {\r\n\t\trange: Maybe;\r\n\t\tsupported: Scalars['Boolean']['output'];\r\n\t};\r\n\r\nexport type AudioChannelLimiterUpdateInput = {\r\n\tbypassed?: InputMaybe;\r\n\tenabled?: InputMaybe;\r\n\tthreshold?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelLobeConfiguration = {\r\n\t/** Indicates whether lobe is enabled */\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelLobeConfigurationChange = {\r\n\tlobeConfiguration: Maybe;\r\n};\r\n\r\nexport type AudioChannelLobeConfigurationUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelLobePosition = {\r\n\t/** Auto-focus lobe displacement in millimeters (mm) relative to the center of the device */\r\n\tautoFocus: Maybe;\r\n\t/** Lobe displacement in millimeters (mm) relative to the center of the device */\r\n\tfixed: FloatPosition;\r\n};\r\n\r\nexport type AudioChannelLobePositionAutoFocusConstraints = IFieldSupportInfo &\r\n\tINullableFloatPositionRangeConstraints & {\r\n\t\trange: Maybe;\r\n\t\tsupported: Scalars['Boolean']['output'];\r\n\t};\r\n\r\nexport type AudioChannelLobePositionChange = {\r\n\tlobePosition: Maybe;\r\n};\r\n\r\nexport type AudioChannelLobePositionConstraints = {\r\n\tautoFocus: AudioChannelLobePositionAutoFocusConstraints;\r\n\tfixed: AudioChannelLobePositionFixedConstraints;\r\n};\r\n\r\nexport type AudioChannelLobePositionFixedConstraints = IFloatPositionRangeConstraints & {\r\n\trange: FloatPositionRange;\r\n};\r\n\r\nexport type AudioChannelLobePositionUpdateInput = {\r\n\tfixed?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelLobeTalkerHeight = {\r\n\t/** Height of the talker's head in millimeters (mm), measured from the floor */\r\n\tautoFocus: Maybe;\r\n\t/** Height of the talker's head in millimeters (mm), measured from the floor */\r\n\tfixed: TalkerHeight;\r\n};\r\n\r\nexport type AudioChannelLobeTalkerHeightChange = {\r\n\tlobeTalkerHeight: Maybe;\r\n};\r\n\r\nexport type AudioChannelLobeTalkerHeightConstraints = {\r\n\tautoFocus: AudioChannelTalkerHeightAutoFocusConstraints;\r\n\tfixed: AudioChannelTalkerHeightFixedConstraints;\r\n};\r\n\r\nexport type AudioChannelLobeTalkerHeightUpdateInput = {\r\n\theight?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelLobeWidth = {\r\n\t/** Specifies the lobe width */\r\n\twidth: LobeWidth | `${LobeWidth}`;\r\n};\r\n\r\nexport type AudioChannelLobeWidthChange = {\r\n\tlobeWidth: Maybe;\r\n};\r\n\r\nexport type AudioChannelLobeWidthConstraints = {\r\n\t/** Describes the range of supported values for the lobe width on the audio channel. */\r\n\twidth: LobeWidthConstraints;\r\n};\r\n\r\nexport type AudioChannelLobeWidthUpdateInput = {\r\n\twidth?: InputMaybe;\r\n};\r\n\r\n/**\r\n * Represents the logic signal sending and receiving happening between devices participating in the device-enabled logic feature.\r\n * This feature optimizes mute status synchronization at the optimal places in the signal path between particapting microphones and digital signal processors.\r\n */\r\nexport type AudioChannelLogicReceiver = {\r\n\tinputDeviceType: Maybe;\r\n\t/** Indicates whether or not the channel is receiving a logic input signal from a logic-enabled microphone */\r\n\tinputSignal: Scalars['Boolean']['output'];\r\n\t/** Indicates whether or not the channel is sending a logic output signal to a logic-enabled microphone */\r\n\toutputGated: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelLogicReceiverChange = {\r\n\tlogicReceiver: Maybe;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerInputPeakLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerInputPeakMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelMatrixMixerInputPeakMeterConstraints = {\r\n\tlevel: AudioChannelMatrixMixerInputPeakLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerInputRmsLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerInputRmsMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelMatrixMixerInputRmsMeterConstraints = {\r\n\tlevel: AudioChannelMatrixMixerInputRmsLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerOutput = {\r\n\tcrossPoints: Array;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerOutputPeakLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerOutputPeakMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelMatrixMixerOutputPeakMeterConstraints = {\r\n\tlevel: AudioChannelMatrixMixerOutputPeakLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerOutputRmsLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerOutputRmsMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelMatrixMixerOutputRmsMeterConstraints = {\r\n\tlevel: AudioChannelMatrixMixerOutputRmsLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerStereoInputPeakLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerStereoInputPeakMeter = {\r\n\tleftLevel: Scalars['Float']['output'];\r\n\trightLevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelMatrixMixerStereoInputPeakMeterConstraints = {\r\n\tleftLevel: AudioChannelMatrixMixerStereoInputPeakLevelConstraints;\r\n\trightLevel: AudioChannelMatrixMixerStereoInputPeakLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerStereoInputRmsLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelMatrixMixerStereoInputRmsMeter = {\r\n\tleftLevel: Scalars['Float']['output'];\r\n\trightLevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelMatrixMixerStereoInputRmsMeterConstraints = {\r\n\tleftLevel: AudioChannelMatrixMixerStereoInputRmsLevelConstraints;\r\n\trightLevel: AudioChannelMatrixMixerStereoInputRmsLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelMeterChange = {\r\n\tfeatures: Maybe;\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type AudioChannelMeterFeatureChange = {\r\n\tacousticEchoCancellationErle: Maybe;\r\n\tacousticEchoCancellationPeak: Maybe;\r\n\tacousticEchoCancellationRms: Maybe;\r\n\tactivity: Maybe;\r\n\tautomaticGain: Maybe;\r\n\tautomaticGainControlPeak: Maybe;\r\n\tautomaticGainControlRms: Maybe;\r\n\tautomixGain: Maybe;\r\n\tautomixerGate: Maybe;\r\n\tautomixerInputPeak: Maybe;\r\n\tautomixerInputRms: Maybe;\r\n\tclip: Maybe;\r\n\tcompressorEngaged: Maybe;\r\n\tdenoiserNoiseReduction: Maybe;\r\n\tlimiterEngaged: Maybe;\r\n\tmatrixMixerInputPeak: Maybe;\r\n\tmatrixMixerInputRms: Maybe;\r\n\tmatrixMixerOutputPeak: Maybe;\r\n\tmatrixMixerOutputRms: Maybe;\r\n\tmatrixMixerStereoInputPeak: Maybe;\r\n\tmatrixMixerStereoInputRms: Maybe;\r\n\tpeak: Maybe;\r\n\trms: Maybe;\r\n\tstereoPeak: Maybe;\r\n\tstereoRms: Maybe;\r\n};\r\n\r\nexport type AudioChannelMicOptimization = {\r\n\tmode: MicOptimizationMode | `${MicOptimizationMode}`;\r\n};\r\n\r\nexport type AudioChannelMicOptimizationChange = {\r\n\tmicOptimization: Maybe;\r\n};\r\n\r\nexport type AudioChannelMicOptimizationConstraints = {\r\n\tmode: AudioChannelMicOptimizationModeConstraints;\r\n};\r\n\r\nexport type AudioChannelMicOptimizationModeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioChannelMicOptimizationUpdateInput = {\r\n\tmode: MicOptimizationMode | `${MicOptimizationMode}`;\r\n};\r\n\r\nexport type AudioChannelMicPolarPattern = {\r\n\tpattern: MicPolarPattern | `${MicPolarPattern}`;\r\n};\r\n\r\nexport type AudioChannelMicPolarPatternChange = {\r\n\tmicPolarPattern: Maybe;\r\n};\r\n\r\nexport type AudioChannelMicPolarPatternConstraints = {\r\n\tpattern: AudioChannelMicPolarPatternTypeConstraints;\r\n};\r\n\r\nexport type AudioChannelMicPolarPatternTypeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioChannelMicPolarPatternUpdateInput = {\r\n\tpattern: MicPolarPattern | `${MicPolarPattern}`;\r\n};\r\n\r\nexport type AudioChannelMicrophoneAngle = {\r\n\t/** Auto-focused position of the microphone angle in degrees. The zero position will be indicated physically on the device. */\r\n\tautoFocus: Maybe;\r\n\t/** Statically positioned microphone angle in degrees. The zero position will be indicated physically on the device. */\r\n\tfixed: MicrophoneAngle;\r\n};\r\n\r\nexport type AudioChannelMicrophoneAngleAutoFocusConstraints = IFieldSupportInfo &\r\n\tINullableIntRangeConstraints & {\r\n\t\trange: Maybe;\r\n\t\tsupported: Scalars['Boolean']['output'];\r\n\t};\r\n\r\nexport type AudioChannelMicrophoneAngleChange = {\r\n\tmicrophoneAngle: Maybe;\r\n};\r\n\r\nexport type AudioChannelMicrophoneAngleConstraints = {\r\n\tautoFocus: AudioChannelMicrophoneAngleAutoFocusConstraints;\r\n\tfixed: AudioChannelMicrophoneAngleFixedConstraints;\r\n};\r\n\r\nexport type AudioChannelMicrophoneAngleFixedConstraints = IIntRangeConstraints & {\r\n\trange: IntRange;\r\n};\r\n\r\nexport type AudioChannelMicrophoneAngleUpdateInput = {\r\n\tangle?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelMonitorMix = {\r\n\t/**\r\n\t * A percentage describing a configurable blend of audio from a microphone, and inbound playback audio.\r\n\t * This is used for direct monitoring of multiple simultaneous audio signals.\r\n\t *\r\n\t * 100% - All audio output is currently being captured by the microphone (direct monitoring).\r\n\t * (e.g. a podcast host can here themselves talk with headphones on with minimal latency without processing from device receiving the signal)\r\n\t * 50% - Equal amounts of audio from both the microphone signal and the host device playback signal\r\n\t * 0% - All audio output is the playback audio from the host device (input monitoring).\r\n\t * (e.g. USB audio input back into the microphone from the operating system for listening to a co-host on a podcast)\r\n\t * (e.g. a podcast host can listen to their audio post processed by a denoiser on their computer, or from DSP in their DAW)\r\n\t */\r\n\tpercentage: Scalars['Int']['output'];\r\n};\r\n\r\nexport type AudioChannelMonitorMixChange = {\r\n\tmonitorMix: Maybe;\r\n};\r\n\r\nexport type AudioChannelMonitorMixConstraints = {\r\n\t/** Describes the range of values for the monitoring mix that are supported on the channel. */\r\n\tpercentage: AudioChannelMonitorMixTypeConstraints;\r\n};\r\n\r\nexport type AudioChannelMonitorMixReverb = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelMonitorMixReverbChange = {\r\n\tmonitorMixReverb: Maybe;\r\n};\r\n\r\nexport type AudioChannelMonitorMixReverbUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelMonitorMixTypeConstraints = IIntRangeConstraints & {\r\n\t/** Describes the range of values for the monitoring mix that are supported on the channel. */\r\n\trange: IntRange;\r\n};\r\n\r\nexport type AudioChannelMonitorMixUpdateInput = {\r\n\tpercentage: Scalars['Int']['input'];\r\n};\r\n\r\nexport type AudioChannelMute = {\r\n\t/** Indicates whether or not the channel is muted */\r\n\tmuted: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelMuteChange = {\r\n\tmute: Maybe;\r\n};\r\n\r\nexport type AudioChannelMuteGroup = {\r\n\t/** Indicates whether or not the audio channel is participating in the mute group for linking mute state across multiple channels */\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelMuteGroupChange = {\r\n\tmuteGroup: Maybe;\r\n};\r\n\r\nexport type AudioChannelMuteGroupUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelMuteLock = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelMuteLockChange = {\r\n\tmuteLock: Maybe;\r\n};\r\n\r\nexport type AudioChannelMuteLockUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelMuteUpdateInput = {\r\n\tmuted: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelName = {\r\n\t/** Name assigned to the channel */\r\n\tname: Scalars['String']['output'];\r\n};\r\n\r\nexport type AudioChannelNameChange = {\r\n\tname: Maybe;\r\n};\r\n\r\nexport type AudioChannelNameConflict = {\r\n\taudioChannel: AudioChannel;\r\n\t/** Channel name that is in conflict with another channel on the device */\r\n\tchannelName: Scalars['String']['output'];\r\n};\r\n\r\nexport type AudioChannelNameConstraints = {\r\n\tname: AudioChannelNameFieldConstraints;\r\n};\r\n\r\nexport type AudioChannelNameFieldConstraints = IStringPatternRangeConstraints & {\r\n\tpattern: Scalars['Regex']['output'];\r\n};\r\n\r\nexport type AudioChannelNameUpdateInput = {\r\n\tname: Scalars['String']['input'];\r\n};\r\n\r\nexport type AudioChannelNoiseReduction = {\r\n\t/** Indicates whether or not the noise reduction feature is enabled */\r\n\tenabled: Scalars['Boolean']['output'];\r\n\t/** Amount of noise reduction applied to the channel */\r\n\tlevel: Maybe;\r\n};\r\n\r\nexport type AudioChannelNoiseReductionChange = {\r\n\tnoiseReduction: Maybe;\r\n};\r\n\r\nexport type AudioChannelNoiseReductionConstraints = {\r\n\tlevel: NoiseReductionLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelNoiseReductionUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tlevel?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelOperationResult = NodeOperationResult & {\r\n\taudioChannel: Maybe;\r\n\terror: Maybe;\r\n};\r\n\r\nexport type AudioChannelOutputPath = {\r\n\tpath: OutputSignalPath | `${OutputSignalPath}`;\r\n};\r\n\r\nexport type AudioChannelOutputPathChange = {\r\n\toutputPath: Maybe;\r\n};\r\n\r\nexport type AudioChannelOutputPathConstraints = {\r\n\tpath: AudioChannelValidOutputPathConstraints;\r\n};\r\n\r\nexport type AudioChannelOutputPathUpdateInput = {\r\n\tpath: OutputSignalPath | `${OutputSignalPath}`;\r\n};\r\n\r\nexport type AudioChannelPcPeripheral = {\r\n\tperipheralOptions: Array;\r\n\tselectedPeripheral: Maybe;\r\n};\r\n\r\nexport type AudioChannelPcPeripheralChange = {\r\n\tpcPeripheral: Maybe;\r\n};\r\n\r\nexport type AudioChannelPcPeripheralIdUpdateInput = {\r\n\tid: Scalars['String']['input'];\r\n};\r\n\r\nexport type AudioChannelPcPeripheralUpdateInput = {\r\n\tselectedPeripheral: AudioChannelPcPeripheralIdUpdateInput;\r\n};\r\n\r\nexport type AudioChannelPeakMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelPeakMeterConstraints = {\r\n\tlevel: AudioCoverageAreaPeakMeterLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelPhantomPower = {\r\n\t/** Phantom power setting in volts */\r\n\tvolts: Scalars['Int']['output'];\r\n};\r\n\r\nexport type AudioChannelPhantomPowerChange = {\r\n\tphantomPower: Maybe;\r\n};\r\n\r\nexport type AudioChannelPhantomPowerConstraints = {\r\n\t/** Describes the list of supported values for the phantom power on the audio channel. */\r\n\tvolts: PhantomPowerConstraints;\r\n};\r\n\r\nexport type AudioChannelPhantomPowerUpdateInput = {\r\n\tvolts: Scalars['Int']['input'];\r\n};\r\n\r\nexport type AudioChannelPlosiveReduction = {\r\n\t/** Indicates whether or not plosive reduction is enabled */\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelPlosiveReductionChange = {\r\n\tplosiveReduction: Maybe;\r\n};\r\n\r\nexport type AudioChannelPlosiveReductionUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelPostGateFieldConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelPostGateGain = {\r\n\t/** Signal gain (dB) after the automixer gating decision has occurred */\r\n\tgain: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelPostGateGainChange = {\r\n\tpostGateGain: Maybe;\r\n};\r\n\r\nexport type AudioChannelPostGateGainConstraints = {\r\n\tgain: AudioChannelPostGateFieldConstraints;\r\n};\r\n\r\nexport type AudioChannelPostGateGainUpdateInput = {\r\n\tgain: Scalars['Float']['input'];\r\n};\r\n\r\nexport type AudioChannelPostGateMute = {\r\n\t/** Audio mute status after the automixer gating decision has occurred */\r\n\tmuted: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelPostGateMuteChange = {\r\n\tpostGateMute: Maybe;\r\n};\r\n\r\nexport type AudioChannelPostGateMuteUpdateInput = {\r\n\tmuted: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelPostGateSolo = {\r\n\t/** Whether or not the audio channel direct out is soloed after the automixer gating decision has occurred. */\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelPostGateSoloChange = {\r\n\tpostGateSolo: Maybe;\r\n};\r\n\r\nexport type AudioChannelPostGateSoloUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelReverb = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n\tintensity: Scalars['Int']['output'];\r\n\ttype: ReverbType | `${ReverbType}`;\r\n};\r\n\r\nexport type AudioChannelReverbChange = {\r\n\treverb: Maybe;\r\n};\r\n\r\nexport type AudioChannelReverbConstraints = {\r\n\tintensity: AudioChannelReverbIntensityConstraints;\r\n\ttype: AudioChannelReverbTypeConstraints;\r\n};\r\n\r\nexport type AudioChannelReverbIntensityConstraints = IIntRangeConstraints & {\r\n\trange: IntRange;\r\n};\r\n\r\nexport type AudioChannelReverbTypeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioChannelReverbUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tintensity?: InputMaybe;\r\n\ttype?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelRmsLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelRmsMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelRmsMeterConstraints = {\r\n\tlevel: AudioChannelRmsLevelConstraints;\r\n};\r\n\r\nexport enum AudioChannelRole {\r\n\tFilter = 'FILTER',\r\n\tSink = 'SINK',\r\n\tSource = 'SOURCE'\r\n}\r\n\r\nexport type AudioChannelSelectedLoudspeaker = {\r\n\tloudspeaker: Loudspeaker | `${Loudspeaker}`;\r\n};\r\n\r\nexport type AudioChannelSelectedLoudspeakerChange = {\r\n\tselectedLoudspeaker: Maybe;\r\n};\r\n\r\nexport type AudioChannelSelectedLoudspeakerConstraints = {\r\n\tloudspeaker: LoudspeakerConstraints;\r\n};\r\n\r\nexport type AudioChannelSelectedLoudspeakerInput = {\r\n\tloudspeaker: Loudspeaker | `${Loudspeaker}`;\r\n};\r\n\r\nexport type AudioChannelSignalGenerator = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n\tfrequency: Scalars['Float']['output'];\r\n\tgain: Scalars['Float']['output'];\r\n\tsignalType: SignalType | `${SignalType}`;\r\n};\r\n\r\nexport type AudioChannelSignalGeneratorChange = {\r\n\tsignalGenerator: Maybe;\r\n};\r\n\r\nexport type AudioChannelSignalGeneratorConstraints = {\r\n\tfrequency: FloatRangeConstraints;\r\n\tgain: Maybe>;\r\n\tsignalType: SignalTypeConstraints;\r\n};\r\n\r\nexport type AudioChannelSignalGeneratorUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tfrequency?: InputMaybe;\r\n\tgain?: InputMaybe;\r\n\tsignalType?: InputMaybe;\r\n};\r\n\r\nexport type AudioChannelSolo = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelSoloChange = {\r\n\tsolo: Maybe;\r\n};\r\n\r\nexport type AudioChannelSoloUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelStereoPeakLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelStereoPeakMeter = {\r\n\tleftLevel: Scalars['Float']['output'];\r\n\trightLevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelStereoPeakMeterConstraints = {\r\n\tleftLevel: AudioChannelStereoPeakLevelConstraints;\r\n\trightLevel: AudioChannelStereoPeakLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelStereoReverse = {\r\n\t/** True, if the left and right stereo audio is swapped, false otherwise */\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioChannelStereoReverseChange = {\r\n\tstereoReverse: Maybe;\r\n};\r\n\r\nexport type AudioChannelStereoReverseUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioChannelStereoRmsLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelStereoRmsMeter = {\r\n\tleftLevel: Scalars['Float']['output'];\r\n\trightLevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelStereoRmsMeterConstraints = {\r\n\tleftLevel: AudioChannelStereoRmsLevelConstraints;\r\n\trightLevel: AudioChannelStereoRmsLevelConstraints;\r\n};\r\n\r\nexport type AudioChannelStereoWidth = {\r\n\t/** The width of the stereo image expressed as an angle in degrees. */\r\n\tangle: Scalars['Int']['output'];\r\n};\r\n\r\nexport type AudioChannelStereoWidthAngleConstraints = IIntRangeConstraints & {\r\n\trange: IntRange;\r\n};\r\n\r\nexport type AudioChannelStereoWidthChange = {\r\n\tstereoWidth: Maybe;\r\n};\r\n\r\nexport type AudioChannelStereoWidthConstraints = {\r\n\tangle: AudioChannelStereoWidthAngleConstraints;\r\n};\r\n\r\nexport type AudioChannelStereoWidthUpdateInput = {\r\n\tangle: Scalars['Int']['input'];\r\n};\r\n\r\nexport type AudioChannelSupportedFeatures = {\r\n\tacousticEchoCancellation: FeatureSupport;\r\n\tacousticEchoCancellationErle: FeatureSupport;\r\n\tacousticEchoCancellationMonoReference: FeatureSupport;\r\n\tacousticEchoCancellationPeak: FeatureSupport;\r\n\tacousticEchoCancellationRms: FeatureSupport;\r\n\tacousticEchoCancellationStereoReference: FeatureSupport;\r\n\tactivity: FeatureSupport;\r\n\tanalogLevel: FeatureSupport;\r\n\tautoLevel: FeatureSupport;\r\n\tautoMute: FeatureSupport;\r\n\tautoPosition: FeatureSupport;\r\n\tautomaticGain: FeatureSupport;\r\n\tautomaticGainControl: FeatureSupport;\r\n\tautomaticGainControlPeak: FeatureSupport;\r\n\tautomaticGainControlRms: FeatureSupport;\r\n\tautomixGain: FeatureSupport;\r\n\tautomixSourceSelector: FeatureSupport;\r\n\tautomixer: FeatureSupport;\r\n\tautomixerGate: FeatureSupport;\r\n\tautomixerInput: FeatureSupport;\r\n\tautomixerInputPeak: FeatureSupport;\r\n\tautomixerInputRms: FeatureSupport;\r\n\tautomixerVoiceActivityDetection: FeatureSupport;\r\n\tchannelConfiguration: FeatureSupport;\r\n\tclip: FeatureSupport;\r\n\tcompressor: FeatureSupport;\r\n\tcompressorEngaged: FeatureSupport;\r\n\tdanteEncryptionStatus: FeatureSupport;\r\n\tdanteRouteReceiver: FeatureSupport;\r\n\tdanteRouteTransmitter: FeatureSupport;\r\n\tdelay: FeatureSupport;\r\n\tdenoiser: FeatureSupport;\r\n\tdenoiserNoiseReduction: FeatureSupport;\r\n\tdeverb: FeatureSupport;\r\n\tdeviceSpecificEqualizerContour: FeatureSupport;\r\n\tdirectOutputTapPoint: FeatureSupport;\r\n\tequalizer: FeatureSupport;\r\n\tequalizerContour: FeatureSupport;\r\n\tequalizerPreset: FeatureSupport;\r\n\tfaderGroup: FeatureSupport;\r\n\tgain: FeatureSupport;\r\n\tgainLock: FeatureSupport;\r\n\tidentify: FeatureSupport;\r\n\tinputSource: FeatureSupport;\r\n\tlightingBehavior: FeatureSupport;\r\n\tlimiter: FeatureSupport;\r\n\tlimiterEngaged: FeatureSupport;\r\n\tlobeConfiguration: FeatureSupport;\r\n\tlobePosition: FeatureSupport;\r\n\tlobeTalkerHeight: FeatureSupport;\r\n\tlobeWidth: FeatureSupport;\r\n\tlogicReceiver: FeatureSupport;\r\n\tmatrixMixerInputPeak: FeatureSupport;\r\n\tmatrixMixerInputRms: FeatureSupport;\r\n\tmatrixMixerOutput: FeatureSupport;\r\n\tmatrixMixerOutputPeak: FeatureSupport;\r\n\tmatrixMixerOutputRms: FeatureSupport;\r\n\tmatrixMixerStereoInputPeak: FeatureSupport;\r\n\tmatrixMixerStereoInputRms: FeatureSupport;\r\n\tmicOptimization: FeatureSupport;\r\n\tmicPolarPattern: FeatureSupport;\r\n\tmicrophoneAngle: FeatureSupport;\r\n\tmonitorMix: FeatureSupport;\r\n\tmonitorMixReverb: FeatureSupport;\r\n\tmute: FeatureSupport;\r\n\tmuteGroup: FeatureSupport;\r\n\tmuteLock: FeatureSupport;\r\n\tname: FeatureSupport;\r\n\tnoiseReduction: FeatureSupport;\r\n\toutputPath: FeatureSupport;\r\n\tpcPeripheral: FeatureSupport;\r\n\tpeak: FeatureSupport;\r\n\tphantomPower: FeatureSupport;\r\n\tplosiveReduction: FeatureSupport;\r\n\tpostGateGain: FeatureSupport;\r\n\tpostGateMute: FeatureSupport;\r\n\tpostGateSolo: FeatureSupport;\r\n\treverb: FeatureSupport;\r\n\trms: FeatureSupport;\r\n\tselectedLoudspeaker: FeatureSupport;\r\n\tsignalGenerator: FeatureSupport;\r\n\tsolo: FeatureSupport;\r\n\tstereoPeak: FeatureSupport;\r\n\tstereoReverse: FeatureSupport;\r\n\tstereoRms: FeatureSupport;\r\n\tstereoWidth: FeatureSupport;\r\n\ttalkerHeight: FeatureSupport;\r\n};\r\n\r\n/** height values are scaled to represent in millimeters (mm) */\r\nexport type AudioChannelTalkerHeight = {\r\n\theight: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioChannelTalkerHeightAutoFocusConstraints = IFieldSupportInfo &\r\n\tINullableFloatRangeConstraints & {\r\n\t\trange: Maybe;\r\n\t\tsupported: Scalars['Boolean']['output'];\r\n\t};\r\n\r\nexport type AudioChannelTalkerHeightChange = {\r\n\ttalkerHeight: Maybe;\r\n};\r\n\r\nexport type AudioChannelTalkerHeightConstraints = {\r\n\theight: Maybe;\r\n};\r\n\r\nexport type AudioChannelTalkerHeightFieldConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelTalkerHeightFixedConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioChannelTalkerHeightUpdateInput = {\r\n\theight: Scalars['Float']['input'];\r\n};\r\n\r\nexport type AudioChannelUpdateInput = {\r\n\tfeatures?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type AudioChannelValidDenoiserLevelConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioChannelValidOutputPathConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioCoverageArea = Fragment &\r\n\tNode & {\r\n\t\tdescription: AudioCoverageAreaDescription;\r\n\t\tfeatures: AudioCoverageAreaFeatures;\r\n\t\tfragmentId: Scalars['ID']['output'];\r\n\t\tid: Scalars['ID']['output'];\r\n\t};\r\n\r\nexport type AudioCoverageAreaAutomixerGateMeter = {\r\n\topen: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioCoverageAreaChange = {\r\n\tfeatures: AudioCoverageAreaFeatureChange;\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type AudioCoverageAreaConfiguration = {\r\n\t/** Indicates whether or not the coverage area is enabled or disabled */\r\n\tactive: Scalars['Boolean']['output'];\r\n\t/** Coordinates of the rectangular bounds of the coverage area */\r\n\tcoordinates: RectangularCoordinates;\r\n\t/**\r\n\t * Dynamic coverage areas have flexible coverage; the microphone intelligently adapts to cover all talkers in the coverage area. Any talker within the boundaries of the coverage area will have microphone coverage (even as they move).\r\n\t *\r\n\t * With Dedicated coverage areas, the microphone assigns coverage to a fixed location all the time, whether a talker is there or not. Dedicated coverage is perfect for a podium or VIP seat that needs priority coverage at all times.\r\n\t */\r\n\ttype: AudioCoverageAreaType | `${AudioCoverageAreaType}`;\r\n};\r\n\r\nexport type AudioCoverageAreaConfigurationChange = {\r\n\tconfiguration: Maybe;\r\n};\r\n\r\nexport type AudioCoverageAreaConfigurationConstraints = {\r\n\ttype: AudioCoverageAreaTypeConstraints;\r\n};\r\n\r\nexport type AudioCoverageAreaConstraints = {\r\n\tconfiguration: Maybe;\r\n\tgain: Maybe;\r\n\tpeak: Maybe;\r\n\trms: Maybe;\r\n};\r\n\r\nexport type AudioCoverageAreaDescription = {\r\n\tconstraints: AudioCoverageAreaConstraints;\r\n\tfeatures: AudioCoverageAreaSupportedFeatures;\r\n};\r\n\r\nexport type AudioCoverageAreaFeatureChange =\r\n\t| AudioCoverageAreaConfigurationChange\r\n\t| AudioCoverageAreaGainChange\r\n\t| AudioCoverageAreaMuteChange;\r\n\r\nexport type AudioCoverageAreaFeatureUpdateInput = {\r\n\tgain?: InputMaybe;\r\n\tmute?: InputMaybe;\r\n};\r\n\r\nexport type AudioCoverageAreaFeatures = {\r\n\tautomixerGate: Maybe;\r\n\tconfiguration: Maybe;\r\n\tgain: Maybe;\r\n\tmute: Maybe;\r\n\tpeak: Maybe;\r\n\trms: Maybe;\r\n};\r\n\r\nexport type AudioCoverageAreaGain = {\r\n\tgain: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioCoverageAreaGainChange = {\r\n\tgain: Maybe;\r\n};\r\n\r\nexport type AudioCoverageAreaGainConstraints = {\r\n\tgain: Maybe;\r\n};\r\n\r\nexport type AudioCoverageAreaGainFieldConstraints = IFloatRangeConstraints & {\r\n\t/** Describes the range of values for the signal gain that are supported on the coverage area. */\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioCoverageAreaGainUpdateInput = {\r\n\tgain: Scalars['Float']['input'];\r\n};\r\n\r\nexport type AudioCoverageAreaMeterChange = {\r\n\tfeatures: Maybe;\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type AudioCoverageAreaMeterFeatureChange = {\r\n\tautomixerGate: Maybe;\r\n\tpeak: Maybe;\r\n\trms: Maybe;\r\n};\r\n\r\nexport type AudioCoverageAreaMute = {\r\n\t/** Indicates whether or not the coverage area is muted */\r\n\tmuted: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type AudioCoverageAreaMuteChange = {\r\n\tmute: Maybe;\r\n};\r\n\r\nexport type AudioCoverageAreaMuteUpdateInput = {\r\n\tmuted: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type AudioCoverageAreaOperationResult = NodeOperationResult & {\r\n\taudioCoverageArea: Maybe;\r\n\terror: Maybe;\r\n};\r\n\r\nexport type AudioCoverageAreaPeakMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioCoverageAreaPeakMeterConstraints = {\r\n\tlevel: AudioCoverageAreaPeakMeterLevelConstraints;\r\n};\r\n\r\nexport type AudioCoverageAreaPeakMeterLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioCoverageAreaRmsMeter = {\r\n\tlevel: Scalars['Float']['output'];\r\n};\r\n\r\nexport type AudioCoverageAreaRmsMeterConstraints = {\r\n\tlevel: Maybe;\r\n};\r\n\r\nexport type AudioCoverageAreaSupportedFeatures = {\r\n\tautomixerGate: FeatureSupport;\r\n\tconfiguration: FeatureSupport;\r\n\tgain: FeatureSupport;\r\n\tmute: FeatureSupport;\r\n\tpeak: FeatureSupport;\r\n\trms: FeatureSupport;\r\n};\r\n\r\nexport enum AudioCoverageAreaType {\r\n\tDedicated = 'DEDICATED',\r\n\tDynamic = 'DYNAMIC'\r\n}\r\n\r\nexport type AudioCoverageAreaTypeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AudioCoverageAreaUpdateInput = {\r\n\tfeatures?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type AudioCoverageRmsMeterLevelConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AudioEncryptionSettingsInput = {\r\n\tid: Scalars['ID']['input'];\r\n\tpassphrase: Scalars['String']['input'];\r\n};\r\n\r\nexport enum AudioMetersLightingMode {\r\n\tBreathing = 'BREATHING',\r\n\tLive = 'LIVE',\r\n\tSolid = 'SOLID'\r\n}\r\n\r\nexport type AudioNetworkNameSyncInput = {\r\n\tid: Scalars['ID']['input'];\r\n\t/**\r\n\t * By default, prior to setting Audio Network Channel Names, Shure (generic) channel names will be checked for conflicts.\r\n\t * This validation can be skipped (if, perhaps, it has already been performed prior to invoking\r\n\t * synchronization).\r\n\t */\r\n\tvalidateChannelNameConflicts?: InputMaybe;\r\n\t/**\r\n\t * By default, prior to setting Audio Network Device Name, discovered devices will be checked for conflicts.\r\n\t * This validation can be skipped (if, perhaps, it has already been performed prior to invoking synchronization).\r\n\t */\r\n\tvalidateDeviceNameConflicts?: InputMaybe;\r\n};\r\n\r\nexport type AudioNetworkNameSyncResult = {\r\n\taudioChannelNameConflicts: Maybe>;\r\n\tdeviceNameConflicts: Maybe>;\r\n\tsuccess: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport enum AutoLevelConfiguration {\r\n\tLoud = 'LOUD',\r\n\tNormal = 'NORMAL',\r\n\tQuiet = 'QUIET'\r\n}\r\n\r\nexport type AutoLevelConfigurationConstraints = IFieldSupportInfo & {\r\n\toptions: Maybe>;\r\n\tsubscribe: Scalars['Boolean']['output'];\r\n\tsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport enum AutoLevelMode {\r\n\tAuto = 'AUTO',\r\n\tManual = 'MANUAL'\r\n}\r\n\r\nexport type AutoLevelModeConstraints = IFieldSupportInfo & {\r\n\toptions: Maybe>;\r\n\tsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport enum AutoLevelPosition {\r\n\tFar = 'FAR',\r\n\tNear = 'NEAR'\r\n}\r\n\r\nexport type AutoLevelPositionConstraints = IFieldSupportInfo & {\r\n\toptions: Maybe>;\r\n\tsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport enum AutoLevelTone {\r\n\tBright = 'BRIGHT',\r\n\tDark = 'DARK',\r\n\tNatural = 'NATURAL'\r\n}\r\n\r\nexport type AutoLevelToneConstraints = IFieldSupportInfo & {\r\n\toptions: Maybe>;\r\n\tsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport enum AutoPositionStatus {\r\n\tFailed = 'FAILED',\r\n\tInactive = 'INACTIVE',\r\n\tProcessing = 'PROCESSING',\r\n\tRecording = 'RECORDING'\r\n}\r\n\r\nexport type AutomixGatingSensitivityConstraints = IIntRangeConstraints & {\r\n\trange: IntRange;\r\n};\r\n\r\nexport type AutomixHoldTimeConstraints = IDurationRangeConstraints & {\r\n\trange: DurationRange;\r\n};\r\n\r\nexport type AutomixMaximumOpenChannelsConstraints = IIntRangeConstraints & {\r\n\trange: IntRange;\r\n};\r\n\r\nexport enum AutomixMode {\r\n\t/**\r\n\t * Emulates the Shure SCM820 automixer default settings. It is renowned for fast-acting, seamless channel gating and consistent perceived ambient sound levels.\r\n\t * Off-attenuation in this mode is fixed at -12dB per channel, regardless of the number of open channels.\r\n\t */\r\n\tClassic = 'CLASSIC',\r\n\t/** Provides manual control over all automixing parameters. This mode is useful when adjustments must be made to one of the preset modes to fit a particular application. */\r\n\tCustom = 'CUSTOM',\r\n\t/**\r\n\t * Dynamically balances system gain between open and closed audio channels.\r\n\t * The system gain remains consistent by distributing gain across audio channels to equal one open audio channel.\r\n\t * The scaled gain structure helps to reduce noise when there is a high audio channel count.\r\n\t * When fewer audio channels are used, the off attenuation setting is lower and provides transparent gating.\r\n\t */\r\n\tGainSharing = 'GAIN_SHARING',\r\n\t/**\r\n\t * Delivers fast-acting, seamless audio channel gating and consistent perceived ambient sound levels.\r\n\t * Off attenuation is fixed at -20 dB, regardless of the number of open audio channels.\r\n\t */\r\n\tGating = 'GATING',\r\n\t/**\r\n\t * Sums all active audio channels and sends the summed signal over a single Dante output.\r\n\t * The gain of all audio channels apply to the summed output.\r\n\t */\r\n\tManual = 'MANUAL',\r\n\t/**\r\n\t * Off-attenuation settings for each channel are scaled, depending on the number of open channels.\r\n\t * The scaled gain structure helps to reduce noise when there is a high channel count.\r\n\t * When fewer channels are used, the lower off-attenuation provides transparent gating.\r\n\t */\r\n\tSmooth = 'SMOOTH'\r\n}\r\n\r\nexport type AutomixModeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type AutomixOffAttenuationConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type AutomixSourceSelectorInput = {\r\n\t/** Node Id of the channel where automixing is performed on a source channel */\r\n\tautomix: Scalars['ID']['input'];\r\n\t/** Node Id of the source channel to be used as selector for automixing. Optional/Null represents a behavior to deselect a source channel if selected */\r\n\tsource?: InputMaybe;\r\n};\r\n\r\nexport enum AutomixerInputDisengagedBehavior {\r\n\tFollowMuteColor = 'FOLLOW_MUTE_COLOR',\r\n\tOff = 'OFF'\r\n}\r\n\r\nexport type AutomixerInputDisengagedBehaviorConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\n/** The state machine describing the lifecycle of a battery-powered device. */\r\nexport enum BatteryState {\r\n\tCalculating = 'CALCULATING',\r\n\tCharging = 'CHARGING',\r\n\tDischarging = 'DISCHARGING',\r\n\tEmpty = 'EMPTY',\r\n\tFull = 'FULL',\r\n\tOptimalStorage = 'OPTIMAL_STORAGE'\r\n}\r\n\r\nexport type BetaDeviceIdentitity = {\r\n\tcategory: Scalars['String']['input'];\r\n\tversions: Array;\r\n};\r\n\r\nexport type BypassCredentialsInput = {\r\n\taccessLevel: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type CancelPendingActivationLicenseInput = {\r\n\tactivationKey: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type Certificate8021XValidationResult = {\r\n\tcertificateInfo: Maybe;\r\n\terror: Maybe;\r\n};\r\n\r\nexport type CertificateInfo8021X = {\r\n\texpirationDate: Scalars['DateTime']['output'];\r\n\thash: Maybe;\r\n\tissuer: Maybe;\r\n\tvalidFromDate: Scalars['DateTime']['output'];\r\n};\r\n\r\nexport type CertificateInput = {\r\n\tanonymousId?: InputMaybe;\r\n\tclientCertificate?: InputMaybe;\r\n\tpassphrase: Scalars['String']['input'];\r\n\trootCertificate: Scalars['String']['input'];\r\n\tusername: Scalars['String']['input'];\r\n};\r\n\r\nexport type ChargerBay = Fragment &\r\n\tNode & {\r\n\t\tdescription: ChargerBayDescription;\r\n\t\tfeatures: ChargerBayFeatures;\r\n\t\tfragmentId: Scalars['ID']['output'];\r\n\t\tid: Scalars['ID']['output'];\r\n\t};\r\n\r\nexport type ChargerBayAssociatedAccessPoint = {\r\n\t/** device and rfChannel fields are null when there is an association established with an access point but the access point isn't discovered */\r\n\tdevice: Maybe;\r\n\trfChannel: Maybe;\r\n};\r\n\r\nexport type ChargerBayAssociation = {\r\n\t/** associatedAccessPoint field is null when there is no association established with an access point */\r\n\tassociatedAccessPoint: Maybe;\r\n};\r\n\r\nexport type ChargerBayAssociationChange = {\r\n\tassociation: Maybe;\r\n};\r\n\r\nexport type ChargerBayBatteryPresent = {\r\n\tbatteryPresent: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type ChargerBayBatteryPresentChange = {\r\n\tbatteryPresent: Maybe;\r\n};\r\n\r\nexport type ChargerBayChange = {\r\n\tfeatures: ChargerBayFeatureChange;\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type ChargerBayChargingMode = {\r\n\tmode: Maybe;\r\n};\r\n\r\nexport type ChargerBayChargingModeChange = {\r\n\tchargingMode: Maybe;\r\n};\r\n\r\nexport type ChargerBayChargingModeConstraints = {\r\n\tmode: ChargingModeConstraints;\r\n};\r\n\r\nexport type ChargerBayConstraints = {\r\n\t/** @deprecated Proof of concept of charger bay on device. Do not use. */\r\n\tchargingMode: Maybe;\r\n};\r\n\r\nexport type ChargerBayDescription = {\r\n\tconstraints: ChargerBayConstraints;\r\n\tfeatures: ChargerBaySupportedFeatures;\r\n};\r\n\r\nexport type ChargerBayDockedDevice = {\r\n\t/** device field is null when there is a docked transmitter on the charger bay but the transmitter isn't discovered */\r\n\tdevice: Maybe;\r\n};\r\n\r\nexport type ChargerBayDockedDeviceChange = {\r\n\tdockedDevice: Maybe;\r\n};\r\n\r\nexport type ChargerBayFeatureChange =\r\n\t| ChargerBayAssociationChange\r\n\t| ChargerBayBatteryPresentChange\r\n\t| ChargerBayChargingModeChange\r\n\t| ChargerBayDockedDeviceChange;\r\n\r\nexport type ChargerBayFeatures = {\r\n\tassociation: Maybe;\r\n\t/** @deprecated Proof of concept of charger bay on device. Do not use. */\r\n\tbatteryPresent: Maybe;\r\n\t/** @deprecated Proof of concept of charger bay on device. Do not use. */\r\n\tchargingMode: Maybe;\r\n\tdockedDevice: Maybe;\r\n};\r\n\r\nexport type ChargerBayOperationResult = NodeOperationResult & {\r\n\tchargerBay: Maybe;\r\n\terror: Maybe;\r\n};\r\n\r\nexport type ChargerBaySupportedFeatures = {\r\n\tassociation: FeatureSupport;\r\n\t/** @deprecated Proof of concept of charger bay on device. Do not use. */\r\n\tbatteryPresent: FeatureSupport;\r\n\t/** @deprecated Proof of concept of charger bay on device. Do not use. */\r\n\tchargingMode: FeatureSupport;\r\n\tdockedDevice: FeatureSupport;\r\n\tlinking: FeatureSupport;\r\n};\r\n\r\nexport enum ChargingMode {\r\n\tCalculating = 'CALCULATING',\r\n\tFull = 'FULL',\r\n\tNormal = 'NORMAL',\r\n\tWarm = 'WARM',\r\n\tWarmandfull = 'WARMANDFULL'\r\n}\r\n\r\nexport type ChargingModeConstraints = {\r\n\toptions: Maybe>;\r\n};\r\n\r\nexport type ClearAssociationResult = NodeOperationResult & {\r\n\terror: Maybe;\r\n\tresult: Maybe;\r\n};\r\n\r\nexport type ClearedAssociation = ChargerBay | RfChannel;\r\n\r\nexport type CloneRoomAudioRouteUpdateEvent = {\r\n\taudioRouteUpdate: CloneRoomAudioRouteUpdateEventDetails;\r\n\toriginalRoom: Scalars['ID']['output'];\r\n\tprogressPercentage: Maybe;\r\n};\r\n\r\nexport type CloneRoomAudioRouteUpdateEventDetails = {\r\n\tclonedAudioRoutes: Scalars['Int']['output'];\r\n\ttotalAudioRoutes: Scalars['Int']['output'];\r\n};\r\n\r\nexport type CloneRoomControlRouteUpdateEvent = {\r\n\tcontrolRouteUpdate: CloneRoomControlRouteUpdateEventDetails;\r\n\toriginalRoom: Scalars['ID']['output'];\r\n\tprogressPercentage: Maybe;\r\n};\r\n\r\nexport type CloneRoomControlRouteUpdateEventDetails = {\r\n\tclonedControlRoutes: Scalars['Int']['output'];\r\n\ttotalControlRoutes: Scalars['Int']['output'];\r\n};\r\n\r\nexport type CloneRoomDeviceUpdateEvent = {\r\n\tdeviceUpdate: CloneRoomDeviceUpdateEventDetails;\r\n\toriginalRoom: Scalars['ID']['output'];\r\n\tprogressPercentage: Maybe;\r\n};\r\n\r\nexport type CloneRoomDeviceUpdateEventDetails = {\r\n\tclonedDevices: Scalars['Int']['output'];\r\n\ttotalDevices: Scalars['Int']['output'];\r\n};\r\n\r\nexport type CloneRoomEvent =\r\n\t| CloneRoomAudioRouteUpdateEvent\r\n\t| CloneRoomControlRouteUpdateEvent\r\n\t| CloneRoomDeviceUpdateEvent\r\n\t| CloneRoomResultEvent\r\n\t| CloneRoomStartedEvent;\r\n\r\nexport type CloneRoomInput = {\r\n\tcloningStrategy?: InputMaybe;\r\n\tdescription?: InputMaybe;\r\n\tname?: InputMaybe;\r\n\tsourceRoom: Scalars['ID']['input'];\r\n};\r\n\r\nexport type CloneRoomResultEvent = {\r\n\toriginalRoom: Scalars['ID']['output'];\r\n\tresult: CloneRoomResultEventDetails;\r\n};\r\n\r\nexport type CloneRoomResultEventDetails = {\r\n\tclonedRoom: Maybe;\r\n\tconflict: Scalars['Boolean']['output'];\r\n\tstatus: CloneRoomStatus | `${CloneRoomStatus}`;\r\n};\r\n\r\nexport type CloneRoomStartEventDetails = {\r\n\tclonedRoom: Scalars['ID']['output'];\r\n};\r\n\r\nexport type CloneRoomStartedEvent = {\r\n\toriginalRoom: Scalars['ID']['output'];\r\n\tprogressPercentage: Maybe;\r\n\tstarted: CloneRoomStartEventDetails;\r\n};\r\n\r\nexport enum CloneRoomStatus {\r\n\tAudioRouteCloningFailed = 'AUDIO_ROUTE_CLONING_FAILED',\r\n\tCanceled = 'CANCELED',\r\n\tControlRouteCloningFailed = 'CONTROL_ROUTE_CLONING_FAILED',\r\n\tDeviceCloningFailed = 'DEVICE_CLONING_FAILED',\r\n\tInternalPrecondFailed = 'INTERNAL_PRECOND_FAILED',\r\n\tOriginRoomCompletePrecondFailed = 'ORIGIN_ROOM_COMPLETE_PRECOND_FAILED',\r\n\tOriginRoomConflictPrecondFailed = 'ORIGIN_ROOM_CONFLICT_PRECOND_FAILED',\r\n\tOriginRoomExistsprecondFailed = 'ORIGIN_ROOM_EXISTSPRECOND_FAILED',\r\n\tOriginRoomUnavailablePrecondFailed = 'ORIGIN_ROOM_UNAVAILABLE_PRECOND_FAILED',\r\n\tOrigRoomNonEmptyPrecondFailed = 'ORIG_ROOM_NON_EMPTY_PRECOND_FAILED',\r\n\tRoomCloningTimeout = 'ROOM_CLONING_TIMEOUT',\r\n\tRoomCreationFailed = 'ROOM_CREATION_FAILED',\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport enum ColorTheme {\r\n\tCustom = 'CUSTOM',\r\n\tDefault = 'DEFAULT',\r\n\tFruity = 'FRUITY',\r\n\tSeaside = 'SEASIDE',\r\n\tShure = 'SHURE',\r\n\tSpace = 'SPACE'\r\n}\r\n\r\nexport type ColorThemeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\n/** The means by which this API is communicating with the device */\r\nexport type CommunicationProtocol = {\r\n\t/** An address which uniquely identifies this device via its given communication protocol */\r\n\taddress: Maybe;\r\n\tdmp: Maybe;\r\n\ttype: Scalars['String']['output'];\r\n};\r\n\r\n/**\r\n * Describes the state of compatibility between this software, and the discovered device.\r\n * Different states may indicate a need to upgrade either the device firmware, or this software,\r\n * in order to use the latest available features.\r\n */\r\nexport enum CompatibilityLevel {\r\n\t/** The device firmware is the latest version tested with this software version. */\r\n\tCompatibleLatest = 'COMPATIBLE_LATEST',\r\n\t/**\r\n\t * The device firmware is ahead of the latest version this software was tested with, but can be completely interacted with.\r\n\t * There may be newer versions of this software which may interact with new features of this device.\r\n\t */\r\n\tCompatibleNew = 'COMPATIBLE_NEW',\r\n\t/**\r\n\t * The device firmware is behind the latest available, but can be completely interacted with.\r\n\t * There are likely newer versions of firmware available for this device which may have additional features which could be interacted with.\r\n\t * Updating the device's firmware is recommended.\r\n\t */\r\n\tCompatibleOld = 'COMPATIBLE_OLD',\r\n\t/**\r\n\t * The device firmware is not supported, and therefore no capability interaction is supported.\r\n\t * Update this software to interact with the device.\r\n\t */\r\n\tIncompatibleTooNew = 'INCOMPATIBLE_TOO_NEW',\r\n\t/**\r\n\t * The device firmware is not supported, and therefore no capability interaction is supported.\r\n\t * Update the device's firmware to interact with the device.\r\n\t */\r\n\tIncompatibleTooOld = 'INCOMPATIBLE_TOO_OLD'\r\n}\r\n\r\nexport enum CompressorLevel {\r\n\tHeavy = 'HEAVY',\r\n\tLight = 'LIGHT',\r\n\tMedium = 'MEDIUM',\r\n\tOff = 'OFF'\r\n}\r\n\r\nexport enum ConferencingOperationMode {\r\n\tConference = 'CONFERENCE',\r\n\tCustom = 'CUSTOM',\r\n\tDirect = 'DIRECT',\r\n\tPresentation = 'PRESENTATION'\r\n}\r\n\r\nexport type ConferencingOperationModeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type ConfigInput8021X = {\r\n\teapMd5?: InputMaybe;\r\n\tpeapGtc?: InputMaybe;\r\n\tpeapMschapv2?: InputMaybe;\r\n\tpwd?: InputMaybe;\r\n\ttls?: InputMaybe;\r\n\tttlsGtc?: InputMaybe;\r\n\tttlsMd5?: InputMaybe;\r\n\tttlsMschapv2?: InputMaybe;\r\n\tttlsPap?: InputMaybe;\r\n};\r\n\r\nexport type ConfigurationFilterTypeConstraints = {\r\n\toptions: Maybe>;\r\n\tsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type ConnectedDeviceLabel = {\r\n\tlabel: Scalars['String']['output'];\r\n};\r\n\r\nexport type ConnectedDeviceLabelChange = {\r\n\tconnectedDeviceLabel: Maybe;\r\n};\r\n\r\nexport type ConnectedDeviceLabelConstraints = {\r\n\tlabel: ConnectedDeviceLabelFieldConstraints;\r\n};\r\n\r\nexport type ConnectedDeviceLabelFieldConstraints = IUtf8StringMaxBytesConstraints & {\r\n\tutf8MaxBytes: Scalars['Int']['output'];\r\n};\r\n\r\nexport type ConnectedDeviceLabelUpdateInput = {\r\n\tlabel: Scalars['String']['input'];\r\n};\r\n\r\nexport enum CoverageMode {\r\n\tAutomatic = 'AUTOMATIC',\r\n\tManual = 'MANUAL'\r\n}\r\n\r\nexport type CreateCredentialsInput = {\r\n\taccessLevel: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n\tpassphrase: Scalars['String']['input'];\r\n};\r\n\r\nexport type CreateRoomInput = {\r\n\tcreated?: InputMaybe;\r\n\tdescription: Scalars['String']['input'];\r\n\tdevices: Array;\r\n\tdimensions?: InputMaybe;\r\n\tname: Scalars['String']['input'];\r\n};\r\n\r\nexport type CreateRouteOperationResult = NodeOperationResult & {\r\n\terror: Maybe;\r\n\treceiveDevice: Maybe;\r\n\ttransmitDevice: Maybe;\r\n};\r\n\r\nexport enum CredentialsState {\r\n\tInitializedNotSet = 'INITIALIZED_NOT_SET',\r\n\tSet = 'SET',\r\n\tUninitialized = 'UNINITIALIZED'\r\n}\r\n\r\nexport type CrossPoint = Fragment &\r\n\tNode & {\r\n\t\tdescription: CrossPointDescription;\r\n\t\tfeatures: CrossPointFeatures;\r\n\t\tfragmentId: Scalars['ID']['output'];\r\n\t\tid: Scalars['ID']['output'];\r\n\t\tinputChannel: CrossPointInputAudioChannel;\r\n\t};\r\n\r\nexport type CrossPointChange = {\r\n\tfeatures: CrossPointFeatureChange;\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type CrossPointConfiguration = {\r\n\t/**\r\n\t * Whether or not to route the input audio channel specified by this cross point node to\r\n\t * the output audio channel specified by the audio channel implementing 'matrixMixerOutput' capability\r\n\t */\r\n\tenabled: Maybe;\r\n};\r\n\r\nexport type CrossPointConfigurationChange = {\r\n\tconfiguration: Maybe;\r\n};\r\n\r\nexport type CrossPointConfigurationUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type CrossPointConstraints = {\r\n\tgain: Maybe;\r\n};\r\n\r\nexport type CrossPointDescription = {\r\n\tconstraints: CrossPointConstraints;\r\n\tfeatures: CrossPointSupportedFeatures;\r\n};\r\n\r\nexport type CrossPointFeatureChange = CrossPointConfigurationChange | CrossPointGainChange;\r\n\r\nexport type CrossPointFeatureUpdateInput = {\r\n\tconfiguration?: InputMaybe;\r\n\tgain?: InputMaybe;\r\n};\r\n\r\nexport type CrossPointFeatures = {\r\n\tconfiguration: Maybe;\r\n\tgain: Maybe;\r\n};\r\n\r\n/** Gain applied to the input audio sent to the output channel */\r\nexport type CrossPointGain = {\r\n\tgain: Maybe;\r\n};\r\n\r\nexport type CrossPointGainChange = {\r\n\tgain: Maybe;\r\n};\r\n\r\nexport type CrossPointGainConstraints = {\r\n\tgain: Maybe;\r\n};\r\n\r\nexport type CrossPointGainFieldConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type CrossPointGainUpdateInput = {\r\n\tgain?: InputMaybe;\r\n};\r\n\r\nexport type CrossPointInputAudioChannel = AudioChannel | StereoAudioChannel;\r\n\r\nexport type CrossPointOperationResult = NodeOperationResult & {\r\n\tcrossPoint: Maybe;\r\n\terror: Maybe;\r\n};\r\n\r\nexport type CrossPointSupportedFeatures = {\r\n\tconfiguration: FeatureSupport;\r\n\tgain: FeatureSupport;\r\n};\r\n\r\nexport type CrossPointUpdateInput = {\r\n\tfeatures?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum DanteAudioEncryptionStatus {\r\n\t/** Audio encryption is enabled between the routed devices, and the symmetric encryption/decryiption key matches between the routed devices. */\r\n\tActive = 'ACTIVE',\r\n\t/**\r\n\t * Audio encryption is inactive because of one or more of the following:\r\n\t * 1) It is not enabled on this device, and/or the routed device\r\n\t * 2) There is no route between this audio channel and another Shure device which supports Dante audio encryption.\r\n\t */\r\n\tInactive = 'INACTIVE',\r\n\t/**\r\n\t * Audio encryption is enabled on this audio channel, but the symmetric encryption/decryiption does not match between the devices. No audio shall pass.\r\n\t * This state will be represented on the audio receive channel, and not on the transmit audio channel (as the transmit audio channel can go to multiple receive channels, and the key may be a match for other receivers).\r\n\t */\r\n\tKeyMismatch = 'KEY_MISMATCH'\r\n}\r\n\r\nexport type DanteAudioRouteSubscription = {\r\n\t/** Whether or not the subscription is transmitting audio. */\r\n\tactive: Scalars['Boolean']['output'];\r\n\t/**\r\n\t * The name of the Dante subscription this receiver is subscribed to. E.g. DanteChannelName@DanteDeviceName.\r\n\t * Replaces a self-subscription with the actual Dante device name.\r\n\t */\r\n\tname: Scalars['String']['output'];\r\n\t/**\r\n\t * Information about the Shure device transmitting audio. Null in the following conditions:\r\n\t * 1) Rx is discovered before Tx which Rx is listening to\r\n\t * 2) Third party device\r\n\t */\r\n\ttransmitter: Maybe;\r\n};\r\n\r\nexport type DanteAudioRouteTransmitter = {\r\n\t/** AudioChannel of the Shure device transmitting audio. */\r\n\taudioChannel: AudioChannel;\r\n\t/** The Shure device transmitting audio. */\r\n\tdevice: Device;\r\n};\r\n\r\nexport type DeactivateLicenseInput = {\r\n\tactivationKey: Scalars['String']['input'];\r\n\tcount: Scalars['Int']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type DeleteRouteOperationResult = NodeOperationResult & {\r\n\terror: Maybe;\r\n\treceiveDevice: Maybe;\r\n};\r\n\r\nexport enum DenoiserLevel {\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM'\r\n}\r\n\r\nexport enum DeverbIntensity {\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM'\r\n}\r\n\r\nexport type Device = Node & {\r\n\t/** The interface used by the device to advertise it's traits. */\r\n\tadvertisedInterface: InterfaceDetails;\r\n\tcompatibility: CompatibilityLevel | `${CompatibilityLevel}`;\r\n\tdescription: DeviceDescription;\r\n\tfeatures: DeviceFeatures;\r\n\thardwareId: Scalars['Guid']['output'];\r\n\tid: Scalars['ID']['output'];\r\n\t/**\r\n\t * The most applicable interface known which is being used to interact with the device.\r\n\t * When a matching interface is not available to the application,\r\n\t * the application assumes forwards compatibility within the same interface ID major version.\r\n\t * If the device's advertisedInterface is in a greater major version than is known by this API,\r\n\t * then the interface presented here will be a different interface used to preserve the lowest\r\n\t * common denominator of interactivity.\r\n\t */\r\n\tinterface: InterfaceDetails;\r\n\tprotocol: CommunicationProtocol;\r\n\tstatus: DeviceStatus | `${DeviceStatus}`;\r\n\t/** Whether or not the device being interacted with is virtualized to simulate the behavior of real hardware */\r\n\tvirtual: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceActivePreset = {\r\n\tactivePreset: Maybe;\r\n};\r\n\r\nexport type DeviceActivePresetChange = {\r\n\tactivePreset: Maybe;\r\n};\r\n\r\n/**\r\n * Event emitted whenever a device is added under management\r\n * (e.g. discovered for the first time as DeviceState.Discovered)\r\n */\r\nexport type DeviceAdded = {\r\n\tadded: Device;\r\n};\r\n\r\nexport type DeviceAllEqualizersBypass = {\r\n\tbypassed: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceAllEqualizersBypassChange = {\r\n\tallEqualizersBypass: Maybe;\r\n};\r\n\r\nexport type DeviceAllEqualizersBypassUpdateInput = {\r\n\tbypassed: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAllIntellimixBypass = {\r\n\tbypassed: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceAllIntellimixBypassChange = {\r\n\tallIntellimixBypass: Maybe;\r\n};\r\n\r\nexport type DeviceAllIntellimixBypassUpdateInput = {\r\n\tbypassed: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAnalogAudioOutputMode = {\r\n\tmode: AnalogAudioOutputMode | `${AnalogAudioOutputMode}`;\r\n};\r\n\r\nexport type DeviceAnalogAudioOutputModeChange = {\r\n\tanalogAudioOutputMode: Maybe;\r\n};\r\n\r\nexport type DeviceAnalogAudioOutputModeConstraints = {\r\n\tmode: Maybe;\r\n};\r\n\r\nexport type DeviceAnalogAudioOutputModeUpdateInput = {\r\n\tmode: AnalogAudioOutputMode | `${AnalogAudioOutputMode}`;\r\n};\r\n\r\nexport type DeviceAnalogLogic = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceAnalogLogicChange = {\r\n\tanalogLogic: Maybe;\r\n};\r\n\r\nexport type DeviceAnalogLogicPresetSwitch = {\r\n\t/** When analogLogic is enabled, a user can select which preset(1 or 2) will be loaded when there is signal. */\r\n\tmode: AnalogLogicPresetSwitch | `${AnalogLogicPresetSwitch}`;\r\n};\r\n\r\nexport type DeviceAnalogLogicPresetSwitchChange = {\r\n\tanalogLogicPresetSwitch: Maybe;\r\n};\r\n\r\nexport type DeviceAnalogLogicPresetSwitchConstraints = {\r\n\tmode: Maybe;\r\n};\r\n\r\nexport type DeviceAnalogLogicPresetSwitchModeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceAnalogLogicPresetSwitchStatus = {\r\n\tstatus: AnalogLogicPresetSwitchStatus | `${AnalogLogicPresetSwitchStatus}`;\r\n};\r\n\r\nexport type DeviceAnalogLogicPresetSwitchStatusChange = {\r\n\tanalogLogicPresetSwitchStatus: Maybe;\r\n};\r\n\r\nexport type DeviceAnalogLogicPresetSwitchStatusConstraints = {\r\n\tstatus: Maybe;\r\n};\r\n\r\nexport type DeviceAnalogLogicPresetSwitchUpdateInput = {\r\n\tmode: AnalogLogicPresetSwitch | `${AnalogLogicPresetSwitch}`;\r\n};\r\n\r\nexport type DeviceAnalogLogicUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAssociationInput = {\r\n\tchargerBay: Scalars['ID']['input'];\r\n\trfChannel: Scalars['ID']['input'];\r\n};\r\n\r\nexport type DeviceAssociationResult = {\r\n\tchargerBay: Maybe;\r\n\trfChannel: Maybe;\r\n\tstatus: AssociationStatus | `${AssociationStatus}`;\r\n};\r\n\r\nexport type DeviceAudioAutoFocus = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceAudioAutoFocusChange = {\r\n\taudioAutoFocus: Maybe;\r\n};\r\n\r\nexport type DeviceAudioAutoFocusUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAudioChannelCount = {\r\n\tcount: Scalars['Int']['output'];\r\n};\r\n\r\nexport type DeviceAudioChannelCountChange = {\r\n\taudioChannelCount: Maybe;\r\n};\r\n\r\nexport type DeviceAudioChannelCountConstraints = {\r\n\tcount: DeviceAudioChannelCountCountConstraints;\r\n};\r\n\r\nexport type DeviceAudioChannelCountCountConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceAudioChannels = {\r\n\t/** Audio channels present on the device */\r\n\taudioChannels: Array;\r\n};\r\n\r\nexport type DeviceAudioChannelsChange = {\r\n\taudioChannels: Maybe;\r\n};\r\n\r\nexport type DeviceAudioChannelsConstraints = {\r\n\tgroups: Array;\r\n};\r\n\r\nexport type DeviceAudioCoverageAreas = {\r\n\taudioCoverageAreas: Array;\r\n};\r\n\r\nexport type DeviceAudioMute = {\r\n\tmuted: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceAudioMuteChange = {\r\n\taudioMute: Maybe;\r\n};\r\n\r\nexport type DeviceAudioMuteControl = {\r\n\tfunction: MuteControlFunction | `${MuteControlFunction}`;\r\n\tmode: MuteButtonMode | `${MuteButtonMode}`;\r\n};\r\n\r\nexport type DeviceAudioMuteControlChange = {\r\n\taudioMuteControl: Maybe;\r\n};\r\n\r\nexport type DeviceAudioMuteControlConstraints = {\r\n\tfunction: Maybe;\r\n\tmode: Maybe;\r\n};\r\n\r\nexport type DeviceAudioMuteControlFunctionConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceAudioMuteControlGroup = {\r\n\tassociatedDevices: Array;\r\n};\r\n\r\nexport type DeviceAudioMuteControlGroupChange = {\r\n\taudioMuteControlGroup: Maybe;\r\n};\r\n\r\nexport type DeviceAudioMuteControlModeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceAudioMuteControlUpdateInput = {\r\n\tfunction?: InputMaybe;\r\n\tmode?: InputMaybe;\r\n};\r\n\r\nexport type DeviceAudioMuteDefault = {\r\n\tmuted: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceAudioMuteDefaultChange = {\r\n\taudioMuteDefault: Maybe;\r\n};\r\n\r\nexport type DeviceAudioMuteDefaultUpdateInput = {\r\n\tmuted: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAudioMuteLock = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceAudioMuteLockChange = {\r\n\taudioMuteLock: Maybe;\r\n};\r\n\r\nexport type DeviceAudioMuteLockUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAudioMuteUpdateInput = {\r\n\tmuted: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAudioNetwork = {\r\n\tinterface: NetworkInterfaceInfo;\r\n};\r\n\r\nexport type DeviceAudioNetworkInterface = {\r\n\tinterfaceOptions: Array;\r\n\tselectedInterface: Maybe;\r\n};\r\n\r\nexport type DeviceAudioNetworkInterfaceChange = {\r\n\taudioNetworkInterface: Maybe;\r\n};\r\n\r\nexport type DeviceAuthenticationChange = {\r\n\tauthentication: Maybe;\r\n};\r\n\r\nexport type DeviceAuthenticationCredential = {\r\n\taccessLevel: Scalars['String']['output'];\r\n\tcredentialsState: CredentialsState | `${CredentialsState}`;\r\n};\r\n\r\nexport type DeviceAuthenticationState = {\r\n\tcredentials: Maybe>;\r\n};\r\n\r\nexport type DeviceAuthenticationStateChange = {\r\n\tcredentials: Maybe>;\r\n\tpassphraseUpdated: Maybe;\r\n};\r\n\r\nexport type DeviceAutomixGainMetering = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceAutomixGainMeteringChange = {\r\n\tautomixGainMetering: Maybe;\r\n};\r\n\r\nexport type DeviceAutomixGainMeteringUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceAvailablePackages = {\r\n\thostedPackages: Array;\r\n\tprimaryPackages: Array;\r\n};\r\n\r\nexport type DeviceAvailablePackagesChange = {\r\n\tavailablePackages: Maybe;\r\n};\r\n\r\nexport type DeviceBatteryHealth = {\r\n\tcycleCount: Scalars['Int']['output'];\r\n\tpercentage: Scalars['Int']['output'];\r\n};\r\n\r\nexport type DeviceBatteryHealthChange = {\r\n\tbatteryHealth: Maybe;\r\n};\r\n\r\nexport type DeviceBatteryHealthConstraints = {\r\n\tpercentage: DeviceBatteryHealthPercentageConstraints;\r\n};\r\n\r\nexport type DeviceBatteryHealthPercentageConstraints = IIntRangeConstraints & {\r\n\trange: IntRange;\r\n};\r\n\r\n/** Describes the battery level of a battery-powered device */\r\nexport type DeviceBatteryLevel = {\r\n\t/** The current level of charge held by the device's battery, as a percentage */\r\n\tpercentage: Scalars['Int']['output'];\r\n\t/** Status about the battery's remaining time to the state it is targetting, whether that be charging or discharging partially or completely. */\r\n\tstatus: DeviceBatteryStatus;\r\n};\r\n\r\nexport type DeviceBatteryLevelChange = {\r\n\tbatteryLevel: Maybe;\r\n};\r\n\r\nexport type DeviceBatteryLevelConstraints = {\r\n\t/**\r\n\t * Describes the range of valid percentage values which can be reported by the battery-powered device.\r\n\t * E.g. Shure smart batteries can provide greater granularity about charge percentage than traditional AAs\r\n\t * when a device is on-air.\r\n\t */\r\n\tpercentage: DeviceBatteryLevelPercentageConstraints;\r\n\t/** Describes the current status regarding the battery level, and any changes which are expected based on whether it is charging or discharging. */\r\n\tstatus: DeviceBatteryLevelStatusConstraints;\r\n};\r\n\r\nexport type DeviceBatteryLevelPercentageConstraints = IIntRangeConstraints & {\r\n\t/** Describes the range of values for battery charge percentage */\r\n\trange: IntRange;\r\n};\r\n\r\nexport type DeviceBatteryLevelStatusConstraints = {\r\n\ttargetState: DeviceBatteryLevelTargetStateConstraints;\r\n};\r\n\r\nexport type DeviceBatteryLevelTargetStateConstraints = {\r\n\t/**\r\n\t * The possible states in the battery state machine for this device.\r\n\t * E.g. Not all devices support \"OPTIMAL_STORAGE\", which allows for long time preservation of unused batteries.\r\n\t */\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceBatteryStatus = {\r\n\tcurrentState: BatteryState | `${BatteryState}`;\r\n\t/** Describes the state machine of the battery both when the device is on the air or on the charger. */\r\n\ttargetState: Maybe;\r\n\t/**\r\n\t * The amount of time remaining for the battery to enter one of the following states expressed through the 'BatteryState' enum.\r\n\t * When transitioning between states (docking on a charger, undocking from a charger), a temporary calculating state will be entered.\r\n\t * During this time, the time can be null.\r\n\t */\r\n\ttimeToTargetState: Maybe;\r\n};\r\n\r\nexport type DeviceCallStatus = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceCallStatusChange = {\r\n\tcallStatus: Maybe;\r\n};\r\n\r\nexport type DeviceCallStatusUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceChange = {\r\n\tfeatures: DeviceFeatureChange;\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type DeviceChargerBays = {\r\n\tchargerBays: Array;\r\n};\r\n\r\nexport type DeviceCommandStringsService = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n\tport: Scalars['Int']['output'];\r\n};\r\n\r\nexport type DeviceCommandStringsServiceChange = {\r\n\tcommandStringsService: Maybe;\r\n};\r\n\r\nexport type DeviceCommandStringsServiceConstraints = {\r\n\tport: DeviceCommandStringsServicePortConstraints;\r\n};\r\n\r\nexport type DeviceCommandStringsServicePortConstraints = IIntRangeConstraints & {\r\n\tmutate: Scalars['Boolean']['output'];\r\n\trange: IntRange;\r\n};\r\n\r\nexport type DeviceCommandStringsServiceUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n\tport?: InputMaybe;\r\n};\r\n\r\nexport type DeviceConferencingOperationMode = {\r\n\tmode: ConferencingOperationMode | `${ConferencingOperationMode}`;\r\n};\r\n\r\nexport type DeviceConferencingOperationModeChange = {\r\n\tconferencingOperationMode: Maybe;\r\n};\r\n\r\nexport type DeviceConferencingOperationModeConstraints = {\r\n\tmode: ConferencingOperationModeConstraints;\r\n};\r\n\r\nexport type DeviceConferencingOperationModeUpdateInput = {\r\n\tmode: ConferencingOperationMode | `${ConferencingOperationMode}`;\r\n};\r\n\r\nexport type DeviceConfigurationLock = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceConfigurationLockChange = {\r\n\tconfigurationLock: Maybe;\r\n};\r\n\r\nexport type DeviceConfigurationLockUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceConstraints = {\r\n\tanalogAudioOutputMode: Maybe;\r\n\tanalogLogicPresetSwitch: Maybe;\r\n\tanalogLogicPresetSwitchStatus: Maybe;\r\n\taudioChannelCount: Maybe;\r\n\taudioChannels: Maybe;\r\n\taudioMuteControl: Maybe;\r\n\tbatteryHealth: Maybe;\r\n\tbatteryLevel: Maybe;\r\n\tcommandStringsService: Maybe;\r\n\tconferencingOperationMode: Maybe;\r\n\tconnectedDeviceLabel: Maybe;\r\n\tdanteAudioNetwork: Maybe;\r\n\tequalizerContour: Maybe;\r\n\tethernetPowerSource: Maybe;\r\n\theight: Maybe;\r\n\tlightingAudioMeters: Maybe;\r\n\tlightingAutomixGating: Maybe;\r\n\tlightingBehavior: Maybe;\r\n\tlightingBrightness: Maybe;\r\n\tlightingMuteBehavior: Maybe;\r\n\tlightingRing: Maybe;\r\n\tlightingUnmuteBehavior: Maybe;\r\n\tlistenerHeight: Maybe;\r\n\tname: Maybe;\r\n\tplacement: Maybe;\r\n\trfDensityMode: Maybe;\r\n\trfPower: Maybe;\r\n\trotation: Maybe;\r\n\tsecurity8021X: Maybe;\r\n\tswitchConfiguration: Maybe;\r\n\ttransmitterLightingBehavior: Maybe;\r\n\t/** @deprecated This feature will be refactored when trasnmitterMuteBehavior(SHSYSAPI-10059) is implemented. */\r\n\ttransmitterSwitchBehavior: Maybe;\r\n\tusbTerminalType: Maybe;\r\n\tvirtualAcousticBoundary: Maybe;\r\n\twebService: DeviceWebServiceConstraints;\r\n};\r\n\r\nexport type DeviceControlNetwork = {\r\n\tinterface: NetworkInterfaceInfo;\r\n};\r\n\r\nexport type DeviceControlNetworkInterface = {\r\n\tinterfaceOptions: Array;\r\n\tselectedInterface: Maybe;\r\n};\r\n\r\nexport type DeviceControlNetworkInterfaceChange = {\r\n\tcontrolNetworkInterface: Maybe;\r\n};\r\n\r\nexport type DeviceCoverageMode = {\r\n\t/**\r\n\t * Automatic coverage mode will automatically adjust lobes within pre-defined coverage areas\r\n\t * Manual coverage mode will require the user to manually adjust the position and width of each microphone lobe\r\n\t */\r\n\tcoverageMode: CoverageMode | `${CoverageMode}`;\r\n};\r\n\r\nexport type DeviceCoverageModeChange = {\r\n\tcoverageMode: Maybe;\r\n};\r\n\r\nexport type DeviceCoverageModeUpdateInput = {\r\n\tcoverageMode: CoverageMode | `${CoverageMode}`;\r\n};\r\n\r\nexport type DeviceCoveragePositionChange = {\r\n\tcoveragePosition: Maybe;\r\n};\r\n\r\nexport type DeviceCoveragePositionInput = {\r\n\txPosition: Scalars['Float']['input'];\r\n\tyPosition: Scalars['Float']['input'];\r\n};\r\n\r\nexport type DeviceDanteAudioEncryption = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n\tpassphraseSet: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceDanteAudioEncryptionChange = {\r\n\tdanteAudioEncryption: Maybe;\r\n};\r\n\r\nexport type DeviceDanteAudioNetwork = {\r\n\tclockSyncError: Maybe;\r\n\tname: Scalars['String']['output'];\r\n\tnameConflict: Maybe;\r\n};\r\n\r\nexport type DeviceDanteAudioNetworkAccess = {\r\n\tchangesAllowed: Scalars['Boolean']['output'];\r\n\tfactoryResetAllowed: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceDanteAudioNetworkAccessChange = {\r\n\tdanteAudioNetworkAccess: Maybe;\r\n};\r\n\r\nexport type DeviceDanteAudioNetworkChange = {\r\n\tdanteAudioNetwork: Maybe;\r\n};\r\n\r\nexport type DeviceDanteAudioNetworkConstraints = {\r\n\tclockSyncError: FieldSupport;\r\n\tname: DeviceDanteAudioNetworkNameConstraints;\r\n\tnameConflict: FieldSupport;\r\n};\r\n\r\nexport type DeviceDanteAudioNetworkNameConstraints = IStringPatternRangeConstraints & {\r\n\tpattern: Scalars['Regex']['output'];\r\n};\r\n\r\nexport type DeviceDanteAudioNetworkUpdateInput = {\r\n\tname: Scalars['String']['input'];\r\n};\r\n\r\n/** The list of physical devices that can be deployed to from this (virtual) device. */\r\nexport type DeviceDeploymentCandidates = {\r\n\tcandidates: Array;\r\n};\r\n\r\nexport type DeviceDeploymentCandidatesChange = {\r\n\tdeployment: Maybe;\r\n};\r\n\r\nexport type DeviceDeploymentInput = {\r\n\t/** Determines the name of the target device after deployment. If not set, the target device name will not change. */\r\n\tdeviceName?: InputMaybe;\r\n\tsourceDevice: Scalars['ID']['input'];\r\n\t/**\r\n\t * Syncs the Shure device and Channel names with the Dante device and channel names.\r\n\t * If not set, Dante names on the target device will remain the same.\r\n\t */\r\n\tsyncDanteNamesWithShureNames?: InputMaybe;\r\n\ttargetDevice?: InputMaybe;\r\n};\r\n\r\nexport type DeviceDeploymentResult = {\r\n\tfailureStage: DeviceDeploymentStage | `${DeviceDeploymentStage}`;\r\n\tsourceDevice: Device;\r\n\ttargetDevice: Device;\r\n};\r\n\r\nexport enum DeviceDeploymentStage {\r\n\t/** Inter-device deployment(Eg: Routing) */\r\n\tAssociationDeployment = 'ASSOCIATION_DEPLOYMENT',\r\n\t/** Generic handling of a device(Eg: Name) */\r\n\tGenericDeployment = 'GENERIC_DEPLOYMENT',\r\n\t/** Specialized handling of a device */\r\n\tSpecificDeployment = 'SPECIFIC_DEPLOYMENT'\r\n}\r\n\r\nexport type DeviceDescription = {\r\n\t/** @deprecated Use advertisedInterface.category or interface.category instead */\r\n\tcategory: Scalars['String']['output'];\r\n\tconstraints: DeviceConstraints;\r\n\tfeatures: DeviceSupportedFeatures;\r\n\t/**\r\n\t * The interface used to determine whether or not a feature is supported for the device.\r\n\t *\r\n\t * This often differs from the advertised interface of a device, and the interface\r\n\t * used to communicate with the features of a device.\r\n\t * If a discovered device is not in the range of supported interface IDs,\r\n\t * most device features will be unavailable as means of preventing unsupported user interaction.\r\n\t */\r\n\tinterface: InterfaceDetails;\r\n\t/** @deprecated Use advertisedInterface.model or interface.model instead */\r\n\tmodel: Scalars['String']['output'];\r\n\t/** @deprecated Use CompatibilityLevel type for feature support */\r\n\tunsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceDisassociationInput = {\r\n\tchargerBay: Scalars['ID']['input'];\r\n\trfChannel: Scalars['ID']['input'];\r\n};\r\n\r\nexport type DeviceDisassociationResult = {\r\n\tchargerBay: Maybe;\r\n\trfChannel: Maybe;\r\n\tstatus: DisassociationStatus | `${DisassociationStatus}`;\r\n};\r\n\r\nexport type DeviceDoubleStuffProxiedTransmitters = {\r\n\tmic1: Maybe;\r\n\tmic2: Maybe;\r\n};\r\n\r\nexport type DeviceDoubleStuffProxiedTransmittersChange = {\r\n\tdoublestuffProxiedTransmitters: Maybe;\r\n};\r\n\r\nexport type DeviceEdge = {\r\n\tcursor: Scalars['String']['output'];\r\n\tnode: Maybe;\r\n};\r\n\r\nexport type DeviceEqualizerContour = {\r\n\tequalizerContour: EqualizerContour | `${EqualizerContour}`;\r\n};\r\n\r\nexport type DeviceEqualizerContourChange = {\r\n\tequalizerContour: Maybe;\r\n};\r\n\r\nexport type DeviceEqualizerContourConstraints = {\r\n\tequalizerContour: Maybe;\r\n};\r\n\r\nexport type DeviceEqualizerContourTypeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceEqualizerContourUpdateInput = {\r\n\tequalizerContour: EqualizerContour | `${EqualizerContour}`;\r\n};\r\n\r\nexport type DeviceEthernetLights = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceEthernetLightsChange = {\r\n\tethernetLights: Maybe;\r\n};\r\n\r\nexport type DeviceEthernetLightsUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceEthernetPowerSource = {\r\n\ttype: EthernetPowerSourceType | `${EthernetPowerSourceType}`;\r\n};\r\n\r\nexport type DeviceEthernetPowerSourceConstraints = {\r\n\ttype: DeviceValidEthernetPowerSourceConstraints;\r\n};\r\n\r\nexport type DeviceFeatureChange =\r\n\t| ConnectedDeviceLabelChange\r\n\t| DeviceActivePresetChange\r\n\t| DeviceAllEqualizersBypassChange\r\n\t| DeviceAllIntellimixBypassChange\r\n\t| DeviceAnalogAudioOutputModeChange\r\n\t| DeviceAnalogLogicChange\r\n\t| DeviceAnalogLogicPresetSwitchChange\r\n\t| DeviceAnalogLogicPresetSwitchStatusChange\r\n\t| DeviceAudioAutoFocusChange\r\n\t| DeviceAudioChannelCountChange\r\n\t| DeviceAudioChannelsChange\r\n\t| DeviceAudioMuteChange\r\n\t| DeviceAudioMuteControlChange\r\n\t| DeviceAudioMuteControlGroupChange\r\n\t| DeviceAudioMuteDefaultChange\r\n\t| DeviceAudioMuteLockChange\r\n\t| DeviceAudioNetworkInterfaceChange\r\n\t| DeviceAuthenticationChange\r\n\t| DeviceAutomixGainMeteringChange\r\n\t| DeviceAvailablePackagesChange\r\n\t| DeviceBatteryHealthChange\r\n\t| DeviceBatteryLevelChange\r\n\t| DeviceCallStatusChange\r\n\t| DeviceCommandStringsServiceChange\r\n\t| DeviceConferencingOperationModeChange\r\n\t| DeviceConfigurationLockChange\r\n\t| DeviceControlNetworkInterfaceChange\r\n\t| DeviceCoverageModeChange\r\n\t| DeviceCoveragePositionChange\r\n\t| DeviceDanteAudioEncryptionChange\r\n\t| DeviceDanteAudioNetworkAccessChange\r\n\t| DeviceDanteAudioNetworkChange\r\n\t| DeviceDeploymentCandidatesChange\r\n\t| DeviceDoubleStuffProxiedTransmittersChange\r\n\t| DeviceEqualizerContourChange\r\n\t| DeviceEthernetLightsChange\r\n\t| DeviceFirmwareUpdatePolicyChange\r\n\t| DeviceGlobalMicStatusChange\r\n\t| DeviceHeightChange\r\n\t| DeviceIdentifyChange\r\n\t| DeviceLicenseChange\r\n\t| DeviceLicenseChangeV2\r\n\t| DeviceLightingAudioMetersChange\r\n\t| DeviceLightingAudioMuteIndicatorOverrideChange\r\n\t| DeviceLightingAutomixGatingChange\r\n\t| DeviceLightingBehaviorChange\r\n\t| DeviceLightingBrightnessChange\r\n\t| DeviceLightingLiveAudioMetersChange\r\n\t| DeviceLightingMuteBehaviorChange\r\n\t| DeviceLightingRingChange\r\n\t| DeviceLightingUnmuteBehaviorChange\r\n\t| DeviceLinkedAccessPointChange\r\n\t| DeviceListenerHeightChange\r\n\t| DeviceLogicMuteChange\r\n\t| DeviceLogicReceiverChange\r\n\t| DeviceLogicTransmitterChange\r\n\t| DeviceLoudspeakerChange\r\n\t| DeviceMdnsServiceChange\r\n\t| DeviceMeteringModesChange\r\n\t| DeviceMicStatusChange\r\n\t| DeviceNameChange\r\n\t| DevicePlacementChange\r\n\t| DeviceProxiedDevicesChange\r\n\t| DeviceRedundantAudioNetworkChange\r\n\t| DeviceRfDensityModeChange\r\n\t| DeviceRfPowerChange\r\n\t| DeviceRoomChange\r\n\t| DeviceRotationChange\r\n\t| DeviceRoutingPositionChange\r\n\t| DeviceSecurity8021XChange\r\n\t| DeviceStereoAudioChange\r\n\t| DeviceSwitchConfigurationChange\r\n\t| DeviceTransmitterIdentifyBehaviorChange\r\n\t| DeviceTransmitterLightingBehaviorChange\r\n\t| DeviceTransmitterOutOfRangeBehaviorChange\r\n\t| DeviceTransmitterRejoinBehaviorChange\r\n\t| DeviceTransmitterSwitchBehaviorChange\r\n\t| DeviceUpdateProgressChange\r\n\t| DeviceUptimeChange\r\n\t| DeviceUsbMuteSyncChange\r\n\t| DeviceUsbTerminalTypeChange\r\n\t| DeviceUserPresetsChange\r\n\t| DeviceVirtualAcousticBoundaryChange\r\n\t| DeviceWebServiceChange;\r\n\r\nexport type DeviceFeatureUpdateInput = {\r\n\tallEqualizersBypass?: InputMaybe;\r\n\tallIntellimixBypass?: InputMaybe;\r\n\tanalogAudioOutputMode?: InputMaybe;\r\n\tanalogLogic?: InputMaybe;\r\n\tanalogLogicPresetSwitch?: InputMaybe;\r\n\taudioAutoFocus?: InputMaybe;\r\n\taudioMute?: InputMaybe;\r\n\taudioMuteControl?: InputMaybe;\r\n\taudioMuteDefault?: InputMaybe;\r\n\taudioMuteLock?: InputMaybe;\r\n\tautomixGainMetering?: InputMaybe;\r\n\tcallStatus?: InputMaybe;\r\n\tcommandStringsService?: InputMaybe;\r\n\tconferencingOperationMode?: InputMaybe;\r\n\tconfigurationLock?: InputMaybe;\r\n\tconnectedDeviceLabel?: InputMaybe;\r\n\tcoverageMode?: InputMaybe;\r\n\tcoveragePosition?: InputMaybe;\r\n\tdanteAudioNetwork?: InputMaybe;\r\n\tequalizerContour?: InputMaybe;\r\n\tethernetLights?: InputMaybe;\r\n\tfirmwareUpdatePolicy?: InputMaybe;\r\n\theight?: InputMaybe;\r\n\tlightingAudioMeters?: InputMaybe;\r\n\tlightingAudioMuteIndicatorOverride?: InputMaybe;\r\n\tlightingAutomixGating?: InputMaybe;\r\n\tlightingLiveAudioMeters?: InputMaybe;\r\n\tlightingMuteBehavior?: InputMaybe;\r\n\tlightingRing?: InputMaybe;\r\n\tlightingUnmuteBehavior?: InputMaybe;\r\n\tlistenerHeight?: InputMaybe;\r\n\tlogicMute?: InputMaybe;\r\n\tlogicReceiver?: InputMaybe;\r\n\tloudspeaker?: InputMaybe;\r\n\tmdnsService?: InputMaybe;\r\n\tmeteringModes?: InputMaybe;\r\n\tmicStatus?: InputMaybe;\r\n\tname?: InputMaybe;\r\n\tplacement?: InputMaybe;\r\n\trfDensityMode?: InputMaybe;\r\n\trfPower?: InputMaybe;\r\n\trotation?: InputMaybe;\r\n\troutingPosition?: InputMaybe;\r\n\tstereoAudio?: InputMaybe;\r\n\tswitchConfiguration?: InputMaybe;\r\n\ttransmitterIdentifyBehavior?: InputMaybe;\r\n\ttransmitterLightingBehavior?: InputMaybe;\r\n\ttransmitterOutOfRangeBehavior?: InputMaybe;\r\n\ttransmitterRejoinBehavior?: InputMaybe;\r\n\t/** @deprecated This feature will be refactored when trasnmitterMuteBehavior(SHSYSAPI-10059) is implemented. */\r\n\ttransmitterSwitchBehavior?: InputMaybe;\r\n\tusbMuteSync?: InputMaybe;\r\n\tusbTerminalType?: InputMaybe;\r\n\tvirtualAcousticBoundary?: InputMaybe;\r\n\twebService?: InputMaybe;\r\n};\r\n\r\nexport type DeviceFeatures = {\r\n\tactivePreset: Maybe;\r\n\tallEqualizersBypass: Maybe;\r\n\tallIntellimixBypass: Maybe;\r\n\t/**\r\n\t * Determines how the device should amplify all outputted analog audio to provide sound reinforcement in the space.\r\n\t * Different output modes require different wiring, and potentially different speakers to handle the given output.\r\n\t */\r\n\tanalogAudioOutputMode: Maybe;\r\n\t/**\r\n\t * Determines how the device should amplify all outputted analog audio to provide sound reinforcement in the space.\r\n\t * Different output modes (whether analogLogic is enabled) specify the behavior for what to do with a high or a low signal over the analog logic connection.\r\n\t */\r\n\tanalogLogic: Maybe;\r\n\tanalogLogicPresetSwitch: Maybe;\r\n\tanalogLogicPresetSwitchStatus: Maybe;\r\n\taudioAutoFocus: Maybe;\r\n\taudioChannelCount: Maybe;\r\n\taudioChannels: Maybe;\r\n\taudioCoverageAreas: Maybe;\r\n\taudioMute: Maybe;\r\n\taudioMuteControl: Maybe;\r\n\taudioMuteControlGroup: Maybe;\r\n\taudioMuteDefault: Maybe;\r\n\taudioMuteLock: Maybe;\r\n\taudioNetwork: Maybe;\r\n\taudioNetworkInterface: Maybe;\r\n\tauthentication: Maybe;\r\n\tautomixGainMetering: Maybe;\r\n\tavailablePackages: Maybe;\r\n\tbatteryHealth: Maybe;\r\n\tbatteryLevel: Maybe;\r\n\tcallStatus: Maybe;\r\n\tchargerBays: Maybe;\r\n\tcommandStringsService: Maybe;\r\n\tconferencingOperationMode: Maybe;\r\n\tconfigurationLock: Maybe;\r\n\t/** A user-settable digital label name for a device which is connected to this device */\r\n\tconnectedDeviceLabel: Maybe;\r\n\tcontrolNetwork: Maybe;\r\n\tcontrolNetworkInterface: Maybe;\r\n\tcoverageMode: Maybe;\r\n\tcoveragePosition: Maybe;\r\n\tdanteAudioEncryption: Maybe;\r\n\tdanteAudioNetwork: Maybe;\r\n\tdanteAudioNetworkAccess: Maybe;\r\n\tdeployment: Maybe;\r\n\t/** @deprecated For Cloud Managed Rooms Use Only. */\r\n\tdoublestuffProxiedTransmitters: Maybe;\r\n\tequalizerContour: Maybe;\r\n\tethernetLights: Maybe;\r\n\tethernetPowerSource: Maybe;\r\n\tfirmware: Maybe;\r\n\tfirmwareUpdatePolicy: Maybe;\r\n\tglobalMicStatus: Maybe;\r\n\theight: Maybe;\r\n\tidentify: Maybe;\r\n\tlicense: Maybe;\r\n\tlicenseV2: Maybe;\r\n\tlightingAudioMeters: Maybe;\r\n\tlightingAudioMuteIndicatorOverride: Maybe;\r\n\tlightingAutomixGating: Maybe;\r\n\tlightingBehavior: Maybe;\r\n\tlightingBrightness: Maybe;\r\n\tlightingLiveAudioMeters: Maybe;\r\n\tlightingMuteBehavior: Maybe;\r\n\tlightingRing: Maybe;\r\n\tlightingUnmuteBehavior: Maybe;\r\n\tlinkedAccessPoint: Maybe;\r\n\tlistenerHeight: Maybe;\r\n\tlogicMute: Maybe;\r\n\tlogicReceiver: Maybe;\r\n\tlogicTransmitter: Maybe;\r\n\tloudspeaker: Maybe;\r\n\tmdnsService: Maybe;\r\n\tmeteringModes: Maybe;\r\n\tmicStatus: Maybe;\r\n\tname: Maybe;\r\n\tpcSpecification: Maybe;\r\n\tplacement: Maybe;\r\n\tproxiedDevices: Maybe;\r\n\tredundantAudioNetwork: Maybe;\r\n\trfChannels: Maybe;\r\n\trfDensityMode: Maybe;\r\n\trfPower: Maybe;\r\n\troom: Maybe;\r\n\trotation: Maybe;\r\n\troutingPosition: Maybe;\r\n\tsecurity8021X: Maybe;\r\n\tserialNumber: Maybe;\r\n\tstereoAudio: Maybe;\r\n\tswitchConfiguration: Maybe;\r\n\ttransmitterIdentifyBehavior: Maybe;\r\n\ttransmitterLightingBehavior: Maybe;\r\n\ttransmitterOutOfRangeBehavior: Maybe;\r\n\ttransmitterRejoinBehavior: Maybe;\r\n\t/** @deprecated This feature will be refactored when trasnmitterMuteBehavior(SHSYSAPI-10059) is implemented. */\r\n\ttransmitterSwitchBehavior: Maybe;\r\n\tupdateProgress: Maybe;\r\n\tuptime: Maybe;\r\n\tusbMuteSync: Maybe;\r\n\tusbTerminalType: Maybe;\r\n\tuserPresets: Maybe;\r\n\tvirtual: Maybe;\r\n\tvirtualAcousticBoundary: Maybe;\r\n\twebService: Maybe;\r\n};\r\n\r\nexport type DeviceFirmware = {\r\n\tvalid: Scalars['Boolean']['output'];\r\n\tversion: Scalars['SemanticVersion']['output'];\r\n};\r\n\r\nexport type DeviceFirmwareUpdatePolicy = {\r\n\tdowngradeAllowed: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceFirmwareUpdatePolicyChange = {\r\n\tfirmwareUpdatePolicy: Maybe;\r\n};\r\n\r\nexport type DeviceFirmwareUpdatePolicyUpdateInput = {\r\n\tdowngradeAllowed: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceGlobalMicStatus = {\r\n\tstatus: GlobalMicStatus | `${GlobalMicStatus}`;\r\n};\r\n\r\nexport type DeviceGlobalMicStatusChange = {\r\n\tglobalMicStatus: Maybe;\r\n};\r\n\r\nexport type DeviceGlobalMicStatusUpdateInput = {\r\n\tid: Scalars['ID']['input'];\r\n\tstatus: GlobalMicStatusInput | `${GlobalMicStatusInput}`;\r\n};\r\n\r\nexport type DeviceGroupLinkingResult = {\r\n\tdetails: Maybe>;\r\n\toverallResult: LinkingOperationResult | `${LinkingOperationResult}`;\r\n};\r\n\r\nexport type DeviceGroupUnlinkingResult = {\r\n\tdetails: Maybe>;\r\n\toverallResult: UnlinkingOperationResult | `${UnlinkingOperationResult}`;\r\n};\r\n\r\n/** height values are scaled to represent in millimeters (mm) */\r\nexport type DeviceHeight = {\r\n\theight: Scalars['Float']['output'];\r\n};\r\n\r\nexport type DeviceHeightChange = {\r\n\theight: Maybe;\r\n};\r\n\r\nexport type DeviceHeightConstraints = {\r\n\theight: DeviceHeightFieldConstraints;\r\n};\r\n\r\nexport type DeviceHeightFieldConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type DeviceHeightUpdateInput = {\r\n\theight: Scalars['Float']['input'];\r\n};\r\n\r\nexport type DeviceIdentify = {\r\n\tidentifying: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceIdentifyChange = {\r\n\tidentify: Maybe;\r\n};\r\n\r\nexport type DeviceIpsInput = {\r\n\tipAddress: Array;\r\n};\r\n\r\nexport type DeviceLicense = {\r\n\tinfo: Array;\r\n};\r\n\r\nexport type DeviceLicenseActivationProgress = {\r\n\tactivationKey: Scalars['String']['output'];\r\n\tcount: Scalars['Int']['output'];\r\n\tdevice: Device;\r\n\tmessage: Scalars['String']['output'];\r\n\tstate: LicenseActivationState | `${LicenseActivationState}`;\r\n};\r\n\r\nexport type DeviceLicenseCancelPendingActivationProgress = {\r\n\tactivationKey: Scalars['String']['output'];\r\n\tdevice: Device;\r\n\tmessage: Scalars['String']['output'];\r\n\tstate: LicenseCancelationState | `${LicenseCancelationState}`;\r\n};\r\n\r\nexport type DeviceLicenseChange = {\r\n\tlicense: Maybe;\r\n};\r\n\r\nexport type DeviceLicenseChangeV2 = {\r\n\tlicenseV2: Maybe;\r\n};\r\n\r\nexport type DeviceLicenseDeactivationProgress = {\r\n\tactivationKey: Scalars['String']['output'];\r\n\tcount: Scalars['Int']['output'];\r\n\tdevice: Device;\r\n\tmessage: Scalars['String']['output'];\r\n\tstate: LicenseDeactivationState | `${LicenseDeactivationState}`;\r\n};\r\n\r\nexport type DeviceLicenseInfo = {\r\n\tactivationId: Maybe;\r\n\tactivationKey: Scalars['String']['output'];\r\n\tcount: Scalars['Int']['output'];\r\n\tentitlementId: Maybe;\r\n\texpirationDate: Maybe;\r\n\t/** @deprecated Use expirationDate for more accurate time handling when close to expiration. This will be removed in a subsequent release */\r\n\texpiresIn: Maybe;\r\n\tfeatureName: Maybe;\r\n\t/** @deprecated This will be removed in a subsequent release. There should be no remaining requirements enforcing that we notify the user of how many days their license remains in the grace period. */\r\n\tgraceExpirationDate: Maybe;\r\n\t/** @deprecated Use graceExpirationDate for more accurate time handling when close to expiration. This will be removed in a subsequent release */\r\n\tgraceExpiresIn: Maybe;\r\n\tinGrace: Maybe;\r\n\tinUse: Maybe;\r\n\tinWarning: Maybe;\r\n\tperpetual: Maybe;\r\n\tsoldTo: Maybe;\r\n\tstartDate: Maybe;\r\n\tstate: LicenseState | `${LicenseState}`;\r\n\ttype: Maybe;\r\n};\r\n\r\nexport type DeviceLicenseInfoV2 = {\r\n\tactivationId: Maybe;\r\n\tactivationKey: Scalars['String']['output'];\r\n\tcount: Scalars['Int']['output'];\r\n\tentitlementId: Maybe;\r\n\texpirationDate: Maybe;\r\n\tfeatureName: Maybe;\r\n\tinGrace: Maybe;\r\n\tinUse: Maybe;\r\n\tinWarning: Maybe;\r\n\tperpetual: Maybe;\r\n\tsoldTo: Maybe;\r\n\tstartDate: Maybe;\r\n\tstate: LicenseState | `${LicenseState}`;\r\n\ttype: Maybe;\r\n};\r\n\r\nexport type DeviceLicenseV2 = {\r\n\tinfo: Array;\r\n};\r\n\r\nexport type DeviceLightingAudioMeters = {\r\n\tbreathingMeterColor: MeterColorThemeInfo;\r\n\tliveMeterColor: LiveMeterColorThemeInfo;\r\n\tmode: AudioMetersLightingMode | `${AudioMetersLightingMode}`;\r\n\tsolidMeterColor: MeterColorThemeInfo;\r\n};\r\n\r\nexport type DeviceLightingAudioMetersChange = {\r\n\tlightingAudioMeters: Maybe;\r\n};\r\n\r\nexport type DeviceLightingAudioMetersConstraints = {\r\n\tbreathingMeterColor: MeterColorConstraints;\r\n\tliveMeterColor: LiveMeterColorConstraints;\r\n\tsolidMeterColor: MeterColorConstraints;\r\n};\r\n\r\nexport type DeviceLightingAudioMetersUpdateInput = {\r\n\tbreathingMeterColor?: InputMaybe;\r\n\tliveMeterColor?: InputMaybe;\r\n\tmode?: InputMaybe;\r\n\tsolidMeterColor?: InputMaybe;\r\n};\r\n\r\nexport type DeviceLightingAudioMuteIndicatorOverride = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceLightingAudioMuteIndicatorOverrideChange = {\r\n\tlightingAudioMuteIndicatorOverride: Maybe;\r\n};\r\n\r\nexport type DeviceLightingAudioMuteIndicatorOverrideUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceLightingAutomixGating = {\r\n\tautomixerInputDisengagedBehavior: AutomixerInputDisengagedBehavior | `${AutomixerInputDisengagedBehavior}`;\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceLightingAutomixGatingChange = {\r\n\tlightingAutomixGating: Maybe;\r\n};\r\n\r\nexport type DeviceLightingAutomixGatingConstraints = {\r\n\tautomixerInputDisengagedBehavior: Maybe;\r\n};\r\n\r\nexport type DeviceLightingAutomixGatingUpdateInput = {\r\n\tautomixerInputDisengagedBehavior?: InputMaybe<\r\n\t\tAutomixerInputDisengagedBehavior | `${AutomixerInputDisengagedBehavior}`\r\n\t>;\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type DeviceLightingBehavior = {\r\n\tcolor: Maybe;\r\n\tmode: Maybe;\r\n\tstate: Maybe;\r\n};\r\n\r\nexport type DeviceLightingBehaviorChange = {\r\n\tlightingBehavior: Maybe;\r\n};\r\n\r\nexport type DeviceLightingBehaviorColorConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceLightingBehaviorConstraints = {\r\n\tcolor: DeviceLightingBehaviorColorConstraints;\r\n\tmode: DeviceLightingBehaviorModeConstraints;\r\n\tstate: DeviceLightingBehaviorStateConstraints;\r\n};\r\n\r\nexport type DeviceLightingBehaviorModeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceLightingBehaviorStateConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceLightingBehaviorUpdateInput = {\r\n\tcolor?: InputMaybe;\r\n\tmode?: InputMaybe;\r\n};\r\n\r\nexport type DeviceLightingBrightness = {\r\n\t/** The current brightness level of the device's lights */\r\n\tlevel: Scalars['Int']['output'];\r\n\t/** Number of brightness levels supported by the device's lights */\r\n\tsupportedLevels: Scalars['Int']['output'];\r\n};\r\n\r\nexport type DeviceLightingBrightnessChange = {\r\n\tlightingBrightness: Maybe;\r\n};\r\n\r\nexport type DeviceLightingBrightnessConstraints = {\r\n\tlevel: DeviceLightingBrightnessFieldConstraints;\r\n};\r\n\r\nexport type DeviceLightingBrightnessFieldConstraints = IIntRangeConstraints & {\r\n\trange: IntRange;\r\n};\r\n\r\nexport type DeviceLightingBrightnessUpdateInput = {\r\n\tid: Scalars['ID']['input'];\r\n\tlevel: Scalars['Int']['input'];\r\n};\r\n\r\nexport type DeviceLightingLiveAudioMeters = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceLightingLiveAudioMetersChange = {\r\n\tlightingLiveAudioMeters: Maybe;\r\n};\r\n\r\nexport type DeviceLightingLiveAudioMetersUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceLightingMuteBehavior = {\r\n\tcolor: LightingColor | `${LightingColor}`;\r\n\tmode: LightingMode | `${LightingMode}`;\r\n};\r\n\r\nexport type DeviceLightingMuteBehaviorChange = {\r\n\tlightingMuteBehavior: Maybe;\r\n};\r\n\r\nexport type DeviceLightingMuteBehaviorConstraints = {\r\n\tcolor: DeviceLightingMuteColorConstraints;\r\n\tmode: DeviceLightingMuteModeConstraints;\r\n};\r\n\r\nexport type DeviceLightingMuteColorConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceLightingMuteModeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceLightingRing = {\r\n\tstyle: LightingStyle | `${LightingStyle}`;\r\n};\r\n\r\nexport type DeviceLightingRingChange = {\r\n\tlightingRing: Maybe;\r\n};\r\n\r\nexport type DeviceLightingRingConstraints = {\r\n\tstyle: DeviceLightingRingStyleConstraints;\r\n};\r\n\r\nexport type DeviceLightingRingStyleConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceLightingRingUpdateInput = {\r\n\tstyle?: InputMaybe;\r\n};\r\n\r\nexport type DeviceLightingUnmuteBehavior = {\r\n\tcolor: LightingColor | `${LightingColor}`;\r\n\tmode: LightingMode | `${LightingMode}`;\r\n};\r\n\r\nexport type DeviceLightingUnmuteBehaviorChange = {\r\n\tlightingUnmuteBehavior: Maybe;\r\n};\r\n\r\nexport type DeviceLightingUnmuteBehaviorConstraints = {\r\n\tcolor: DeviceLightingUnmuteColorConstraints;\r\n\tmode: DeviceLightingUnmuteModeConstraints;\r\n};\r\n\r\nexport type DeviceLightingUnmuteColorConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceLightingUnmuteModeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceLinkage = {\r\n\t/** device and rfChannel fields are null when there is a linkage established with an access point but the access point isn't discovered */\r\n\tdevice: Maybe;\r\n\trfChannel: Maybe;\r\n};\r\n\r\nexport type DeviceLinkedAccessPoint = {\r\n\t/** linkage field is null when there is no linkage established with an access point */\r\n\tlinkage: Maybe;\r\n};\r\n\r\nexport type DeviceLinkedAccessPointChange = {\r\n\tlinkedAccessPoint: Maybe;\r\n};\r\n\r\nexport type DeviceLinkingDetailResult = {\r\n\tchargerBay: ChargerBay;\r\n\trfChannel: RfChannel;\r\n\tstatus: LinkingStatus | `${LinkingStatus}`;\r\n};\r\n\r\nexport type DeviceLinkingInput = {\r\n\tchargerBay: Scalars['ID']['input'];\r\n\trfChannel: Scalars['ID']['input'];\r\n};\r\n\r\n/** Listener height values are scaled to represent in millimeters (mm) */\r\nexport type DeviceListenerHeight = {\r\n\theight: Scalars['Float']['output'];\r\n};\r\n\r\nexport type DeviceListenerHeightChange = {\r\n\tlistenerHeight: Maybe;\r\n};\r\n\r\nexport type DeviceListenerHeightConstraints = {\r\n\theight: DeviceListenerHeightFieldConstraints;\r\n};\r\n\r\nexport type DeviceListenerHeightFieldConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type DeviceListenerHeightUpdateInput = {\r\n\theight: Scalars['Float']['input'];\r\n};\r\n\r\nexport type DeviceLogicMute = {\r\n\tmuted: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceLogicMuteChange = {\r\n\tlogicMute: Maybe;\r\n};\r\n\r\nexport type DeviceLogicMuteUpdateInput = {\r\n\tmuted: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceLogicReceiver = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceLogicReceiverChange = {\r\n\tlogicReceiver: Maybe;\r\n};\r\n\r\nexport type DeviceLogicReceiverUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceLogicTransmitter = {\r\n\tinputLightingSignal: Scalars['Boolean']['output'];\r\n\toutputSignal: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceLogicTransmitterChange = {\r\n\tlogicTransmitter: Maybe;\r\n};\r\n\r\nexport type DeviceLoudspeaker = {\r\n\tavailable: Scalars['Boolean']['output'];\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceLoudspeakerChange = {\r\n\tloudspeaker: Maybe;\r\n};\r\n\r\nexport type DeviceLoudspeakerUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type DeviceMdnsService = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n\tport: Scalars['Int']['output'];\r\n};\r\n\r\nexport type DeviceMdnsServiceChange = {\r\n\tmdnsService: Maybe;\r\n};\r\n\r\nexport type DeviceMdnsServiceUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceMeteringModes = {\r\n\tinputMode: MeteringMode | `${MeteringMode}`;\r\n\toutputMode: MeteringMode | `${MeteringMode}`;\r\n};\r\n\r\nexport type DeviceMeteringModesChange = {\r\n\tmeteringModes: Maybe;\r\n};\r\n\r\nexport type DeviceMeteringModesUpdateInput = {\r\n\tinputMode?: InputMaybe;\r\n\toutputMode?: InputMaybe;\r\n};\r\n\r\nexport type DeviceMicStatus = {\r\n\tstatus: MicStatus | `${MicStatus}`;\r\n};\r\n\r\nexport type DeviceMicStatusChange = {\r\n\tmicStatus: Maybe;\r\n};\r\n\r\nexport type DeviceMicStatusUpdateInput = {\r\n\tstatus: MicStatusInput | `${MicStatusInput}`;\r\n};\r\n\r\nexport type DeviceName = {\r\n\tname: Scalars['String']['output'];\r\n};\r\n\r\nexport type DeviceNameChange = {\r\n\tname: Maybe;\r\n};\r\n\r\nexport type DeviceNameConflict = {\r\n\t/** Audio network device name, which is in conflict */\r\n\taudioNetworkDeviceName: Scalars['String']['output'];\r\n\t/** Device that has a conflicting Network Audio device name */\r\n\tdevice: Device;\r\n};\r\n\r\nexport type DeviceNameConstraints = {\r\n\tname: DeviceNameFieldConstraints;\r\n};\r\n\r\nexport type DeviceNameFieldConstraints = IStringPatternRangeConstraints &\r\n\tIUtf8StringMaxBytesConstraints & {\r\n\t\tpattern: Maybe;\r\n\t\tutf8MaxBytes: Maybe;\r\n\t};\r\n\r\nexport type DeviceNameUpdateInput = {\r\n\tname: Scalars['String']['input'];\r\n};\r\n\r\nexport type DeviceNetworkInterface = {\r\n\t/** Example: Windows: (GUID) '{60B5DC8A-837A-44BC-B594-5027416EF5CC}', Unix: 'en0' */\r\n\tid: Scalars['String']['output'];\r\n\tipAddress: Scalars['IpAddress']['output'];\r\n\t/**\r\n\t * Display name, or 'Friendly name', of network interface.\r\n\t * Example: Windows: 'Test Network', Mac: 'Thunderbolt Ethernet Slot 1'. Note: Will be copy of 'id' field for Linux.\r\n\t */\r\n\tname: Scalars['String']['output'];\r\n};\r\n\r\nexport type DeviceOperationResult = NodeOperationResult & {\r\n\tdevice: Maybe;\r\n\terror: Maybe;\r\n};\r\n\r\nexport type DeviceOptimizationResult = {\r\n\tdevice: Maybe;\r\n\tstatus: DeviceOptimizationStatus | `${DeviceOptimizationStatus}`;\r\n};\r\n\r\nexport enum DeviceOptimizationStatus {\r\n\tConflict = 'CONFLICT',\r\n\tDeviceUnavailable = 'DEVICE_UNAVAILABLE',\r\n\tFailure = 'FAILURE',\r\n\tPartialSuccess = 'PARTIAL_SUCCESS',\r\n\tSuccess = 'SUCCESS',\r\n\tUnsupported = 'UNSUPPORTED'\r\n}\r\n\r\nexport type DevicePcSpecification = {\r\n\tmanufacturer: Maybe;\r\n\tmemory: Maybe;\r\n\tmodel: Maybe;\r\n\toperatingSystem: Maybe;\r\n\tprocessorInfo: Maybe;\r\n};\r\n\r\nexport type DevicePlacement = {\r\n\tplacement: Placement | `${Placement}`;\r\n};\r\n\r\nexport type DevicePlacementChange = {\r\n\tplacement: Maybe;\r\n};\r\n\r\nexport type DevicePlacementConstraints = {\r\n\tplacement: DevicePlacementValuesConstraint;\r\n};\r\n\r\nexport type DevicePlacementUpdateInput = {\r\n\tplacement: Placement | `${Placement}`;\r\n};\r\n\r\nexport type DevicePlacementValuesConstraint = {\r\n\toptions: Array;\r\n};\r\n\r\n/** The default value of the X/Y positions is uninitialized(i.e., null). Positions are scaled to represent in millimeters (mm) */\r\nexport type DevicePosition = {\r\n\txPosition: Maybe;\r\n\tyPosition: Maybe;\r\n};\r\n\r\nexport type DeviceProperty = {\r\n\tid: Scalars['ID']['output'];\r\n\tpropertyInfo: Maybe;\r\n\tpropertyKey: Scalars['String']['output'];\r\n\tpropertyValue: Maybe;\r\n};\r\n\r\nexport type DevicePropertyChangeEvent = {\r\n\tid: Scalars['ID']['output'];\r\n\tpropertyKey: Scalars['String']['output'];\r\n\tpropertyValue: Maybe;\r\n};\r\n\r\nexport type DevicePropertyFilter = {\r\n\tget?: InputMaybe;\r\n\tpropertyKeys?: InputMaybe>;\r\n\tpublic?: InputMaybe;\r\n};\r\n\r\nexport type DevicePropertyInfo = {\r\n\tbaseKey: Scalars['String']['output'];\r\n\tcategory: Scalars['String']['output'];\r\n\teventReliable: Scalars['Boolean']['output'];\r\n\tget: Scalars['Boolean']['output'];\r\n\tisPublic: Scalars['Boolean']['output'];\r\n\tmaxSize: Scalars['Int']['output'];\r\n\tpropValueType: Maybe;\r\n\tset: Scalars['Boolean']['output'];\r\n\tsubscribe: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceProxiedDevices = {\r\n\tproxiedDevices: Array;\r\n};\r\n\r\nexport type DeviceProxiedDevicesChange = {\r\n\tproxiedDevices: Maybe;\r\n};\r\n\r\nexport type DeviceRedundantAudioNetwork = {\r\n\tavailable: Scalars['Boolean']['output'];\r\n\tinterface: Maybe;\r\n};\r\n\r\nexport type DeviceRedundantAudioNetworkChange = {\r\n\tredundantAudioNetwork: Maybe;\r\n};\r\n\r\n/**\r\n * Event emitted whenever a device is removed from management\r\n * (e.g. a physical device goes to DeviceState.Offline, a virtual device is deleted)\r\n */\r\nexport type DeviceRemoved = {\r\n\tremoved: Scalars['ID']['output'];\r\n};\r\n\r\nexport enum DeviceResetScope {\r\n\t/** use audio channel id as request id for resetDevice mutation */\r\n\tAutomixer = 'AUTOMIXER',\r\n\t/** use device id as request id for resetDevice mutation */\r\n\tCoverageAreas = 'COVERAGE_AREAS',\r\n\t/** use audio channel id as request id for resetDevice mutation */\r\n\tEqualizerFilters = 'EQUALIZER_FILTERS',\r\n\t/** use device id as request id for resetDevice mutation */\r\n\tFactory = 'FACTORY',\r\n\t/** use device id as request id for resetDevice mutation */\r\n\tNetworks = 'NETWORKS',\r\n\t/** use device id as request id for resetDevice mutation */\r\n\tUserPresetable = 'USER_PRESETABLE'\r\n}\r\n\r\nexport type DeviceRfChannels = {\r\n\t/** RF channels present on the device */\r\n\trfChannels: Array;\r\n};\r\n\r\nexport type DeviceRfDensityMode = {\r\n\tmode: RfDensityMode | `${RfDensityMode}`;\r\n};\r\n\r\nexport type DeviceRfDensityModeChange = {\r\n\trfDensityMode: Maybe;\r\n};\r\n\r\nexport type DeviceRfDensityModeConstraints = {\r\n\tmode: Maybe;\r\n};\r\n\r\nexport type DeviceRfDensityModeUpdateInput = {\r\n\tmode: RfDensityMode | `${RfDensityMode}`;\r\n};\r\n\r\nexport type DeviceRfPower = {\r\n\tlevel: RfPower | `${RfPower}`;\r\n};\r\n\r\nexport type DeviceRfPowerChange = {\r\n\trfPower: Maybe;\r\n};\r\n\r\nexport type DeviceRfPowerConstraints = {\r\n\tlevel: RfPowerConstraints;\r\n};\r\n\r\nexport type DeviceRfPowerUpdateInput = {\r\n\tlevel: RfPower | `${RfPower}`;\r\n};\r\n\r\n/**\r\n * The room that this device is currently in\r\n *\r\n * NOTE: This feature may be transiently null when the device is first discovered.\r\n */\r\nexport type DeviceRoom = {\r\n\troom: Maybe;\r\n};\r\n\r\nexport type DeviceRoomChange = {\r\n\troom: Maybe;\r\n};\r\n\r\nexport type DeviceRotation = {\r\n\txAxis: Scalars['Int']['output'];\r\n\tyAxis: Scalars['Int']['output'];\r\n\tzAxis: Scalars['Int']['output'];\r\n};\r\n\r\nexport type DeviceRotationAxisConstraints = IIntRangeConstraints & {\r\n\trange: IntRange;\r\n};\r\n\r\nexport type DeviceRotationChange = {\r\n\trotation: Maybe;\r\n};\r\n\r\nexport type DeviceRotationConstraints = {\r\n\txAxis: DeviceRotationAxisConstraints;\r\n\tyAxis: DeviceRotationAxisConstraints;\r\n\tzAxis: DeviceRotationAxisConstraints;\r\n};\r\n\r\nexport type DeviceRotationUpdateInput = {\r\n\txAxis?: InputMaybe;\r\n\tyAxis?: InputMaybe;\r\n\tzAxis?: InputMaybe;\r\n};\r\n\r\nexport type DeviceRoutingPositionChange = {\r\n\troutingPosition: Maybe;\r\n};\r\n\r\nexport type DeviceRoutingPositionInput = {\r\n\txPosition: Scalars['Float']['input'];\r\n\tyPosition: Scalars['Float']['input'];\r\n};\r\n\r\nexport type DeviceSecurity8021X = {\r\n\tanonymousId: Maybe;\r\n\tclientCertificate: Maybe;\r\n\teapMethod: EapMethod8021X | `${EapMethod8021X}`;\r\n\tenabled: Scalars['Boolean']['output'];\r\n\tlastAuthenticationStatus: LastAuthenticationStatus8021X | `${LastAuthenticationStatus8021X}`;\r\n\trebootRequired: Scalars['Boolean']['output'];\r\n\trootCertificate: Maybe;\r\n\tusername: Maybe;\r\n};\r\n\r\nexport type DeviceSecurity8021XAnonymousIdConstraints = IStringPatternRangeConstraints & {\r\n\tpattern: Scalars['Regex']['output'];\r\n};\r\n\r\nexport type DeviceSecurity8021XChange = {\r\n\tsecurity8021X: Maybe;\r\n};\r\n\r\nexport type DeviceSecurity8021XConstraints = {\r\n\tanonymousId: DeviceSecurity8021XAnonymousIdConstraints;\r\n\teapMethod: DeviceSecurity8021XConstraintsEapMethods;\r\n\tpassword: DeviceSecurity8021XPasswordConstraints;\r\n\tusername: DeviceSecurity8021XUserNameConstraints;\r\n};\r\n\r\nexport type DeviceSecurity8021XConstraintsEapMethods = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceSecurity8021XPasswordConstraints = IStringPatternRangeConstraints & {\r\n\tpattern: Scalars['Regex']['output'];\r\n};\r\n\r\nexport type DeviceSecurity8021XUserNameConstraints = IStringPatternRangeConstraints & {\r\n\tpattern: Scalars['Regex']['output'];\r\n};\r\n\r\nexport type DeviceSerialNumber = {\r\n\tserialNumber: Scalars['String']['output'];\r\n};\r\n\r\nexport type DeviceSingleLinkingResult = {\r\n\tdetail: Maybe;\r\n\toverallResult: LinkingOperationResult | `${LinkingOperationResult}`;\r\n};\r\n\r\nexport type DeviceSingleUnlinkingResult = {\r\n\tdetail: Maybe;\r\n\toverallResult: UnlinkingOperationResult | `${UnlinkingOperationResult}`;\r\n};\r\n\r\nexport enum DeviceSpecificEqualizerContour {\r\n\tMxa310 = 'MXA310',\r\n\tMxa710LowShelf = 'MXA710_LOW_SHELF',\r\n\tMxa901HighPass = 'MXA901_HIGH_PASS',\r\n\tMxa902HighPass = 'MXA902_HIGH_PASS',\r\n\tMxa910 = 'MXA910',\r\n\tMxa910HighPass = 'MXA910_HIGH_PASS',\r\n\tMxa910MultiBand = 'MXA910_MULTI_BAND',\r\n\tMxa920HighPass = 'MXA920_HIGH_PASS',\r\n\tOff = 'OFF'\r\n}\r\n\r\nexport enum DeviceStatus {\r\n\t/**\r\n\t * The device was discovered by a particular communication protocol,\r\n\t * but is yet not ready to be interacted with. This state is normally transient.\r\n\t *\r\n\t * Factory reset and reboot operations are allowed if applicable, but with no guarantees of success.\r\n\t */\r\n\tDiscovered = 'DISCOVERED',\r\n\t/**\r\n\t * The device was discovered, but is in an unusable state for further feature interaction.\r\n\t *\r\n\t * Factory reset and reboot operations are allowed if applicable, but with no guarantees of success.\r\n\t */\r\n\tError = 'ERROR',\r\n\t/**\r\n\t * A connection can no logner be established with the device.\r\n\t *\r\n\t * This state may be transient when performing an operation which reboots the device.\r\n\t * (e.g. factory reset, rebooting the ethernet switch a device is powered by, etc)\r\n\t */\r\n\tOffline = 'OFFLINE',\r\n\t/** The device and all of its features can be interacted with */\r\n\tOnline = 'ONLINE'\r\n}\r\n\r\nexport type DeviceStatusChange = {\r\n\tid: Scalars['ID']['output'];\r\n\tstatus: DeviceStatus | `${DeviceStatus}`;\r\n};\r\n\r\nexport type DeviceStereoAudio = {\r\n\tavailable: Scalars['Boolean']['output'];\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceStereoAudioChange = {\r\n\tstereoAudio: Maybe;\r\n};\r\n\r\nexport type DeviceStereoAudioUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceSupportedFeatures = {\r\n\tactivePreset: FeatureSupport;\r\n\tallEqualizersBypass: FeatureSupport;\r\n\tallIntellimixBypass: FeatureSupport;\r\n\tanalogAudioOutputMode: FeatureSupport;\r\n\tanalogLogic: FeatureSupport;\r\n\tanalogLogicPresetSwitch: FeatureSupport;\r\n\tanalogLogicPresetSwitchStatus: FeatureSupport;\r\n\taudioAutoFocus: FeatureSupport;\r\n\taudioChannelCount: FeatureSupport;\r\n\taudioChannels: FeatureSupport;\r\n\taudioCoverageAreas: FeatureSupport;\r\n\taudioMute: FeatureSupport;\r\n\taudioMuteControl: FeatureSupport;\r\n\taudioMuteControlGroup: FeatureSupport;\r\n\taudioMuteDefault: FeatureSupport;\r\n\taudioMuteLock: FeatureSupport;\r\n\taudioNetwork: FeatureSupport;\r\n\taudioNetworkInterface: FeatureSupport;\r\n\taudioNetworkNameSync: FeatureSupport;\r\n\tauthentication: FeatureSupport;\r\n\tautomixGainMetering: FeatureSupport;\r\n\tavailablePackages: FeatureSupport;\r\n\tbatteryHealth: FeatureSupport;\r\n\tbatteryLevel: FeatureSupport;\r\n\tcallStatus: FeatureSupport;\r\n\tchargerBays: FeatureSupport;\r\n\tclearLightErrors: FeatureSupport;\r\n\tcommandStringsService: FeatureSupport;\r\n\tconferencingOperationMode: FeatureSupport;\r\n\tconfigurationLock: FeatureSupport;\r\n\tconnectedDeviceLabel: FeatureSupport;\r\n\tcontrolNetwork: FeatureSupport;\r\n\tcontrolNetworkInterface: FeatureSupport;\r\n\tcoverageMode: FeatureSupport;\r\n\tcoveragePosition: FeatureSupport;\r\n\tdanteAudioEncryption: FeatureSupport;\r\n\tdanteAudioNetwork: FeatureSupport;\r\n\tdanteAudioNetworkAccess: FeatureSupport;\r\n\tdeployment: FeatureSupport;\r\n\t/** @deprecated For Cloud Managed Rooms Use Only. */\r\n\tdoublestuffProxiedTransmitters: FeatureSupport;\r\n\tequalizerContour: FeatureSupport;\r\n\tethernetLights: FeatureSupport;\r\n\tethernetPowerSource: FeatureSupport;\r\n\teventLogExport: FeatureSupport;\r\n\tfactoryReset: FeatureSupport;\r\n\tfirmware: FeatureSupport;\r\n\tfirmwareUpdatePolicy: FeatureSupport;\r\n\tglobalMicStatus: FeatureSupport;\r\n\theight: FeatureSupport;\r\n\tidentify: FeatureSupport;\r\n\tlicense: FeatureSupport;\r\n\tlicenseV2: FeatureSupport;\r\n\tlightingAudioMeters: FeatureSupport;\r\n\tlightingAudioMuteIndicatorOverride: FeatureSupport;\r\n\tlightingAutomixGating: FeatureSupport;\r\n\tlightingBehavior: FeatureSupport;\r\n\tlightingBrightness: FeatureSupport;\r\n\tlightingLiveAudioMeters: FeatureSupport;\r\n\tlightingMuteBehavior: FeatureSupport;\r\n\tlightingRing: FeatureSupport;\r\n\tlightingUnmuteBehavior: FeatureSupport;\r\n\tlinkedAccessPoint: FeatureSupport;\r\n\tlistenerHeight: FeatureSupport;\r\n\tlogicMute: FeatureSupport;\r\n\tlogicReceiver: FeatureSupport;\r\n\tlogicTransmitter: FeatureSupport;\r\n\tloudspeaker: FeatureSupport;\r\n\tmdnsService: FeatureSupport;\r\n\tmeteringModes: FeatureSupport;\r\n\tmicStatus: FeatureSupport;\r\n\tname: FeatureSupport;\r\n\tpcSpecification: FeatureSupport;\r\n\tplacement: FeatureSupport;\r\n\tproxiedDevices: FeatureSupport;\r\n\treboot: FeatureSupport;\r\n\tredundantAudioNetwork: FeatureSupport;\r\n\trfChannels: FeatureSupport;\r\n\trfDensityMode: FeatureSupport;\r\n\trfPower: FeatureSupport;\r\n\troom: FeatureSupport;\r\n\trotation: FeatureSupport;\r\n\troutingPosition: FeatureSupport;\r\n\tsecurity8021X: FeatureSupport;\r\n\tserialNumber: FeatureSupport;\r\n\tstereoAudio: FeatureSupport;\r\n\tswitchConfiguration: FeatureSupport;\r\n\ttransmitterIdentifyBehavior: FeatureSupport;\r\n\ttransmitterLightingBehavior: FeatureSupport;\r\n\ttransmitterOutOfRangeBehavior: FeatureSupport;\r\n\ttransmitterRejoinBehavior: FeatureSupport;\r\n\ttransmitterSwitchBehavior: FeatureSupport;\r\n\tupdateProgress: FeatureSupport;\r\n\tuptime: FeatureSupport;\r\n\tusbMuteSync: FeatureSupport;\r\n\tusbTerminalType: FeatureSupport;\r\n\tuserPresets: FeatureSupport;\r\n\tvirtual: FeatureSupport;\r\n\tvirtualAcousticBoundary: FeatureSupport;\r\n\twebService: FeatureSupport;\r\n};\r\n\r\nexport type DeviceSwitchConfiguration = {\r\n\tmode: Maybe;\r\n};\r\n\r\nexport type DeviceSwitchConfigurationChange = {\r\n\tswitchConfiguration: Maybe;\r\n};\r\n\r\nexport type DeviceSwitchConfigurationConstraints = {\r\n\tmode: DeviceSwitchConfigurationModeConstraints;\r\n};\r\n\r\nexport type DeviceSwitchConfigurationModeConstraints = {\r\n\toptions: Array>;\r\n};\r\n\r\nexport type DeviceSwitchConfigurationUpdateInput = {\r\n\tmode: NetworkMode | `${NetworkMode}`;\r\n};\r\n\r\nexport type DeviceTransmitterIdentifyAlarm = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceTransmitterIdentifyAlarmInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceTransmitterIdentifyBehavior = {\r\n\talarm: DeviceTransmitterIdentifyAlarm;\r\n};\r\n\r\nexport type DeviceTransmitterIdentifyBehaviorChange = {\r\n\ttransmitterIdentifyBehavior: Maybe;\r\n};\r\n\r\nexport type DeviceTransmitterIdentifyBehaviorInput = {\r\n\talarm?: InputMaybe;\r\n};\r\n\r\nexport type DeviceTransmitterLightingBehavior = {\r\n\tbehavior: TransmitterLightingBehavior | `${TransmitterLightingBehavior}`;\r\n};\r\n\r\nexport type DeviceTransmitterLightingBehaviorChange = {\r\n\ttransmitterLightingBehavior: Maybe;\r\n};\r\n\r\nexport type DeviceTransmitterLightingBehaviorConstraints = {\r\n\tbehavior: Maybe;\r\n};\r\n\r\nexport type DeviceTransmitterLightingBehaviorUpdateInput = {\r\n\tbehavior: TransmitterLightingBehavior | `${TransmitterLightingBehavior}`;\r\n};\r\n\r\nexport type DeviceTransmitterOutOfRangeAlarm = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceTransmitterOutOfRangeAlarmInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceTransmitterOutOfRangeBehavior = {\r\n\talarm: DeviceTransmitterOutOfRangeAlarm;\r\n};\r\n\r\nexport type DeviceTransmitterOutOfRangeBehaviorChange = {\r\n\ttransmitterOutOfRangeBehavior: Maybe;\r\n};\r\n\r\nexport type DeviceTransmitterOutOfRangeBehaviorInput = {\r\n\talarm?: InputMaybe;\r\n};\r\n\r\nexport type DeviceTransmitterRejoinAudioMute = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceTransmitterRejoinAudioMuteInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceTransmitterRejoinBehavior = {\r\n\taudioMute: DeviceTransmitterRejoinAudioMute;\r\n};\r\n\r\nexport type DeviceTransmitterRejoinBehaviorChange = {\r\n\ttransmitterRejoinBehavior: Maybe;\r\n};\r\n\r\nexport type DeviceTransmitterRejoinBehaviorInput = {\r\n\taudioMute?: InputMaybe;\r\n};\r\n\r\nexport type DeviceTransmitterSwitchBehavior = {\r\n\tbodypack: TransmitterSwitchBehavior | `${TransmitterSwitchBehavior}`;\r\n\tboundary: TransmitterSwitchBehavior | `${TransmitterSwitchBehavior}`;\r\n\tgooseneck: TransmitterSwitchBehavior | `${TransmitterSwitchBehavior}`;\r\n\thandheld: TransmitterSwitchBehavior | `${TransmitterSwitchBehavior}`;\r\n};\r\n\r\nexport type DeviceTransmitterSwitchBehaviorChange = {\r\n\ttransmitterSwitchBehavior: Maybe;\r\n};\r\n\r\nexport type DeviceTransmitterSwitchBehaviorConstraints = {\r\n\tbodypack: TransmitterSwitchBehaviorConstraints;\r\n\tboundary: TransmitterSwitchBehaviorConstraints;\r\n\tgooseneck: TransmitterSwitchBehaviorConstraints;\r\n\thandheld: TransmitterSwitchBehaviorConstraints;\r\n};\r\n\r\nexport type DeviceTransmitterSwitchBehaviorUpdateInput = {\r\n\tbodypack?: InputMaybe;\r\n\tboundary?: InputMaybe;\r\n\tgooseneck?: InputMaybe;\r\n\thandheld?: InputMaybe;\r\n};\r\n\r\nexport type DeviceUnlinkingChargerBayResult = {\r\n\tchargerBay: ChargerBay;\r\n\tsuccess: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceUnlinkingDetailResult = DeviceUnlinkingChargerBayResult | DeviceUnlinkingRfChannelResult;\r\n\r\nexport type DeviceUnlinkingRfChannelResult = {\r\n\trfChannel: RfChannel;\r\n\tsuccess: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceUpdateInput = {\r\n\tfeatures?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type DeviceUpdateProgress = {\r\n\tdeviceProgressPercentage: Scalars['Int']['output'];\r\n\tfirmwarePackageKey: Scalars['String']['output'];\r\n\tfirmwarePackageVersion: Scalars['String']['output'];\r\n\tstageProgressPercentage: Scalars['Int']['output'];\r\n\tupdateStage: FirmwareUpdateStage | `${FirmwareUpdateStage}`;\r\n\tupdateStatus: FirmwareUpdateStatus | `${FirmwareUpdateStatus}`;\r\n};\r\n\r\nexport type DeviceUpdateProgressChange = {\r\n\tupdateProgress: Maybe;\r\n};\r\n\r\nexport type DeviceUptime = {\r\n\tuptime: Scalars['Duration']['output'];\r\n};\r\n\r\nexport type DeviceUptimeChange = {\r\n\tuptime: Maybe;\r\n};\r\n\r\nexport type DeviceUsbMuteSync = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceUsbMuteSyncChange = {\r\n\tusbMuteSync: Maybe;\r\n};\r\n\r\nexport type DeviceUsbMuteSyncUpdateInput = {\r\n\tenabled: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type DeviceUsbTerminalType = {\r\n\tterminalType: UsbTerminalType | `${UsbTerminalType}`;\r\n};\r\n\r\nexport type DeviceUsbTerminalTypeChange = {\r\n\tusbTerminalType: Maybe;\r\n};\r\n\r\nexport type DeviceUsbTerminalTypeConstraints = {\r\n\tterminalType: DeviceValidUsbTerminalTypeConstraints;\r\n};\r\n\r\nexport type DeviceUsbTerminalTypeUpdateInput = {\r\n\tterminalType: UsbTerminalType | `${UsbTerminalType}`;\r\n};\r\n\r\nexport type DeviceUserPresets = {\r\n\tuserPresets: Array;\r\n};\r\n\r\nexport type DeviceUserPresetsChange = {\r\n\tuserPresets: Maybe;\r\n};\r\n\r\nexport type DeviceValidEthernetPowerSourceConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceValidUsbTerminalTypeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type DeviceVirtual = {\r\n\torigin: Maybe;\r\n\tvirtual: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type DeviceVirtualAcousticBoundary = {\r\n\tenabled: Scalars['Boolean']['output'];\r\n\tsensitivity: Scalars['Int']['output'];\r\n};\r\n\r\nexport type DeviceVirtualAcousticBoundaryChange = {\r\n\tvirtualAcousticBoundary: Maybe;\r\n};\r\n\r\nexport type DeviceVirtualAcousticBoundaryConstraints = {\r\n\tsensitivity: Maybe;\r\n};\r\n\r\nexport type DeviceVirtualAcousticBoundarySensitivityConstraints = IIntRangeConstraints & {\r\n\t/** Describes the range of values for sensitivity */\r\n\trange: IntRange;\r\n};\r\n\r\nexport type DeviceVirtualAcousticBoundaryUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tsensitivity?: InputMaybe;\r\n};\r\n\r\nexport type DeviceWebService = {\r\n\tdeviceRestApi: Maybe;\r\n\tenabled: Scalars['Boolean']['output'];\r\n\tport: Scalars['Int']['output'];\r\n};\r\n\r\nexport type DeviceWebServiceChange = {\r\n\twebService: Maybe;\r\n};\r\n\r\nexport type DeviceWebServiceConstraints = {\r\n\tdeviceRestApi: FieldSupport;\r\n};\r\n\r\nexport type DeviceWebServiceUpdateInput = {\r\n\t/** When the Web Service is disabled, the device api services are also disabled */\r\n\tdeviceRestApi?: InputMaybe;\r\n\tenabled?: InputMaybe;\r\n};\r\n\r\nexport type DevicesConnection = {\r\n\tedges: Array;\r\n\tpageInfo: PageInfo;\r\n};\r\n\r\nexport enum DirectOutputTapPoint {\r\n\t/** Sends a signal with automixer gating, AEC, and noise reduction, but without AGC, to the matrix mixer. */\r\n\tPostProcessingPostGate = 'POST_PROCESSING_POST_GATE',\r\n\t/** Sends a signal with AEC and noise reduction, but without automixer gating or AGC, to the matrix mixer. */\r\n\tPostProcessingPreGate = 'POST_PROCESSING_PRE_GATE',\r\n\t/** Sends a signal with automixer gating, but without AEC, noise reduction, or AGC, to the matrix mixer. */\r\n\tPreProcessingPostGate = 'PRE_PROCESSING_POST_GATE',\r\n\t/** Sends a signal without AEC, noise reduction, or AGC to the matrix mixer. */\r\n\tPreProcessingPreGate = 'PRE_PROCESSING_PRE_GATE'\r\n}\r\n\r\nexport enum DisassociationStatus {\r\n\t/** Access point is not discoverable */\r\n\tAccessPointDeviceNotFound = 'ACCESS_POINT_DEVICE_NOT_FOUND',\r\n\t/** Charger device is not discoverable */\r\n\tChargerDeviceNotFound = 'CHARGER_DEVICE_NOT_FOUND',\r\n\t/** Failed to disassociate RF Channel and Charger Bay */\r\n\tFailure = 'FAILURE',\r\n\t/** Input node id(s) provided in association request is not valid */\r\n\tInvalidInput = 'INVALID_INPUT',\r\n\t/** Provided input device(s) either does not support association feature or not a valid input for this operation */\r\n\tInvalidOperation = 'INVALID_OPERATION',\r\n\t/** Association is cleared successfully on Charger Bay */\r\n\tPartialSuccessChargerBay = 'PARTIAL_SUCCESS_CHARGER_BAY',\r\n\t/** Association is cleared successfully on RF Channel */\r\n\tPartialSuccessRfChannel = 'PARTIAL_SUCCESS_RF_CHANNEL',\r\n\t/** Successfully disassociated RF Channel and Charger Bay */\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport type DiscoveredDevicesEvent = DeviceAdded | DeviceRemoved;\r\n\r\nexport type DiscoveredDevicesStatusChange = {\r\n\tdevice: Device;\r\n};\r\n\r\nexport type DiscoveredRoomEvent = RoomAddedEvent | RoomRemovedEvent;\r\n\r\nexport type DmpCommunicationProtocol = {\r\n\tipAddress: Scalars['IpAddress']['output'];\r\n};\r\n\r\nexport type DoubleStuffProxiedTransmitter = {\r\n\tbatteryLevelPercentage: Maybe;\r\n\tmuted: Maybe;\r\n\tname: Scalars['String']['output'];\r\n\tonline: Scalars['Boolean']['output'];\r\n\tstatus: Maybe;\r\n};\r\n\r\nexport enum DoubleStuffProxiedTransmitterStatus {\r\n\tActive = 'ACTIVE',\r\n\tCharging = 'CHARGING',\r\n\tUnknown = 'UNKNOWN'\r\n}\r\n\r\nexport type DurationRange = {\r\n\tmax: Scalars['Duration']['output'];\r\n\tmin: Scalars['Duration']['output'];\r\n\tstep: Scalars['Duration']['output'];\r\n};\r\n\r\nexport enum EapMethod8021X {\r\n\tDisabled = 'DISABLED',\r\n\tEapMd5 = 'EAP_MD5',\r\n\tPeapGtc = 'PEAP_GTC',\r\n\tPeapMschapv2 = 'PEAP_MSCHAPV2',\r\n\tPwd = 'PWD',\r\n\tTls = 'TLS',\r\n\tTtlsGtc = 'TTLS_GTC',\r\n\tTtlsMd5 = 'TTLS_MD5',\r\n\tTtlsMschapv2 = 'TTLS_MSCHAPV2',\r\n\tTtlsPap = 'TTLS_PAP'\r\n}\r\n\r\nexport enum EqFilterType {\r\n\t/** Rolls off the audio signal above the selected frequency */\r\n\tHighCut = 'HIGH_CUT',\r\n\t/** Attenuates or boosts the audio signal above the selected frequency */\r\n\tHighShelf = 'HIGH_SHELF',\r\n\t/** Rolls off the audio signal below the selected frequency */\r\n\tLowCut = 'LOW_CUT',\r\n\t/** Attenuates or boost the audio signal below the selected frequency */\r\n\tLowShelf = 'LOW_SHELF',\r\n\t/** Attenuates or boost the audio signal within a customizable frequency range */\r\n\tParametric = 'PARAMETRIC'\r\n}\r\n\r\nexport enum EqualizerContour {\r\n\tHighPass = 'HIGH_PASS',\r\n\tHighPassAndPresenceBoost = 'HIGH_PASS_AND_PRESENCE_BOOST',\r\n\tHpf_75Hz = 'HPF_75_HZ',\r\n\tHpf_150Hz = 'HPF_150_HZ',\r\n\tLowShelf = 'LOW_SHELF',\r\n\tMultiBand = 'MULTI_BAND',\r\n\tOff = 'OFF',\r\n\tPresenceBoost = 'PRESENCE_BOOST'\r\n}\r\n\r\nexport type EqualizerEnabledConstraints = IFieldSupportInfo & {\r\n\tsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type EqualizerFilter = Fragment &\r\n\tNode & {\r\n\t\tdescription: EqualizerFilterDescription;\r\n\t\tfeatures: EqualizerFilterFeatures;\r\n\t\tfragmentId: Scalars['ID']['output'];\r\n\t\tid: Scalars['ID']['output'];\r\n\t};\r\n\r\nexport type EqualizerFilterBandwidth = {\r\n\t/** Range of frequencies affected by the filter */\r\n\tbandwidth: Fraction;\r\n};\r\n\r\nexport type EqualizerFilterBandwidthChange = {\r\n\tbandwidth: Maybe;\r\n};\r\n\r\nexport type EqualizerFilterBandwidthConstraint = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type EqualizerFilterBandwidthConstraints = {\r\n\tbandwidth: EqualizerFilterBandwidthConstraint;\r\n};\r\n\r\nexport type EqualizerFilterBandwidthUpdateInput = {\r\n\tdenominator: Scalars['Int']['input'];\r\n\tnumerator: Scalars['Int']['input'];\r\n};\r\n\r\nexport type EqualizerFilterChange = {\r\n\tfeatures: EqualizerFilterFeatureChange;\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type EqualizerFilterConfiguration = {\r\n\t/** Indicates whether or not the filter is enabled */\r\n\tenabled: Scalars['Boolean']['output'];\r\n\t/** Equalizer Filter type */\r\n\tfilterType: Maybe;\r\n};\r\n\r\nexport type EqualizerFilterConfigurationChange = {\r\n\tconfiguration: Maybe;\r\n};\r\n\r\nexport type EqualizerFilterConfigurationConstraints = {\r\n\tfilterType: Maybe;\r\n};\r\n\r\nexport type EqualizerFilterConfigurationUpdateInput = {\r\n\tenabled?: InputMaybe;\r\n\tfilterType?: InputMaybe;\r\n};\r\n\r\nexport type EqualizerFilterConstraints = {\r\n\tbandwidth: Maybe;\r\n\tconfiguration: Maybe;\r\n\tfrequency: Maybe;\r\n\tgain: Maybe;\r\n\tqFactor: Maybe;\r\n};\r\n\r\nexport type EqualizerFilterDescription = {\r\n\tconstraints: EqualizerFilterConstraints;\r\n\tfeatures: EqualizerFilterSupportedFeatures;\r\n};\r\n\r\nexport type EqualizerFilterFeatureChange =\r\n\t| EqualizerFilterBandwidthChange\r\n\t| EqualizerFilterConfigurationChange\r\n\t| EqualizerFilterFrequencyChange\r\n\t| EqualizerFilterGainChange\r\n\t| EqualizerFilterQFactorChange;\r\n\r\nexport type EqualizerFilterFeatureUpdateInput = {\r\n\tbandwidth?: InputMaybe;\r\n\tconfiguration?: InputMaybe;\r\n\tfrequency?: InputMaybe;\r\n\tgain?: InputMaybe;\r\n\tqFactor?: InputMaybe;\r\n};\r\n\r\nexport type EqualizerFilterFeatures = {\r\n\tbandwidth: Maybe;\r\n\tconfiguration: Maybe;\r\n\tfrequency: Maybe;\r\n\tgain: Maybe;\r\n\tqFactor: Maybe;\r\n};\r\n\r\nexport type EqualizerFilterFrequency = {\r\n\t/** Center frequency (Hz) */\r\n\tfrequency: Scalars['Float']['output'];\r\n};\r\n\r\nexport type EqualizerFilterFrequencyChange = {\r\n\tfrequency: Maybe;\r\n};\r\n\r\nexport type EqualizerFilterFrequencyConstraints = {\r\n\tfrequency: EqualizerFilterFrequencyFieldConstraints;\r\n};\r\n\r\nexport type EqualizerFilterFrequencyFieldConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type EqualizerFilterFrequencyUpdateInput = {\r\n\tfrequency?: InputMaybe;\r\n};\r\n\r\nexport type EqualizerFilterGain = {\r\n\t/** Gain applied to frequencies affected by the filter (dB) */\r\n\tgain: Scalars['Float']['output'];\r\n};\r\n\r\nexport type EqualizerFilterGainChange = {\r\n\tgain: Maybe;\r\n};\r\n\r\nexport type EqualizerFilterGainConstraints = {\r\n\tgain: EqualizerFilterGainFieldConstraints;\r\n};\r\n\r\nexport type EqualizerFilterGainFieldConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type EqualizerFilterGainUpdateInput = {\r\n\tgain?: InputMaybe;\r\n};\r\n\r\nexport type EqualizerFilterOperationResult = NodeOperationResult & {\r\n\tequalizerFilter: Maybe;\r\n\terror: Maybe;\r\n};\r\n\r\nexport type EqualizerFilterQFactor = {\r\n\t/** Range of frequencies affected by the filter, represented as a ratio of center frequency to bandwidth */\r\n\tqFactor: Scalars['Float']['output'];\r\n};\r\n\r\nexport type EqualizerFilterQFactorChange = {\r\n\tqFactor: Maybe;\r\n};\r\n\r\nexport type EqualizerFilterQFactorConstraints = {\r\n\tqFactor: QFactorConstraint;\r\n};\r\n\r\nexport type EqualizerFilterQFactorUpdateInput = {\r\n\tqFactor?: InputMaybe;\r\n};\r\n\r\nexport type EqualizerFilterSupportedFeatures = {\r\n\tbandwidth: FeatureSupport;\r\n\tconfiguration: FeatureSupport;\r\n\tfrequency: FeatureSupport;\r\n\tgain: FeatureSupport;\r\n\tqFactor: FeatureSupport;\r\n};\r\n\r\nexport type EqualizerFilterUpdateInput = {\r\n\tfeatures?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type EqualizerFilterValidQFactors = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type EqualizerFiltersConstraints = IFieldSupportInfo & {\r\n\tquery: Scalars['Boolean']['output'];\r\n\tsubscribe: Scalars['Boolean']['output'];\r\n\tsupported: Scalars['Boolean']['output'];\r\n\tupdateNodes: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport enum EqualizerPreset {\r\n\tAcoustic = 'ACOUSTIC',\r\n\tBand = 'BAND',\r\n\tFlat = 'FLAT',\r\n\tSinging = 'SINGING',\r\n\tSpeech = 'SPEECH'\r\n}\r\n\r\nexport type EqualizerToneConstraints = IFieldSupportInfo &\r\n\tINullableIntRangeConstraints & {\r\n\t\trange: Maybe;\r\n\t\tsupported: Scalars['Boolean']['output'];\r\n\t};\r\n\r\nexport enum ErrorCode {\r\n\tConflict = 'CONFLICT',\r\n\tDeviceNotFound = 'DEVICE_NOT_FOUND',\r\n\tDeviceUnauthenticated = 'DEVICE_UNAUTHENTICATED',\r\n\tInvalidInput = 'INVALID_INPUT',\r\n\tInvalidOperation = 'INVALID_OPERATION',\r\n\tNotImplemented = 'NOT_IMPLEMENTED',\r\n\tTimeoutExceeded = 'TIMEOUT_EXCEEDED',\r\n\tUnknown = 'UNKNOWN'\r\n}\r\n\r\nexport type EthernetConfig = {\r\n\tnetworkInterfaceId: Scalars['String']['input'];\r\n};\r\n\r\nexport enum EthernetPowerSourceType {\r\n\tPoe = 'POE',\r\n\tPoePlus = 'POE_PLUS',\r\n\tPoePlusPlus = 'POE_PLUS_PLUS',\r\n\tUnknown = 'UNKNOWN'\r\n}\r\n\r\nexport type EventLogExportResult = {\r\n\terror: Maybe;\r\n\t/** One or more lines of device events in a CSV formatted string */\r\n\teventLog: Maybe;\r\n};\r\n\r\nexport type FeatureSupport = {\r\n\tquery: Scalars['Boolean']['output'];\r\n\tsubscribe: Scalars['Boolean']['output'];\r\n\tsupported: Scalars['Boolean']['output'];\r\n\tsupportedMutations: Maybe>;\r\n\tsupportedSubscriptions: Maybe>;\r\n\tupdateNodes: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type FieldSupport = IFieldSupportInfo & {\r\n\tsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type FirmwarePackage = {\r\n\tdescription: Scalars['String']['output'];\r\n\tkey: Scalars['String']['output'];\r\n\treleaseDate: Scalars['String']['output'];\r\n\treleaseNotesUrl: Scalars['String']['output'];\r\n\tversion: Scalars['String']['output'];\r\n};\r\n\r\nexport type FirmwarePackageDownloadInput = {\r\n\tfirmwarePackageKey: Scalars['String']['input'];\r\n\tfirmwarePackageVersion: Scalars['String']['input'];\r\n};\r\n\r\nexport type FirmwarePackageDownloadProgress = Node & {\r\n\tid: Scalars['ID']['output'];\r\n\t/** The key of the firmware package being downloaded */\r\n\tkey: Scalars['String']['output'];\r\n\t/** A percentage that indicates the progress of the firmware package download */\r\n\tprogress: Scalars['Int']['output'];\r\n\t/** The current stage of the firmware package download */\r\n\tstage: FirmwarePackageDownloadStage | `${FirmwarePackageDownloadStage}`;\r\n\t/** The version of the firmware package being downloaded */\r\n\tversion: Scalars['String']['output'];\r\n};\r\n\r\nexport type FirmwarePackageDownloadRequestProgress = Node & {\r\n\tid: Scalars['ID']['output'];\r\n\t/** The progress for each package in the firmware package download request */\r\n\tpackages: Array;\r\n\t/** A percentage that indicates the overall progress of the firmware package download request */\r\n\tprogress: Scalars['Int']['output'];\r\n\t/** A unique identifier for the firmware package download request */\r\n\trequestId: Scalars['Guid']['output'];\r\n\t/** The current state of the firmware package download request */\r\n\tstate: FirmwarePackageDownloadRequestState | `${FirmwarePackageDownloadRequestState}`;\r\n};\r\n\r\nexport enum FirmwarePackageDownloadRequestState {\r\n\tCanceled = 'CANCELED',\r\n\tFailed = 'FAILED',\r\n\tInProgress = 'IN_PROGRESS',\r\n\tPending = 'PENDING',\r\n\tSuccessful = 'SUCCESSFUL'\r\n}\r\n\r\nexport enum FirmwarePackageDownloadStage {\r\n\tAlreadyDownloaded = 'ALREADY_DOWNLOADED',\r\n\tCanceled = 'CANCELED',\r\n\tComplete = 'COMPLETE',\r\n\tInvalidDestination = 'INVALID_DESTINATION',\r\n\tInvalidPackage = 'INVALID_PACKAGE',\r\n\tInvalidUrl = 'INVALID_URL',\r\n\tInProgress = 'IN_PROGRESS',\r\n\tNonSpecific = 'NON_SPECIFIC',\r\n\tNoConnection = 'NO_CONNECTION',\r\n\tPending = 'PENDING'\r\n}\r\n\r\nexport type FirmwarePackageServerStatus = {\r\n\tavailable: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type FirmwareUpdateCapabilityOutput = {\r\n\tdeviceId: Scalars['Guid']['output'];\r\n\thostedPackages: Array;\r\n\tprimaryPackages: Array;\r\n};\r\n\r\nexport type FirmwareUpdateProgress = Node & {\r\n\t/** The hardware ID of the updating device */\r\n\tdeviceId: Scalars['Guid']['output'];\r\n\t/** A percentage that indicates the overall progress of the firmware update */\r\n\tdeviceProgress: Scalars['Int']['output'];\r\n\t/** The key of the firmware package in use for the update */\r\n\tfirmwarePackageKey: Scalars['String']['output'];\r\n\t/** The version of the firmware package in use for the update */\r\n\tfirmwarePackageVersion: Scalars['String']['output'];\r\n\tid: Scalars['ID']['output'];\r\n\t/** The current stage of the firmware update */\r\n\tstage: FirmwareUpdateStage | `${FirmwareUpdateStage}`;\r\n\t/** A percentage that indicates the progress of the current stage */\r\n\tstageProgress: Scalars['Int']['output'];\r\n\t/** The current state of the firmware update */\r\n\tstatus: FirmwareUpdateStatus | `${FirmwareUpdateStatus}`;\r\n};\r\n\r\nexport type FirmwareUpdateRequestProgress = Node & {\r\n\t/** The progress for each device in the firmware update request */\r\n\tdevices: Array;\r\n\tid: Scalars['ID']['output'];\r\n\t/** A percentage that indicates the overall progress of the firmware update request */\r\n\tprogress: Scalars['Int']['output'];\r\n\t/** A unique identifier for the firmware update request */\r\n\trequestId: Scalars['Guid']['output'];\r\n\t/** The current state of the firmware update request */\r\n\tstate: FirmwareUpdateRequestState | `${FirmwareUpdateRequestState}`;\r\n};\r\n\r\nexport enum FirmwareUpdateRequestState {\r\n\t/** The firmware update request was canceled. */\r\n\tCanceled = 'CANCELED',\r\n\t/** The firmware update request failed. */\r\n\tFailed = 'FAILED',\r\n\t/** The firmware update request is in progress. */\r\n\tInProgress = 'IN_PROGRESS',\r\n\t/** The firmware update request was received, but has not started. */\r\n\tPending = 'PENDING',\r\n\t/** The firmware update request is complete. */\r\n\tSuccessful = 'SUCCESSFUL'\r\n}\r\n\r\nexport enum FirmwareUpdateStage {\r\n\t/** The firmware update was canceled. */\r\n\tCanceled = 'CANCELED',\r\n\t/** The firmware update is complete. */\r\n\tComplete = 'COMPLETE',\r\n\t/** The device is being reserved for a firmware update. */\r\n\tDeviceReserved = 'DEVICE_RESERVED',\r\n\t/** An error occurred during the firmware update. */\r\n\tError = 'ERROR',\r\n\t/** The device is available for a firmware update. */\r\n\tIdle = 'IDLE',\r\n\t/** The device is installing the firmware package. */\r\n\tInstalling = 'INSTALLING',\r\n\t/** The request to update the device was received, but has not started yet. */\r\n\tPending = 'PENDING',\r\n\t/** The firmware package is being validated by the device before installation. */\r\n\tPreInstallValidating = 'PRE_INSTALL_VALIDATING',\r\n\t/** The device is rebooting. */\r\n\tRebooting = 'REBOOTING',\r\n\t/** The firmware package is being transferred to the device. */\r\n\tTransferringFiles = 'TRANSFERRING_FILES',\r\n\t/** The device is verifying that the firmware package was installed correctly. */\r\n\tVerifying = 'VERIFYING'\r\n}\r\n\r\nexport enum FirmwareUpdateStatus {\r\n\t/** The device aborted the firmware update. */\r\n\tAborted = 'ABORTED',\r\n\t/** The firmware update was canceled. */\r\n\tCanceled = 'CANCELED',\r\n\t/** There was a connectivity issue. */\r\n\tConnectivityLoss = 'CONNECTIVITY_LOSS',\r\n\t/** The firmware package was corrupted locally or in transfer to the device. */\r\n\tCorruptPackage = 'CORRUPT_PACKAGE',\r\n\t/** The device is unavailable for a firmware update. */\r\n\tDeviceBusy = 'DEVICE_BUSY',\r\n\t/** The device cannot be found. */\r\n\tDeviceNotFound = 'DEVICE_NOT_FOUND',\r\n\tDeviceRejectedPackage = 'DEVICE_REJECTED_PACKAGE',\r\n\t/** An error occurred while transferring the firmware package to the device. */\r\n\tFileTransferError = 'FILE_TRANSFER_ERROR',\r\n\t/** An error occurred while the device was installing the firmware package. */\r\n\tInstallationError = 'INSTALLATION_ERROR',\r\n\t/** The device does not support the specified firmware package. */\r\n\tInvalidPackage = 'INVALID_PACKAGE',\r\n\t/** The firmware update is complete. */\r\n\tSuccess = 'SUCCESS',\r\n\t/** An unknown error occurred. */\r\n\tUnknownError = 'UNKNOWN_ERROR',\r\n\t/** An error occurred while the device was verifying the installation. */\r\n\tVerificationError = 'VERIFICATION_ERROR'\r\n}\r\n\r\nexport type FloatPosition = {\r\n\txPosition: Scalars['Float']['output'];\r\n\tyPosition: Scalars['Float']['output'];\r\n\tzPosition: Scalars['Float']['output'];\r\n};\r\n\r\nexport type FloatPositionRange = {\r\n\txPositionRange: FloatRange;\r\n\tyPositionRange: FloatRange;\r\n\tzPositionRange: FloatRange;\r\n};\r\n\r\nexport type FloatPositionRangeConstraints = {\r\n\trange: FloatPositionRange;\r\n};\r\n\r\nexport type FloatPositionUpdateInput = {\r\n\txPosition?: InputMaybe;\r\n\tyPosition?: InputMaybe;\r\n\tzPosition?: InputMaybe;\r\n};\r\n\r\nexport type FloatRange = {\r\n\tmax: Scalars['Float']['output'];\r\n\tmin: Scalars['Float']['output'];\r\n\tstep: Scalars['Float']['output'];\r\n};\r\n\r\nexport type FloatRangeConstraints = {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type Fraction = {\r\n\tdenominator: Scalars['Int']['output'];\r\n\tnumerator: Scalars['Int']['output'];\r\n};\r\n\r\nexport type Fragment = {\r\n\tfragmentId: Scalars['ID']['output'];\r\n};\r\n\r\nexport enum GlobalMicStatus {\r\n\tActive = 'ACTIVE',\r\n\tMute = 'MUTE',\r\n\tNonUniform = 'NON_UNIFORM',\r\n\tOff = 'OFF',\r\n\tStandby = 'STANDBY'\r\n}\r\n\r\nexport enum GlobalMicStatusInput {\r\n\tActive = 'ACTIVE',\r\n\tMute = 'MUTE',\r\n\tOff = 'OFF',\r\n\tStandby = 'STANDBY'\r\n}\r\n\r\nexport type GroupAssociationResult = {\r\n\toverallResult: GroupAssociationStatus | `${GroupAssociationStatus}`;\r\n\twarnings: Array;\r\n};\r\n\r\nexport enum GroupAssociationStatus {\r\n\tAllAssociationsUnsuccessful = 'ALL_ASSOCIATIONS_UNSUCCESSFUL',\r\n\tConflict = 'CONFLICT',\r\n\tDevicesUnavailable = 'DEVICES_UNAVAILABLE',\r\n\tFailure = 'FAILURE',\r\n\tIncompatibleDevice = 'INCOMPATIBLE_DEVICE',\r\n\tNoApplicableRoutesForStereoAecProcessor = 'NO_APPLICABLE_ROUTES_FOR_STEREO_AEC_PROCESSOR',\r\n\tSuccess = 'SUCCESS',\r\n\tSuccessWithWarnings = 'SUCCESS_WITH_WARNINGS',\r\n\tTimeout = 'TIMEOUT'\r\n}\r\n\r\nexport enum GroupAssociationWarning {\r\n\tAllNetworkAudioAssociationsUnsuccessful = 'ALL_NETWORK_AUDIO_ASSOCIATIONS_UNSUCCESSFUL',\r\n\tNonImxMixOutputsUsedToFitDevices = 'NON_IMX_MIX_OUTPUTS_USED_TO_FIT_DEVICES',\r\n\tNoApplicableRoutesForStereoAecProcessor = 'NO_APPLICABLE_ROUTES_FOR_STEREO_AEC_PROCESSOR',\r\n\tSomeNetworkAudioAssociationsUnsuccessful = 'SOME_NETWORK_AUDIO_ASSOCIATIONS_UNSUCCESSFUL',\r\n\tTooManyMicrophones = 'TOO_MANY_MICROPHONES',\r\n\tTooManyMicrophonesForStereoAecProcessor = 'TOO_MANY_MICROPHONES_FOR_STEREO_AEC_PROCESSOR',\r\n\tTooManyProcessors = 'TOO_MANY_PROCESSORS'\r\n}\r\n\r\nexport type GroupOptimizationResult = {\r\n\tdeviceOptimizationResults: Array;\r\n\toverallResult: GroupOptimizationStatus | `${GroupOptimizationStatus}`;\r\n};\r\n\r\nexport enum GroupOptimizationStatus {\r\n\tConflict = 'CONFLICT',\r\n\tDevicesUnavailable = 'DEVICES_UNAVAILABLE',\r\n\tFailure = 'FAILURE',\r\n\tNoDevicesToOptimize = 'NO_DEVICES_TO_OPTIMIZE',\r\n\tPartialSuccess = 'PARTIAL_SUCCESS',\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport type IDurationRangeConstraints = {\r\n\trange: DurationRange;\r\n};\r\n\r\nexport type IFieldSupportInfo = {\r\n\tsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type IFloatPositionRangeConstraints = {\r\n\trange: FloatPositionRange;\r\n};\r\n\r\nexport type IFloatRangeConstraints = {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type IIntRangeConstraints = {\r\n\trange: IntRange;\r\n};\r\n\r\nexport type INullableDurationRangeConstraints = {\r\n\trange: Maybe;\r\n};\r\n\r\nexport type INullableFloatPositionRangeConstraints = {\r\n\trange: Maybe;\r\n};\r\n\r\nexport type INullableFloatRangeConstraints = {\r\n\trange: Maybe;\r\n};\r\n\r\nexport type INullableIntRangeConstraints = {\r\n\trange: Maybe;\r\n};\r\n\r\nexport type IStringPatternRangeConstraints = {\r\n\tpattern: Maybe;\r\n};\r\n\r\nexport type IUtf8StringMaxBytesConstraints = {\r\n\tutf8MaxBytes: Maybe;\r\n};\r\n\r\nexport type InspectKeyringOperationResult = {\r\n\tdeviceIds: Array;\r\n\terror: Maybe;\r\n};\r\n\r\nexport type IntRange = {\r\n\tmax: Scalars['Int']['output'];\r\n\tmin: Scalars['Int']['output'];\r\n\tstep: Scalars['Int']['output'];\r\n};\r\n\r\nexport type IntRangeConstraints = {\r\n\trange: IntRange;\r\n};\r\n\r\nexport type InterfaceDetails = {\r\n\tcategory: Scalars['String']['output'];\r\n\tmodel: Maybe;\r\n\tversion: InterfaceVersion;\r\n};\r\n\r\nexport type InterfaceVersion = {\r\n\tbeta: Scalars['Boolean']['output'];\r\n\tinterfaceId: Scalars['Int']['output'];\r\n\tversion: Scalars['SemanticVersion']['output'];\r\n};\r\n\r\nexport enum IpMode {\r\n\tDhcp = 'DHCP',\r\n\tStatic = 'STATIC'\r\n}\r\n\r\nexport type KeyringInput = {\r\n\tid: Scalars['ID']['input'];\r\n\tpassphrase: Scalars['String']['input'];\r\n};\r\n\r\nexport type KeyringOperationResult = {\r\n\terror: Maybe;\r\n\tkeyring: Maybe;\r\n};\r\n\r\nexport enum LastAuthenticationStatus8021X {\r\n\tFailure = 'FAILURE',\r\n\tNeverAttempted = 'NEVER_ATTEMPTED',\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport enum LicenseActivationState {\r\n\tActivated = 'ACTIVATED',\r\n\tCanceled = 'CANCELED',\r\n\tHostMismatchError = 'HOST_MISMATCH_ERROR',\r\n\tInsufficientFailure = 'INSUFFICIENT_FAILURE',\r\n\tInternalError = 'INTERNAL_ERROR',\r\n\tInvalidConfigurationFailure = 'INVALID_CONFIGURATION_FAILURE',\r\n\tKeyNotfoundFailure = 'KEY_NOTFOUND_FAILURE',\r\n\tNetworkFailure = 'NETWORK_FAILURE',\r\n\tParameterError = 'PARAMETER_ERROR',\r\n\tPending = 'PENDING',\r\n\tPendingInsufficient = 'PENDING_INSUFFICIENT',\r\n\tPendingNetwork = 'PENDING_NETWORK'\r\n}\r\n\r\nexport enum LicenseCancelationState {\r\n\tCanceled = 'CANCELED',\r\n\tFailed = 'FAILED',\r\n\tInternalError = 'INTERNAL_ERROR',\r\n\tParameterError = 'PARAMETER_ERROR',\r\n\tPending = 'PENDING'\r\n}\r\n\r\nexport enum LicenseDeactivationState {\r\n\tDeactivated = 'DEACTIVATED',\r\n\tInternalError = 'INTERNAL_ERROR',\r\n\tNetworkFailure = 'NETWORK_FAILURE',\r\n\tParameterError = 'PARAMETER_ERROR',\r\n\tPending = 'PENDING'\r\n}\r\n\r\nexport enum LicenseState {\r\n\tClockwindback = 'CLOCKWINDBACK',\r\n\tExpired = 'EXPIRED',\r\n\tFailedActivationKeyError = 'FAILED_ACTIVATION_KEY_ERROR',\r\n\tGrace = 'GRACE',\r\n\tInternalError = 'INTERNAL_ERROR',\r\n\tPendingActivationInsufficient = 'PENDING_ACTIVATION_INSUFFICIENT',\r\n\tPendingActivationNetwork = 'PENDING_ACTIVATION_NETWORK',\r\n\tPendingActivationOffline = 'PENDING_ACTIVATION_OFFLINE',\r\n\tPendingDeactivation = 'PENDING_DEACTIVATION',\r\n\tPendingExpiration = 'PENDING_EXPIRATION',\r\n\tTampered = 'TAMPERED',\r\n\tValid = 'VALID'\r\n}\r\n\r\nexport enum LicenseStateV2 {\r\n\tClockwindback = 'CLOCKWINDBACK',\r\n\tExpired = 'EXPIRED',\r\n\tFailedActivationKeyError = 'FAILED_ACTIVATION_KEY_ERROR',\r\n\tGrace = 'GRACE',\r\n\tInternalError = 'INTERNAL_ERROR',\r\n\tPendingActivationInsufficient = 'PENDING_ACTIVATION_INSUFFICIENT',\r\n\tPendingActivationNetwork = 'PENDING_ACTIVATION_NETWORK',\r\n\tPendingActivationOffline = 'PENDING_ACTIVATION_OFFLINE',\r\n\tPendingDeactivation = 'PENDING_DEACTIVATION',\r\n\tPendingExpiration = 'PENDING_EXPIRATION',\r\n\tTampered = 'TAMPERED',\r\n\tValid = 'VALID'\r\n}\r\n\r\nexport enum LicenseType {\r\n\tDemo = 'DEMO',\r\n\tPaid = 'PAID',\r\n\tTrial = 'TRIAL'\r\n}\r\n\r\nexport enum LicenseTypeV2 {\r\n\tDemo = 'DEMO',\r\n\tPaid = 'PAID',\r\n\tTrial = 'TRIAL'\r\n}\r\n\r\nexport enum LightingColor {\r\n\tBlue = 'BLUE',\r\n\tCyan = 'CYAN',\r\n\tGold = 'GOLD',\r\n\tGreen = 'GREEN',\r\n\tLightPurple = 'LIGHT_PURPLE',\r\n\tOrange = 'ORANGE',\r\n\tOrchid = 'ORCHID',\r\n\tPink = 'PINK',\r\n\tPowderBlue = 'POWDER_BLUE',\r\n\tPurple = 'PURPLE',\r\n\tRed = 'RED',\r\n\tSkyBlue = 'SKY_BLUE',\r\n\tTurquoise = 'TURQUOISE',\r\n\tViolet = 'VIOLET',\r\n\tWhite = 'WHITE',\r\n\tYellow = 'YELLOW',\r\n\tYellowGreen = 'YELLOW_GREEN'\r\n}\r\n\r\nexport enum LightingMode {\r\n\tFlashing = 'FLASHING',\r\n\tOff = 'OFF',\r\n\tOn = 'ON'\r\n}\r\n\r\nexport enum LightingState {\r\n\tMuted = 'MUTED',\r\n\tUnmuted = 'UNMUTED'\r\n}\r\n\r\nexport enum LightingStyle {\r\n\tRing = 'RING',\r\n\tSegment = 'SEGMENT'\r\n}\r\n\r\nexport enum LinkingOperationResult {\r\n\t/** Device is not discoverable. */\r\n\tDeviceNotFound = 'DEVICE_NOT_FOUND',\r\n\t/** Failed to link RF channel(s) and transmitter(s) */\r\n\tFailure = 'FAILURE',\r\n\t/** Input node id(s) provided in linking request is not valid. */\r\n\tInvalidInput = 'INVALID_INPUT',\r\n\t/** Provided input devices either does not support linking feature or not a valid input for this operation. */\r\n\tInvalidOperation = 'INVALID_OPERATION',\r\n\t/** No transmitter is discovered for the charger bay. */\r\n\tNoTransmittersOnCharger = 'NO_TRANSMITTERS_ON_CHARGER',\r\n\t/** Successfully linked RF channel(s) and transmitter(s) */\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport enum LinkingStatus {\r\n\t/**\r\n\t * An unknown reason caused the failure.\r\n\t * This means the middleware receive a linking result that is not expected such as BAN_SECONDARY_MIC or INVALID_APT_CHANNEL\r\n\t */\r\n\tFailure = 'FAILURE',\r\n\t/** Linking failed due to audio protocol mismatch */\r\n\tFailureAudioProtocolMismatch = 'FAILURE_AUDIO_PROTOCOL_MISMATCH',\r\n\t/**\r\n\t * Linking failed due to mismatched access point/charger/transmitter firmware version\r\n\t * Major and minor version of firmware for devices should be matched to perform linking operation\r\n\t */\r\n\tFailureFirmwareVersionMismatch = 'FAILURE_FIRMWARE_VERSION_MISMATCH',\r\n\t/** Linking failed due to RF band mismatch */\r\n\tFailureRfBandMismatch = 'FAILURE_RF_BAND_MISMATCH',\r\n\t/** Successfully linked RF channel and transmitter */\r\n\tSuccess = 'SUCCESS',\r\n\t/** Failed to receive linking result within the timeout */\r\n\tTimeoutExceeded = 'TIMEOUT_EXCEEDED'\r\n}\r\n\r\nexport type LiveMeterColorConstraints = {\r\n\tcustomThemeLightColorGradient: LiveMeterCustomThemeLightColorGradientConstraints;\r\n\ttheme: ColorThemeConstraints;\r\n};\r\n\r\nexport type LiveMeterColorThemeInfo = {\r\n\tcustomThemeLightColorGradient: LiveMeterCustomThemeLightColorGradient;\r\n\ttheme: ColorTheme | `${ColorTheme}`;\r\n};\r\n\r\nexport type LiveMeterColorThemeInfoInput = {\r\n\tcustomThemeLightColorGradient?: InputMaybe;\r\n\ttheme?: InputMaybe;\r\n};\r\n\r\nexport type LiveMeterCustomThemeLightColorGradient = {\r\n\tcenterLightColor: RgbColorMix;\r\n\tclippingLightColor: RgbColorMix;\r\n\toutermostLightColor: RgbColorMix;\r\n};\r\n\r\nexport type LiveMeterCustomThemeLightColorGradientConstraints = {\r\n\tcenterLightColor: RgbColorMixConstraints;\r\n\tclippingLightColor: RgbColorMixConstraints;\r\n\toutermostLightColor: RgbColorMixConstraints;\r\n};\r\n\r\nexport type LiveMeterCustomThemeLightColorGradientInput = {\r\n\tcenterLightColor?: InputMaybe;\r\n\tclippingLightColor?: InputMaybe;\r\n\toutermostLightColor?: InputMaybe;\r\n};\r\n\r\nexport type LoadDeviceStateInput = {\r\n\tdevice: Scalars['ID']['input'];\r\n\tfilePath: Scalars['String']['input'];\r\n};\r\n\r\nexport type LoadDeviceStateResult = {\r\n\tdevice: Maybe;\r\n\terror: Maybe;\r\n\tfilePath: Maybe;\r\n};\r\n\r\nexport enum LoadPerDeviceStateResult {\r\n\tLoadFailed = 'LOAD_FAILED',\r\n\tLoadSuccess = 'LOAD_SUCCESS'\r\n}\r\n\r\nexport enum LobeWidth {\r\n\tMedium = 'MEDIUM',\r\n\tNarrow = 'NARROW',\r\n\tWide = 'WIDE'\r\n}\r\n\r\nexport type LobeWidthConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport enum Loudspeaker {\r\n\tGeneric = 'GENERIC',\r\n\tMxp_1 = 'MXP_1',\r\n\tMxp_3 = 'MXP_3',\r\n\tMxp_5 = 'MXP_5',\r\n\tMxp_6 = 'MXP_6'\r\n}\r\n\r\nexport type LoudspeakerConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type MeterChange = AudioChannelMeterChange | AudioCoverageAreaMeterChange | RfChannelMeterChange;\r\n\r\nexport enum MeterChangeType {\r\n\tAudioChannelAcousticEchoCancellationErle = 'AUDIO_CHANNEL_ACOUSTIC_ECHO_CANCELLATION_ERLE',\r\n\tAudioChannelAcousticEchoCancellationPeak = 'AUDIO_CHANNEL_ACOUSTIC_ECHO_CANCELLATION_PEAK',\r\n\tAudioChannelAcousticEchoCancellationRms = 'AUDIO_CHANNEL_ACOUSTIC_ECHO_CANCELLATION_RMS',\r\n\tAudioChannelActivity = 'AUDIO_CHANNEL_ACTIVITY',\r\n\tAudioChannelAutomaticGain = 'AUDIO_CHANNEL_AUTOMATIC_GAIN',\r\n\tAudioChannelAutomaticGainControlPeak = 'AUDIO_CHANNEL_AUTOMATIC_GAIN_CONTROL_PEAK',\r\n\tAudioChannelAutomaticGainControlRms = 'AUDIO_CHANNEL_AUTOMATIC_GAIN_CONTROL_RMS',\r\n\tAudioChannelAutomixerGate = 'AUDIO_CHANNEL_AUTOMIXER_GATE',\r\n\tAudioChannelAutomixerInputPeak = 'AUDIO_CHANNEL_AUTOMIXER_INPUT_PEAK',\r\n\tAudioChannelAutomixerInputRms = 'AUDIO_CHANNEL_AUTOMIXER_INPUT_RMS',\r\n\tAudioChannelAutomixGain = 'AUDIO_CHANNEL_AUTOMIX_GAIN',\r\n\tAudioChannelClip = 'AUDIO_CHANNEL_CLIP',\r\n\tAudioChannelCompressorEngaged = 'AUDIO_CHANNEL_COMPRESSOR_ENGAGED',\r\n\tAudioChannelDenoiserNoiseReduction = 'AUDIO_CHANNEL_DENOISER_NOISE_REDUCTION',\r\n\tAudioChannelLimiterEngaged = 'AUDIO_CHANNEL_LIMITER_ENGAGED',\r\n\tAudioChannelMatrixMixerInputPeak = 'AUDIO_CHANNEL_MATRIX_MIXER_INPUT_PEAK',\r\n\tAudioChannelMatrixMixerInputRms = 'AUDIO_CHANNEL_MATRIX_MIXER_INPUT_RMS',\r\n\tAudioChannelMatrixMixerOutputPeak = 'AUDIO_CHANNEL_MATRIX_MIXER_OUTPUT_PEAK',\r\n\tAudioChannelMatrixMixerOutputRms = 'AUDIO_CHANNEL_MATRIX_MIXER_OUTPUT_RMS',\r\n\tAudioChannelMatrixMixerStereoInputPeak = 'AUDIO_CHANNEL_MATRIX_MIXER_STEREO_INPUT_PEAK',\r\n\tAudioChannelMatrixMixerStereoInputRms = 'AUDIO_CHANNEL_MATRIX_MIXER_STEREO_INPUT_RMS',\r\n\tAudioChannelPeak = 'AUDIO_CHANNEL_PEAK',\r\n\tAudioChannelRms = 'AUDIO_CHANNEL_RMS',\r\n\tAudioChannelStereoPeak = 'AUDIO_CHANNEL_STEREO_PEAK',\r\n\tAudioChannelStereoRms = 'AUDIO_CHANNEL_STEREO_RMS',\r\n\tAudioCoverageAreaAutomixerGate = 'AUDIO_COVERAGE_AREA_AUTOMIXER_GATE',\r\n\tAudioCoverageAreaPeak = 'AUDIO_COVERAGE_AREA_PEAK',\r\n\tAudioCoverageAreaRms = 'AUDIO_COVERAGE_AREA_RMS',\r\n\tRfChannelActivity = 'RF_CHANNEL_ACTIVITY',\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\tRfChannelReceiveLevelAntA = 'RF_CHANNEL_RECEIVE_LEVEL_ANT_A',\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\tRfChannelReceiveLevelAntB = 'RF_CHANNEL_RECEIVE_LEVEL_ANT_B'\r\n}\r\n\r\nexport type MeterColorConstraints = {\r\n\tcustomThemeLightColor: RgbColorMixConstraints;\r\n\ttheme: ColorThemeConstraints;\r\n};\r\n\r\nexport type MeterColorThemeInfo = {\r\n\tcustomThemeLightColor: RgbColorMix;\r\n\ttheme: ColorTheme | `${ColorTheme}`;\r\n};\r\n\r\nexport type MeterColorThemeInfoInput = {\r\n\tcustomThemeLightColor?: InputMaybe;\r\n\ttheme?: InputMaybe;\r\n};\r\n\r\nexport enum MeteringMode {\r\n\tPostFader = 'POST_FADER',\r\n\tPreFader = 'PRE_FADER'\r\n}\r\n\r\nexport enum MicOptimizationMode {\r\n\tMxa310 = 'MXA310',\r\n\tMxa710 = 'MXA710',\r\n\tMxa901 = 'MXA901',\r\n\tMxa902 = 'MXA902',\r\n\tMxa910 = 'MXA910',\r\n\tMxa920 = 'MXA920',\r\n\tNormal = 'NORMAL'\r\n}\r\n\r\n/**\r\n * The microphone polar pattern determines how much audio signal is picked up from the direction from which the signal originates from.\r\n * RAW_MID_SIDE: Combines Cardioid and Bi-directional polar pattern. Refer to the following youtube video for more information on its usage: https://youtu.be/HXpHcO8RG1M\r\n */\r\nexport enum MicPolarPattern {\r\n\tBidirectional = 'BIDIRECTIONAL',\r\n\tCardioid = 'CARDIOID',\r\n\tHypercardioid = 'HYPERCARDIOID',\r\n\tOmnidirectional = 'OMNIDIRECTIONAL',\r\n\tRawMidSide = 'RAW_MID_SIDE',\r\n\tStereo = 'STEREO',\r\n\tSupercardioid = 'SUPERCARDIOID',\r\n\tToroid = 'TOROID'\r\n}\r\n\r\nexport enum MicStatus {\r\n\tActive = 'ACTIVE',\r\n\tMute = 'MUTE',\r\n\tOff = 'OFF',\r\n\tOnCharger = 'ON_CHARGER',\r\n\tOutOfRange = 'OUT_OF_RANGE',\r\n\tStandby = 'STANDBY',\r\n\tUnknown = 'UNKNOWN'\r\n}\r\n\r\nexport enum MicStatusInput {\r\n\tActive = 'ACTIVE',\r\n\tMute = 'MUTE',\r\n\tOff = 'OFF',\r\n\tStandby = 'STANDBY'\r\n}\r\n\r\nexport type MicrophoneAngle = {\r\n\tangle: Scalars['Int']['output'];\r\n};\r\n\r\nexport type Mutation = {\r\n\t/**\r\n\t * Activates a coverage area with the provided initial configuration.\r\n\t *\r\n\t * The coverage area CANNOT overlap with currently active coverage areas.\r\n\t *\r\n\t * The coverage area CANNOT be more than 25'(7620000μm) away from the center of the device.\r\n\t *\r\n\t * Dedicated coverage areas MUST have a fixed size of 6' x 6' (1828800μm x 1828800μm).\r\n\t */\r\n\tactivateAudioCoverageArea: AudioCoverageAreaOperationResult;\r\n\tactivateDeviceLicense: DeviceOperationResult;\r\n\taddDevicesToAudioMuteControlGroup: DeviceOperationResult;\r\n\taddDevicesToRoom: RoomOperationResult;\r\n\taddManualDeviceIps: OperationResult;\r\n\t/**\r\n\t * Requests to add one or more virtual devices\r\n\t *\r\n\t * Waits for the virtual device(s) to come online\r\n\t */\r\n\taddVirtualDevices: VirtualDeviceAdditionResult;\r\n\t/**\r\n\t * Requests to add one or more virtual devices\r\n\t *\r\n\t * Does not wait for the virtual device(s) to come online\r\n\t */\r\n\taddVirtualDevicesAsync: VirtualDeviceAdditionAsyncResult;\r\n\t/**\r\n\t * Requests to add one or more virtual devices from uploaded JSON state files\r\n\t *\r\n\t * Waits for the virtual device(s) to come online\r\n\t */\r\n\taddVirtualDevicesFromStateFileContents: VirtualDevicesAdditionFromStateFileContentsResult;\r\n\t/**\r\n\t * Requests to add one or more virtual devices from JSON state files\r\n\t *\r\n\t * Waits for the virtual device(s) to come online\r\n\t */\r\n\taddVirtualDevicesFromStateFilePaths: VirtualDevicesAdditionFromStateFilePathsResult;\r\n\t/**\r\n\t * Requests to add one or more virtual devices from JSON state files\r\n\t *\r\n\t * Does not wait for the virtual device(s) to come online\r\n\t */\r\n\taddVirtualDevicesFromStateFilePathsAsync: VirtualDeviceAdditionAsyncResult;\r\n\t/**\r\n\t * Requests to add one or more virtual devices from remote JSON state files\r\n\t *\r\n\t * Waits for the virtual device(s) to come online\r\n\t */\r\n\taddVirtualDevicesFromStateFileUris: VirtualDevicesAdditionFromStateFileUrisResult;\r\n\t/**\r\n\t * Associate an access point's RF channel and a charger's charger bay to *prepare for linking* a transmitter with an access point's RF channel.\r\n\t * Any existing prior association for the RF channel or the charger bay will be cleared before creating the requested association.\r\n\t */\r\n\tassociateAccessPointAndCharger: DeviceAssociationResult;\r\n\tauthenticate: Maybe;\r\n\tbypassInitialCredentials: Array;\r\n\tcancelFirmwareUpdate: OperationResult;\r\n\tcancelPendingActivationDeviceLicense: DeviceOperationResult;\r\n\tcancelRoomCloning: OperationResult;\r\n\t/**\r\n\t * Clear all existing association(s) on an access point's RF channel or a charger's charger bay.\r\n\t * 'disassociateAccessPointAndCharger()' should be used instead when the associated devices are online to confirm both device acknowledge the disassociation.\r\n\t */\r\n\tclearAllAssociations: DeviceOperationResult;\r\n\tclearAllDanteAudioRoutes: DeleteRouteOperationResult;\r\n\t/**\r\n\t * Clear a single association association(s) on an access point's RF channel or a charger's charger bay.\r\n\t * 'disassociateAccessPointAndCharger()' should be used instead when the associated devices are online to confirm both devices acknowledge the disassociation.\r\n\t */\r\n\tclearAssociation: ClearAssociationResult;\r\n\tclearAudioMuteControlGroup: DeviceOperationResult;\r\n\tclearLightErrors: DeviceOperationResult;\r\n\tclearManualDeviceIps: OperationResult;\r\n\tclearUserPreset: UserPresetOperationResult;\r\n\tconfigure8021x: DeviceOperationResult;\r\n\tcreateCredentials: Array;\r\n\tcreateDanteAudioRoute: CreateRouteOperationResult;\r\n\tcreateKeyring: KeyringOperationResult;\r\n\tcreateRoom: RoomOperationResult;\r\n\t/** Deactivates a coverage area. */\r\n\tdeactivateAudioCoverageArea: AudioCoverageAreaOperationResult;\r\n\tdeactivateDeviceLicense: DeviceOperationResult;\r\n\tdeleteDanteAudioRoute: DeleteRouteOperationResult;\r\n\tdeleteRoom: OperationResult;\r\n\tdisableDanteAudioEncryption: DeviceOperationResult;\r\n\t/**\r\n\t * Disassociate an access point's RF channel and a charger's charger bay. Both devices must be online for the disassociation to succeed.\r\n\t * Use clearAllAssociations() or clearAssociation() instead when one of the devices is offline.\r\n\t */\r\n\tdisassociateAccessPointAndCharger: DeviceDisassociationResult;\r\n\tdownloadFirmwarePackages: FirmwarePackageDownloadRequestProgress;\r\n\tenable8021x: DeviceOperationResult;\r\n\tenableDanteAudioEncryption: DeviceOperationResult;\r\n\texportDeviceEventLogs: EventLogExportResult;\r\n\texportUserPresetToFileContents: UserPresetExportToFileContentsOperationResult;\r\n\texportUserPresetToFilePath: UserPresetOperationResult;\r\n\timportUserPresetFromFileContents: UserPresetOperationResult;\r\n\timportUserPresetFromFilePath: UserPresetOperationResult;\r\n\tinspectKeyring: InspectKeyringOperationResult;\r\n\t/**\r\n\t * Link all transmitters docked on a charger to the associated access point RF channels(when deviceId is charger device Id)\r\n\t * or link all transmitters docked on chargers associated with an access point(when device is access point device Id).\r\n\t * All associations between access point's RF channel and charger's charger bay should be established before linking\r\n\t * id is charger device node Id or access point device node Id.\r\n\t * Note: Skipped linkings for all charger bays or all RF channels will return SUCCESS with null details\r\n\t */\r\n\tlinkAllTransmitters: DeviceGroupLinkingResult;\r\n\t/**\r\n\t * Link single transmitter on a charger to access point's RF channel remotely.\r\n\t * This mutation will link the transmitter on a charger to access point's RF channel without association.\r\n\t * Previously linked transmitter information will be lost if you link a different transmitter to the same RF channel.\r\n\t */\r\n\tlinkSingleTransmitter: DeviceSingleLinkingResult;\r\n\tloadDeviceStates: Array;\r\n\tloadUserPreset: UserPresetOperationResult;\r\n\trebootDevice: OperationResult;\r\n\t/** The refreshDeviceLicense mutation initiates a license refresh operation on the device. This operation involves communication between the device and ShureCloud. */\r\n\trefreshDeviceLicense: DeviceOperationResult;\r\n\t/** Requests to remove all virtual devices */\r\n\tremoveAllVirtualDevices: VirtualDeviceRemovalResult;\r\n\tremoveCredentials: Array;\r\n\tremoveDevicesFromAudioMuteControlGroup: DeviceOperationResult;\r\n\tremoveDevicesFromRoom: RoomOperationResult;\r\n\tremoveManualDeviceIps: OperationResult;\r\n\t/** Requests to remove one or more virtual devices */\r\n\tremoveVirtualDevices: VirtualDeviceRemovalResult;\r\n\treplaceManualDeviceIps: OperationResult;\r\n\t/**\r\n\t * Repositions a coverage area according to the provided coordinates.\r\n\t *\r\n\t * The coverage area CANNOT overlap with currently active coverage areas.\r\n\t *\r\n\t * The coverage area CANNOT be more than 25'(7620000μm) away from the center of the device.\r\n\t *\r\n\t * Dedicated coverage areas MUST have a fixed size of 6' x 6' (1828800μm x 1828800μm).\r\n\t */\r\n\trepositionAudioCoverageArea: AudioCoverageAreaOperationResult;\r\n\treset8021x: DeviceOperationResult;\r\n\tresetDevice: ResetDeviceResult;\r\n\tsaveDeviceStates: Array;\r\n\tsaveUserPreset: UserPresetOperationResult;\r\n\tstartAudioChannelAutoPositioning: AudioChannelOperationResult;\r\n\tstartAudioChannelIdentify: AudioChannelOperationResult;\r\n\tstartIdentify: DeviceOperationResult;\r\n\tstopAudioChannelAutoPositioning: AudioChannelOperationResult;\r\n\tstopAudioChannelIdentify: AudioChannelOperationResult;\r\n\tstopIdentify: DeviceOperationResult;\r\n\t/** Synchronize Shure device/channel names to audio network device/channel names on the device */\r\n\tsynchronizeAudioNetworkNamesOnDevice: NameSyncOperationResult;\r\n\t/**\r\n\t * Unlink all transmitters via charger device or access point device.\r\n\t * This mutation will unlink all transmitters docked on a charger(when deviceId is charger device Id)\r\n\t * or unlink all transmitters linked to access point(when deviceId is access point device Id).\r\n\t * id can be charger device node Id or access point node Id.\r\n\t * Note: Skipped unlinkings for all charger bays or all RF channels will return SUCCESS with null details\r\n\t */\r\n\tunlinkAllTransmitters: DeviceGroupUnlinkingResult;\r\n\t/**\r\n\t * Unlink single transmitter via charger bay or RF channel.\r\n\t * This mutation will unlink the transmitter docked on a charger(when id is charger bay node Id)\r\n\t * or unlink the transmitter linked to access point's RF channel(when id is RF channel node Id).\r\n\t * id can be charger bay node Id or RF channel node Id.\r\n\t */\r\n\tunlinkSingleTransmitter: DeviceSingleUnlinkingResult;\r\n\tupdateAcousticEchoCancellationMonoReferenceSource: AudioChannelOperationResult;\r\n\tupdateAcousticEchoCancellationStereoReferenceSource: AudioChannelOperationResult;\r\n\tupdateAudioChannelCount: DeviceOperationResult;\r\n\tupdateAudioNetwork: OperationResult;\r\n\tupdateAudioNetworkInterface: OperationResult;\r\n\tupdateAutomixSourceSelector: AudioChannelOperationResult;\r\n\tupdateControlNetwork: OperationResult;\r\n\tupdateControlNetworkInterface: OperationResult;\r\n\tupdateCredentials: Array;\r\n\tupdateDeviceLightingBrightness: DeviceOperationResult;\r\n\t/** The updateDevicePropery mutation is not-supported and is only used for internal purposes */\r\n\tupdateDeviceProperty: Scalars['Boolean']['output'];\r\n\tupdateDiscovery: OperationResult;\r\n\tupdateFirmware: FirmwareUpdateRequestProgress;\r\n\tupdateGlobalMicStatus: DeviceOperationResult;\r\n\tupdateKeyring: KeyringOperationResult;\r\n\t/**\r\n\t * Update one or more nodes simultaneously by patching their current state(s) with new state(s).\r\n\t *\r\n\t * If one or more nodes provided correspond to devices which support the 'authentication' capability, and have authentication enabled,\r\n\t * a keyring must be provided to authorize the update for the nodes on those devices.\r\n\t */\r\n\tupdateNodes: Array;\r\n\tupdateRoom: RoomOperationResult;\r\n\tupdateUserPresetName: UserPresetOperationResult;\r\n\tvalidateCertificate8021X: Certificate8021XValidationResult;\r\n\tverifyCredentials: Array;\r\n};\r\n\r\nexport type MutationActivateAudioCoverageAreaArgs = {\r\n\tcoordinates: RectangularCoordinatesInput;\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n\ttype: AudioCoverageAreaType;\r\n};\r\n\r\nexport type MutationActivateDeviceLicenseArgs = {\r\n\tinput: ActivateLicenseInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationAddDevicesToAudioMuteControlGroupArgs = {\r\n\tdevices: Array;\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationAddDevicesToRoomArgs = {\r\n\tdevices: Array;\r\n\tkeyring: InputMaybe;\r\n\troom: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationAddManualDeviceIpsArgs = {\r\n\tinput: DeviceIpsInput;\r\n};\r\n\r\nexport type MutationAddVirtualDevicesArgs = {\r\n\tinput: VirtualDeviceAdditionInput;\r\n};\r\n\r\nexport type MutationAddVirtualDevicesAsyncArgs = {\r\n\tinput: VirtualDeviceAdditionInput;\r\n};\r\n\r\nexport type MutationAddVirtualDevicesFromStateFileContentsArgs = {\r\n\tinput: Array;\r\n};\r\n\r\nexport type MutationAddVirtualDevicesFromStateFilePathsArgs = {\r\n\tinput: Array;\r\n};\r\n\r\nexport type MutationAddVirtualDevicesFromStateFilePathsAsyncArgs = {\r\n\tinput: Array;\r\n};\r\n\r\nexport type MutationAddVirtualDevicesFromStateFileUrisArgs = {\r\n\tinput: Array;\r\n};\r\n\r\nexport type MutationAssociateAccessPointAndChargerArgs = {\r\n\tinput: DeviceAssociationInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationAuthenticateArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: Scalars['String']['input'];\r\n};\r\n\r\nexport type MutationBypassInitialCredentialsArgs = {\r\n\tinputs: Array;\r\n};\r\n\r\nexport type MutationCancelFirmwareUpdateArgs = {\r\n\trequestId: Scalars['Guid']['input'];\r\n};\r\n\r\nexport type MutationCancelPendingActivationDeviceLicenseArgs = {\r\n\tinput: CancelPendingActivationLicenseInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationCancelRoomCloningArgs = {\r\n\tcloneRoomId: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationClearAllAssociationsArgs = {\r\n\tdeviceId: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationClearAllDanteAudioRoutesArgs = {\r\n\tkeyring: InputMaybe;\r\n\treceiveDevice: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationClearAssociationArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationClearAudioMuteControlGroupArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationClearLightErrorsArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationClearUserPresetArgs = {\r\n\tkeyring: InputMaybe;\r\n\tpresetId: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationConfigure8021xArgs = {\r\n\tconfig: ConfigInput8021X;\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationCreateCredentialsArgs = {\r\n\tinputs: Array;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationCreateDanteAudioRouteArgs = {\r\n\tkeyring: InputMaybe;\r\n\treceiveChannel: Scalars['ID']['input'];\r\n\ttransmitChannel: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationCreateKeyringArgs = {\r\n\tinput: Array;\r\n};\r\n\r\nexport type MutationCreateRoomArgs = {\r\n\tinput: CreateRoomInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationDeactivateAudioCoverageAreaArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationDeactivateDeviceLicenseArgs = {\r\n\tinput: DeactivateLicenseInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationDeleteDanteAudioRouteArgs = {\r\n\tkeyring: InputMaybe;\r\n\treceiveChannel: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationDeleteRoomArgs = {\r\n\tkeyring: InputMaybe;\r\n\troom: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationDisableDanteAudioEncryptionArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationDisassociateAccessPointAndChargerArgs = {\r\n\tinput: DeviceDisassociationInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationDownloadFirmwarePackagesArgs = {\r\n\tpackages: Array;\r\n};\r\n\r\nexport type MutationEnable8021xArgs = {\r\n\tenable: Scalars['Boolean']['input'];\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n\trebootNow: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type MutationEnableDanteAudioEncryptionArgs = {\r\n\tinput: AudioEncryptionSettingsInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationExportDeviceEventLogsArgs = {\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationExportUserPresetToFileContentsArgs = {\r\n\tpresetId: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationExportUserPresetToFilePathArgs = {\r\n\tinput: PresetExportToFilePathInput;\r\n};\r\n\r\nexport type MutationImportUserPresetFromFileContentsArgs = {\r\n\tinput: PresetImportFromFileContentsInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationImportUserPresetFromFilePathArgs = {\r\n\tinput: PresetImportFromFilePathInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationInspectKeyringArgs = {\r\n\tkeyring: Scalars['String']['input'];\r\n};\r\n\r\nexport type MutationLinkAllTransmittersArgs = {\r\n\tdeviceId: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationLinkSingleTransmitterArgs = {\r\n\tinput: DeviceLinkingInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationLoadDeviceStatesArgs = {\r\n\tinput: Array;\r\n};\r\n\r\nexport type MutationLoadUserPresetArgs = {\r\n\tkeyring: InputMaybe;\r\n\tpresetId: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationRebootDeviceArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationRefreshDeviceLicenseArgs = {\r\n\tinput: RefreshDeviceLicenseInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationRemoveCredentialsArgs = {\r\n\tinputs: Array;\r\n\tkeyring: Scalars['String']['input'];\r\n};\r\n\r\nexport type MutationRemoveDevicesFromAudioMuteControlGroupArgs = {\r\n\tdevices: Array;\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationRemoveDevicesFromRoomArgs = {\r\n\tdevices: Array;\r\n\tkeyring: InputMaybe;\r\n\troom: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationRemoveManualDeviceIpsArgs = {\r\n\tinput: DeviceIpsInput;\r\n};\r\n\r\nexport type MutationRemoveVirtualDevicesArgs = {\r\n\tinput: VirtualDeviceRemovalInput;\r\n};\r\n\r\nexport type MutationReplaceManualDeviceIpsArgs = {\r\n\tinput: DeviceIpsInput;\r\n};\r\n\r\nexport type MutationRepositionAudioCoverageAreaArgs = {\r\n\tcoordinates: RectangularCoordinatesInput;\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationReset8021xArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n\trebootNow: Scalars['Boolean']['input'];\r\n};\r\n\r\nexport type MutationResetDeviceArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n\tscope: DeviceResetScope;\r\n};\r\n\r\nexport type MutationSaveDeviceStatesArgs = {\r\n\tinput: Array;\r\n};\r\n\r\nexport type MutationSaveUserPresetArgs = {\r\n\tkeyring: InputMaybe;\r\n\tpresetId: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationStartAudioChannelAutoPositioningArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationStartAudioChannelIdentifyArgs = {\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationStartIdentifyArgs = {\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationStopAudioChannelAutoPositioningArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationStopAudioChannelIdentifyArgs = {\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationStopIdentifyArgs = {\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type MutationSynchronizeAudioNetworkNamesOnDeviceArgs = {\r\n\tinput: AudioNetworkNameSyncInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUnlinkAllTransmittersArgs = {\r\n\tdeviceId: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUnlinkSingleTransmitterArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUpdateAcousticEchoCancellationMonoReferenceSourceArgs = {\r\n\tinput: AudioChannelAcousticEchoCancellationMonoReferenceInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUpdateAcousticEchoCancellationStereoReferenceSourceArgs = {\r\n\tinput: AudioChannelAcousticEchoCancellationStereoReferenceInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUpdateAudioChannelCountArgs = {\r\n\tinput: AudioChannelCountInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUpdateAudioNetworkArgs = {\r\n\tinput: UpdateAudioNetworkInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUpdateAudioNetworkInterfaceArgs = {\r\n\tinput: UpdateAudioNetworkInterfaceInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUpdateAutomixSourceSelectorArgs = {\r\n\tinput: AutomixSourceSelectorInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUpdateControlNetworkArgs = {\r\n\tinput: UpdateControlNetworkInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUpdateControlNetworkInterfaceArgs = {\r\n\tinput: UpdateControlNetworkInterfaceInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUpdateCredentialsArgs = {\r\n\tinputs: Array;\r\n\tkeyring: Scalars['String']['input'];\r\n};\r\n\r\nexport type MutationUpdateDeviceLightingBrightnessArgs = {\r\n\tinput: DeviceLightingBrightnessUpdateInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUpdateDevicePropertyArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tpropertyKey: Scalars['String']['input'];\r\n\tpropertyValue: Scalars['String']['input'];\r\n};\r\n\r\nexport type MutationUpdateDiscoveryArgs = {\r\n\tinput: SupportedProtocolsInput;\r\n};\r\n\r\nexport type MutationUpdateFirmwareArgs = {\r\n\tinput: Array;\r\n};\r\n\r\nexport type MutationUpdateGlobalMicStatusArgs = {\r\n\tinput: DeviceGlobalMicStatusUpdateInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUpdateKeyringArgs = {\r\n\tinput: Array;\r\n\tkeyring: Scalars['String']['input'];\r\n};\r\n\r\nexport type MutationUpdateNodesArgs = {\r\n\tkeyring: InputMaybe;\r\n\tupdates: Array;\r\n};\r\n\r\nexport type MutationUpdateRoomArgs = {\r\n\tinput: UpdateRoomInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationUpdateUserPresetNameArgs = {\r\n\tinput: PresetUpdateInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type MutationValidateCertificate8021XArgs = {\r\n\tcertificate: Scalars['String']['input'];\r\n};\r\n\r\nexport type MutationVerifyCredentialsArgs = {\r\n\tinputs: Array;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport enum MuteButtonMode {\r\n\tPushToMute = 'PUSH_TO_MUTE',\r\n\tPushToTalk = 'PUSH_TO_TALK',\r\n\tToggle = 'TOGGLE'\r\n}\r\n\r\nexport enum MuteControlFunction {\r\n\tDisabled = 'DISABLED',\r\n\tLocal = 'LOCAL',\r\n\tLogicOut = 'LOGIC_OUT'\r\n}\r\n\r\nexport type NameSyncOperationResult = {\r\n\terror: Maybe;\r\n\tresult: Maybe;\r\n};\r\n\r\nexport type NetworkInterface = {\r\n\tdescription: Scalars['String']['output'];\r\n\tgateway: Maybe;\r\n\t/** Example: Windows: (GUID) '{60B5DC8A-837A-44BC-B594-5027416EF5CC}', Unix: 'en0' */\r\n\tid: Scalars['String']['output'];\r\n\tipAddress: Scalars['IpAddress']['output'];\r\n\tmacAddress: Scalars['String']['output'];\r\n\t/**\r\n\t * Display name, or 'Friendly name', of network interface.\r\n\t * Example: Windows: 'Test Network', Mac: 'Thunderbolt Ethernet Slot 1'. Note: Will be copy of below 'id' field for Linux.\r\n\t */\r\n\tname: Scalars['String']['output'];\r\n\tsubnetMask: Scalars['IpAddress']['output'];\r\n};\r\n\r\nexport type NetworkInterfaceChange = {\r\n\tstatus: NetworkInterfaceStatus | `${NetworkInterfaceStatus}`;\r\n};\r\n\r\nexport type NetworkInterfaceInfo = {\r\n\tgateway: Maybe;\r\n\tipAddress: Maybe;\r\n\tipMode: IpMode | `${IpMode}`;\r\n\tmacAddress: Scalars['String']['output'];\r\n\tsubnetMask: Maybe;\r\n};\r\n\r\nexport enum NetworkInterfaceStatus {\r\n\tInterfaceDisabled = 'INTERFACE_DISABLED',\r\n\tInterfaceEnabled = 'INTERFACE_ENABLED',\r\n\tIpaddressChanged = 'IPADDRESS_CHANGED',\r\n\tNetmaskChanged = 'NETMASK_CHANGED',\r\n\tNotSet = 'NOT_SET'\r\n}\r\n\r\nexport enum NetworkMode {\r\n\tRedundant = 'REDUNDANT',\r\n\tSplit = 'SPLIT',\r\n\tSwitched = 'SWITCHED',\r\n\tUplink = 'UPLINK'\r\n}\r\n\r\nexport type Node = {\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type NodeChange =\r\n\t| AudioChannel\r\n\t| AudioChannelChange\r\n\t| AudioCoverageArea\r\n\t| AudioCoverageAreaChange\r\n\t| ChargerBay\r\n\t| ChargerBayChange\r\n\t| CrossPoint\r\n\t| CrossPointChange\r\n\t| Device\r\n\t| DeviceChange\r\n\t| DeviceStatusChange\r\n\t| EqualizerFilter\r\n\t| EqualizerFilterChange\r\n\t| FirmwarePackageDownloadProgress\r\n\t| FirmwarePackageDownloadRequestProgress\r\n\t| FirmwareUpdateProgress\r\n\t| FirmwareUpdateRequestProgress\r\n\t| RfChannel\r\n\t| RfChannelChange\r\n\t| Room\r\n\t| UserPreset\r\n\t| UserPresetChange;\r\n\r\nexport enum NodeChangeType {\r\n\tAudioChannelAcousticEchoCancellation = 'AUDIO_CHANNEL_ACOUSTIC_ECHO_CANCELLATION',\r\n\tAudioChannelAcousticEchoCancellationMonoReference = 'AUDIO_CHANNEL_ACOUSTIC_ECHO_CANCELLATION_MONO_REFERENCE',\r\n\tAudioChannelAcousticEchoCancellationStereoReference = 'AUDIO_CHANNEL_ACOUSTIC_ECHO_CANCELLATION_STEREO_REFERENCE',\r\n\tAudioChannelAnalogLevel = 'AUDIO_CHANNEL_ANALOG_LEVEL',\r\n\tAudioChannelAutomaticGainControl = 'AUDIO_CHANNEL_AUTOMATIC_GAIN_CONTROL',\r\n\tAudioChannelAutomixer = 'AUDIO_CHANNEL_AUTOMIXER',\r\n\tAudioChannelAutomixerInput = 'AUDIO_CHANNEL_AUTOMIXER_INPUT',\r\n\tAudioChannelAutomixerVoiceActivityDetection = 'AUDIO_CHANNEL_AUTOMIXER_VOICE_ACTIVITY_DETECTION',\r\n\tAudioChannelAutomixSourceSelector = 'AUDIO_CHANNEL_AUTOMIX_SOURCE_SELECTOR',\r\n\tAudioChannelAutoLevel = 'AUDIO_CHANNEL_AUTO_LEVEL',\r\n\tAudioChannelAutoMute = 'AUDIO_CHANNEL_AUTO_MUTE',\r\n\tAudioChannelAutoPosition = 'AUDIO_CHANNEL_AUTO_POSITION',\r\n\tAudioChannelChannelConfiguration = 'AUDIO_CHANNEL_CHANNEL_CONFIGURATION',\r\n\tAudioChannelCompressor = 'AUDIO_CHANNEL_COMPRESSOR',\r\n\tAudioChannelDanteEncryptionStatus = 'AUDIO_CHANNEL_DANTE_ENCRYPTION_STATUS',\r\n\tAudioChannelDanteRouteReceiver = 'AUDIO_CHANNEL_DANTE_ROUTE_RECEIVER',\r\n\tAudioChannelDanteRouteTransmitter = 'AUDIO_CHANNEL_DANTE_ROUTE_TRANSMITTER',\r\n\tAudioChannelDelay = 'AUDIO_CHANNEL_DELAY',\r\n\tAudioChannelDenoiser = 'AUDIO_CHANNEL_DENOISER',\r\n\tAudioChannelDeverb = 'AUDIO_CHANNEL_DEVERB',\r\n\tAudioChannelDeviceSpecificEqualizerContour = 'AUDIO_CHANNEL_DEVICE_SPECIFIC_EQUALIZER_CONTOUR',\r\n\tAudioChannelDirectOutputTapPoint = 'AUDIO_CHANNEL_DIRECT_OUTPUT_TAP_POINT',\r\n\tAudioChannelEqualizer = 'AUDIO_CHANNEL_EQUALIZER',\r\n\tAudioChannelEqualizerContour = 'AUDIO_CHANNEL_EQUALIZER_CONTOUR',\r\n\tAudioChannelEqualizerPreset = 'AUDIO_CHANNEL_EQUALIZER_PRESET',\r\n\tAudioChannelFaderGroup = 'AUDIO_CHANNEL_FADER_GROUP',\r\n\tAudioChannelGain = 'AUDIO_CHANNEL_GAIN',\r\n\tAudioChannelGainLock = 'AUDIO_CHANNEL_GAIN_LOCK',\r\n\tAudioChannelIdentify = 'AUDIO_CHANNEL_IDENTIFY',\r\n\tAudioChannelInputSource = 'AUDIO_CHANNEL_INPUT_SOURCE',\r\n\tAudioChannelLightingBehavior = 'AUDIO_CHANNEL_LIGHTING_BEHAVIOR',\r\n\tAudioChannelLimiter = 'AUDIO_CHANNEL_LIMITER',\r\n\tAudioChannelLobeConfiguration = 'AUDIO_CHANNEL_LOBE_CONFIGURATION',\r\n\tAudioChannelLobePosition = 'AUDIO_CHANNEL_LOBE_POSITION',\r\n\tAudioChannelLobeTalkerHeight = 'AUDIO_CHANNEL_LOBE_TALKER_HEIGHT',\r\n\tAudioChannelLobeWidth = 'AUDIO_CHANNEL_LOBE_WIDTH',\r\n\tAudioChannelLogicReceiver = 'AUDIO_CHANNEL_LOGIC_RECEIVER',\r\n\tAudioChannelMicrophoneAngle = 'AUDIO_CHANNEL_MICROPHONE_ANGLE',\r\n\tAudioChannelMicOptimization = 'AUDIO_CHANNEL_MIC_OPTIMIZATION',\r\n\tAudioChannelMicPolarPattern = 'AUDIO_CHANNEL_MIC_POLAR_PATTERN',\r\n\tAudioChannelMonitorMix = 'AUDIO_CHANNEL_MONITOR_MIX',\r\n\tAudioChannelMonitorMixReverb = 'AUDIO_CHANNEL_MONITOR_MIX_REVERB',\r\n\tAudioChannelMute = 'AUDIO_CHANNEL_MUTE',\r\n\tAudioChannelMuteGroup = 'AUDIO_CHANNEL_MUTE_GROUP',\r\n\tAudioChannelMuteLock = 'AUDIO_CHANNEL_MUTE_LOCK',\r\n\tAudioChannelName = 'AUDIO_CHANNEL_NAME',\r\n\tAudioChannelNoiseReduction = 'AUDIO_CHANNEL_NOISE_REDUCTION',\r\n\tAudioChannelOutputPath = 'AUDIO_CHANNEL_OUTPUT_PATH',\r\n\tAudioChannelPcPeripheral = 'AUDIO_CHANNEL_PC_PERIPHERAL',\r\n\tAudioChannelPhantomPower = 'AUDIO_CHANNEL_PHANTOM_POWER',\r\n\tAudioChannelPlosiveReduction = 'AUDIO_CHANNEL_PLOSIVE_REDUCTION',\r\n\tAudioChannelPostGateGain = 'AUDIO_CHANNEL_POST_GATE_GAIN',\r\n\tAudioChannelPostGateMute = 'AUDIO_CHANNEL_POST_GATE_MUTE',\r\n\tAudioChannelPostGateSolo = 'AUDIO_CHANNEL_POST_GATE_SOLO',\r\n\tAudioChannelReverb = 'AUDIO_CHANNEL_REVERB',\r\n\tAudioChannelSelectedLoudspeaker = 'AUDIO_CHANNEL_SELECTED_LOUDSPEAKER',\r\n\tAudioChannelSignalGenerator = 'AUDIO_CHANNEL_SIGNAL_GENERATOR',\r\n\tAudioChannelSolo = 'AUDIO_CHANNEL_SOLO',\r\n\tAudioChannelStereoReverse = 'AUDIO_CHANNEL_STEREO_REVERSE',\r\n\tAudioChannelStereoWidth = 'AUDIO_CHANNEL_STEREO_WIDTH',\r\n\tAudioChannelTalkerHeight = 'AUDIO_CHANNEL_TALKER_HEIGHT',\r\n\tAudioCoverageAreaConfiguration = 'AUDIO_COVERAGE_AREA_CONFIGURATION',\r\n\tAudioCoverageAreaGain = 'AUDIO_COVERAGE_AREA_GAIN',\r\n\tAudioCoverageAreaMute = 'AUDIO_COVERAGE_AREA_MUTE',\r\n\tChargerBayAssociation = 'CHARGER_BAY_ASSOCIATION',\r\n\tChargerBayBatteryPresent = 'CHARGER_BAY_BATTERY_PRESENT',\r\n\t/** @deprecated Proof of concept of charger bay on device. Do not use. */\r\n\tChargerBayChargingMode = 'CHARGER_BAY_CHARGING_MODE',\r\n\tChargerBayDockedDevice = 'CHARGER_BAY_DOCKED_DEVICE',\r\n\tCrossPointConfiguration = 'CROSS_POINT_CONFIGURATION',\r\n\tCrossPointGain = 'CROSS_POINT_GAIN',\r\n\tDeviceActivePreset = 'DEVICE_ACTIVE_PRESET',\r\n\tDeviceAllEqualizersBypass = 'DEVICE_ALL_EQUALIZERS_BYPASS',\r\n\tDeviceAllIntellimixBypass = 'DEVICE_ALL_INTELLIMIX_BYPASS',\r\n\tDeviceAnalogAudioOutputMode = 'DEVICE_ANALOG_AUDIO_OUTPUT_MODE',\r\n\tDeviceAnalogLogic = 'DEVICE_ANALOG_LOGIC',\r\n\tDeviceAnalogLogicPresetSwitch = 'DEVICE_ANALOG_LOGIC_PRESET_SWITCH',\r\n\tDeviceAnalogLogicPresetSwitchStatus = 'DEVICE_ANALOG_LOGIC_PRESET_SWITCH_STATUS',\r\n\tDeviceAudioAutoFocus = 'DEVICE_AUDIO_AUTO_FOCUS',\r\n\tDeviceAudioChannels = 'DEVICE_AUDIO_CHANNELS',\r\n\tDeviceAudioChannelCount = 'DEVICE_AUDIO_CHANNEL_COUNT',\r\n\tDeviceAudioMute = 'DEVICE_AUDIO_MUTE',\r\n\tDeviceAudioMuteControl = 'DEVICE_AUDIO_MUTE_CONTROL',\r\n\tDeviceAudioMuteControlGroup = 'DEVICE_AUDIO_MUTE_CONTROL_GROUP',\r\n\tDeviceAudioMuteDefault = 'DEVICE_AUDIO_MUTE_DEFAULT',\r\n\tDeviceAudioMuteLock = 'DEVICE_AUDIO_MUTE_LOCK',\r\n\tDeviceAudioNetworkInterface = 'DEVICE_AUDIO_NETWORK_INTERFACE',\r\n\tDeviceAuthentication = 'DEVICE_AUTHENTICATION',\r\n\tDeviceAutomixGainMetering = 'DEVICE_AUTOMIX_GAIN_METERING',\r\n\tDeviceAvailablePackages = 'DEVICE_AVAILABLE_PACKAGES',\r\n\tDeviceBatteryHealth = 'DEVICE_BATTERY_HEALTH',\r\n\tDeviceBatteryLevel = 'DEVICE_BATTERY_LEVEL',\r\n\tDeviceCallStatus = 'DEVICE_CALL_STATUS',\r\n\tDeviceCommandStringsService = 'DEVICE_COMMAND_STRINGS_SERVICE',\r\n\tDeviceConferencingOperationMode = 'DEVICE_CONFERENCING_OPERATION_MODE',\r\n\tDeviceConfigurationLock = 'DEVICE_CONFIGURATION_LOCK',\r\n\tDeviceConnectedDeviceLabel = 'DEVICE_CONNECTED_DEVICE_LABEL',\r\n\tDeviceControlNetworkInterface = 'DEVICE_CONTROL_NETWORK_INTERFACE',\r\n\tDeviceCoverageMode = 'DEVICE_COVERAGE_MODE',\r\n\tDeviceCoveragePosition = 'DEVICE_COVERAGE_POSITION',\r\n\tDeviceDanteAudioEncryption = 'DEVICE_DANTE_AUDIO_ENCRYPTION',\r\n\tDeviceDanteAudioNetwork = 'DEVICE_DANTE_AUDIO_NETWORK',\r\n\tDeviceDanteAudioNetworkAccess = 'DEVICE_DANTE_AUDIO_NETWORK_ACCESS',\r\n\tDeviceDeploymentCandidates = 'DEVICE_DEPLOYMENT_CANDIDATES',\r\n\t/** @deprecated For Cloud Managed Rooms Use Only. */\r\n\tDeviceDoubleStuffProxiedTransmitters = 'DEVICE_DOUBLE_STUFF_PROXIED_TRANSMITTERS',\r\n\tDeviceEqualizerContour = 'DEVICE_EQUALIZER_CONTOUR',\r\n\tDeviceEthernetLights = 'DEVICE_ETHERNET_LIGHTS',\r\n\tDeviceFirmwareUpdatePolicy = 'DEVICE_FIRMWARE_UPDATE_POLICY',\r\n\tDeviceGlobalMicStatus = 'DEVICE_GLOBAL_MIC_STATUS',\r\n\tDeviceHeight = 'DEVICE_HEIGHT',\r\n\tDeviceIdentify = 'DEVICE_IDENTIFY',\r\n\tDeviceLicense = 'DEVICE_LICENSE',\r\n\tDeviceLicenseV2 = 'DEVICE_LICENSE_V2',\r\n\tDeviceLightingAudioMeters = 'DEVICE_LIGHTING_AUDIO_METERS',\r\n\tDeviceLightingAudioMuteIndicatorOverride = 'DEVICE_LIGHTING_AUDIO_MUTE_INDICATOR_OVERRIDE',\r\n\tDeviceLightingAutomixGating = 'DEVICE_LIGHTING_AUTOMIX_GATING',\r\n\tDeviceLightingBehavior = 'DEVICE_LIGHTING_BEHAVIOR',\r\n\tDeviceLightingBrightness = 'DEVICE_LIGHTING_BRIGHTNESS',\r\n\tDeviceLightingLiveAudioMeters = 'DEVICE_LIGHTING_LIVE_AUDIO_METERS',\r\n\tDeviceLightingMuteBehavior = 'DEVICE_LIGHTING_MUTE_BEHAVIOR',\r\n\tDeviceLightingRing = 'DEVICE_LIGHTING_RING',\r\n\tDeviceLightingUnmuteBehavior = 'DEVICE_LIGHTING_UNMUTE_BEHAVIOR',\r\n\tDeviceLinkedAccessPoint = 'DEVICE_LINKED_ACCESS_POINT',\r\n\tDeviceListenerHeight = 'DEVICE_LISTENER_HEIGHT',\r\n\tDeviceLogicMute = 'DEVICE_LOGIC_MUTE',\r\n\tDeviceLogicReceiver = 'DEVICE_LOGIC_RECEIVER',\r\n\tDeviceLogicTransmitter = 'DEVICE_LOGIC_TRANSMITTER',\r\n\tDeviceLoudspeaker = 'DEVICE_LOUDSPEAKER',\r\n\tDeviceMdnsService = 'DEVICE_MDNS_SERVICE',\r\n\tDeviceMeteringModes = 'DEVICE_METERING_MODES',\r\n\tDeviceMicStatus = 'DEVICE_MIC_STATUS',\r\n\tDeviceName = 'DEVICE_NAME',\r\n\tDevicePlacement = 'DEVICE_PLACEMENT',\r\n\tDeviceProxiedDevices = 'DEVICE_PROXIED_DEVICES',\r\n\tDeviceRedundantAudioNetwork = 'DEVICE_REDUNDANT_AUDIO_NETWORK',\r\n\tDeviceRfDensityMode = 'DEVICE_RF_DENSITY_MODE',\r\n\tDeviceRfPower = 'DEVICE_RF_POWER',\r\n\tDeviceRoom = 'DEVICE_ROOM',\r\n\tDeviceRotation = 'DEVICE_ROTATION',\r\n\tDeviceRoutingPosition = 'DEVICE_ROUTING_POSITION',\r\n\tDeviceSecurity_8021X = 'DEVICE_SECURITY_8021X',\r\n\tDeviceStereoAudio = 'DEVICE_STEREO_AUDIO',\r\n\tDeviceSwitchConfiguration = 'DEVICE_SWITCH_CONFIGURATION',\r\n\tDeviceTransmitterIdentifyBehavior = 'DEVICE_TRANSMITTER_IDENTIFY_BEHAVIOR',\r\n\tDeviceTransmitterLightingBehavior = 'DEVICE_TRANSMITTER_LIGHTING_BEHAVIOR',\r\n\tDeviceTransmitterOutOfRangeBehavior = 'DEVICE_TRANSMITTER_OUT_OF_RANGE_BEHAVIOR',\r\n\tDeviceTransmitterRejoinBehavior = 'DEVICE_TRANSMITTER_REJOIN_BEHAVIOR',\r\n\tDeviceTransmitterSwitchBehavior = 'DEVICE_TRANSMITTER_SWITCH_BEHAVIOR',\r\n\tDeviceUpdateProgress = 'DEVICE_UPDATE_PROGRESS',\r\n\tDeviceUptime = 'DEVICE_UPTIME',\r\n\tDeviceUsbMuteSync = 'DEVICE_USB_MUTE_SYNC',\r\n\tDeviceUsbTerminalType = 'DEVICE_USB_TERMINAL_TYPE',\r\n\tDeviceUserPreset = 'DEVICE_USER_PRESET',\r\n\tDeviceVirtualAcousticBoundary = 'DEVICE_VIRTUAL_ACOUSTIC_BOUNDARY',\r\n\tDeviceWebService = 'DEVICE_WEB_SERVICE',\r\n\tEqualizerFilterBandwidth = 'EQUALIZER_FILTER_BANDWIDTH',\r\n\tEqualizerFilterConfiguration = 'EQUALIZER_FILTER_CONFIGURATION',\r\n\tEqualizerFilterFrequency = 'EQUALIZER_FILTER_FREQUENCY',\r\n\tEqualizerFilterGain = 'EQUALIZER_FILTER_GAIN',\r\n\tEqualizerFilterQFactor = 'EQUALIZER_FILTER_Q_FACTOR',\r\n\tFirmwarePackageDownloadProgress = 'FIRMWARE_PACKAGE_DOWNLOAD_PROGRESS',\r\n\tFirmwarePackageDownloadRequestProgress = 'FIRMWARE_PACKAGE_DOWNLOAD_REQUEST_PROGRESS',\r\n\tFirmwareUpdateProgress = 'FIRMWARE_UPDATE_PROGRESS',\r\n\tFirmwareUpdateRequestProgress = 'FIRMWARE_UPDATE_REQUEST_PROGRESS',\r\n\tRfChannelAssociation = 'RF_CHANNEL_ASSOCIATION',\r\n\tRfChannelLinkedTransmitter = 'RF_CHANNEL_LINKED_TRANSMITTER',\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\tRfChannelPrimaryGroupChanName = 'RF_CHANNEL_PRIMARY_GROUP_CHAN_NAME',\r\n\tRoom = 'ROOM',\r\n\tUserPreset = 'USER_PRESET'\r\n}\r\n\r\n/**\r\n * Result returned for an operation which may result in the associated device becoming inaccessible\r\n * (e.g. transitioning to DeviceState.OFFLINE)\r\n */\r\nexport type NodeOperationResult = {\r\n\terror: Maybe;\r\n};\r\n\r\nexport type NodeUpdateInput = {\r\n\taudioChannel?: InputMaybe;\r\n\taudioCoverageArea?: InputMaybe;\r\n\tcrossPoint?: InputMaybe;\r\n\tdevice?: InputMaybe;\r\n\tequalizerFilters?: InputMaybe;\r\n\trfChannel?: InputMaybe;\r\n};\r\n\r\nexport enum NoiseDetectionSensitivity {\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM',\r\n\tOff = 'OFF'\r\n}\r\n\r\nexport type NoiseDetectionSensitivityConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport enum NoiseReductionLevel {\r\n\tAuto = 'AUTO',\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM'\r\n}\r\n\r\nexport type NoiseReductionLevelConstraints = IFieldSupportInfo & {\r\n\toptions: Maybe>;\r\n\tsupported: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport enum NoiseRemovalLevel {\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM',\r\n\tOff = 'OFF'\r\n}\r\n\r\nexport type NoiseRemovalLevelConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport enum NonLinearProcessingLevel {\r\n\tAuto = 'AUTO',\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM'\r\n}\r\n\r\nexport type NonLinearProcessingLevelConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type OperatingSystem = {\r\n\tmanufacturer: Maybe;\r\n\tversion: Maybe;\r\n};\r\n\r\nexport type OperationError = {\r\n\tcode: ErrorCode | `${ErrorCode}`;\r\n\tmessage: Scalars['String']['output'];\r\n};\r\n\r\nexport type OperationResult = {\r\n\terror: Maybe;\r\n};\r\n\r\nexport enum OperationalStatus {\r\n\tDown = 'DOWN',\r\n\tUp = 'UP'\r\n}\r\n\r\nexport type OptimizeRoomInput = {\r\n\t/**\r\n\t * Indicates whether audio setting should be applied to room devices.\r\n\t * If not provided, true is assumed (audio settings will be applied to associated room devices).\r\n\t */\r\n\tadjustAudioSettings?: InputMaybe;\r\n\t/**\r\n\t * Indicates whether optimizing the room should happen even if one or more room devices are offline.\r\n\t * If not provided, false is assumed (room optimization would fail if one or more devices are offline).\r\n\t */\r\n\tallowUnavailableDevices?: InputMaybe;\r\n\t/**\r\n\t * Indicates whether mute synchronization should be enabled on processor while optimizaing room.\r\n\t * If not provided, true is assumed (mute synchronization will be enabled on the processor).\r\n\t */\r\n\tenableMuteSynchronization?: InputMaybe;\r\n};\r\n\r\nexport type OptimizeRoomProgress = OptimizeRoomProgressEvent | OptimizeRoomResult;\r\n\r\nexport type OptimizeRoomProgressEvent = {\r\n\troomOptimizationStage: RoomOptimizationStage | `${RoomOptimizationStage}`;\r\n};\r\n\r\nexport enum OptimizeRoomProgressType {\r\n\tOptimizeRoomProgress = 'OPTIMIZE_ROOM_PROGRESS',\r\n\tOptimizeRoomResult = 'OPTIMIZE_ROOM_RESULT'\r\n}\r\n\r\nexport type OptimizeRoomResult = {\r\n\tassociationResult: GroupAssociationResult;\r\n\toptimizationResult: GroupOptimizationResult;\r\n\tstatus: RoomOptimizationStatus | `${RoomOptimizationStatus}`;\r\n};\r\n\r\nexport type OriginDevice = {\r\n\tdevice: Maybe;\r\n\thardwareId: Scalars['Guid']['output'];\r\n};\r\n\r\nexport enum OutputSignalPath {\r\n\tPostDigitalSignalProcessing = 'POST_DIGITAL_SIGNAL_PROCESSING',\r\n\tPreDigitalSignalProcessing = 'PRE_DIGITAL_SIGNAL_PROCESSING'\r\n}\r\n\r\nexport type PageInfo = {\r\n\tendCursor: Scalars['String']['output'];\r\n\thasNextPage: Scalars['Boolean']['output'];\r\n\thasPreviousPage: Scalars['Boolean']['output'];\r\n\tstartCursor: Scalars['String']['output'];\r\n};\r\n\r\nexport type PcPeripheral = {\r\n\tid: Scalars['String']['output'];\r\n\tname: Scalars['String']['output'];\r\n\tstatus: PcPeripheralStatus | `${PcPeripheralStatus}`;\r\n};\r\n\r\nexport enum PcPeripheralStatus {\r\n\tAvailable = 'AVAILABLE',\r\n\tBegin = 'BEGIN',\r\n\tEnd = 'END',\r\n\tInProgress = 'IN_PROGRESS',\r\n\tNone = 'NONE',\r\n\tUnavailable = 'UNAVAILABLE'\r\n}\r\n\r\nexport type PendingVirtualDevice = {\r\n\tadvertisedInterface: InterfaceDetails;\r\n\tcompatibility: CompatibilityLevel | `${CompatibilityLevel}`;\r\n\tdescription: PendingVirtualDeviceDescription;\r\n\thardwareId: Scalars['Guid']['output'];\r\n\tid: Scalars['ID']['output'];\r\n\tinterface: InterfaceDetails;\r\n\tstatus: DeviceStatus | `${DeviceStatus}`;\r\n\tvirtual: Scalars['Boolean']['output'];\r\n};\r\n\r\nexport type PendingVirtualDeviceDescription = {\r\n\tinterface: InterfaceDetails;\r\n};\r\n\r\nexport type PhantomPowerConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport enum Placement {\r\n\tCeiling = 'CEILING',\r\n\tTable = 'TABLE',\r\n\tWallHorizontal = 'WALL_HORIZONTAL',\r\n\tWallVertical = 'WALL_VERTICAL'\r\n}\r\n\r\nexport type PowerSourceGainConstraints = {\r\n\tpoe: Maybe;\r\n\tpoePlus: FloatRangeConstraints;\r\n};\r\n\r\nexport type PresetExportToFilePathInput = {\r\n\t/**\r\n\t * Full file path, where preset file should be exported to, including file name;\r\n\t * file name is expected in path to ensure naming conventions, which might be different\r\n\t * for different clients, are satisfied\r\n\t */\r\n\tfilePath: Scalars['String']['input'];\r\n\t/** Preset Id to be exported */\r\n\tpresetId: Scalars['ID']['input'];\r\n};\r\n\r\n/** This input is intended for REST interface */\r\nexport type PresetImportFromFileContentsInput = {\r\n\t/** Full path to JSON preset file to be imported */\r\n\tfileContents: Scalars['Upload']['input'];\r\n\t/** Preset Id, to which imported preset should be applied */\r\n\tpresetId: Scalars['ID']['input'];\r\n};\r\n\r\nexport type PresetImportFromFilePathInput = {\r\n\t/** Provided path to a JSON preset file to be imported */\r\n\tfilePath: Scalars['String']['input'];\r\n\t/** Preset Id, to which imported preset should be applied */\r\n\tpresetId: Scalars['ID']['input'];\r\n};\r\n\r\nexport type PresetUpdateInput = {\r\n\tname: Scalars['String']['input'];\r\n\tpresetId: Scalars['ID']['input'];\r\n};\r\n\r\nexport type ProcessorInfo = {\r\n\tcores: Maybe;\r\n\tcpuSpeed: Maybe;\r\n\tlogicalProcessor: Maybe;\r\n\tprocessor: Maybe;\r\n};\r\n\r\nexport type ProductionDeviceIdentity = {\r\n\tcategory: Scalars['String']['input'];\r\n\tminVersions: Array;\r\n};\r\n\r\nexport type QFactorConstraint = EqualizerFilterValidQFactors | FloatRange;\r\n\r\nexport type Query = {\r\n\tavailableFirmwarePackages: Array;\r\n\tdeviceByAddress: Device;\r\n\tdeviceByHardwareId: Device;\r\n\tdeviceModels: Array;\r\n\t/** The deviceProperties query is not-supported and is only used for internal purposes */\r\n\tdeviceProperties: Array>;\r\n\tdevicesByHardwareId: Array>;\r\n\tdiscoveredDevices: Array;\r\n\tdiscoveredDevicesConnection: DevicesConnection;\r\n\tdiscoveredRooms: Array;\r\n\tfirmwarePackageDownloadProgress: FirmwarePackageDownloadRequestProgress;\r\n\tfirmwarePackageServerStatus: FirmwarePackageServerStatus;\r\n\tfirmwareUpdateProgress: FirmwareUpdateRequestProgress;\r\n\tfragmentByHardwareId: Fragment;\r\n\tmanualDeviceDiscoveryIps: Array;\r\n\tnetworkInterfaces: Array;\r\n\tnode: Node;\r\n\tnodes: Array>;\r\n\tself: Device;\r\n\tselfFragment: Fragment;\r\n};\r\n\r\nexport type QueryDeviceByAddressArgs = {\r\n\thost: Scalars['String']['input'];\r\n\tport: InputMaybe;\r\n};\r\n\r\nexport type QueryDeviceByHardwareIdArgs = {\r\n\thardwareId: Scalars['Guid']['input'];\r\n};\r\n\r\nexport type QueryDevicePropertiesArgs = {\r\n\tfilter: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type QueryDevicesByHardwareIdArgs = {\r\n\thardwareIds: Array;\r\n};\r\n\r\nexport type QueryDiscoveredDevicesConnectionArgs = {\r\n\tafter: InputMaybe;\r\n\tbefore: InputMaybe;\r\n\tdeviceModels: InputMaybe>;\r\n\tfirst: InputMaybe;\r\n\tlast: InputMaybe;\r\n};\r\n\r\nexport type QueryFirmwarePackageDownloadProgressArgs = {\r\n\trequestId: Scalars['String']['input'];\r\n};\r\n\r\nexport type QueryFirmwareUpdateProgressArgs = {\r\n\tupdateRequestId: Scalars['Guid']['input'];\r\n};\r\n\r\nexport type QueryFragmentByHardwareIdArgs = {\r\n\tfragmentId: Scalars['ID']['input'];\r\n\thardwareId: Scalars['Guid']['input'];\r\n};\r\n\r\nexport type QueryNodeArgs = {\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type QueryNodesArgs = {\r\n\tids: Array;\r\n};\r\n\r\nexport type QuerySelfFragmentArgs = {\r\n\tfragmentId: Scalars['ID']['input'];\r\n};\r\n\r\nexport type RectangularAreaConstraints = {\r\n\tdistance: RectangularAreaFieldConstraints;\r\n\theight: RectangularAreaFieldConstraints;\r\n\ttype: RectangularAreaTypeConstraints;\r\n\twidth: RectangularAreaFieldConstraints;\r\n};\r\n\r\nexport type RectangularAreaFieldConstraints = IFloatRangeConstraints & {\r\n\trange: FloatRange;\r\n};\r\n\r\nexport type RectangularAreaTypeConstraints = {\r\n\toptions: AudioCoverageAreaType | `${AudioCoverageAreaType}`;\r\n};\r\n\r\nexport type RectangularCoordinates = {\r\n\t/** Maximum x-coordinate of the rectangular bounds, in millimeter */\r\n\txMax: Scalars['Float']['output'];\r\n\t/** Minimum x-coordinate of the rectangular bounds, in millimeter */\r\n\txMin: Scalars['Float']['output'];\r\n\t/** Maximum y-coordinate of the rectangular bounds, in millimeter */\r\n\tyMax: Scalars['Float']['output'];\r\n\t/** Minimum y-coordinate of the rectangular bounds, in millimeter */\r\n\tyMin: Scalars['Float']['output'];\r\n};\r\n\r\nexport type RectangularCoordinatesInput = {\r\n\t/** Maximum x-coordinate of the rectangular bounds, in millimeters */\r\n\txMax: Scalars['Float']['input'];\r\n\t/** Minimum x-coordinate of the rectangular bounds, in millimeters */\r\n\txMin: Scalars['Float']['input'];\r\n\t/** Maximum y-coordinate of the rectangular bounds, in millimeters */\r\n\tyMax: Scalars['Float']['input'];\r\n\t/** Minimum y-coordinate of the rectangular bounds, in millimeters */\r\n\tyMin: Scalars['Float']['input'];\r\n};\r\n\r\nexport type RefreshDeviceLicenseInput = {\r\n\t/** The node ID of the device to refresh the license for. */\r\n\tid: Scalars['ID']['input'];\r\n\t/** The client-generated, uuid-formatted, correlation token to use for the license refresh operation. */\r\n\ttransactionId: Scalars['String']['input'];\r\n};\r\n\r\nexport type RemoveCredentialsInput = {\r\n\taccessLevel: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type ResetDeviceResult = DeviceOperationResult | OperationResult;\r\n\r\nexport enum ReverbType {\r\n\tHall = 'HALL',\r\n\tPlate = 'PLATE',\r\n\tStudio = 'STUDIO'\r\n}\r\n\r\nexport enum RfActivityLevel {\r\n\tAdequate = 'ADEQUATE',\r\n\tGood = 'GOOD',\r\n\tNone = 'NONE',\r\n\tOverload = 'OVERLOAD',\r\n\tPoor = 'POOR'\r\n}\r\n\r\nexport type RfChannel = Fragment &\r\n\tNode & {\r\n\t\tdescription: RfChannelDescription;\r\n\t\tfeatures: RfChannelFeatures;\r\n\t\tfragmentId: Scalars['ID']['output'];\r\n\t\tid: Scalars['ID']['output'];\r\n\t};\r\n\r\nexport type RfChannelActivityMeter = {\r\n\tlevel: RfActivityLevel | `${RfActivityLevel}`;\r\n};\r\n\r\nexport type RfChannelAssociatedCharger = {\r\n\tchargerBay: Maybe;\r\n\t/** device and chargerBay fields are null when there is an association established with a charger but the charger isn't discovered */\r\n\tdevice: Maybe;\r\n};\r\n\r\nexport type RfChannelAssociation = {\r\n\t/** associatedCharger field is null when there is no association established with a charger */\r\n\tassociatedCharger: Maybe;\r\n};\r\n\r\nexport type RfChannelAssociationChange = {\r\n\tassociation: Maybe;\r\n};\r\n\r\nexport type RfChannelChange = {\r\n\tfeatures: RfChannelFeatureChange;\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type RfChannelConstraints = {\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\tprimaryGroupChanName: Maybe;\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\treceiveLevelAntA: Maybe;\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\treceiveLevelAntB: Maybe;\r\n};\r\n\r\nexport type RfChannelDescription = {\r\n\tconstraints: RfChannelConstraints;\r\n\tfeatures: RfChannelSupportedFeatures;\r\n};\r\n\r\nexport type RfChannelFeatureChange =\r\n\t| RfChannelAssociationChange\r\n\t| RfChannelLinkedTransmitterChange\r\n\t| RfChannelPrimaryGroupChanNameChange;\r\n\r\nexport type RfChannelFeatureUpdateInput = {\r\n\tprimaryGroupChanName?: InputMaybe;\r\n};\r\n\r\nexport type RfChannelFeatures = {\r\n\tactivity: Maybe;\r\n\tassociation: Maybe;\r\n\tlinkedTransmitter: Maybe;\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\tprimaryGroupChanName: Maybe;\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\treceiveLevelAntA: Maybe;\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\treceiveLevelAntB: Maybe;\r\n};\r\n\r\nexport type RfChannelLinkage = {\r\n\t/** device field is null when there is a linkage established with a transmitter but the transmitter isn't discovered */\r\n\tdevice: Maybe;\r\n};\r\n\r\nexport type RfChannelLinkedTransmitter = {\r\n\t/** linkage field is null when there is no linkage established with a transmitter */\r\n\tlinkage: Maybe;\r\n};\r\n\r\nexport type RfChannelLinkedTransmitterChange = {\r\n\tlinkedTransmitter: Maybe;\r\n};\r\n\r\nexport type RfChannelMeterChange = {\r\n\tfeatures: Maybe;\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type RfChannelMeterFeatureChange = {\r\n\tactivity: Maybe;\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\treceiveLevelAntA: Maybe;\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\treceiveLevelAntB: Maybe;\r\n};\r\n\r\nexport type RfChannelOperationResult = NodeOperationResult & {\r\n\terror: Maybe;\r\n\trfChannel: Maybe;\r\n};\r\n\r\nexport type RfChannelPrimaryGroupChanName = {\r\n\t/** Primary group channel name */\r\n\tprimaryGroupChanName: Scalars['String']['output'];\r\n};\r\n\r\nexport type RfChannelPrimaryGroupChanNameChange = {\r\n\tprimaryGroupChanName: Maybe;\r\n};\r\n\r\nexport type RfChannelPrimaryGroupChanNameConstraints = {\r\n\t/** Regular expression that a primary group channel name must match */\r\n\tprimaryGroupChanNamePattern: Scalars['Regex']['output'];\r\n};\r\n\r\nexport type RfChannelPrimaryGroupChanNameUpdateInput = {\r\n\tprimaryGroupChanName: Scalars['String']['input'];\r\n};\r\n\r\nexport type RfChannelReceiveLevelAntAMeter = {\r\n\tlevel: Scalars['Int']['output'];\r\n};\r\n\r\nexport type RfChannelReceiveLevelAntAMeterConstraints = {\r\n\tlevel: IntRange;\r\n};\r\n\r\nexport type RfChannelReceiveLevelAntBMeter = {\r\n\tlevel: Scalars['Int']['output'];\r\n};\r\n\r\nexport type RfChannelReceiveLevelAntBMeterConstraints = {\r\n\tlevel: IntRange;\r\n};\r\n\r\nexport type RfChannelSupportedFeatures = {\r\n\tactivity: FeatureSupport;\r\n\tassociation: FeatureSupport;\r\n\tlinkedTransmitter: FeatureSupport;\r\n\tlinking: FeatureSupport;\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\tprimaryGroupChanName: FeatureSupport;\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\treceiveLevelAntA: FeatureSupport;\r\n\t/** @deprecated Proof of concept of RF channels on device. Do not use. */\r\n\treceiveLevelAntB: FeatureSupport;\r\n};\r\n\r\nexport type RfChannelUpdateInput = {\r\n\tfeatures?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum RfDensityMode {\r\n\tHigh = 'HIGH',\r\n\tStandard = 'STANDARD'\r\n}\r\n\r\nexport type RfDensityModeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport enum RfPower {\r\n\tHigh = 'HIGH',\r\n\tLow = 'LOW',\r\n\tMedium = 'MEDIUM',\r\n\tMediumHigh = 'MEDIUM_HIGH'\r\n}\r\n\r\nexport type RfPowerConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type RgbColorMix = {\r\n\tblue: Scalars['Int']['output'];\r\n\tgreen: Scalars['Int']['output'];\r\n\tred: Scalars['Int']['output'];\r\n};\r\n\r\nexport type RgbColorMixConstraints = {\r\n\tblue: RgbColorMixFieldConstraints;\r\n\tgreen: RgbColorMixFieldConstraints;\r\n\tred: RgbColorMixFieldConstraints;\r\n};\r\n\r\nexport type RgbColorMixFieldConstraints = IIntRangeConstraints & {\r\n\trange: IntRange;\r\n};\r\n\r\nexport type RgbColorMixInput = {\r\n\tblue: Scalars['Int']['input'];\r\n\tgreen: Scalars['Int']['input'];\r\n\tred: Scalars['Int']['input'];\r\n};\r\n\r\nexport type Room = Node & {\r\n\tconflict: Scalars['Boolean']['output'];\r\n\t/** Time Stamp when room is created */\r\n\tcreated: Scalars['DateTime']['output'];\r\n\tdescription: Scalars['String']['output'];\r\n\tdevices: Array;\r\n\tdimensions: Maybe;\r\n\t/**\r\n\t * When true, the room will be held when no devices belong to it.\r\n\t * When false, the room will be automatically deleted when no devices belong to it.\r\n\t */\r\n\thold: Scalars['Boolean']['output'];\r\n\tid: Scalars['ID']['output'];\r\n\t/** Basic information about the devices which are currently assigned to the room, but have not been discovered. */\r\n\tmissingDevices: Array>;\r\n\tname: Scalars['String']['output'];\r\n\troomId: Scalars['Guid']['output'];\r\n\t/** Time Stamp when room is modified for the last time */\r\n\tupdated: Scalars['DateTime']['output'];\r\n};\r\n\r\nexport type RoomAddedEvent = {\r\n\tadded: Room;\r\n};\r\n\r\nexport enum RoomCloningStrategy {\r\n\t/**\r\n\t * Cloned device has origin ID set to the ID of the device from which it is cloned\r\n\t * Cloning of virtual device with CLONE_AS_CHILD strategy would always result\r\n\t * in the clone with nill origin ID (identical to CLONE_AS_ORPHAN) due to the rule\r\n\t * of \"clone of a clone is pure virtual with no origin\"\r\n\t */\r\n\tCloneAsChild = 'CLONE_AS_CHILD',\r\n\t/**\r\n\t * Cloned device has no origin ID (null UUID)\r\n\t * Cloning of virtual device with CLONE_AS_CHILD strategy would always result\r\n\t * in the clone with nill origin ID (identical to CLONE_AS_ORPHAN)\r\n\t * due to the rule of \"clone of a clone is pure virtual with no origin\"\r\n\t */\r\n\tCloneAsOrphan = 'CLONE_AS_ORPHAN',\r\n\t/**\r\n\t * Cloned device has origin ID set to the origin ID of the original device\r\n\t * Notice that for real devices this will result in the same originId as in\r\n\t * CLONE_AS_CHILD strategy. Real devices have origin ID equal their ID\r\n\t */\r\n\tCloneAsSibling = 'CLONE_AS_SIBLING'\r\n}\r\n\r\nexport type RoomDeploymentInput = {\r\n\tdestinationRoom?: InputMaybe;\r\n\tdestinationRoomDescription?: InputMaybe;\r\n\tdestinationRoomName?: InputMaybe;\r\n\tdevices: Array;\r\n\tsourceRoom: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum RoomDeploymentOverallResult {\r\n\t/**\r\n\t * Room deployment failed, device deployment failed and no room placement was attempted\r\n\t * @deprecated Use the more specific failure modes instead\r\n\t */\r\n\tDeploymentFailed = 'DEPLOYMENT_FAILED',\r\n\t/** Room deployment succeeded, devices were deployed and placed into a room */\r\n\tDeploymentSuccess = 'DEPLOYMENT_SUCCESS',\r\n\t/** Failed at creating the destination room for the target devices */\r\n\tFailedCreatingDestinationRoom = 'FAILED_CREATING_DESTINATION_ROOM',\r\n\t/** Failed at deploying audio routes between devices in room */\r\n\tFailedDeployingAudioRoutes = 'FAILED_DEPLOYING_AUDIO_ROUTES',\r\n\t/** Failed at deploying control routes (i.e. mute routes) between devices in room */\r\n\tFailedDeployingControlRoutes = 'FAILED_DEPLOYING_CONTROL_ROUTES',\r\n\t/** Failed at deploying device state from sources to targets */\r\n\tFailedDeployingDeviceState = 'FAILED_DEPLOYING_DEVICE_STATE',\r\n\t/** Failed at cleaning up and validating the room deployment */\r\n\tFailedFinalizing = 'FAILED_FINALIZING',\r\n\t/** Failed at preparing the devices and rooms for room deployment */\r\n\tFailedPreparing = 'FAILED_PREPARING',\r\n\t/** Failed for unknown reasons */\r\n\tFailedUnknown = 'FAILED_UNKNOWN',\r\n\t/**\r\n\t * Room deployment failed, devices were successfully deployed, but could not be placed in a room\r\n\t * @deprecated Use the more specific failure modes instead\r\n\t */\r\n\tPlacementFailed = 'PLACEMENT_FAILED'\r\n}\r\n\r\nexport type RoomDeploymentProgress = RoomDeploymentProgressEvent | RoomDeploymentResult;\r\n\r\nexport type RoomDeploymentProgressEvent = {\r\n\t/** Overall progress of room deployment between 0 and 100 */\r\n\tprogressPercentage: Scalars['Int']['output'];\r\n\t/** The current deployment activity happening */\r\n\troomDeploymentStage: RoomDeploymentStage | `${RoomDeploymentStage}`;\r\n};\r\n\r\nexport enum RoomDeploymentProgressType {\r\n\tRoomDeploymentResult = 'ROOM_DEPLOYMENT_RESULT'\r\n}\r\n\r\nexport type RoomDeploymentResult = {\r\n\tdestinationRoom: Maybe;\r\n\tdeviceDeploymentResults: Array;\r\n\toverallResult: RoomDeploymentOverallResult | `${RoomDeploymentOverallResult}`;\r\n};\r\n\r\nexport enum RoomDeploymentStage {\r\n\t/** Creating the destination room for the target devices */\r\n\tCreatingDestinationRoom = 'CREATING_DESTINATION_ROOM',\r\n\t/** Deploying audio routes between devices in room */\r\n\tDeployingAudioRoutes = 'DEPLOYING_AUDIO_ROUTES',\r\n\t/** Deploying control routes (i.e. mute routes) between devices in room */\r\n\tDeployingControlRoutes = 'DEPLOYING_CONTROL_ROUTES',\r\n\t/** Deploying device state from sources to targets */\r\n\tDeployingDeviceState = 'DEPLOYING_DEVICE_STATE',\r\n\t/** Cleaning up and validating the room deployment */\r\n\tFinalizing = 'FINALIZING',\r\n\t/** The deployment request has been accepted and is pending execution */\r\n\tPending = 'PENDING',\r\n\t/** Preparing the devices and rooms for room deployment */\r\n\tPreparing = 'PREPARING'\r\n}\r\n\r\nexport type RoomDimensions = {\r\n\t/** height values are scaled to represent in millimeters (mm) */\r\n\theight: Scalars['Float']['output'];\r\n\t/** length values are scaled to represent in millimeters (mm) */\r\n\tlength: Scalars['Float']['output'];\r\n\t/** width values are scaled to represent in millimeters (mm) */\r\n\twidth: Scalars['Float']['output'];\r\n};\r\n\r\nexport type RoomDimensionsInput = {\r\n\t/** height values are scaled to represent in millimeters (mm) */\r\n\theight: Scalars['Float']['input'];\r\n\t/** length values are scaled to represent in millimeters (mm) */\r\n\tlength: Scalars['Float']['input'];\r\n\t/** width values are scaled to represent in millimeters (mm) */\r\n\twidth: Scalars['Float']['input'];\r\n};\r\n\r\n/** Basic information about devices which are assigned to a room */\r\nexport type RoomManifestDevice = Node & {\r\n\thardwareId: Scalars['Guid']['output'];\r\n\tid: Scalars['ID']['output'];\r\n\tmodel: Scalars['String']['output'];\r\n};\r\n\r\nexport type RoomOperationResult = NodeOperationResult & {\r\n\terror: Maybe;\r\n\troom: Maybe;\r\n};\r\n\r\nexport enum RoomOptimizationStage {\r\n\t/** Creating audio/control routes between devices */\r\n\tCreatingAssociations = 'CREATING_ASSOCIATIONS',\r\n\t/** Applying device settings for optimal audio */\r\n\tOptimizingDeviceSettings = 'OPTIMIZING_DEVICE_SETTINGS'\r\n}\r\n\r\nexport enum RoomOptimizationStatus {\r\n\tConflict = 'CONFLICT',\r\n\tDevicesUnavailable = 'DEVICES_UNAVAILABLE',\r\n\tFailure = 'FAILURE',\r\n\tIncompatibleDevice = 'INCOMPATIBLE_DEVICE',\r\n\tMissingMicrophone = 'MISSING_MICROPHONE',\r\n\tMissingProcessor = 'MISSING_PROCESSOR',\r\n\tPartialSuccess = 'PARTIAL_SUCCESS',\r\n\tSuccess = 'SUCCESS'\r\n}\r\n\r\nexport type RoomRemovedEvent = {\r\n\tremoved: Scalars['ID']['output'];\r\n};\r\n\r\nexport type SaveDeviceStateInput = {\r\n\tdevice: Scalars['ID']['input'];\r\n\tfilePath: Scalars['String']['input'];\r\n\toverwrite: Scalars['Boolean']['input'];\r\n\tsaveOption: SaveDeviceStateOption | `${SaveDeviceStateOption}`;\r\n};\r\n\r\nexport enum SaveDeviceStateOption {\r\n\tSaveAll = 'SAVE_ALL',\r\n\tSaveCacheOnly = 'SAVE_CACHE_ONLY'\r\n}\r\n\r\nexport type SaveDeviceStateResult = {\r\n\tdevice: Maybe;\r\n\terror: Maybe;\r\n\tfilePath: Maybe;\r\n\t/** @deprecated Use 'error' field instead to check for operation failure. */\r\n\tsaveResult: Maybe;\r\n};\r\n\r\nexport enum SavePerDeviceStateResult {\r\n\tSaveFailed = 'SAVE_FAILED',\r\n\tSaveSuccess = 'SAVE_SUCCESS'\r\n}\r\n\r\nexport type SignalGeneratorPowerSourceGainConstraints = {\r\n\tfrequency: FloatRangeConstraints;\r\n\tpowerSources: PowerSourceGainConstraints;\r\n};\r\n\r\nexport enum SignalType {\r\n\tPinkNoise = 'PINK_NOISE',\r\n\tSineWave = 'SINE_WAVE',\r\n\tSweep = 'SWEEP',\r\n\tWhiteNoise = 'WHITE_NOISE'\r\n}\r\n\r\nexport type SignalTypeConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport type StereoAudioChannel = Node & {\r\n\taudioChannelId: Scalars['ID']['output'];\r\n\tdescription: StereoAudioChannelDescription;\r\n\tfeatures: AudioChannelFeatures;\r\n\tfragmentId: Scalars['ID']['output'];\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type StereoAudioChannelDescription = {\r\n\tconstraints: AudioChannelConstraints;\r\n\tfeatures: AudioChannelSupportedFeatures;\r\n\tgroup: AudioChannelGroup | `${AudioChannelGroup}`;\r\n\trole: AudioChannelRole | `${AudioChannelRole}`;\r\n\tstereoAudioChannelSpatialSeparation: Maybe<\r\n\t\tStereoAudioChannelSpatialSeparation | `${StereoAudioChannelSpatialSeparation}`\r\n\t>;\r\n};\r\n\r\nexport enum StereoAudioChannelSpatialSeparation {\r\n\tLeft = 'LEFT',\r\n\tRight = 'RIGHT'\r\n}\r\n\r\nexport type Subscription = {\r\n\tavailableFirmwarePackages: Array;\r\n\tcloneRoomAsync: Maybe;\r\n\tdeployRoomAsync: RoomDeploymentProgress;\r\n\tdeviceFirmwareUpdateCapabilities: Array;\r\n\tdeviceLicenseActivationProgress: DeviceLicenseActivationProgress;\r\n\tdeviceLicenseCancelPendingActivationProgress: DeviceLicenseCancelPendingActivationProgress;\r\n\tdeviceLicenseDeactivationProgress: DeviceLicenseDeactivationProgress;\r\n\t/**\r\n\t * Emits events whenever a device is added under management (e.g. discovered for the first time as DeviceState.Discovered),\r\n\t * or whenever a device is removed from management (e.g. a physical device goes to DeviceState.Offline, a virtual device is deleted).\r\n\t */\r\n\tdiscoveredDevices: DiscoveredDevicesEvent;\r\n\t/** Emits events whenever any device undergoes a status change (DISCOVERED, ONLINE, OFFLINE, ERROR). */\r\n\tdiscoveredDevicesStatus: DiscoveredDevicesStatusChange;\r\n\tdiscoveredRooms: Maybe;\r\n\tfirmwarePackageDownloadProgress: FirmwarePackageDownloadRequestProgress;\r\n\tfirmwarePackageServerStatus: FirmwarePackageServerStatus;\r\n\tfirmwareUpdateProgress: FirmwareUpdateRequestProgress;\r\n\t/**\r\n\t * Emits change events for a given node specified by the node's ID.\r\n\t * A list of MeterChangeType values can be used to suppress events that do not correspond to the features being subscribed for.\r\n\t * The update period must also be specified for the minimum amount of time between events.\r\n\t *\r\n\t * Note that when multiple MeterChangeTypes and meterable data are provided simultaneously,\r\n\t * each MeterChange event can contain one or more features for that given node which have changed.\r\n\t */\r\n\tmeterChanges: MeterChange;\r\n\tnetworkInterfacechange: Maybe;\r\n\t/**\r\n\t * Emits change events for a given node specified by the node's ID.\r\n\t * A list of NodeChangeType values can be used to suppress events that do not correspond to the features being subscribing for.\r\n\t * DeviceStateChange events returned from this subscription cannot be suppressed.\r\n\t */\r\n\tnodeChanges: NodeChange;\r\n\toptimizeRoomAsync: OptimizeRoomProgress;\r\n\t/** The subscribeDeviceProperties is not-supported and is only used for internal purposes */\r\n\tsubscribeDeviceProperties: Array;\r\n};\r\n\r\nexport type SubscriptionCloneRoomAsyncArgs = {\r\n\tinput: CloneRoomInput;\r\n};\r\n\r\nexport type SubscriptionDeployRoomAsyncArgs = {\r\n\tinput: RoomDeploymentInput;\r\n\tkeyring: InputMaybe;\r\n};\r\n\r\nexport type SubscriptionDeviceLicenseActivationProgressArgs = {\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type SubscriptionDeviceLicenseCancelPendingActivationProgressArgs = {\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type SubscriptionDeviceLicenseDeactivationProgressArgs = {\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\nexport type SubscriptionMeterChangesArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\ttypes: Array;\r\n\tupdateRate: Scalars['Duration']['input'];\r\n};\r\n\r\nexport type SubscriptionNetworkInterfacechangeArgs = {\r\n\tnetworkInterfaceId: Scalars['String']['input'];\r\n};\r\n\r\nexport type SubscriptionNodeChangesArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\ttypes: Array;\r\n};\r\n\r\nexport type SubscriptionOptimizeRoomAsyncArgs = {\r\n\tkeyring: InputMaybe;\r\n\trequest: InputMaybe;\r\n\troom: Scalars['ID']['input'];\r\n};\r\n\r\nexport type SubscriptionSubscribeDevicePropertiesArgs = {\r\n\tid: Scalars['ID']['input'];\r\n\tpropertyKeys: Array;\r\n};\r\n\r\nexport type SupportedProtocolsInput = {\r\n\tethernet?: InputMaybe;\r\n\tusb?: InputMaybe;\r\n};\r\n\r\nexport type TalkerHeight = {\r\n\theight: Scalars['Float']['output'];\r\n};\r\n\r\nexport type TlsCertificateInput = {\r\n\tanonymousId?: InputMaybe;\r\n\tclientCertificate: Scalars['String']['input'];\r\n\tpassphrase?: InputMaybe;\r\n\trootCertificate: Scalars['String']['input'];\r\n\tusername?: InputMaybe;\r\n};\r\n\r\nexport enum TransmitterLightingBehavior {\r\n\t/** External LED control */\r\n\tExternalControl = 'EXTERNAL_CONTROL',\r\n\t/** Solid green when the mic is unmuted and solid red when the mic is muted */\r\n\tUnmuteSolidGreenMuteSolidRed = 'UNMUTE_SOLID_GREEN_MUTE_SOLID_RED',\r\n\t/** Solid red when the mic is unmuted and flashing red when the mic is muted */\r\n\tUnmuteSolidRedMuteFlashingRed = 'UNMUTE_SOLID_RED_MUTE_FLASHING_RED',\r\n\t/** Solid red when the mic is unmuted and off when the mic is muted */\r\n\tUnmuteSolidRedMuteOff = 'UNMUTE_SOLID_RED_MUTE_OFF'\r\n}\r\n\r\nexport type TransmitterLightingBehaviorConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport enum TransmitterSwitchBehavior {\r\n\tDisabled = 'DISABLED',\r\n\tPushToMute = 'PUSH_TO_MUTE',\r\n\tPushToTalk = 'PUSH_TO_TALK',\r\n\tToggle = 'TOGGLE'\r\n}\r\n\r\nexport type TransmitterSwitchBehaviorConstraints = {\r\n\toptions: Array;\r\n};\r\n\r\nexport enum UnlinkingOperationResult {\r\n\t/** Device is not discoverable. */\r\n\tDeviceNotFound = 'DEVICE_NOT_FOUND',\r\n\t/** Failed to unlink RF channel(s) and transmitter(s). */\r\n\tFailure = 'FAILURE',\r\n\t/** Input node id(s) provided in linking request is not valid. */\r\n\tInvalidInput = 'INVALID_INPUT',\r\n\t/** Provided input devices either does not support linking feature or not a valid input for this operation. */\r\n\tInvalidOperation = 'INVALID_OPERATION',\r\n\t/** No transmitter is linked to RF channel. */\r\n\tNoLinkedTransmitterOnRfChannel = 'NO_LINKED_TRANSMITTER_ON_RF_CHANNEL',\r\n\t/** No transmitter is discovered for the charger bay. */\r\n\tNoTransmitterOnChargerBay = 'NO_TRANSMITTER_ON_CHARGER_BAY',\r\n\t/** Successfully unlinked RF channel(s) and transmitter(s) */\r\n\tSuccess = 'SUCCESS',\r\n\t/** Failed to receive unlinking result within the timeout */\r\n\tTimeoutExceeded = 'TIMEOUT_EXCEEDED'\r\n}\r\n\r\nexport type UpdateAudioNetworkInput = {\r\n\tgateway?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n\tipAddress?: InputMaybe;\r\n\tipMode: IpMode | `${IpMode}`;\r\n\tsubnetMask?: InputMaybe;\r\n};\r\n\r\nexport type UpdateAudioNetworkInterfaceInput = {\r\n\tid: Scalars['ID']['input'];\r\n\tnetworkInterfaceId: Scalars['String']['input'];\r\n};\r\n\r\nexport type UpdateControlNetworkInput = {\r\n\tgateway?: InputMaybe;\r\n\tid: Scalars['ID']['input'];\r\n\tipAddress?: InputMaybe;\r\n\tipMode: IpMode | `${IpMode}`;\r\n\tsubnetMask?: InputMaybe;\r\n};\r\n\r\nexport type UpdateControlNetworkInterfaceInput = {\r\n\tid: Scalars['ID']['input'];\r\n\tnetworkInterfaceId: Scalars['String']['input'];\r\n};\r\n\r\nexport type UpdateCredentialsInput = {\r\n\taccessLevel: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n\tnewPassphrase: Scalars['String']['input'];\r\n};\r\n\r\nexport type UpdateDeviceFirmwareInput = {\r\n\tfirmwarePackageKey: Scalars['String']['input'];\r\n\tfirmwarePackageVersion: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n};\r\n\r\n/**\r\n * Result from attempting to update a node via updateNodes().\r\n *\r\n * Typically, the 'node' to update will be returned with and can be queried to observe the updated data, or query for additional data.\r\n * In the event that the 'node' cannot be successfully queried back on behalf of the first operation, it will be returned as null (instead of additionally compounding separate errors).\r\n *\r\n * Typically, 'error' will be null.\r\n * If the update to the node was unsuccessful, an error will be returned via this field.\r\n */\r\nexport type UpdateNodeResult = {\r\n\terror: Maybe;\r\n\tnode: Maybe;\r\n};\r\n\r\nexport type UpdateRoomInput = {\r\n\tdescription?: InputMaybe;\r\n\tdimensions?: InputMaybe;\r\n\thold?: InputMaybe;\r\n\tname?: InputMaybe;\r\n\troom: Scalars['ID']['input'];\r\n};\r\n\r\nexport enum UsbTerminalType {\r\n\tEchoCancelingSpeakerphone = 'ECHO_CANCELING_SPEAKERPHONE',\r\n\tSpeakerphoneNoEchoReduction = 'SPEAKERPHONE_NO_ECHO_REDUCTION'\r\n}\r\n\r\nexport type UserPreset = Fragment &\r\n\tNode & {\r\n\t\tdescription: UserPresetDescription;\r\n\t\tfeatures: UserPresetFeatures;\r\n\t\tfragmentId: Scalars['ID']['output'];\r\n\t\tid: Scalars['ID']['output'];\r\n\t};\r\n\r\nexport type UserPresetChange = {\r\n\tfeatures: UserPresetFeatureChange;\r\n\tfragmentId: Scalars['ID']['output'];\r\n\tid: Scalars['ID']['output'];\r\n};\r\n\r\nexport type UserPresetConstraints = {\r\n\tpreset: Maybe;\r\n};\r\n\r\nexport type UserPresetCore = {\r\n\tcreated: Maybe;\r\n\tempty: Scalars['Boolean']['output'];\r\n\tname: Scalars['String']['output'];\r\n};\r\n\r\nexport type UserPresetCoreChange = {\r\n\tpreset: Maybe;\r\n};\r\n\r\nexport type UserPresetCoreConstraints = {\r\n\tname: UserPresetCoreNameConstraints;\r\n};\r\n\r\nexport type UserPresetCoreNameConstraints = IStringPatternRangeConstraints & {\r\n\tpattern: Scalars['Regex']['output'];\r\n};\r\n\r\nexport type UserPresetDescription = {\r\n\tconstraints: UserPresetConstraints;\r\n\tfeatures: UserPresetSupportedFeatures;\r\n};\r\n\r\nexport type UserPresetExportToFileContentsOperationResult = {\r\n\terror: Maybe;\r\n\tfileContents: Maybe;\r\n};\r\n\r\nexport type UserPresetFeatureChange = UserPresetCoreChange;\r\n\r\nexport type UserPresetFeatures = {\r\n\tpreset: Maybe;\r\n};\r\n\r\nexport type UserPresetOperationResult = NodeOperationResult & {\r\n\terror: Maybe;\r\n\tuserPreset: Maybe;\r\n};\r\n\r\nexport type UserPresetSupportedFeatures = {\r\n\tpreset: FeatureSupport;\r\n};\r\n\r\nexport type UsernamePassphraseInput = {\r\n\tpassphrase: Scalars['String']['input'];\r\n\tusername: Scalars['String']['input'];\r\n};\r\n\r\nexport type VerifyCredentialsInput = {\r\n\taccessLevel: Scalars['String']['input'];\r\n\tid: Scalars['ID']['input'];\r\n\tpassphrase: Scalars['String']['input'];\r\n};\r\n\r\nexport type VirtualDeviceAdditionAsyncResult = {\r\n\t/** Requested virtual devices that were added, or will be added */\r\n\taddedDevices: Array;\r\n\terror: Maybe;\r\n};\r\n\r\nexport type VirtualDeviceAdditionFromStateFileContentsInput = {\r\n\t/** Device ID to assign to the virtual device (optional) */\r\n\tdeviceId?: InputMaybe;\r\n\t/** Uploaded contents of a JSON state file */\r\n\tfileContents: Scalars['Upload']['input'];\r\n\t/** Device ID of the original device represented by the state file (optional) */\r\n\toriginDeviceId?: InputMaybe;\r\n};\r\n\r\nexport type VirtualDeviceAdditionFromStateFileContentsResult = {\r\n\t/** Indicates whether or not the virtual device was added */\r\n\tadded: Scalars['Boolean']['output'];\r\n\t/** Virtual device that was added */\r\n\tdevice: Device;\r\n\t/** Device ID of the original device represented by the state file, if provided */\r\n\toriginDeviceId: Maybe;\r\n};\r\n\r\nexport type VirtualDeviceAdditionFromStateFilePathAsyncInput = {\r\n\t/** Number of identical virtual devices to load */\r\n\tcount: Scalars['Int']['input'];\r\n\t/** Path to a JSON state file */\r\n\tfilePath: Scalars['String']['input'];\r\n};\r\n\r\nexport type VirtualDeviceAdditionFromStateFilePathInput = {\r\n\t/** Device ID to assign to the requested virtual device (optional) */\r\n\tdeviceId?: InputMaybe;\r\n\t/** Path to a JSON state file */\r\n\tfilePath: Scalars['String']['input'];\r\n\t/** Device ID of the original device represented by the state file (optional) */\r\n\toriginDeviceId?: InputMaybe;\r\n};\r\n\r\nexport type VirtualDeviceAdditionFromStateFilePathResult = {\r\n\t/** Indicates whether or not the requested virtual device was added */\r\n\tadded: Scalars['Boolean']['output'];\r\n\t/** Virtual device */\r\n\tdevice: Device;\r\n\t/** Provided path to a JSON state file */\r\n\tfilePath: Scalars['String']['output'];\r\n\t/** Device ID of the original device represented by the state file, if provided */\r\n\toriginDeviceId: Maybe;\r\n};\r\n\r\nexport type VirtualDeviceAdditionFromStateFileUriInput = {\r\n\t/** Device ID to assign to the virtual device (optional) */\r\n\tdeviceId?: InputMaybe;\r\n\t/** URI of a JSON state file */\r\n\tfileUri: Scalars['String']['input'];\r\n\t/** Device ID of the original device represented by the state file (optional) */\r\n\toriginDeviceId?: InputMaybe;\r\n};\r\n\r\nexport type VirtualDeviceAdditionFromStateFileUriResult = {\r\n\t/** Indicates whether or not the requested virtual device was added */\r\n\tadded: Scalars['Boolean']['output'];\r\n\t/** Virtual device that was added */\r\n\tdevice: Device;\r\n\t/** Provided URI to a JSON state file */\r\n\tfileUri: Scalars['String']['output'];\r\n\t/** Device ID of the original device represented by the state file, if provided */\r\n\toriginDeviceId: Maybe;\r\n};\r\n\r\nexport type VirtualDeviceAdditionInput = {\r\n\t/** Number of identical virtual devices to add */\r\n\tcount: Scalars['Int']['input'];\r\n\t/** Device category */\r\n\tdeviceCategory: Scalars['String']['input'];\r\n\t/** Device type ID */\r\n\tdeviceType: Scalars['Guid']['input'];\r\n\t/**\r\n\t * Property interface ID (optional)\r\n\t *\r\n\t * If one is not provided, the latest supported interface will be used\r\n\t */\r\n\tinterfaceId?: InputMaybe;\r\n};\r\n\r\nexport type VirtualDeviceAdditionResult = {\r\n\t/** Requested virtual devices that were successfully added */\r\n\taddedDevices: Array;\r\n\terror: Maybe;\r\n};\r\n\r\nexport type VirtualDeviceRemovalInput = {\r\n\t/** Node IDs of the virtual devices to remove */\r\n\tids: Array;\r\n};\r\n\r\nexport type VirtualDeviceRemovalResult = {\r\n\terror: Maybe;\r\n\t/** Virtual devices that were not removed */\r\n\tfailedDevices: Array;\r\n};\r\n\r\nexport type VirtualDevicesAdditionFromStateFileContentsResult = {\r\n\terror: Maybe;\r\n\t/** Results for each requested virtual device */\r\n\tresults: Array;\r\n};\r\n\r\nexport type VirtualDevicesAdditionFromStateFilePathsResult = {\r\n\terror: Maybe;\r\n\t/** Results for each requested virtual device */\r\n\tresults: Array;\r\n};\r\n\r\nexport type VirtualDevicesAdditionFromStateFileUrisResult = {\r\n\terror: Maybe;\r\n\t/** Results for each requested virtual device */\r\n\tresults: Array;\r\n};\r\n","import { Inject, Injectable } from '@angular/core';\r\nimport {\r\n\tApolloCache,\r\n\tdefaultDataIdFromObject,\r\n\tInMemoryCache,\r\n\tNormalizedCacheObject,\r\n\tPossibleTypesMap\r\n} from '@apollo/client';\r\nimport { mergeDeepArray } from '@apollo/client/utilities';\r\n\r\nimport { ApolloCacheManager } from './apollo-cache-manager.service';\r\nimport { ApolloTypePolicyProvider, APOLLO_TYPE_POLICY_PROVIDERS } from './apollo-type-policy.provider';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class ApolloCacheFactory {\r\n\tconstructor(\r\n\t\t@Inject(APOLLO_TYPE_POLICY_PROVIDERS) private readonly typePolicyProviders: ApolloTypePolicyProvider[],\r\n\t\tprivate readonly apolloCacheManager: ApolloCacheManager\r\n\t) {}\r\n\r\n\tpublic createCache(name: string, possibleTypes: PossibleTypesMap): ApolloCache {\r\n\t\tconst typePolicies = mergeDeepArray(this.typePolicyProviders.map((x) => x.typePolicies()));\r\n\t\tconst typenameMap = mergeDeepArray(this.typePolicyProviders.map((x) => x.typenameMap()));\r\n\t\tconst cache = new InMemoryCache({\r\n\t\t\tpossibleTypes,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n\t\t\tdataIdFromObject(responseObject) {\r\n\t\t\t\t// eslint-disable-next-line dot-notation\r\n\t\t\t\tconst typeNameMapper = responseObject.__typename;\r\n\t\t\t\tif (typeNameMapper !== undefined && typeNameMapper in typenameMap) {\r\n\t\t\t\t\treturn typenameMap[typeNameMapper](responseObject);\r\n\t\t\t\t}\r\n\t\t\t\treturn defaultDataIdFromObject(responseObject);\r\n\t\t\t},\r\n\t\t\ttypePolicies\r\n\t\t});\r\n\t\tthis.apolloCacheManager.addCache(name, cache);\r\n\t\treturn cache;\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ApolloCache, NormalizedCacheObject } from '@apollo/client';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class ApolloCacheManager {\r\n\tprivate caches = new Map>();\r\n\r\n\tpublic getApolloCache(name: string): ApolloCache | undefined {\r\n\t\treturn this.caches.get(name);\r\n\t}\r\n\r\n\tpublic addCache(name: string, cache: ApolloCache): void {\r\n\t\tthis.caches.set(name, cache);\r\n\t}\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\nimport { StoreObject, TypePolicies } from '@apollo/client';\r\n\r\nexport const APOLLO_TYPE_POLICY_PROVIDERS = new InjectionToken('ApolloTypePolicyProviders');\r\n\r\nexport interface ApolloTypePolicyProvider {\r\n\ttypePolicies(): TypePolicies;\r\n\ttypenameMap(): { [__typename: string]: (storeObject: Readonly) => string };\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\nimport { ApolloLink } from '@apollo/client';\r\n\r\nexport const APOLLO_LINK_PROVIDERS = new InjectionToken('ApolloLinkProvider');\r\n\r\nexport interface ApolloLinkWithPriority {\r\n\tlink: ApolloLink;\r\n\tpriority: number;\r\n}\r\nexport function sortLinkProvidersByPriority(linkProviders: ApolloLinkProvider[]): ApolloLink[] {\r\n\treturn linkProviders\r\n\t\t.map((e) => e.createApolloLink())\r\n\t\t.sort((a, b) => a.priority - b.priority)\r\n\t\t.map((e) => e.link);\r\n}\r\n\r\nexport interface ApolloLinkProvider {\r\n\t/**\r\n\t * Returns a Apollo Link and a priority order for inserting in the link chain.\r\n\t * @returns { link: ApolloLink; priority: number }\r\n\t */\r\n\tcreateApolloLink(): ApolloLinkWithPriority;\r\n}\r\n","import { ApolloClientOptions, ApolloLink, PossibleTypesMap, from } from '@apollo/client/core';\r\n\r\nimport { MessagePortLink } from '@shure/application-apollo-link-web';\r\n\r\nimport { ApolloCacheFactory } from './apollo-cache-factory.service';\r\nimport { ApolloConnectionService } from './apollo-connection.service';\r\nexport class MessagePortApolloConnectionService extends ApolloConnectionService {\r\n\tconstructor(\r\n\t\tprivate readonly name: string,\r\n\t\tprivate readonly possibleTypes: PossibleTypesMap,\r\n\t\tprivate readonly apolloCacheFactory: ApolloCacheFactory,\r\n\t\tprivate readonly messagePort: MessagePort,\r\n\t\tprivate readonly apolloLinks: ApolloLink[]\r\n\t) {\r\n\t\tsuper();\r\n\t}\r\n\r\n\tpublic createApolloClientOptions(): ApolloClientOptions {\r\n\t\treturn {\r\n\t\t\tcache: this.apolloCacheFactory.createCache(this.name, this.possibleTypes),\r\n\t\t\tlink: from([...this.apolloLinks, new MessagePortLink(this.messagePort)])\r\n\t\t};\r\n\t}\r\n}\r\n","import { ApolloClientOptions } from '@apollo/client/core';\r\n\r\nexport abstract class ApolloConnectionService {\r\n\tpublic abstract createApolloClientOptions(): ApolloClientOptions;\r\n}\r\n","import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\r\n\r\nimport result from '../generated/system-api.generated';\r\n\r\nimport { ApolloCacheFactory } from './apollo-cache-factory.service';\r\nimport { APOLLO_LINK_PROVIDERS, ApolloLinkProvider, sortLinkProvidersByPriority } from './apollo-link.provider';\r\nimport { MessagePortApolloConnectionService } from './message-port-apollo-connection.service';\r\n\r\nexport const SYS_API_MESSAGE_PORT = new InjectionToken('SYS_API_MESSAGE_PORT');\r\n\r\n@Injectable()\r\nexport class SysApiMessagePortConnectionService extends MessagePortApolloConnectionService {\r\n\tconstructor(\r\n\t\tapolloCacheFactory: ApolloCacheFactory,\r\n\t\t@Inject(SYS_API_MESSAGE_PORT) messagePort: MessagePort,\r\n\t\t@Optional() @Inject(APOLLO_LINK_PROVIDERS) linkProviders: ApolloLinkProvider[]\r\n\t) {\r\n\t\tsuper(\r\n\t\t\t'sysApi',\r\n\t\t\tresult.possibleTypes,\r\n\t\t\tapolloCacheFactory,\r\n\t\t\tmessagePort,\r\n\t\t\tsortLinkProvidersByPriority(linkProviders ?? [])\r\n\t\t);\r\n\t}\r\n}\r\n","import {\r\n\tApolloClientOptions,\r\n\tApolloLink,\r\n\tcreateHttpLink,\r\n\tfrom,\r\n\tOperation,\r\n\tPossibleTypesMap,\r\n\tsplit\r\n} from '@apollo/client';\r\nimport { setContext } from '@apollo/client/link/context';\r\nimport { onError } from '@apollo/client/link/error';\r\nimport { GraphQLWsLink } from '@apollo/client/link/subscriptions';\r\nimport { getMainDefinition } from '@apollo/client/utilities';\r\nimport { Kind, OperationTypeNode } from 'graphql';\r\nimport { createClient } from 'graphql-ws';\r\nimport { firstValueFrom, map, Observable } from 'rxjs';\r\n\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { ApolloCacheFactory } from './apollo-cache-factory.service';\r\nimport { ApolloConnectInfo } from './apollo-connection.models';\r\nimport { ApolloConnectionService } from './apollo-connection.service';\r\n\r\nexport abstract class HttpApolloConnectionService extends ApolloConnectionService {\r\n\tprivate retryCountLastSeenOk = 0;\r\n\tprivate retryCountLastSeen = 0;\r\n\r\n\tprivate readonly logger: ILogger;\r\n\tprivate apolloConnectInfo$: Observable;\r\n\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\tprivate readonly name: string,\r\n\t\tprivate readonly possibleTypes: PossibleTypesMap,\r\n\t\tprivate readonly retryCountMax: number,\r\n\t\tprivate readonly connectInfoProvider$: Observable<{ url: string; apiKey: string }>,\r\n\t\tprivate readonly apolloCacheFactory: ApolloCacheFactory,\r\n\t\tprivate readonly apolloLinks: ApolloLink[]\r\n\t) {\r\n\t\tsuper();\r\n\t\tthis.logger = logger.createScopedLogger(`ApolloConnectionService.${this.name}`);\r\n\t\tthis.apolloConnectInfo$ = this.connectInfoProvider$.pipe(\r\n\t\t\tmap((connectInfo: { url: string; apiKey: string }) => {\r\n\t\t\t\tconst apolloConnectInfo = {\r\n\t\t\t\t\tgqlHttpUrl: connectInfo.url,\r\n\t\t\t\t\tgqlWsUrl: connectInfo.url.replace('https', 'wss').replace('http', 'ws'),\r\n\t\t\t\t\tapiKey: connectInfo.apiKey\r\n\t\t\t\t};\r\n\t\t\t\treturn apolloConnectInfo;\r\n\t\t\t})\r\n\t\t);\r\n\t\tthis.doResetRetryCount();\r\n\t}\r\n\r\n\tpublic createApolloClientOptions(): ApolloClientOptions {\r\n\t\treturn {\r\n\t\t\tcache: this.apolloCacheFactory.createCache(this.name, this.possibleTypes),\r\n\t\t\tlink: from([...this.apolloLinks, this.createLink()])\r\n\t\t};\r\n\t}\r\n\tprivate createLink(): ApolloLink {\r\n\t\tthis.logger.trace('createLink()', '', { name: this.name });\r\n\r\n\t\tconst contextConnectInfo = setContext(async () => {\r\n\t\t\tthis.logger.trace('withConnectInfo', 'waiting');\r\n\t\t\tconst connectInfo = await firstValueFrom(this.apolloConnectInfo$);\r\n\t\t\tthis.logger.trace('withConnectInfo', 'available', { connectInfo });\r\n\t\t\treturn { connectInfo };\r\n\t\t});\r\n\r\n\t\t// If data is coming back, we has verified that the connection to sysapi server is ok\r\n\t\t// and we can reset the retry counter.\r\n\t\tconst successLink = new ApolloLink((operation, forward) => {\r\n\t\t\treturn forward(operation).map((data) => {\r\n\t\t\t\tthis.doResetRetryCount();\r\n\t\t\t\treturn data;\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tconst errorLink = onError(({ networkError }) => {\r\n\t\t\tif (networkError) {\r\n\t\t\t\t// Catches http error codes, we are ignore this for now,\r\n\t\t\t\t// but could indicate authentication issues if used properly on server side\r\n\t\t\t\tif ('statusCode' in networkError) {\r\n\t\t\t\t\tthis.logger.trace('errorLink', 'httpError', { statusCode: networkError.statusCode });\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tthis.logger.trace('errorLink', 'networkError', { networkError: JSON.stringify(networkError) });\r\n\t\t\t\tthis.onNetworkError();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tconst authMiddlewareLink = new ApolloLink((operation, forward) => {\r\n\t\t\tconst { connectInfo } = operation.getContext();\r\n\t\t\toperation.setContext(() => ({\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention\r\n\t\t\t\t\t'x-api-key': connectInfo.apiKey\r\n\t\t\t\t}\r\n\t\t\t}));\r\n\t\t\treturn forward(operation);\r\n\t\t});\r\n\r\n\t\t// split operation based on type. Queries and mutations use http and\r\n\t\t// subscriptions use websockets\r\n\t\tconst connectLink = split(\r\n\t\t\t({ query }) => {\r\n\t\t\t\tconst definition = getMainDefinition(query);\r\n\t\t\t\treturn (\r\n\t\t\t\t\tdefinition.kind === Kind.OPERATION_DEFINITION &&\r\n\t\t\t\t\tdefinition.operation === OperationTypeNode.SUBSCRIPTION\r\n\t\t\t\t);\r\n\t\t\t},\r\n\t\t\tnew GraphQLWsLink(\r\n\t\t\t\tcreateClient({\r\n\t\t\t\t\turl: () => firstValueFrom(this.apolloConnectInfo$).then((connectInfo) => connectInfo.gqlWsUrl)\r\n\t\t\t\t})\r\n\t\t\t),\r\n\t\t\tcreateHttpLink({\r\n\t\t\t\turi: (operation) => {\r\n\t\t\t\t\tconst { connectInfo } = operation.getContext();\r\n\t\t\t\t\treturn connectInfo.gqlHttpUrl;\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t);\r\n\t\treturn from([successLink, errorLink, contextConnectInfo, authMiddlewareLink, connectLink]);\r\n\t}\r\n\r\n\tprivate onNetworkError(): void {\r\n\t\tthis.logger.trace('onNetworkError', '');\r\n\t\t// Currently we are not doing anything, but this indicate that the connection is broken,\r\n\t\t// and we should show this to the user to take action.\r\n\t}\r\n\r\n\tprivate shouldRetry(count: number, operation: Operation, error: unknown): boolean {\r\n\t\t// count comes from Apollo RetryLink and seems to occasionally being reset,\r\n\t\t// but the reset is not related to e.g. successfully subscriptions\r\n\t\tthis.retryCountLastSeen = count;\r\n\r\n\t\tconst retryCount = this.getRetryCount();\r\n\t\tthis.logger.trace('shouldRetry', '', {\r\n\t\t\tretryCount,\r\n\t\t\tretryCountLastSeen: this.retryCountLastSeen,\r\n\t\t\tretryCountLastSeenOk: this.retryCountLastSeenOk,\r\n\t\t\tcount,\r\n\t\t\toperation,\r\n\t\t\terror\r\n\t\t});\r\n\t\treturn retryCount < this.retryCountMax;\r\n\t}\r\n\r\n\tprivate getRetryDelay(_count: number): number {\r\n\t\treturn 2000 * Math.random();\r\n\t}\r\n\r\n\tprivate doResetRetryCount(): void {\r\n\t\tthis.retryCountLastSeenOk = this.retryCountLastSeen;\r\n\t}\r\n\r\n\tprivate getRetryCount(): number {\r\n\t\treturn Math.max(0, this.retryCountLastSeen - this.retryCountLastSeenOk);\r\n\t}\r\n}\r\n","import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\r\nimport { of } from 'rxjs';\r\n\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport result from '../generated/system-api.generated';\r\n\r\nimport { ApolloCacheFactory } from './apollo-cache-factory.service';\r\nimport { APOLLO_LINK_PROVIDERS, ApolloLinkProvider, sortLinkProvidersByPriority } from './apollo-link.provider';\r\nimport { HttpApolloConnectionService } from './http-apollo-connection.service';\r\n\r\nexport const SYS_API_URL = new InjectionToken<{ url: string; apiKey: string }>('SYS_API_URL');\r\n\r\n@Injectable()\r\nexport class SysApiHttpConnectionService extends HttpApolloConnectionService {\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\t@Inject(SYS_API_URL) connectInfo: { url: string; apiKey: string },\r\n\t\tapolloCacheFactory: ApolloCacheFactory,\r\n\t\t@Optional() @Inject(APOLLO_LINK_PROVIDERS) linkProviders: ApolloLinkProvider[]\r\n\t) {\r\n\t\tsuper(\r\n\t\t\tlogger,\r\n\t\t\t'sysApi',\r\n\t\t\tresult.possibleTypes,\r\n\t\t\t4,\r\n\t\t\tof(connectInfo),\r\n\t\t\tapolloCacheFactory,\r\n\t\t\tsortLinkProvidersByPriority(linkProviders ?? [])\r\n\t\t);\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { StoreObject, TypePolicies, TypePolicy } from '@apollo/client';\r\nimport { DeepMerger } from '@apollo/client/utilities';\r\n\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { ApolloTypePolicyProvider } from '../services';\r\n\r\nimport { deepMergeReconciler } from './deep-merge-reconciler';\r\n\r\nconst mergePolicyNoKey: TypePolicy = {\r\n\tkeyFields: false,\r\n\tmerge: true\r\n};\r\n\r\nconst deepMergePolicyNoKey: TypePolicy = {\r\n\tkeyFields: false,\r\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n\tmerge: (e, i, { toReference }): any => {\r\n\t\treturn new DeepMerger(deepMergeReconciler).merge(e, i, {\r\n\t\t\ttoReference: toReference\r\n\t\t});\r\n\t}\r\n};\r\n\r\nconst mergePolicyNoKeyKeepTypename = (logger: ILogger): TypePolicy => {\r\n\treturn {\r\n\t\tkeyFields: false,\r\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n\t\tmerge: (e, i, { toReference, isReference, readField }): any => {\r\n\t\t\tconst typename = isReference(e)\r\n\t\t\t\t? readField({\r\n\t\t\t\t\t\tfieldName: '__typename',\r\n\t\t\t\t\t\tfrom: e\r\n\t\t\t\t })\r\n\t\t\t\t: e?.__typename;\r\n\r\n\t\t\tif (!typename) {\r\n\t\t\t\tlogger.error('mergePolicyNoKeyKeepTypename', 'could not resolve __typename to keep from existing', {\r\n\t\t\t\t\te,\r\n\t\t\t\t\ti\r\n\t\t\t\t});\r\n\t\t\t\treturn e;\r\n\t\t\t}\r\n\r\n\t\t\t// copy incoming data as a workaround for __typename being readonly\r\n\t\t\t// Apollo will not merge with existing if the __typename fields don't match\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention\r\n\t\t\tconst copy = { ...i, __typename: typename };\r\n\r\n\t\t\treturn new DeepMerger(deepMergeReconciler).merge(e, copy, {\r\n\t\t\t\ttoReference: toReference\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n};\r\n\r\nconst mergePolicyFixedTypename = (typename: string): TypePolicy => {\r\n\treturn {\r\n\t\tmerge: true,\r\n\t\tfields: {\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention\r\n\t\t\t__typename: {\r\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n\t\t\t\tmerge(_e, _i) {\r\n\t\t\t\t\treturn typename;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n};\r\n\r\nconst mergePolicyUseNewValue: TypePolicy = {\r\n\tmerge: (_e, i) => {\r\n\t\treturn i;\r\n\t}\r\n};\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class SysApiTypePolicyProvider implements ApolloTypePolicyProvider {\r\n\tprivate readonly logger: ILogger;\r\n\r\n\tconstructor(logger: ILogger) {\r\n\t\tthis.logger = logger.createScopedLogger('SysApiTypePolicyProvider');\r\n\t}\r\n\r\n\tpublic typenameMap(): { [__typename: string]: (storeObject: Readonly) => string } {\r\n\t\t// This mapping will map 'XXChange' event from the nodeChanges-subscription into the XX entry in the apollo cache\r\n\t\t// this only works because the type of 'XXChange' is a subset of the type 'XX'.\r\n\t\treturn {\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tDeviceChange: (storeObject) => `Device:${storeObject['id']}`,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tDeviceStatusChange: (storeObject) => `Device:${storeObject['id']}`,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tRoomChange: (storeObject) => `Room:${storeObject['id']}`,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tAudioChannelChange: (storeObject) => `AudioChannel:${storeObject['id']}`,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tRfChannelChange: (storeObject) => `RfChannel:${storeObject['id']}`,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tUserPresetChange: (storeObject) => `UserPreset:${storeObject['id']}`,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tEqualizerFilterChange: (storeObject) => `EqualizerFilter:${storeObject['id']}`,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tAudioCoverageAreaChange: (storeObject) => `AudioCoverageArea:${storeObject['id']}`,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tCrossPointChange: (storeObject) => `CrossPoint:${storeObject['id']}`,\r\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention, dot-notation\r\n\t\t\tChargerBayChange: (storeObject) => `ChargerBay:${storeObject['id']}`\r\n\t\t};\r\n\t}\r\n\r\n\tpublic typePolicies(): TypePolicies {\r\n\t\treturn {\r\n\t\t\t/*\r\n\t\t\t * Room\r\n\t\t\t */\r\n\t\t\tRoomChange: mergePolicyFixedTypename('Room'),\r\n\t\t\tRoomManifestDevice: mergePolicyNoKey,\r\n\r\n\t\t\t/*\r\n\t\t\t * Device\r\n\t\t\t */\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tDeviceDescription: deepMergePolicyNoKey,\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tDeviceFeatures: deepMergePolicyNoKey,\r\n\r\n\t\t\tDeviceAdded: mergePolicyNoKey,\r\n\t\t\tDeviceRemoved: mergePolicyNoKey,\r\n\r\n\t\t\t// Types are mapped to Device in cache\r\n\t\t\tDeviceChange: mergePolicyFixedTypename('Device'),\r\n\t\t\tDeviceStatusChange: mergePolicyFixedTypename('Device'),\r\n\r\n\t\t\tDeviceAllEqualizersBypassChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAllIntellimixBypassChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceDanteAudioEncryptionChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAuthenticationChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAutomixGainMeteringChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAvailablePackagesChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceCallStatusChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceDanteAudioNetworkChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceDanteAudioNetworkAccessChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceEqualizerContourChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceEthernetLightsChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceIdentifyChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceMeteringModesChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAudioMuteChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceVirtualAcousticBoundaryChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLinkedAccessPointChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceNameChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceUpdateProgressChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceUptimeChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceUserPresetsChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceCoveragePositionChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceRoutingPositionChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLocalLicenseChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceServerLicenseChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLicenseChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLicenseChannelCountChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceCoverageModeChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceRotationChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceHeightChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAudioMuteControlGroupChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceRoomChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLightingBrightnessChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLoudspeakerChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDevicePlacementChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceActivePresetChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAudioMuteControlChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAudioMuteDefaultChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceBatteryHealthChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceBatteryLevelChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceCommandStringsServiceChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceConfigurationLockChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceDoubleStuffProxiedTransmittersChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceGlobalMicStatusChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceWebServiceChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLightingAutomixGatingChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLightingBehaviorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLightingLiveMetersChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLightingMuteBehaviorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLightingRingChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLightingUnmuteBehaviorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceListenerHeightChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLogicMuteChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLogicReceiverChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLogicTransmitterChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceMdnsServiceChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceMicStatusChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceSecurity8021XChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceStereoAudioChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceSwitchConfigurationChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceUsbMuteSyncChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceUsbTerminalTypeChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceDeploymentCandidatesChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceProxiedDevicesChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tConnectedDeviceLabelChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAudioChannelCountChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAudioChannelsChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAudioMuteLockChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLightingAudioMetersChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLightingAudioMuteIndicatorOverrideChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLightingLiveAudioMetersChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAudioNetworkInterfaceChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceControlNetworkInterfaceChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAudioAutoFocusChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceFirmwareUpdatePolicyChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAnalogAudioOutputModeChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAnalogLogicChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAnalogLogicPresetSwitchChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceAnalogLogicPresetSwitchStatusChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceLicenseChangeV2: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceTransmitterOutOfRangeBehaviorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceConferencingOperationModeChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceRfPowerChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceTransmitterIdentifyBehaviorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceRedundantAudioNetworkChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceRfDensityModeChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceTransmitterLightingBehaviorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceTransmitterRejoinBehaviorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tDeviceTransmitterSwitchBehaviorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\r\n\t\t\t/*\r\n\t\t\t * StereoAudioChannel\r\n\t\t\t */\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tStereoAudioChannelDescription: deepMergePolicyNoKey,\r\n\r\n\t\t\t/*\r\n\t\t\t * AudioChannel\r\n\t\t\t */\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tAudioChannelDescription: deepMergePolicyNoKey,\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tAudioChannelFeatures: deepMergePolicyNoKey,\r\n\r\n\t\t\t// Types are mapped to Device in cache\r\n\t\t\tAudioChannelChange: mergePolicyFixedTypename('AudioChannel'),\r\n\t\t\tAudioChannelChannelConfigurationChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelSelectedLoudspeakerChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAcousticEchoCancellationChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAcousticEchoCancellationMonoReferenceChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAcousticEchoCancellationStereoReferenceChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAnalogLevelChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAdvancedAutomixerChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAecReferenceChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAutoMuteChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAutoPositionChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAnalogInputChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAutomixSourceSelectorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAutomixerInputChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAutomixerVoiceActivityDetectionChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAnalogOutputChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAutoFocusChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAutoLevelChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAutomaticGainControlChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelAutomixerChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelCompressorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelDelayChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelMonitoringChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelDirectOutputChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelDanteEncryptionStatusChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelFaderGroupChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelGainChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelGainLockChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelGateChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelIntellimixChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelLimiterChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelLobeChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelLogicChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelMixBusChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelMuteChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelMuteGroupChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelMuteLockChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelNameChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelNoiseReductionChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelPcInputChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelPcOutputChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelDanteRouteReceiverChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelDanteRouteTransmitterChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelSoloChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelSoloMixChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelThresholdLimiterChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelTalkerHeightChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelOutputPathChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelSignalGeneratorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelDenoiserChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelDirectOutputTapPointChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelEqualizerChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelEqualizerContourChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelLobeConfigurationChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelLobePositionChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelLobeTalkerHeightChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelLobeWidthChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelLogicReceiverChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelMicOptimizationChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelMicPolarPatternChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelMicrophoneAngleChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelMonitorMixChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelMonitorMixReverbChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelPcPeripheralChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelPhantomPowerChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelPlosiveReductionChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelPostGateGainChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelPostGateMuteChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelReverbChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelDeviceSpecificEqualizerContourChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelEqualizerPresetChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelIdentifyChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelLightingBehaviorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelStereoReverseChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelStereoWidthChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelPostGateSoloChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelDeverbChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioChannelInputSourceChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\r\n\t\t\t/*\r\n\t\t\t * RfChannel\r\n\t\t\t */\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tRfChannelDescription: deepMergePolicyNoKey,\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tRfChannelFeatures: deepMergePolicyNoKey,\r\n\r\n\t\t\tRfChannelChange: mergePolicyFixedTypename('RfChannel'),\r\n\t\t\tRfChannelFeatureChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tRfChannelLinkedTransmitterChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\r\n\t\t\t/*\r\n\t\t\t * ChargerBay\r\n\t\t\t */\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tChargerBayDescription: deepMergePolicyNoKey,\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tChargerBayFeatures: deepMergePolicyNoKey,\r\n\r\n\t\t\tChargerBayChange: mergePolicyFixedTypename('ChargerBay'),\r\n\t\t\tChargerBayDockedDeviceChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\r\n\t\t\t/*\r\n\t\t\t * EqualizerFilter\r\n\t\t\t */\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tEqualizerFilterDescription: deepMergePolicyNoKey,\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tEqualizerFilterFeatures: deepMergePolicyNoKey,\r\n\r\n\t\t\tEqualizerFilterChange: mergePolicyFixedTypename('EqualizerFilter'),\r\n\t\t\tEqualizerFilterConfigurationChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tEqualizerFilterBandwidthChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tEqualizerFilterFrequencyChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tEqualizerFilterGainChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tEqualizerFilterQFactorChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\r\n\t\t\t/*\r\n\t\t\t * UserPreset\r\n\t\t\t */\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tUserPresetDescription: deepMergePolicyNoKey,\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tUserPresetFeatures: deepMergePolicyNoKey,\r\n\r\n\t\t\tUserPresetChange: mergePolicyFixedTypename('UserPreset'),\r\n\r\n\t\t\t/*\r\n\t\t\t * AudioCoverageArea\r\n\t\t\t */\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tAudioCoverageAreaDescription: deepMergePolicyNoKey,\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tAudioCoverageAreaFeatures: deepMergePolicyNoKey,\r\n\r\n\t\t\tAudioCoverageAreaChange: mergePolicyFixedTypename('AudioCoverageArea'),\r\n\t\t\tAudioCoverageAreaGainChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioCoverageAreaMuteChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tAudioCoverageAreaConfigurationChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\r\n\t\t\t/*\r\n\t\t\t * CrossPoint\r\n\t\t\t */\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tCrossPointDescription: deepMergePolicyNoKey,\r\n\t\t\t// First level in device which is not normalized (no id), should deep merge\r\n\t\t\tCrossPointFeatures: deepMergePolicyNoKey,\r\n\r\n\t\t\tCrossPointChange: mergePolicyFixedTypename('CrossPoint'),\r\n\t\t\tCrossPointConfigurationChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\t\t\tCrossPointGainChange: mergePolicyNoKeyKeepTypename(this.logger),\r\n\r\n\t\t\t/*\r\n\t\t\t * Special rule to merge result or subscription/query in the cache\r\n\t\t\t */\r\n\t\t\tSubscription: {\r\n\t\t\t\tfields: {\r\n\t\t\t\t\tdiscoveredDevices: mergePolicyUseNewValue,\r\n\t\t\t\t\tdiscoveredRooms: mergePolicyUseNewValue\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tQuery: {\r\n\t\t\t\tfields: {\r\n\t\t\t\t\tdiscoveredDevices: mergePolicyUseNewValue,\r\n\t\t\t\t\tdiscoveredRooms: mergePolicyUseNewValue\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n}\r\n","import { ToReferenceFunction } from '@apollo/client/cache/core/types/common';\r\nimport { ReconcilerFunction } from '@apollo/client/utilities';\r\n\r\ntype DeepMergeReconcilerContext = [\r\n\t{\r\n\t\ttoReference: ToReferenceFunction;\r\n\t}\r\n];\r\n\r\nexport const deepMergeReconciler: ReconcilerFunction = function (\r\n\ttarget,\r\n\tsource,\r\n\tproperty,\r\n\tcontext\r\n) {\r\n\tconst targetPropertyValue = target[property];\r\n\tconst sourcePropertyValue = source[property];\r\n\r\n\tif (!Array.isArray(targetPropertyValue) || !Array.isArray(sourcePropertyValue)) {\r\n\t\treturn this.merge(targetPropertyValue, sourcePropertyValue, context);\r\n\t}\r\n\r\n\tif (targetPropertyValue.length === 0) {\r\n\t\tif (sourcePropertyValue.length === 0) {\r\n\t\t\t// special case, it is supposedly more efficient to return the unmodified target when possible\r\n\t\t\treturn targetPropertyValue;\r\n\t\t}\r\n\r\n\t\treturn sourcePropertyValue;\r\n\t}\r\n\r\n\t// match items to merge by store object reference if possible, replace target with source if we can't\r\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n\tconst targetItemMap = new Map();\r\n\ttargetPropertyValue\r\n\t\t.filter((targetItem) => this.isObject(targetItem))\r\n\t\t.forEach((targetItem) => {\r\n\t\t\tconst reference = context.toReference(targetItem);\r\n\t\t\tif (reference !== undefined) {\r\n\t\t\t\ttargetItemMap.set(reference.__ref, targetItem);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\tif (targetItemMap.size === 0) {\r\n\t\treturn sourcePropertyValue;\r\n\t}\r\n\r\n\treturn sourcePropertyValue.map((sourceItem) => {\r\n\t\tconst reference = context.toReference(sourceItem);\r\n\t\tif (reference === undefined) {\r\n\t\t\treturn sourceItem;\r\n\t\t}\r\n\r\n\t\tconst targetItem = targetItemMap.get(reference.__ref);\r\n\r\n\t\treturn this.merge(targetItem, sourceItem, context);\r\n\t});\r\n};\r\n","import { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { ApolloModule, APOLLO_NAMED_OPTIONS, NamedOptions } from 'apollo-angular';\r\n\r\nimport {\r\n\tAPOLLO_TYPE_POLICY_PROVIDERS,\r\n\tApolloConnectionService,\r\n\tSYS_API_URL,\r\n\tSysApiHttpConnectionService,\r\n\tSysApiMessagePortConnectionService\r\n} from './services';\r\nimport { SysApiTypePolicyProvider } from './type-policy/sys-api.type-policy-provider';\r\n\r\n@NgModule({\r\n\timports: [ApolloModule],\r\n\tproviders: [\r\n\t\t{\r\n\t\t\tprovide: APOLLO_NAMED_OPTIONS,\r\n\t\t\tuseFactory(apolloConnectionService: ApolloConnectionService): NamedOptions {\r\n\t\t\t\treturn { sysApi: apolloConnectionService.createApolloClientOptions() };\r\n\t\t\t},\r\n\t\t\tdeps: [ApolloConnectionService]\r\n\t\t},\r\n\t\t{\r\n\t\t\tprovide: APOLLO_TYPE_POLICY_PROVIDERS,\r\n\t\t\tmulti: true,\r\n\t\t\tuseClass: SysApiTypePolicyProvider\r\n\t\t}\r\n\t]\r\n})\r\nexport class SystemApiCoreDataAccessModule {\r\n\tpublic static withHttp(externalConnectInfo: {\r\n\t\turl: string;\r\n\t\tapiKey: string;\r\n\t}): ModuleWithProviders {\r\n\t\treturn {\r\n\t\t\tngModule: SystemApiCoreDataAccessModule,\r\n\t\t\tproviders: [\r\n\t\t\t\t{\r\n\t\t\t\t\tprovide: SYS_API_URL,\r\n\t\t\t\t\tuseValue: externalConnectInfo\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tprovide: ApolloConnectionService,\r\n\t\t\t\t\tuseClass: SysApiHttpConnectionService\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t};\r\n\t}\r\n\r\n\tpublic static withMessagePort(): ModuleWithProviders {\r\n\t\treturn {\r\n\t\t\tngModule: SystemApiCoreDataAccessModule,\r\n\t\t\tproviders: [\r\n\t\t\t\t{\r\n\t\t\t\t\tprovide: ApolloConnectionService,\r\n\t\t\t\t\tuseClass: SysApiMessagePortConnectionService\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t};\r\n\t}\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\nimport { DecorationExport, DecorationType } from './decoration.models';\r\n\r\nexport const DECORATION_PROVIDERS = new InjectionToken('DecorationProviders');\r\n\r\nexport interface DecorationProvider {\r\n\tdecorationSupportedTypes(): DecorationType[];\r\n\tdecorationClone(id: string, toId: string): Promise;\r\n\tdecorationSetExport(id: string, decoration: DecorationExport): Promise;\r\n\tdecorationGetExport(id: string): Promise;\r\n\tdecorationDelete(id: string): Promise;\r\n}\r\n","import { Inject, Injectable } from '@angular/core';\r\n\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { DecorationExport } from './decoration.models';\r\nimport { DecorationProvider, DECORATION_PROVIDERS } from './decoration.provider';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class DecorationService {\r\n\tprivate readonly logger: ILogger;\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\t@Inject(DECORATION_PROVIDERS) private readonly decorationProviders: DecorationProvider[]\r\n\t) {\r\n\t\tthis.logger = logger.createScopedLogger('DecorationService');\r\n\t}\r\n\r\n\tpublic async clone(id: string, toId: string): Promise {\r\n\t\tthis.logger.trace('clone', '', { id, toId });\r\n\t\tawait Promise.all(this.decorationProviders.map((p) => p.decorationClone(id, toId)));\r\n\t}\r\n\r\n\tpublic async delete(id: string): Promise {\r\n\t\tthis.logger.trace('delete', '', { id });\r\n\t\tawait Promise.all(this.decorationProviders.map((p) => p.decorationDelete(id)));\r\n\t}\r\n\r\n\tpublic async get(id: string): Promise {\r\n\t\tthis.logger.trace('get', '', { id });\r\n\t\tconst decorations = await Promise.all(this.decorationProviders.map((p) => p.decorationGetExport(id)));\r\n\t\treturn decorations.flat();\r\n\t}\r\n\r\n\tpublic async set(id: string, content: DecorationExport[]): Promise {\r\n\t\tthis.logger.trace('set', '', { id, content });\r\n\t\tawait Promise.allSettled(content.map((decoration) => this.setDecoration(id, decoration))).then((results) => {\r\n\t\t\tconst rejected = results.find((result) => result.status === 'rejected');\r\n\t\t\tif (rejected) {\r\n\t\t\t\tthrow (rejected).reason;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprivate async setDecoration(id: string, decoration: DecorationExport): Promise {\r\n\t\tconst provider = this.decorationProviders.find((provider) =>\r\n\t\t\tprovider.decorationSupportedTypes().includes(decoration.type)\r\n\t\t);\r\n\t\tif (provider) {\r\n\t\t\treturn provider.decorationSetExport(id, decoration);\r\n\t\t}\r\n\t\tthrow new Error(`No decorationProvider could handle decoration type '${decoration.type}'`);\r\n\t}\r\n}\r\n","import { Subscription } from 'rxjs';\r\nexport interface SubscriptionManagerConfigCreate {\r\n\tid: string;\r\n\tretryCallback: () => void;\r\n\tresetRetryDelay: () => void;\r\n}\r\nexport interface SubscriptionManagerConfig {\r\n\tcreate: (config: SubscriptionManagerConfigCreate) => Subscription;\r\n\tretryWaitMs?: number;\r\n}\r\n\r\ninterface SubscriptionInfo {\r\n\tsubscription: Subscription;\r\n\tqueryIds: Set;\r\n}\r\n\r\nconst initialRetryDelay = 1000; // 1 second\r\n\r\nconst maxRetryDelay = 4096 * 1000; // ~68 minutes\r\n\r\nexport class SubscriptionManager {\r\n\tprivate readonly subscriptions = new Map();\r\n\tprivate readonly retryDelay = new Map();\r\n\r\n\tconstructor(private readonly config: SubscriptionManagerConfig) {}\r\n\r\n\tpublic subscribe(queryId: string, keyArg: string | string[], prune = true): void {\r\n\t\tconst keys = typeof keyArg === 'string' ? [keyArg] : keyArg;\r\n\t\tconst keysAsSet = new Set(keys);\r\n\t\tconst keysToRemove = prune ? new Set([...this.subscriptions.keys()].filter((x) => !keysAsSet.has(x))) : [];\r\n\t\tkeys.forEach((key) => this.addKey(queryId, key));\r\n\t\tkeysToRemove.forEach((key) => this.removeKey(queryId, key));\r\n\t}\r\n\r\n\tpublic unsubscribeAllQuery(queryId: string): void {\r\n\t\tthis.subscriptions.forEach((subscriptionInfo, key) => {\r\n\t\t\tif (subscriptionInfo.queryIds.has(queryId)) {\r\n\t\t\t\tthis.removeKey(queryId, key);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tpublic unsubscribeAll(): void {\r\n\t\tthis.subscriptions.forEach((subscriptionInfo, _) => {\r\n\t\t\tsubscriptionInfo.subscription.unsubscribe();\r\n\t\t});\r\n\t\tthis.subscriptions.clear();\r\n\t\tthis.retryDelay.clear();\r\n\t}\r\n\r\n\tpublic removeKey(queryId: string, key: string): void {\r\n\t\tconst subscriptionInfo = this.subscriptions.get(key);\r\n\t\tif (subscriptionInfo) {\r\n\t\t\tconst queryIds = new Set([...subscriptionInfo.queryIds.keys()].filter((qId) => qId !== queryId));\r\n\t\t\tthis.subscriptions.delete(key);\r\n\t\t\tif (queryIds.size > 0) {\r\n\t\t\t\tthis.subscriptions.set(key, { ...subscriptionInfo, queryIds });\r\n\t\t\t} else {\r\n\t\t\t\tsubscriptionInfo.subscription.unsubscribe();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst retryDelayKey = this.buildRetryDelayKey(queryId, key);\r\n\t\tif (this.retryDelay.has(retryDelayKey)) {\r\n\t\t\tthis.retryDelay.delete(retryDelayKey);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate addKey(queryId: string, key: string): void {\r\n\t\tconst subscriptionInfo = this.subscriptions.get(key);\r\n\t\tif (subscriptionInfo) {\r\n\t\t\tsubscriptionInfo.queryIds.add(queryId);\r\n\t\t} else {\r\n\t\t\tconst subscription = this.config.create({\r\n\t\t\t\tid: key,\r\n\t\t\t\tretryCallback: () => this.handleSubscriptionRetry(queryId, key),\r\n\t\t\t\tresetRetryDelay: () => {\r\n\t\t\t\t\tthis.retryDelay.set(this.buildRetryDelayKey(queryId, key), initialRetryDelay);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tthis.subscriptions.set(key, { subscription, queryIds: new Set([queryId]) });\r\n\t\t}\r\n\t}\r\n\r\n\tprivate handleSubscriptionRetry(queryId: string, key: string): void {\r\n\t\tconst retryDelayKey = this.buildRetryDelayKey(queryId, key);\r\n\t\tconst delay = this.retryDelay.get(retryDelayKey) ?? initialRetryDelay;\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.reCreateSubscription(queryId, key);\r\n\t\t}, delay);\r\n\r\n\t\tif (delay < maxRetryDelay) {\r\n\t\t\tthis.retryDelay.set(retryDelayKey, delay * 2);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate reCreateSubscription(queryId: string, key: string): void {\r\n\t\tconst subscriptionInfo = this.subscriptions.get(key);\r\n\t\tif (subscriptionInfo && subscriptionInfo.queryIds.has(queryId)) {\r\n\t\t\tsubscriptionInfo.subscription.unsubscribe();\r\n\t\t\tconst subscription = this.config.create({\r\n\t\t\t\tid: key,\r\n\t\t\t\tretryCallback: () => this.handleSubscriptionRetry(queryId, key),\r\n\t\t\t\tresetRetryDelay: () => {\r\n\t\t\t\t\tthis.retryDelay.set(this.buildRetryDelayKey(queryId, key), initialRetryDelay);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tthis.subscriptions.set(key, { ...subscriptionInfo, subscription });\r\n\t\t}\r\n\t}\r\n\r\n\tprivate buildRetryDelayKey(queryId: string, key: string): string {\r\n\t\treturn `${queryId}${key}`;\r\n\t}\r\n}\r\n","import { Subscription as ApolloSubscription, SubscriptionResult } from 'apollo-angular';\r\nimport { Subscription } from 'rxjs';\r\n\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { NodeChangeType } from '../../generated/system-api.generated';\r\n\r\nimport { SubscriptionHandler, SubscriptionManagerService } from './subscription-manager-service';\r\n\r\nexport type GqlSubscriptionVariables = {\r\n\tid: string;\r\n\ttypes: NodeChangeType[] | NodeChangeType;\r\n};\r\n\r\n/**\r\n * Configuration to pass when creating a subscription manager instance\r\n */\r\nexport interface CombiningSubscriptionManagerConfig {\r\n\t/**\r\n\t * Name of the object instantiating the subscription manager (for logging and debugging purposes only).\r\n\t * E.g. \"RoomSysApiService:Room\" for RoomSysApiService when subscribing for room changes.\r\n\t */\r\n\tname: string;\r\n\r\n\t/**\r\n\t * The changes types this susbcription manager is to subscribe to on targets\r\n\t */\r\n\tchangeTypes: NodeChangeType[];\r\n\r\n\t/**\r\n\t * The GQL subscription creation instance to use when setting up a subscription on a target\r\n\t */\r\n\tsubscriptionGql: ApolloSubscription;\r\n\r\n\t/**\r\n\t * The initial retry delay when wanting to retry a failed subscription.\r\n\t * If not specified an internal default will be used.\r\n\t */\r\n\tretryWaitMs?: number;\r\n\r\n\t/**\r\n\t * Callback invoked when a subscription receives update data\r\n\t */\r\n\tonUpdate?: (targetId: string, update: SubscriptionResult) => void;\r\n}\r\n\r\n/**\r\n * Subscription information held for a single target\r\n */\r\ninterface SubscriptionInfo {\r\n\ttargetId: string;\r\n\tretryDelay: number;\r\n\r\n\t/**\r\n\t * QueryIds of all requests made for a subscription on the target\r\n\t */\r\n\tqueries: Set;\r\n\r\n\t/**\r\n\t * The subscription actually running.\r\n\t * Undefined if not actively subscribed to target.\r\n\t */\r\n\tsubscription: Subscription | undefined;\r\n}\r\n\r\nconst initialRetryDelay = 1000; // 1 second\r\nconst maxRetryDelay = 4096 * 1000; // ~68 minutes\r\n\r\nexport class CombiningSubscriptionManager {\r\n\tprivate readonly logger: ILogger;\r\n\r\n\tprivate name: string;\r\n\r\n\t/**\r\n\t * The individual queries subscribed on the instance\r\n\t */\r\n\tprivate readonly subscriptions = new Map();\r\n\r\n\t/**\r\n\t * SubscriptionHandler instance to use for requesting subscribing via SubscriptionManagerService\r\n\t */\r\n\tprivate subscriptionHandler: SubscriptionHandler;\r\n\r\n\tconstructor(\r\n\t\tprivate readonly config: CombiningSubscriptionManagerConfig,\r\n\t\tlogger: ILogger,\r\n\t\tprivate readonly subscriptionService: SubscriptionManagerService\r\n\t) {\r\n\t\tthis.name = `SubscriptionManager<${config.name}>`;\r\n\t\tthis.logger = logger.createScopedLogger(this.name);\r\n\r\n\t\tthis.subscriptionHandler = subscriptionService.createHandler(\r\n\t\t\tthis.config.name,\r\n\t\t\tthis.config.changeTypes,\r\n\t\t\tthis.config.subscriptionGql,\r\n\t\t\t(targetId) => this.handleSubscribeToTarget(targetId),\r\n\t\t\t(targetId, subscription) => this.handleUnsubscribeFromTarget(targetId, subscription)\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Add subscription to a target to the subscription manager\r\n\t */\r\n\tpublic subscribe(queryId: string, targetId: string): void {\r\n\t\tthis.addQuery(queryId, targetId);\r\n\t}\r\n\r\n\t/**\r\n\t * Add subscriptions for multiple targets to the subscription manager\r\n\t */\r\n\tpublic subscribeMany(queryId: string, targetIds: string[]): void {\r\n\t\ttargetIds.forEach((id) => this.addQuery(queryId, id));\r\n\t}\r\n\r\n\t/**\r\n\t * Subscribe to the given targets and unsubscribe from any other targets previously subscribed to\r\n\t */\r\n\tpublic subscribeToOnly(queryId: string, targetIds: string[]): void {\r\n\t\tconst targetIdSet = new Set(targetIds);\r\n\t\tconst targetsToUnsubscribe = new Set([...this.subscriptions.keys()].filter((x) => !targetIdSet.has(x)));\r\n\t\ttargetIds.forEach((id) => this.addQuery(queryId, id));\r\n\t\ttargetsToUnsubscribe.forEach((key) => this.removeQuery(queryId, key));\r\n\t}\r\n\r\n\t/**\r\n\t * Remove a subscription to a target from the subscription manager\r\n\t */\r\n\tpublic unsubscribe(queryId: string, targetId: string): void {\r\n\t\tthis.removeQuery(queryId, targetId);\r\n\t}\r\n\r\n\t/**\r\n\t * Unsubscribe all subscriptions placed using a specific queryId\r\n\t */\r\n\tpublic unsubscribeQuery(queryId: string): void {\r\n\t\tthis.subscriptions.forEach((subscriptionInfo, key) => {\r\n\t\t\tif (subscriptionInfo.queries.has(queryId)) {\r\n\t\t\t\tthis.removeQuery(queryId, key);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Unsubscribe all subscriptions placed at the subscription manager\r\n\t */\r\n\tpublic unsubscribeAll(): void {\r\n\t\tthis.subscriptions.forEach((subscriptionInfo, _) => {\r\n\t\t\tthis.subscriptionService.removeSubscriptionRequest(subscriptionInfo.targetId, this.subscriptionHandler);\r\n\t\t});\r\n\t\tthis.subscriptions.clear();\r\n\t}\r\n\r\n\tprivate addQuery(queryId: string, targetId: string): void {\r\n\t\t// Get/add subscription info for target\r\n\t\tlet subscriptionInfo = this.subscriptions.get(targetId);\r\n\t\tif (!subscriptionInfo) {\r\n\t\t\tsubscriptionInfo = {\r\n\t\t\t\ttargetId: targetId,\r\n\t\t\t\tretryDelay: this.config.retryWaitMs ?? initialRetryDelay,\r\n\t\t\t\tqueries: new Set(),\r\n\t\t\t\tsubscription: undefined\r\n\t\t\t};\r\n\t\t\tthis.subscriptions.set(targetId, subscriptionInfo);\r\n\r\n\t\t\tthis.subscriptionService.addSubscriptionRequest(targetId, this.subscriptionHandler);\r\n\t\t}\r\n\t\tif (!subscriptionInfo.queries.has(queryId)) {\r\n\t\t\t// Create query info for specific query on target\r\n\t\t\tsubscriptionInfo.queries.add(queryId);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate removeQuery(queryId: string, targetId: string): void {\r\n\t\tconst subscriptionInfo = this.subscriptions.get(targetId);\r\n\t\tif (subscriptionInfo) {\r\n\t\t\tsubscriptionInfo.queries.delete(queryId);\r\n\r\n\t\t\tif (subscriptionInfo.queries.size === 0) {\r\n\t\t\t\t// No more subscribers\r\n\t\t\t\tthis.subscriptionService.removeSubscriptionRequest(targetId, this.subscriptionHandler);\r\n\t\t\t\tthis.subscriptions.delete(targetId);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Handle request from subscription manager service to subscribe to a target\r\n\t */\r\n\tprivate handleSubscribeToTarget(targetId: string): Subscription {\r\n\t\tconst subscriptionInfo = this.subscriptions.get(targetId);\r\n\t\tif (!subscriptionInfo) {\r\n\t\t\tthrow new Error('No SubscriptionInfo found for target when requested to subscribe');\r\n\t\t}\r\n\r\n\t\treturn this.subscribeOnGql(subscriptionInfo);\r\n\t}\r\n\r\n\t/**\r\n\t * Handle request from subscription manager service to unsubscribe from a target\r\n\t */\r\n\tprivate handleUnsubscribeFromTarget(targetId: string, subscription: Subscription): void {\r\n\t\tsubscription.unsubscribe();\r\n\t}\r\n\r\n\tprivate subscribeOnGql(subscriptionInfo: SubscriptionInfo): Subscription {\r\n\t\tconst targetId = subscriptionInfo.targetId;\r\n\r\n\t\tconst subscription = this.config.subscriptionGql\r\n\t\t\t.subscribe(\r\n\t\t\t\t{\r\n\t\t\t\t\tid: targetId,\r\n\t\t\t\t\ttypes: this.config.changeTypes\r\n\t\t\t\t},\r\n\t\t\t\t{ errorPolicy: 'all' }\r\n\t\t\t)\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: (change) => {\r\n\t\t\t\t\tthis.logger.trace('GQL', 'Received update', {\r\n\t\t\t\t\t\ttargetId,\r\n\t\t\t\t\t\tchange\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis.handleSubscriptionUpdate(targetId, change);\r\n\t\t\t\t},\r\n\t\t\t\terror: (error) => {\r\n\t\t\t\t\tthis.logger.error('GQL', 'Encountered error', {\r\n\t\t\t\t\t\ttargetId,\r\n\t\t\t\t\t\terror\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis.handleSubscriptionError(targetId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\tsubscriptionInfo.subscription = subscription;\r\n\r\n\t\treturn subscription;\r\n\t}\r\n\r\n\tprivate handleSubscriptionUpdate(targetId: string, update: SubscriptionResult): void {\r\n\t\t// Reset connection retry timeout value\r\n\t\tconst subscriptionInfo = this.subscriptions.get(targetId);\r\n\t\tif (subscriptionInfo) {\r\n\t\t\tsubscriptionInfo.retryDelay = this.config.retryWaitMs ?? initialRetryDelay;\r\n\t\t}\r\n\r\n\t\t// Invoke client callback\r\n\t\tif (this.config.onUpdate) {\r\n\t\t\ttry {\r\n\t\t\t\tthis.config.onUpdate(targetId, update);\r\n\t\t\t} catch (error) {\r\n\t\t\t\tthis.logger.error('GQL', 'Client callback threw error', {\r\n\t\t\t\t\ttargetId,\r\n\t\t\t\t\terror\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprivate handleSubscriptionError(targetId: string): void {\r\n\t\tconst subscriptionInfo = this.subscriptions.get(targetId);\r\n\r\n\t\t// Setup delayed retry of subscription\r\n\t\tconst delay = subscriptionInfo ? subscriptionInfo.retryDelay : initialRetryDelay;\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.reCreateSubscription(targetId);\r\n\t\t}, delay);\r\n\r\n\t\tif (subscriptionInfo && delay < maxRetryDelay) {\r\n\t\t\tsubscriptionInfo.retryDelay = subscriptionInfo.retryDelay * 2;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate reCreateSubscription(targetId: string): void {\r\n\t\tconst subscriptionInfo = this.subscriptions.get(targetId);\r\n\t\tif (subscriptionInfo && subscriptionInfo.subscription) {\r\n\t\t\tsubscriptionInfo.subscription.unsubscribe();\r\n\t\t\tthis.subscribeOnGql(subscriptionInfo);\r\n\t\t}\r\n\t}\r\n}\r\n","import { TypedDocumentNode } from 'apollo-angular';\r\nimport {\r\n\tDocumentNode,\r\n\tFieldNode,\r\n\tFragmentDefinitionNode,\r\n\tFragmentSpreadNode,\r\n\tInlineFragmentNode,\r\n\tKind,\r\n\tOperationDefinitionNode,\r\n\tOperationTypeNode,\r\n\tSelectionNode\r\n} from 'graphql';\r\n\r\nexport interface SubscribedField {\r\n\tname: string;\r\n\talias?: string;\r\n\r\n\t/**\r\n\t * Direct child fields subscribed to on this field\r\n\t */\r\n\tfields: SubscribedField[];\r\n\r\n\t/**\r\n\t * Direct child fragments subscribed on this field (undefined if there are no fragments here)\r\n\t */\r\n\tfragments: SubscribedFragment[];\r\n}\r\n\r\nexport interface SubscribedFragment extends SubscribedField {\r\n\t/**\r\n\t * The name of the type this fragment is on. I.e. the part of \"... on { fields }\" or \"fragment on \"\r\n\t */\r\n\ttypeName: string;\r\n\r\n\t/**\r\n\t * Is the fragment a field-local inline fragment?\r\n\t */\r\n\tisInline: boolean;\r\n}\r\n\r\nexport interface ParsedSubscription {\r\n\tname: string;\r\n\r\n\t/**\r\n\t * The top-level subscribed field (e.g. 'nodeChanges(id, changeTypes)')\r\n\t */\r\n\tselection: SubscribedField;\r\n}\r\n\r\nexport type GqlSubscriptionDocument = DocumentNode | TypedDocumentNode;\r\n\r\nexport class GqlSubscriptionParser {\r\n\tpublic static parseGqlSubscription(gqlDocument: GqlSubscriptionDocument): ParsedSubscription {\r\n\t\tconst fragmentMap = new Map();\r\n\r\n\t\tconst operation = this.getGqlOperation(gqlDocument);\r\n\t\tif (!operation) {\r\n\t\t\tthrow new Error('GQL is not a subscription');\r\n\t\t}\r\n\t\tconst operationField = this.getGqlOperationField(operation);\r\n\t\tif (!operationField) {\r\n\t\t\tthrow new Error('GQL has no operation field to subscribe to');\r\n\t\t}\r\n\r\n\t\tconst fragmentNodes = this.getGqlOperationFragments(gqlDocument);\r\n\t\tif (fragmentNodes) {\r\n\t\t\t// Populate the fragment map with empty shells (to support inter-fragment referencing while parsing)\r\n\t\t\tfragmentNodes.forEach((f) =>\r\n\t\t\t\tfragmentMap.set(f.name.value, {\r\n\t\t\t\t\tname: f.name.value,\r\n\t\t\t\t\talias: undefined,\r\n\t\t\t\t\ttypeName: f.typeCondition.name.value,\r\n\t\t\t\t\tisInline: false,\r\n\t\t\t\t\tfields: [],\r\n\t\t\t\t\tfragments: []\r\n\t\t\t\t})\r\n\t\t\t);\r\n\r\n\t\t\t// Actually parse the fragments\r\n\t\t\tfragmentNodes.forEach((f) => {\r\n\t\t\t\tconst fragment = fragmentMap.get(f.name.value);\r\n\t\t\t\tif (fragment && f.selectionSet.selections) {\r\n\t\t\t\t\tthis.getGqlExplicitChildFieldTree(f.selectionSet.selections, fragmentMap, fragment);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// Parse the GQL field selections\r\n\t\treturn {\r\n\t\t\tname: operation.name?.value ?? '',\r\n\t\t\tselection: this.getGqlExplicitFieldTree(operationField, fragmentMap)\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Get the operation definition of an Apollo GQL subscription definition instance\r\n\t */\r\n\tprivate static getGqlOperation(gqlDocument: GqlSubscriptionDocument): OperationDefinitionNode | undefined {\r\n\t\tconst operation = (\r\n\t\t\tgqlDocument.definitions.find((def) => def.kind === Kind.OPERATION_DEFINITION)\r\n\t\t);\r\n\t\tif (!operation || operation.operation !== OperationTypeNode.SUBSCRIPTION) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t\treturn operation;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the GQL operation field from a subscription\r\n\t */\r\n\tprivate static getGqlOperationField(operation: OperationDefinitionNode): FieldNode | undefined {\r\n\t\tconst operationField = operation.selectionSet?.selections[0];\r\n\t\tif (!operationField || operationField.kind !== Kind.FIELD) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t\treturn operationField;\r\n\t}\r\n\r\n\t/**\r\n\t * Collect all fragments registered with the GQL operation.\r\n\t */\r\n\tprivate static getGqlOperationFragments(\r\n\t\tgqlDocument: GqlSubscriptionDocument\r\n\t): Map | undefined {\r\n\t\tconst fragmentDefs = gqlDocument.definitions\r\n\t\t\t.filter((def) => def.kind === Kind.FRAGMENT_DEFINITION)\r\n\t\t\t.map((def) => def);\r\n\r\n\t\tconst fragmentMap = new Map();\r\n\t\tfragmentDefs.forEach((def) => fragmentMap.set(def.name.value, def));\r\n\r\n\t\treturn fragmentMap;\r\n\t}\r\n\r\n\t/**\r\n\t * Extract the tree of fields subscribed by the passed in parentFieldName\r\n\t */\r\n\tprivate static getGqlExplicitFieldTree(\r\n\t\tparentFieldNode: FieldNode,\r\n\t\tfragmentMap: Map\r\n\t): SubscribedField {\r\n\t\tconst rootField: SubscribedField = {\r\n\t\t\tname: parentFieldNode.name.value,\r\n\t\t\talias: parentFieldNode.alias?.value,\r\n\t\t\tfields: [],\r\n\t\t\tfragments: []\r\n\t\t};\r\n\r\n\t\tif (parentFieldNode.selectionSet) {\r\n\t\t\tthis.getGqlExplicitChildFieldTree(parentFieldNode.selectionSet.selections, fragmentMap, rootField);\r\n\t\t}\r\n\r\n\t\treturn rootField;\r\n\t}\r\n\r\n\t/**\r\n\t * Extract the tree of fields subscribed by the passed in parentFieldName\r\n\t */\r\n\tprivate static getGqlExplicitChildFieldTree(\r\n\t\tfieldList: readonly SelectionNode[],\r\n\t\tfragmentMap: Map,\r\n\t\toutputItem: SubscribedField\r\n\t): void {\r\n\t\tfor (const item of fieldList) {\r\n\t\t\tswitch (item.kind) {\r\n\t\t\t\tcase Kind.FIELD:\r\n\t\t\t\t\toutputItem.fields.push(this.getGqlExplicitFieldTree(item, fragmentMap));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase Kind.FRAGMENT_SPREAD: {\r\n\t\t\t\t\tconst fragmentItem = item;\r\n\t\t\t\t\tconst fragmentName = fragmentItem.name.value;\r\n\t\t\t\t\tconst fragment = fragmentMap.get(fragmentName);\r\n\t\t\t\t\tif (!fragment) {\r\n\t\t\t\t\t\tthrow new Error(\r\n\t\t\t\t\t\t\t`Fragment ${fragmentName} used for selection in field ${outputItem.name} is not defined`\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t\toutputItem.fragments.push(fragment);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcase Kind.INLINE_FRAGMENT: {\r\n\t\t\t\t\tconst fragmentItem = item;\r\n\t\t\t\t\tconst fragment: SubscribedFragment = {\r\n\t\t\t\t\t\tname: `__inline__${fragmentItem.typeCondition?.name.value ?? 'untyped'}`,\r\n\t\t\t\t\t\talias: undefined,\r\n\t\t\t\t\t\ttypeName: fragmentItem.typeCondition?.name.value ?? '',\r\n\t\t\t\t\t\tisInline: true,\r\n\t\t\t\t\t\tfields: [],\r\n\t\t\t\t\t\tfragments: []\r\n\t\t\t\t\t};\r\n\t\t\t\t\tthis.getGqlExplicitChildFieldTree(fragmentItem.selectionSet.selections, fragmentMap, fragment);\r\n\r\n\t\t\t\t\toutputItem.fragments.push(fragment);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Subscription as ApolloSubscription } from 'apollo-angular';\r\nimport { Subscription } from 'rxjs';\r\n\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { NodeChangeType } from '../../generated/system-api.generated';\r\n\r\nimport { GqlSubscriptionParser, ParsedSubscription, SubscribedField } from './gql-subscription-parser';\r\n\r\nexport interface SubscriptionHandler {\r\n\t/**\r\n\t * Handler name (for logging and debugging purposes only)\r\n\t */\r\n\tname: string;\r\n\r\n\t/**\r\n\t * The change types this handler will be subscribing to when subscribing\r\n\t */\r\n\treadonly changeTypes: NodeChangeType[];\r\n\r\n\t/**\r\n\t * The subscription field (top node) of a parsed out GQL selection tree\r\n\t * which this handler will be subscribing to when subscribing.\r\n\t */\r\n\treadonly gqlSelection: SubscribedField;\r\n\r\n\t/**\r\n\t * An opague ID uniquely identifying the GQL subscription selection\r\n\t * Two handler instances with the same gqlSelectionId has the exact same selection. Two\r\n\t * handle instances with difference gqlSelectionId may, or may not, have the exact same\r\n\t * selection.\r\n\t */\r\n\treadonly gqlSelectionId: object;\r\n\r\n\t/**\r\n\t * Subscribe to the given target object\r\n\t */\r\n\tsubscribe(targetId: string): Subscription;\r\n\r\n\t/**\r\n\t * Unsubscribe a previously opened subscription\r\n\t */\r\n\tunsubscribe(targetId: string, subscription: Subscription): void;\r\n}\r\n\r\n/**\r\n * An active subscription on a target - i.e. actually subscribed via GQL\r\n */\r\ninterface ActiveSubscription {\r\n\thandler: SubscriptionHandler;\r\n\tsubscription: Subscription;\r\n}\r\n\r\n/**\r\n * Subscription management context for a target object\r\n */\r\ninterface TargetContext {\r\n\ttargetId: string;\r\n\r\n\t/**\r\n\t * All requested subscriptions on the target\r\n\t */\r\n\tsubscribers: Set;\r\n\r\n\t/**\r\n\t * Subscriptions actively opened with the target.\r\n\t * This is a subset of the \"subscribers\" list (enough to cover all requested properties).\r\n\t */\r\n\tactiveSubscriptions: Map;\r\n}\r\n\r\nenum SelectionComparison {\r\n\tNotContained,\r\n\tContained,\r\n\tEqual\r\n}\r\n\r\ninterface CachedGqlComparisons {\r\n\t/**\r\n\t * Comparison results with other GQL selection trees.\r\n\t *\r\n\t * Lookup key is the DocumentNode of the GQL document describing the selection since\r\n\t * that is the same for multiple usages of the same GQL subscription query.\r\n\t */\r\n\tcomparisons: Map;\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class SubscriptionManagerService {\r\n\tprivate readonly logger: ILogger;\r\n\r\n\tprivate readonly parsedGqlCache = new Map();\r\n\tprivate readonly gqlComparisonCache = new Map();\r\n\r\n\tprivate readonly subscriptions = new Map();\r\n\tprivate handlerSequenceNumber = 0;\r\n\r\n\tconstructor(logger: ILogger) {\r\n\t\tthis.logger = logger.createScopedLogger('SubscriptionManagerService');\r\n\t}\r\n\r\n\t/**\r\n\t * Create a subscription handler instance to be used for subscribing on target objects\r\n\t */\r\n\tpublic createHandler(\r\n\t\tname: string,\r\n\t\tchangeTypes: NodeChangeType[],\r\n\t\tsubscriptionGql: ApolloSubscription,\r\n\t\tsubscribeFunc: (targetId: string) => Subscription,\r\n\t\tunsubscribeFunc: (targetId: string, subscription: Subscription) => void\r\n\t): SubscriptionHandler {\r\n\t\tconst gqlInfo = this.parseGqlSubscription(subscriptionGql);\r\n\r\n\t\tif (this.handlerSequenceNumber >= Number.MAX_SAFE_INTEGER) {\r\n\t\t\t// Safety-reset of number sequence for completeness\r\n\t\t\tthis.handlerSequenceNumber = 0;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tname: `${this.handlerSequenceNumber++}:${name}.${gqlInfo.name}`,\r\n\t\t\tchangeTypes: changeTypes,\r\n\t\t\tgqlSelection: gqlInfo.selection,\r\n\t\t\tgqlSelectionId: subscriptionGql.document, // (The GQL query document is a generated global constant we can use as id)\r\n\t\t\tsubscribe: subscribeFunc,\r\n\t\t\tunsubscribe: unsubscribeFunc\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Add a request to subscribe to a set of GQL fields on a target object.\r\n\t * Subscribing the same handler to the same target more than once is allowed, but will not\r\n\t * nest. I.e. one remove will undo any number of adds.\r\n\t * @param targetId Id of the target object to subscribe on\r\n\t * @param handler The handler requesting the subscription (and thus also the GQL fields to subscribe to)\r\n\t */\r\n\tpublic addSubscriptionRequest(targetId: string, handler: SubscriptionHandler): void {\r\n\t\tlet target = this.subscriptions.get(targetId);\r\n\t\tif (!target) {\r\n\t\t\ttarget = {\r\n\t\t\t\ttargetId: targetId,\r\n\t\t\t\tsubscribers: new Set(),\r\n\t\t\t\tactiveSubscriptions: new Map()\r\n\t\t\t};\r\n\t\t\tthis.subscriptions.set(targetId, target);\r\n\t\t}\r\n\r\n\t\tthis.logger.information('subscribe', 'Adding subscriber to target', {\r\n\t\t\ttargetId,\r\n\t\t\thandler: handler.name\r\n\t\t});\r\n\t\ttarget.subscribers.add(handler);\r\n\r\n\t\tthis.evaluateSubscriptions(target);\r\n\t}\r\n\r\n\t/**\r\n\t * Remove a request to subscribe to a set of GQL fields from a target object.\r\n\t * @param targetId Id of the target object to retire the subscription from\r\n\t * @param handler The handler which originally requested the subscription (and thus also the GQL fields to nolonger subscribe to)\r\n\t */\r\n\tpublic removeSubscriptionRequest(targetId: string, handler: SubscriptionHandler): void {\r\n\t\tconst target = this.subscriptions.get(targetId);\r\n\t\tif (target) {\r\n\t\t\tif (target.subscribers.delete(handler)) {\r\n\t\t\t\tthis.logger.information('unsubscribe', 'Removed subscriber from target', {\r\n\t\t\t\t\ttargetId,\r\n\t\t\t\t\thandler: handler.name\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.evaluateSubscriptions(target);\r\n\r\n\t\t\t\tif (target.subscribers.size === 0) {\r\n\t\t\t\t\tthis.subscriptions.delete(targetId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * DEBUG: Dump all content cached in the service to be able to inspect state\r\n\t */\r\n\t/* Keeping this in so cache debugging can easily be re-enabled when/if needed\r\n\tpublic debugDumpToConsole(): void {\r\n\t\tthis.logger.debug('dump', 'BEGIN ------------------ SubscriptionManagerService dump ------------------');\r\n\t\tthis.logger.debug('dump', 'Subscriptions:');\r\n\t\tthis.subscriptions.forEach((sub) => {\r\n\t\t\tthis.logger.debug('dump', ` - ${sub.targetId}`);\r\n\t\t\tthis.logger.debug('dump', ` Requested: ${sub.subscribers.size}`);\r\n\t\t\tsub.subscribers.forEach((handler) => {\r\n\t\t\t\tthis.logger.debug('dump', ` - ${handler.name}`);\r\n\t\t\t});\r\n\t\t\tthis.logger.debug('dump', ` Active: ${sub.activeSubscriptions.size}`);\r\n\t\t\tsub.activeSubscriptions.forEach((active) => {\r\n\t\t\t\tthis.logger.debug('dump', ` - ${active.handler.name}`);\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tthis.logger.debug('dump', '');\r\n\t\tthis.logger.debug('dump', 'Cached parsed gql:');\r\n\t\tthis.parsedGqlCache.forEach((entry) => {\r\n\t\t\tthis.logger.debug('dump', ` - ${entry.name}`);\r\n\t\t});\r\n\r\n\t\tthis.logger.debug('dump', '');\r\n\t\tthis.logger.debug('dump', 'Cached comparisons:');\r\n\t\tthis.gqlComparisonCache.forEach((entry, candidateKey) => {\r\n\t\t\tconst candidateSource = (candidateKey).loc?.source.body.split('\\n')[1].trim() ?? '';\r\n\t\t\tthis.logger.debug('dump', ` - ${candidateSource}`);\r\n\t\t\tentry.comparisons.forEach((comp, otherKey) => {\r\n\t\t\t\tconst otherSource = (otherKey).loc?.source.body.split('\\n')[1].trim() ?? '';\r\n\t\t\t\tconst equalString =\r\n\t\t\t\t\tcomp === SelectionComparison.NotContained\r\n\t\t\t\t\t\t? 'Disjoint'\r\n\t\t\t\t\t\t: comp === SelectionComparison.Equal\r\n\t\t\t\t\t\t ? 'Equal'\r\n\t\t\t\t\t\t : 'Contains';\r\n\t\t\t\tthis.logger.debug('dump', ` - ${otherSource}: ${equalString}`);\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tthis.logger.debug('dump', '');\r\n\t\tthis.logger.debug('dump', 'END ------------------ SubscriptionManagerService dump ------------------');\r\n\t}\r\n\t*/\r\n\r\n\t/**\r\n\t * Determine which GQL subscriptions are required to actively subscribe to all requested GQL fields,\r\n\t * and update the active GQL subscriptions to match.\r\n\t */\r\n\tprivate evaluateSubscriptions(target: TargetContext): void {\r\n\t\tlet madeChanges = false;\r\n\t\tconst requiredSubscriptions = this.determineRequiredSubscriptions(target);\r\n\r\n\t\t// Close subscriptions nolonger required.\r\n\t\tconst subsToClose: ActiveSubscription[] = [];\r\n\t\tfor (const active of target.activeSubscriptions.values()) {\r\n\t\t\tif (!requiredSubscriptions.has(active.handler)) {\r\n\t\t\t\tsubsToClose.push(active);\r\n\t\t\t\tmadeChanges = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tsubsToClose.forEach((s) => this.closeSubscription(target, s));\r\n\r\n\t\t// Open subscriptions required\r\n\t\tconst subscToOpen: SubscriptionHandler[] = [];\r\n\t\tfor (const required of requiredSubscriptions) {\r\n\t\t\tif (!target.activeSubscriptions.has(required)) {\r\n\t\t\t\tsubscToOpen.push(required);\r\n\t\t\t\tmadeChanges = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tsubscToOpen.forEach((s) => this.openSubscription(target, s));\r\n\r\n\t\tif (madeChanges) {\r\n\t\t\tthis.logger.information(\r\n\t\t\t\t'evaluateSubscriptions',\r\n\t\t\t\t`Subscriptions changed. Selected ${target.activeSubscriptions.size} of ${target.subscribers.size} requested`\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Compare requested susbcriptions to determine which subscriptions are required to cover all GQL field selections\r\n\t */\r\n\tprivate determineRequiredSubscriptions(target: TargetContext): Set {\r\n\t\tconst candidateSubscribers: (SubscriptionHandler | undefined)[] = [...target.subscribers];\r\n\r\n\t\t// Trim out subscriptions with duplicate field selections\r\n\t\tfor (let candidateIdx = 0; candidateIdx < candidateSubscribers.length - 1; candidateIdx++) {\r\n\t\t\tconst candidate = candidateSubscribers[candidateIdx];\r\n\t\t\tif (candidate) {\r\n\t\t\t\tfor (let otherIdx = candidateIdx + 1; otherIdx < candidateSubscribers.length; otherIdx++) {\r\n\t\t\t\t\tconst other = candidateSubscribers[otherIdx];\r\n\t\t\t\t\tif (other) {\r\n\t\t\t\t\t\tlet comparison = this.isSubscriptionContainedInOther(candidate, other);\r\n\r\n\t\t\t\t\t\tif (comparison === SelectionComparison.Contained) {\r\n\t\t\t\t\t\t\t// Candidate is subset of other - trim it out\r\n\t\t\t\t\t\t\tcandidateSubscribers[candidateIdx] = undefined;\r\n\t\t\t\t\t\t} else if (comparison === SelectionComparison.Equal) {\r\n\t\t\t\t\t\t\t// Candidate selection equals other - trim out one of them.\r\n\t\t\t\t\t\t\t// Candidate will be trimmed unless it is subscribed to. In that case other is trimmed to\r\n\t\t\t\t\t\t\t// avoid unneeded subscribtion changes.\r\n\t\t\t\t\t\t\tconst ignoreOther = target.activeSubscriptions.has(candidate);\r\n\t\t\t\t\t\t\tconst idxToIgnore = ignoreOther ? otherIdx : candidateIdx;\r\n\r\n\t\t\t\t\t\t\tcandidateSubscribers[idxToIgnore] = undefined;\r\n\t\t\t\t\t\t\tif (!ignoreOther) {\r\n\t\t\t\t\t\t\t\t// candidate subscription was ignored - stop comparing against it\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Candidate was not included in other - check if other is included in candidate\r\n\t\t\t\t\t\t\tcomparison = this.isSubscriptionContainedInOther(other, candidate);\r\n\t\t\t\t\t\t\tif (comparison !== SelectionComparison.NotContained) {\r\n\t\t\t\t\t\t\t\t// Always a \"other contained in candidate\" case - so always \"other\" being trimmed\r\n\t\t\t\t\t\t\t\tcandidateSubscribers[otherIdx] = undefined;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst requiredSubscriptions = new Set(\r\n\t\t\t>candidateSubscribers.filter((s) => s !== undefined)\r\n\t\t);\r\n\r\n\t\treturn requiredSubscriptions;\r\n\t}\r\n\r\n\tprivate openSubscription(target: TargetContext, handler: SubscriptionHandler): void {\r\n\t\tthis.logger.information('openSubscription', 'Subscribing', {\r\n\t\t\ttargetId: target.targetId,\r\n\t\t\thandler: handler.name\r\n\t\t});\r\n\r\n\t\tconst subscription = handler.subscribe(target.targetId);\r\n\r\n\t\ttarget.activeSubscriptions.set(handler, {\r\n\t\t\thandler: handler,\r\n\t\t\tsubscription: subscription\r\n\t\t});\r\n\t}\r\n\r\n\tprivate closeSubscription(target: TargetContext, s: ActiveSubscription): void {\r\n\t\tthis.logger.information('closeSubscription', 'Unsubscribing', {\r\n\t\t\ttargetId: target.targetId,\r\n\t\t\thandler: s.handler.name\r\n\t\t});\r\n\r\n\t\ts.handler.unsubscribe(target.targetId, s.subscription);\r\n\t\ttarget.activeSubscriptions.delete(s.handler);\r\n\t}\r\n\r\n\t/**\r\n\t * Get parsed-out GQL subscription data\r\n\t */\r\n\tprivate parseGqlSubscription(subscriptionGql: ApolloSubscription): ParsedSubscription {\r\n\t\tlet parsed = this.parsedGqlCache.get(subscriptionGql.document);\r\n\t\tif (!parsed) {\r\n\t\t\tparsed = GqlSubscriptionParser.parseGqlSubscription(subscriptionGql.document);\r\n\t\t\tthis.parsedGqlCache.set(subscriptionGql.document, parsed);\r\n\t\t}\r\n\t\treturn parsed;\r\n\t}\r\n\r\n\t/**\r\n\t * Check whether a candidate GQL subscription is contained within another GQL subscription\r\n\t */\r\n\tprivate isSubscriptionContainedInOther(\r\n\t\tcandidate: SubscriptionHandler,\r\n\t\tother: SubscriptionHandler\r\n\t): SelectionComparison {\r\n\t\t// Check NodeChangeTypes\r\n\t\tconst changeTypeComparison = this.isNodeChangeTypesContainedInOther(candidate.changeTypes, other.changeTypes);\r\n\t\tif (changeTypeComparison === SelectionComparison.NotContained) {\r\n\t\t\t// ChangeTypes are not contained => the whole comparison is not contained\r\n\t\t\treturn SelectionComparison.NotContained;\r\n\t\t}\r\n\r\n\t\t// Check GQL field selection\r\n\t\tconst gqlComparison = this.isGqlSelectionContainedInOther(candidate, other);\r\n\r\n\t\t// Select the least positive result as overall comparison result\r\n\t\tif (gqlComparison === SelectionComparison.NotContained) {\r\n\t\t\treturn SelectionComparison.NotContained;\r\n\t\t}\r\n\t\tif (gqlComparison === SelectionComparison.Contained || changeTypeComparison === SelectionComparison.Contained) {\r\n\t\t\treturn SelectionComparison.Contained;\r\n\t\t}\r\n\t\treturn SelectionComparison.Equal;\r\n\t}\r\n\r\n\t/**\r\n\t * Check whether a candidate set of NodeChangeTypes is contained within another set of NodeChangeTypes\r\n\t */\r\n\tprivate isNodeChangeTypesContainedInOther(\r\n\t\tcandidateChangeTypes: NodeChangeType[],\r\n\t\totherChangeTypes: NodeChangeType[]\r\n\t): SelectionComparison {\r\n\t\tlet result: SelectionComparison = SelectionComparison.Equal;\r\n\r\n\t\tif (candidateChangeTypes.length > otherChangeTypes.length) {\r\n\t\t\tresult = SelectionComparison.NotContained;\r\n\t\t} else {\r\n\t\t\tif (candidateChangeTypes.length < otherChangeTypes.length) {\r\n\t\t\t\tresult = SelectionComparison.Contained;\r\n\t\t\t}\r\n\r\n\t\t\tfor (const changeType of candidateChangeTypes) {\r\n\t\t\t\tif (!otherChangeTypes.includes(changeType)) {\r\n\t\t\t\t\tresult = SelectionComparison.NotContained;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t * Check whether a candidate GQL selection tree is included in another GQL selection tree.\r\n\t *\r\n\t * Will use caching to avoid repeated full selection tree comparisons.\r\n\t */\r\n\tprivate isGqlSelectionContainedInOther(\r\n\t\tcandidate: SubscriptionHandler,\r\n\t\tother: SubscriptionHandler\r\n\t): SelectionComparison {\r\n\t\tlet result: SelectionComparison | undefined;\r\n\r\n\t\t// Get comparison from cache\r\n\t\tconst cachedComparisons = this.getOrAddCachedComparisonSet(candidate.gqlSelectionId);\r\n\t\tresult = cachedComparisons.comparisons.get(other.gqlSelectionId);\r\n\t\tif (!result) {\r\n\t\t\t// Comparison was not cached - evaluate if candidate is included in other selection\r\n\t\t\tresult = this.isSelectionTreeIncluded(candidate.gqlSelection, other.gqlSelection);\r\n\t\t\tcachedComparisons.comparisons.set(other.gqlSelectionId, result);\r\n\r\n\t\t\tif (result !== SelectionComparison.NotContained) {\r\n\t\t\t\t// If candidate is included in/equal to other selection we also know the opposite comparison\r\n\t\t\t\t// result without doing an actual field-by-field comparison. So cache that as well\r\n\t\t\t\tconst otherComparisons = this.getOrAddCachedComparisonSet(other.gqlSelectionId);\r\n\t\t\t\tif (!otherComparisons.comparisons.has(candidate.gqlSelectionId)) {\r\n\t\t\t\t\totherComparisons.comparisons.set(\r\n\t\t\t\t\t\tcandidate.gqlSelectionId,\r\n\t\t\t\t\t\tresult === SelectionComparison.Equal\r\n\t\t\t\t\t\t\t? SelectionComparison.Equal\r\n\t\t\t\t\t\t\t: SelectionComparison.NotContained\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t * Check whether a candidate GQL selection tree is included in another GQL selection tree\r\n\t */\r\n\tprivate isSelectionTreeIncluded(candidateField: SubscribedField, otherField: SubscribedField): SelectionComparison {\r\n\t\tlet isEqual = true;\r\n\r\n\t\t// Check fragments\r\n\t\tfor (const candidateChild of candidateField.fragments) {\r\n\t\t\tconst otherChild = otherField.fragments.find((f) => f.typeName === candidateChild.typeName);\r\n\t\t\tif (!otherChild) {\r\n\t\t\t\treturn SelectionComparison.NotContained;\r\n\t\t\t}\r\n\t\t\tconst fragmentComparison = this.isSelectionTreeIncluded(candidateChild, otherChild);\r\n\t\t\tif (fragmentComparison === SelectionComparison.NotContained) {\r\n\t\t\t\treturn SelectionComparison.NotContained;\r\n\t\t\t} else if (fragmentComparison !== SelectionComparison.Equal) {\r\n\t\t\t\tisEqual = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (candidateField.fragments.length !== otherField.fragments.length) {\r\n\t\t\tisEqual = false;\r\n\t\t}\r\n\r\n\t\t// Check fields\r\n\t\tfor (const candidateChild of candidateField.fields) {\r\n\t\t\tconst otherChild = otherField.fields.find((f) => f.name === candidateChild.name);\r\n\t\t\tif (!otherChild) {\r\n\t\t\t\treturn SelectionComparison.NotContained;\r\n\t\t\t}\r\n\t\t\tconst fieldComparison = this.isSelectionTreeIncluded(candidateChild, otherChild);\r\n\t\t\tif (fieldComparison === SelectionComparison.NotContained) {\r\n\t\t\t\treturn SelectionComparison.NotContained;\r\n\t\t\t} else if (fieldComparison !== SelectionComparison.Equal) {\r\n\t\t\t\tisEqual = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (candidateField.fields.length !== otherField.fields.length) {\r\n\t\t\tisEqual = false;\r\n\t\t}\r\n\r\n\t\treturn isEqual ? SelectionComparison.Equal : SelectionComparison.Contained;\r\n\t}\r\n\r\n\tprivate getOrAddCachedComparisonSet(candidateKey: object): CachedGqlComparisons {\r\n\t\tlet comparisonSet = this.gqlComparisonCache.get(candidateKey);\r\n\t\tif (!comparisonSet) {\r\n\t\t\tcomparisonSet = {\r\n\t\t\t\tcomparisons: new Map()\r\n\t\t\t};\r\n\t\t\tthis.gqlComparisonCache.set(candidateKey, comparisonSet);\r\n\t\t}\r\n\t\treturn comparisonSet;\r\n\t}\r\n}\r\n","import { ApolloError, ApolloQueryResult } from '@apollo/client';\r\nimport { GraphQLError } from 'graphql';\r\n\r\nexport class ApolloQueryErrorMapper {\r\n\tpublic static getError(queryResult: ApolloQueryResult): ApolloError | ReadonlyArray | Error {\r\n\t\treturn queryResult.error ?? queryResult.errors ?? new Error('unknown error ocurred');\r\n\t}\r\n}\r\n","// Re-export default export from generated file.\r\nimport result from './lib/generated/system-api.generated';\r\nexport const possibleTypes = result.possibleTypes;\r\n\r\n// Export all types from generated output.\r\nexport * from './lib/generated/system-api.generated';\r\n\r\nexport * from './lib/system-api-core.module';\r\n\r\nexport * from './lib/services';\r\n\r\nexport * from './lib/decoration';\r\n\r\nexport * from './lib/utils';\r\n","import { FetchResult } from '@apollo/client/core';\r\n\r\nexport class GqlUtils {\r\n\tpublic static isSuccess(result: FetchResult): boolean {\r\n\t\tif ('data' in result && result.data !== null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tpublic static decomposeGQLError(error: FetchResult): string {\r\n\t\treturn JSON.stringify(error);\r\n\t}\r\n\r\n\tpublic static decomposeHTTPError(error: { message: string }): string {\r\n\t\treturn error?.message;\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, from, Observable, of, Subject, throwError } from 'rxjs';\r\nimport { catchError, finalize, map, mergeMap, mergeScan, take, takeUntil } from 'rxjs/operators';\r\n\r\nimport {\r\n\tClaimResults,\r\n\tDeletePendingClaimBatchResult,\r\n\tDeletePendingClaimResult,\r\n\tDeviceClaimResult,\r\n\tDeviceDetection,\r\n\tPendingClaim,\r\n\tDeviceClaimProgress,\r\n\tMacSerialNumberDevice,\r\n\tPendingClaimStatus\r\n} from '@shure/cloud/shared/models/devices';\r\nimport { OktaInterfaceService, monitorLoginState } from '@shure/cloud/shared/okta/data-access';\r\nimport { ErrorCode } from '@shure/shared/angular/data-access/system-api/core';\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { DeviceClaimingApiService } from '../api/device-claiming-api.service';\r\n\r\nimport {\r\n\tClaimDeviceByMacSerialNumberGQL,\r\n\tClaimDeviceByMacSerialNumberOpResult,\r\n\tClaimDeviceByMacSerialNumberVariables,\r\n\tClaimDeviceGQL,\r\n\tClaimDeviceVariables,\r\n\tDeletePendingClaimGQL,\r\n\tDeletePendingClaimVariables,\r\n\tListPendingClaimsGQL,\r\n\tPendingClaimStatusGQL,\r\n\tUnclaimDeviceGQL,\r\n\tUnclaimDeviceVariables\r\n} from './graphql/generated/cloud-sys-api';\r\nimport { GqlUtils } from './mappers/gql.utils';\r\n\r\nconst claimByMacSsnBatchSize = 50;\r\n\r\n/**\r\n * This service is provided in the root/app module. Once instantiated, it will always exist.\r\n */\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class SysApiDeviceClaimingApiService implements DeviceClaimingApiService {\r\n\tpublic claimOpInProgress$ = new BehaviorSubject(false);\r\n\tprivate pendingClaims$ = new BehaviorSubject([]);\r\n\tprivate readonly logger: ILogger;\r\n\tprivate destroy$ = new Subject();\r\n\r\n\tprivate claimingResults: ClaimResults = {\r\n\t\tnumSuccess: 0,\r\n\t\tnumError: 0,\r\n\t\terrors: []\r\n\t};\r\n\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\tprivate claimDeviceGQL: ClaimDeviceGQL,\r\n\t\tprivate unclaimDeviceGQL: UnclaimDeviceGQL,\r\n\t\tprivate listPendingClaimGQL: ListPendingClaimsGQL,\r\n\t\tprivate deletePendingClaimGQL: DeletePendingClaimGQL,\r\n\t\tprivate claimDeviceMacSerialGQL: ClaimDeviceByMacSerialNumberGQL,\r\n\t\tprivate pendingClaimStatusGQL: PendingClaimStatusGQL,\r\n\t\tprivate readonly oktaService: OktaInterfaceService\r\n\t) {\r\n\t\tthis.logger = logger.createScopedLogger('SysApiDeviceClaimingApiService');\r\n\t\tmonitorLoginState(this.oktaService, {\r\n\t\t\tonLogIn: this.initService.bind(this),\r\n\t\t\tonLogOut: this.suspendService.bind(this)\r\n\t\t});\r\n\t}\r\n\r\n\tpublic claimDevicesThrottled$(devices: DeviceDetection[]): Observable> {\r\n\t\tconst progress: DeviceClaimProgress = {\r\n\t\t\tdone: devices.length === 0, // if no devices, we're alreday done.\r\n\t\t\tstats: {\r\n\t\t\t\ttotalToDo: devices.length,\r\n\t\t\t\tsuccess: 0,\r\n\t\t\t\tinProgress: 0,\r\n\t\t\t\tfailed: 0\r\n\t\t\t},\r\n\t\t\tdevices: []\r\n\t\t};\r\n\t\tconst throttle$ = new Subject();\r\n\r\n\t\treturn new Observable>((observer) => {\r\n\t\t\tthrottle$.subscribe((deviceClaimBatch) => {\r\n\t\t\t\tif (progress.done) {\r\n\t\t\t\t\tobserver.next(progress);\r\n\t\t\t\t\tobserver.complete();\r\n\t\t\t\t\tthrottle$.complete();\r\n\t\t\t\t\tthis.claimOpInProgress$.next(false);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdeviceClaimBatch.forEach((currentDevice) => {\r\n\t\t\t\t\tthis.updateClaimingResultsByDevice(progress, currentDevice, 'in-progress');\r\n\t\t\t\t\tobserver.next(progress);\r\n\r\n\t\t\t\t\tthis.claimDeviceMutation$(currentDevice.device.id, currentDevice.detectionToken)\r\n\r\n\t\t\t\t\t\t// eslint-disable-next-line rxjs/no-nested-subscribe\r\n\t\t\t\t\t\t.subscribe({\r\n\t\t\t\t\t\t\tnext: () => {\r\n\t\t\t\t\t\t\t\tthis.updateClaimingResultsByDevice(progress, currentDevice, 'success');\r\n\t\t\t\t\t\t\t\tobserver.next(progress);\r\n\t\t\t\t\t\t\t\tconst nextDevice = devices.splice(0, 1); // next claim\r\n\t\t\t\t\t\t\t\tthrottle$.next(nextDevice);\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\terror: () => {\r\n\t\t\t\t\t\t\t\tthis.updateClaimingResultsByDevice(progress, currentDevice, 'error');\r\n\t\t\t\t\t\t\t\tobserver.next(progress);\r\n\t\t\t\t\t\t\t\tconst nextDevice = devices.splice(0, 1); // next claim\r\n\t\t\t\t\t\t\t\tthrottle$.next(nextDevice);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\t// Submit 10 requests concurrently. As each one completes, submit another.\r\n\t\t\tconst thisBatch = devices.splice(0, 10);\r\n\t\t\tthis.claimOpInProgress$.next(true);\r\n\t\t\tobserver.next(progress);\r\n\t\t\tthrottle$.next(thisBatch);\r\n\t\t});\r\n\t}\r\n\r\n\tpublic claimDevicesByMacSerialThrottled$(\r\n\t\tmacSerialDevices: MacSerialNumberDevice[]\r\n\t): Observable> {\r\n\t\tconst retVal$ = new Subject>();\r\n\t\tconst progress: DeviceClaimProgress = {\r\n\t\t\tdone: false,\r\n\t\t\tstats: {\r\n\t\t\t\ttotalToDo: macSerialDevices.length,\r\n\t\t\t\tsuccess: 0,\r\n\t\t\t\tinProgress: 0,\r\n\t\t\t\tfailed: 0\r\n\t\t\t},\r\n\t\t\tdevices: []\r\n\t\t};\r\n\r\n\t\tconst throttle$ = new Subject();\r\n\r\n\t\t// let everyone know a claim operation is in progress, and emit the initial progress\r\n\t\tretVal$.next(progress);\r\n\t\tthis.claimOpInProgress$.next(true);\r\n\r\n\t\tthrottle$.subscribe((macSsnRemaining) => {\r\n\t\t\t// if we've sent all of the requests, clenaup and emit final progress value.\r\n\t\t\tif (macSsnRemaining.length === 0) {\r\n\t\t\t\tthis.claimOpInProgress$.next(false);\r\n\t\t\t\tprogress.done = true;\r\n\t\t\t\tretVal$.next(progress);\r\n\t\t\t\tretVal$.complete();\r\n\t\t\t\tthrottle$.complete();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// get the next batch of devices to send\r\n\t\t\tconst macSsnBatch = macSsnRemaining.splice(0, claimByMacSsnBatchSize);\r\n\r\n\t\t\t// indicate claiming is in progress for each mac/ssn value.\r\n\t\t\tmacSsnBatch.forEach((item) => {\r\n\t\t\t\tthis.updateClaimingResultsByDevice(progress, item, 'in-progress');\r\n\t\t\t\tretVal$.next(progress);\r\n\t\t\t});\r\n\r\n\t\t\t// now claim as a batch\r\n\t\t\t// eslint-disable-next-line rxjs/no-nested-subscribe\r\n\t\t\tthis.claimDeviceByMacSerialMutation$(macSsnBatch).subscribe((result) => {\r\n\t\t\t\t// expecting the same number of entries in the response as in the macSsnBatch\r\n\t\t\t\tif (macSsnBatch.length !== result?.claimDeviceUsingMacAndSerial.length) {\r\n\t\t\t\t\tthis.logger.error('claimDevicesByMacSerialThrottled$', 'Wrong number of entries in response', {\r\n\t\t\t\t\t\tmacSsnBatch,\r\n\t\t\t\t\t\tresult\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// for each macSsn value, find the value in the response and update the progress.\r\n\t\t\t\t// if we can't find an entry, mark it as an error... the check above should have flagged\r\n\t\t\t\t// the size mismatch.\r\n\t\t\t\tmacSsnBatch.forEach((macSsnItem) => {\r\n\t\t\t\t\tconst responseItem = result?.claimDeviceUsingMacAndSerial.find(\r\n\t\t\t\t\t\t(resultItem) =>\r\n\t\t\t\t\t\t\tmacSsnItem.device.macAddress === resultItem.macAndSerialClaim.macAddress &&\r\n\t\t\t\t\t\t\tmacSsnItem.device.serialNumber === resultItem.macAndSerialClaim.serialNumber\r\n\t\t\t\t\t);\r\n\t\t\t\t\tconst claimResult = responseItem !== undefined && responseItem.error === null ? 'success' : 'error';\r\n\t\t\t\t\tthis.updateClaimingResultsByDevice(progress, macSsnItem, claimResult);\r\n\t\t\t\t\tretVal$.next(progress);\r\n\t\t\t\t});\r\n\t\t\t\tthrottle$.next(macSsnRemaining);\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tthrottle$.next(macSerialDevices);\r\n\t\treturn retVal$.asObservable();\r\n\t}\r\n\r\n\tpublic unClaimDevicesThrottled$(deviceNodeIds: string[]): Observable {\r\n\t\tlet numUnclaimsLeft = deviceNodeIds.length;\r\n\t\tthis.logger.debug('unclaiming starting', `Num devices to unclaim: ${deviceNodeIds.length}`);\r\n\t\tthis.claimingResults = {\r\n\t\t\tnumSuccess: 0,\r\n\t\t\tnumError: 0,\r\n\t\t\terrors: []\r\n\t\t};\r\n\r\n\t\tconst throttle$ = new Subject();\r\n\r\n\t\treturn new Observable((observer) => {\r\n\t\t\tthrottle$.subscribe((unclaimBatch) => {\r\n\t\t\t\tif (numUnclaimsLeft <= 0) {\r\n\t\t\t\t\tthis.claimOpInProgress$.next(false);\r\n\t\t\t\t\tobserver.next(this.claimingResults);\r\n\t\t\t\t\tobserver.complete();\r\n\t\t\t\t\tthrottle$.complete();\r\n\t\t\t\t\tthis.logger.debug('unclaiming completed', `${this.claimingResults}`);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tunclaimBatch.forEach((deviceNodeId) => {\r\n\t\t\t\t\tthis.unclaimDeviceMutation$(deviceNodeId)\r\n\t\t\t\t\t\t.pipe(take(1))\r\n\t\t\t\t\t\t// eslint-disable-next-line rxjs/no-nested-subscribe\r\n\t\t\t\t\t\t.subscribe({\r\n\t\t\t\t\t\t\tnext: () => {\r\n\t\t\t\t\t\t\t\t++this.claimingResults.numSuccess;\r\n\t\t\t\t\t\t\t\tnumUnclaimsLeft--;\r\n\t\t\t\t\t\t\t\tconst nextDevice = deviceNodeIds.splice(0, 1); // next unclaim\r\n\t\t\t\t\t\t\t\tthrottle$.next(nextDevice);\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\terror: (error) => {\r\n\t\t\t\t\t\t\t\t++this.claimingResults.numError;\r\n\t\t\t\t\t\t\t\tnumUnclaimsLeft--;\r\n\t\t\t\t\t\t\t\tthis.claimingResults.errors.push(error);\r\n\t\t\t\t\t\t\t\tconst nextDevice = deviceNodeIds.splice(0, 1); // next unclaim\r\n\t\t\t\t\t\t\t\tthrottle$.next(nextDevice);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\t// Submit 10 requests concurrently. As each one completes, submit another.\r\n\t\t\tthis.claimOpInProgress$.next(true);\r\n\t\t\tconst thisBatch = deviceNodeIds.splice(0, 10);\r\n\t\t\tthrottle$.next(thisBatch);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Return an observable for the pendingClaims subject containing all pending claims\r\n\t */\r\n\tpublic getPendingClaims$(): Observable {\r\n\t\treturn this.pendingClaims$.asObservable();\r\n\t}\r\n\r\n\t/**\r\n\t * Delete pending claims concurrently\r\n\t * @returns an observable that sends updates on the progress of the deletions\r\n\t */\r\n\tpublic deletePendingClaimsThrottled$(deviceNodeIds: string[]): Observable {\r\n\t\tconst batchSize = 10; // concurrency\r\n\t\tthis.claimOpInProgress$.next(true);\r\n\t\t// execute up to 10 in parallel. blocking. at least one should complete before another is pulled in\r\n\t\treturn from(deviceNodeIds).pipe(\r\n\t\t\tmergeMap(\r\n\t\t\t\t(device) =>\r\n\t\t\t\t\tthis.deletePendingClaimMutation$(device).pipe(\r\n\t\t\t\t\t\tmap((_res) => ({\r\n\t\t\t\t\t\t\tnumSuccess: 1,\r\n\t\t\t\t\t\t\tnumError: 0,\r\n\t\t\t\t\t\t\terrors: []\r\n\t\t\t\t\t\t})),\r\n\t\t\t\t\t\tcatchError((err) =>\r\n\t\t\t\t\t\t\tof({\r\n\t\t\t\t\t\t\t\tnumSuccess: 0,\r\n\t\t\t\t\t\t\t\tnumError: 1,\r\n\t\t\t\t\t\t\t\terrors: [err]\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t),\r\n\t\t\t\tbatchSize\r\n\t\t\t),\r\n\t\t\tmergeScan(\r\n\t\t\t\t(acc, val) =>\r\n\t\t\t\t\tof({\r\n\t\t\t\t\t\t...acc,\r\n\t\t\t\t\t\tnumSuccess: acc.numSuccess + val.numSuccess,\r\n\t\t\t\t\t\tnumError: acc.numError + val.numError,\r\n\t\t\t\t\t\terrors: acc.errors.concat(val.errors)\r\n\t\t\t\t\t}),\r\n\t\t\t\t{\r\n\t\t\t\t\ttotal: deviceNodeIds.length,\r\n\t\t\t\t\tnumSuccess: 0,\r\n\t\t\t\t\tnumError: 0,\r\n\t\t\t\t\terrors: []\r\n\t\t\t\t}\r\n\t\t\t),\r\n\t\t\tfinalize(() => {\r\n\t\t\t\tthis.claimOpInProgress$.next(false);\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Call the pending claims query and repopulate the list in pendingClaims$\r\n\t */\r\n\tprivate fetchPendingClaims(bypassCache = false): void {\r\n\t\t// don't need to cleanup here. should complete on it's own\r\n\t\tthis.listPendingClaimsQuery$(bypassCache).subscribe({\r\n\t\t\tnext: (claims) => {\r\n\t\t\t\tthis.pendingClaims$.next(claims);\r\n\t\t\t},\r\n\t\t\tcomplete: () => {\r\n\t\t\t\tthis.logger.information('fetchPendingClaims()', 'listPendingClaimsQuery$ complete');\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Uses the pending claim status subscription to get updates on pending claims and\r\n\t * pushes those updates into pendingClaims$\r\n\t */\r\n\tprivate createPendingClaimSubscription(): void {\r\n\t\tthis.pendingClaimStatusGQL\r\n\t\t\t.subscribe()\r\n\t\t\t.pipe(takeUntil(this.destroy$))\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: (event) => {\r\n\t\t\t\t\tif (event.data) {\r\n\t\t\t\t\t\tconst pendingClaimStatus = event.data.pendingClaims satisfies PendingClaimStatus;\r\n\t\t\t\t\t\tlet pendingClaims = this.pendingClaims$.value;\r\n\t\t\t\t\t\tconst claimIndex = pendingClaims.findIndex((claim) => claim.id === pendingClaimStatus.id);\r\n\t\t\t\t\t\tconst { status, ...pendingClaim } = pendingClaimStatus;\r\n\t\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\t\tcase 'CREATED':\r\n\t\t\t\t\t\t\t\tpendingClaims = pendingClaims.concat(pendingClaim);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'DELETED':\r\n\t\t\t\t\t\t\t\t// cannot mutate due to reference to pendingClaims$.value\r\n\t\t\t\t\t\t\t\tpendingClaims = pendingClaims\r\n\t\t\t\t\t\t\t\t\t.slice(0, claimIndex)\r\n\t\t\t\t\t\t\t\t\t.concat(pendingClaims.slice(claimIndex + 1));\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tthis.logger.error(\r\n\t\t\t\t\t\t\t\t\t'handleSignInTransition().pendingClaimSubscription',\r\n\t\t\t\t\t\t\t\t\t'subscription error',\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tid: pendingClaim.id\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.pendingClaims$.next(pendingClaims);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\terror: (error) => {\r\n\t\t\t\t\tthis.logger.error(\r\n\t\t\t\t\t\t'createPendingClaimSubscription().pendingClaimStatusGQL',\r\n\t\t\t\t\t\t'subscription error',\r\n\t\t\t\t\t\tJSON.stringify(error)\r\n\t\t\t\t\t);\r\n\t\t\t\t},\r\n\t\t\t\tcomplete: () => {\r\n\t\t\t\t\tthis.logger.information(\r\n\t\t\t\t\t\t'createPendingClaimSubscription().pendingClaimStatusGQL',\r\n\t\t\t\t\t\t'subscription completed'\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Setup method\r\n\t */\r\n\tprivate initService(): void {\r\n\t\tthis.destroy$ = new Subject();\r\n\t\tthis.createPendingClaimSubscription();\r\n\t\tthis.fetchPendingClaims();\r\n\t}\r\n\r\n\t/**\r\n\t * Cleanup method for any subscriptions\r\n\t */\r\n\tprivate suspendService(): void {\r\n\t\tthis.destroy$.next();\r\n\t\tthis.destroy$.complete();\r\n\t}\r\n\r\n\tprivate listPendingClaimsQuery$(bypassCache: boolean): Observable {\r\n\t\treturn this.listPendingClaimGQL\r\n\t\t\t.fetch(\r\n\t\t\t\t{},\r\n\t\t\t\t{\r\n\t\t\t\t\tfetchPolicy: bypassCache ? 'no-cache' : 'cache-first'\r\n\t\t\t\t}\r\n\t\t\t)\r\n\t\t\t.pipe(\r\n\t\t\t\tmap((result) => {\r\n\t\t\t\t\tif (GqlUtils.isSuccess(result)) {\r\n\t\t\t\t\t\tthis.logger.trace('listPendingClaimsQuery', 'Success', { result });\r\n\t\t\t\t\t\treturn result.data?.pendingDeviceClaims;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst err = GqlUtils.decomposeGQLError(result);\r\n\t\t\t\t\tthis.logger.error('listPendingClaimsQuery', 'Failure', JSON.stringify(err));\r\n\t\t\t\t\tthrowError(() => err);\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}),\r\n\t\t\t\tcatchError((error) => {\r\n\t\t\t\t\tthis.logger.error('listPendingClaimsQuery', 'Error', JSON.stringify(error));\r\n\t\t\t\t\treturn throwError(() => error);\r\n\t\t\t\t})\r\n\t\t\t);\r\n\t}\r\n\r\n\tprivate deletePendingClaimMutation$(id: string): Observable {\r\n\t\tconst mutationVars: DeletePendingClaimVariables = {\r\n\t\t\tpendingClaimId: id\r\n\t\t};\r\n\r\n\t\treturn this.deletePendingClaimGQL.mutate(mutationVars).pipe(\r\n\t\t\ttake(1),\r\n\t\t\tmap((result) => {\r\n\t\t\t\tif (result.data && result.data?.deletePendingDeviceClaim.error === null) {\r\n\t\t\t\t\tthis.logger.trace('deletePendingClaimMutation$', 'Success', { result });\r\n\t\t\t\t\treturn result.data.deletePendingDeviceClaim satisfies DeletePendingClaimResult;\r\n\t\t\t\t}\r\n\t\t\t\tconst err = GqlUtils.decomposeGQLError(result);\r\n\t\t\t\tthis.logger.error('deletePendingClaimMutation$', 'Failure', JSON.stringify(err));\r\n\t\t\t\tthrowError(() => err);\r\n\t\t\t\treturn {\r\n\t\t\t\t\tid,\r\n\t\t\t\t\terror: { code: 'UNKNOWN', message: err }\r\n\t\t\t\t};\r\n\t\t\t}),\r\n\t\t\tcatchError((error) => {\r\n\t\t\t\tthis.logger.error('deletePendingClaimMutation$', 'Error', JSON.stringify(error));\r\n\t\t\t\treturn throwError(() => error);\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\r\n\tprivate updateClaimingResultsByDevice(\r\n\t\tprogress: DeviceClaimProgress,\r\n\t\tdevice: DeviceDetection | MacSerialNumberDevice,\r\n\t\tresult: DeviceClaimResult\r\n\t): void {\r\n\t\tif (result === 'in-progress') {\r\n\t\t\tprogress.stats.inProgress += 1;\r\n\t\t\tprogress.devices.push({\r\n\t\t\t\tresult: 'in-progress',\r\n\t\t\t\tdevice: device\r\n\t\t\t});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// otherwise, we need to find the device entry in the array, and update the result value.\r\n\t\tif (result === 'success') progress.stats.success += 1;\r\n\t\tif (result === 'error') progress.stats.failed += 1;\r\n\t\tconst thisDevice = progress.devices.find((d) => d.device.device.id === device.device.id);\r\n\t\tif (thisDevice !== undefined) {\r\n\t\t\tthisDevice.result = result;\r\n\t\t}\r\n\r\n\t\tif (progress.stats.totalToDo <= progress.stats.failed + progress.stats.success) {\r\n\t\t\tprogress.done = true;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate claimDeviceMutation$(deviceNodeId: string, detectionToken: string): Observable {\r\n\t\tthis.logger.trace('claimDeviceMutation$', 'Device claiming mutation request', deviceNodeId);\r\n\t\tconst mutationVars: ClaimDeviceVariables = {\r\n\t\t\tdeviceNodeId: deviceNodeId,\r\n\t\t\ttokenId: detectionToken\r\n\t\t};\r\n\r\n\t\treturn this.claimDeviceGQL.mutate(mutationVars).pipe(\r\n\t\t\tmap((result) => {\r\n\t\t\t\tif (GqlUtils.isSuccess(result)) {\r\n\t\t\t\t\tthis.logger.trace('claimDeviceMutation$', 'Success', { result });\r\n\t\t\t\t\treturn result.data?.claimDevice;\r\n\t\t\t\t}\r\n\t\t\t\tconst err = GqlUtils.decomposeGQLError(result);\r\n\t\t\t\tthis.logger.error('claimDeviceMutation$', 'Failure', JSON.stringify(err));\r\n\t\t\t\tthrowError(() => err);\r\n\t\t\t\treturn false;\r\n\t\t\t}),\r\n\t\t\tcatchError((error) => {\r\n\t\t\t\tthis.logger.error('claimDeviceMutation$', 'Error', JSON.stringify({ error }));\r\n\t\t\t\treturn throwError(() => error);\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\r\n\tprivate claimDeviceByMacSerialMutation$(\r\n\t\tdevices: MacSerialNumberDevice[]\r\n\t): Observable {\r\n\t\tthis.logger.trace('claimDeviceByMacSerialMutation$', 'Device claiming mutation request', { devices });\r\n\r\n\t\tconst mutationVars: ClaimDeviceByMacSerialNumberVariables = {\r\n\t\t\tclaimRequests: devices.map((d) => ({\r\n\t\t\t\tmacAddress: d.device.macAddress,\r\n\t\t\t\tserialNumber: d.device.serialNumber\r\n\t\t\t}))\r\n\t\t};\r\n\r\n\t\treturn this.claimDeviceMacSerialGQL.mutate(mutationVars).pipe(\r\n\t\t\tmap((result) => {\r\n\t\t\t\tif (GqlUtils.isSuccess(result) && result.data?.claimDeviceUsingMacAndSerial !== null) {\r\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n\t\t\t\t\treturn result.data!;\r\n\t\t\t\t}\r\n\t\t\t\treturn this.makeClaimErrorOpResult(devices, { code: ErrorCode.Unknown, message: 'unknown' });\r\n\t\t\t}),\r\n\t\t\tcatchError((_error) => {\r\n\t\t\t\tthis.logger.error('claimDeviceMacSerialGQL', 'Error', JSON.stringify(_error));\r\n\t\t\t\treturn of(this.makeClaimErrorOpResult(devices, { code: ErrorCode.Unknown, message: 'Error Caught' }));\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\r\n\t// this is a convenience function to walk the list of mac/serial values and mark it as an error.\r\n\tprivate makeClaimErrorOpResult(\r\n\t\tdevices: MacSerialNumberDevice[],\r\n\t\terror: { code: ErrorCode; message: string }\r\n\t): ClaimDeviceByMacSerialNumberOpResult {\r\n\t\treturn {\r\n\t\t\tclaimDeviceUsingMacAndSerial: devices.map((d) => ({\r\n\t\t\t\tmacAndSerialClaim: {\r\n\t\t\t\t\tmacAddress: d.device.macAddress,\r\n\t\t\t\t\tserialNumber: d.device.serialNumber\r\n\t\t\t\t},\r\n\t\t\t\terror: error\r\n\t\t\t}))\r\n\t\t};\r\n\t}\r\n\r\n\tprivate unclaimDeviceMutation$(deviceNodeId: string): Observable {\r\n\t\tthis.logger.trace('unclaimDeviceMutation$', 'Device unclaiming mutation request', deviceNodeId);\r\n\t\tconst mutationVars: UnclaimDeviceVariables = {\r\n\t\t\tdeviceNodeId: deviceNodeId\r\n\t\t};\r\n\r\n\t\treturn this.unclaimDeviceGQL.mutate(mutationVars).pipe(\r\n\t\t\tmap((result) => {\r\n\t\t\t\tif (GqlUtils.isSuccess(result)) {\r\n\t\t\t\t\tthis.logger.trace('unclaimDeviceMutation$', 'Success', { result });\r\n\t\t\t\t\treturn result.data?.unclaimDevice;\r\n\t\t\t\t}\r\n\t\t\t\tconst err = GqlUtils.decomposeGQLError(result);\r\n\t\t\t\tthis.logger.error('unclaimDeviceMutation$', 'Failure', JSON.stringify(err));\r\n\t\t\t\tthrowError(() => err);\r\n\t\t\t\treturn false;\r\n\t\t\t}),\r\n\t\t\tcatchError((error) => {\r\n\t\t\t\tthis.logger.error('unclaimDeviceMutation$', 'Error', JSON.stringify(error));\r\n\t\t\t\treturn throwError(() => error);\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n}\r\n","class t extends Error{}class e extends t{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class s extends t{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class n extends t{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class r extends t{constructor(t){super(`Invalid unit ${t}`),Object.setPrototypeOf(this,r.prototype)}}class i extends t{constructor(t){super(`${t} is an invalid or unknown zone specifier`),Object.setPrototypeOf(this,i.prototype)}}class o extends t{constructor(t){super(t),Object.setPrototypeOf(this,o.prototype)}}class a extends t{constructor(t){super(t),Object.setPrototypeOf(this,a.prototype)}}class u extends t{constructor(){super(\"Zone is an abstract class\"),Object.setPrototypeOf(this,u.prototype)}}function c(...t){t.length}class l{get type(){throw new u}get ianaName(){return this.name}get name(){throw new u}get isUniversal(){throw new u}offsetName(t,e){throw c(t,e),new u}formatOffset(t,e){throw c(t,e),new u}offset(t){throw c(t),new u}equals(t){throw c(t),new u}get isValid(){throw new u}}var h=Intl;let d={};const m={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let f={};class y extends l{constructor(t){super(),this._zoneName=t,this._valid=y.isValidZone(t)}static create(t){return f[t]||(f[t]=new y(t)),f[t]}static resetCache(){f={},d={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new h.DateTimeFormat(\"en-US\",{timeZone:t}).format(),!0}catch(t){return!1}}get type(){return\"iana\"}get name(){return this._zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:s}={}){return Wt(t,e,s,this.name)}formatOffset(t,e){return Jt(this.offset(t),e)}offset(t){const e=new Date(t);if(isNaN(+e))return NaN;const s=function(t){if(!d[t])try{d[t]=new h.DateTimeFormat(\"en-US\",{hour12:!1,timeZone:t,year:\"numeric\",month:\"2-digit\",day:\"2-digit\",hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\",era:\"short\"})}catch(e){throw new i(t)}return d[t]}(this.name);let n;const[r,o,a,u,c,l,f]=typeof s.formatToParts==typeof isNaN?function(t,e){const s=t.formatToParts(e),n=[];for(let t=0;t=0?_:1e3+_,(qt({year:n||+r,month:+o,day:+a,hour:+(24===c?0:c),minute:+l,second:+f,millisecond:0})-y)/6e4}equals(t){return\"iana\"===t.type&&t.name===this.name}get isValid(){return this._valid}}const _=\"numeric\",g=\"short\",p=\"long\",w={year:_,month:_,day:_},O={year:_,month:g,day:_},b={year:_,month:g,day:_,weekday:g},v={year:_,month:p,day:_},T={year:_,month:p,day:_,weekday:p},S={hour:_,minute:_},k={hour:_,minute:_,second:_},M={hour:_,minute:_,second:_,timeZoneName:g},N={hour:_,minute:_,second:_,timeZoneName:p},D={hour:_,minute:_,hourCycle:\"h23\"},E={hour:_,minute:_,second:_,hourCycle:\"h23\"},j={hour:_,minute:_,second:_,hourCycle:\"h23\",timeZoneName:g},x={hour:_,minute:_,second:_,hourCycle:\"h23\",timeZoneName:p},I={year:_,month:_,day:_,hour:_,minute:_},V={year:_,month:_,day:_,hour:_,minute:_,second:_},C={year:_,month:g,day:_,hour:_,minute:_},Z={year:_,month:g,day:_,hour:_,minute:_,second:_},F={year:_,month:g,day:_,weekday:g,hour:_,minute:_},$={year:_,month:p,day:_,hour:_,minute:_,timeZoneName:g},z={year:_,month:p,day:_,hour:_,minute:_,second:_,timeZoneName:g},L={year:_,month:p,day:_,weekday:p,hour:_,minute:_,timeZoneName:p},q={year:_,month:p,day:_,weekday:p,hour:_,minute:_,second:_,timeZoneName:p},A=[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],U=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],W=[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"];function H(t){switch(t){case\"narrow\":return[...W];case\"short\":return[...U];case\"long\":return[...A];case\"numeric\":return[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\"];case\"2-digit\":return[\"01\",\"02\",\"03\",\"04\",\"05\",\"06\",\"07\",\"08\",\"09\",\"10\",\"11\",\"12\"]}}const P=[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\",\"Sunday\"],R=[\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\",\"Sun\"],J=[\"M\",\"T\",\"W\",\"T\",\"F\",\"S\",\"S\"];function Y(t){switch(t){case\"narrow\":return[...J];case\"short\":return[...R];case\"long\":return[...P];case\"numeric\":return[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\"]}}const G=[\"AM\",\"PM\"],B=[\"Before Christ\",\"Anno Domini\"],Q=[\"BC\",\"AD\"],K=[\"B\",\"A\"];function X(t){switch(t){case\"narrow\":return[...K];case\"short\":return[...Q];case\"long\":return[...B]}}let tt={};let et={};function st(t,e={}){const s=JSON.stringify([t,e]);let n=et[s];return n||(n=new h.DateTimeFormat(t,e),et[s]=n),n}let nt={};let rt,it={};function ot(t,e,s,n){return\"en\"===t.listingMode()?s(e):n(e)}class at{constructor(t,e,s){this._padTo=s.padTo||0,this._floor=s.floor||!1;const n=function(t,e){var s={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(s[n]=t[n]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r0){const e=Object.assign({useGrouping:!1},s);this._padTo>0&&(e.minimumIntegerDigits=s.padTo),this._inf=function(t,e){const s=JSON.stringify([t,e]);let n=nt[s];return n||(n=new h.NumberFormat(t,e),nt[s]=n),n}(t,e)}}format(t){if(this._inf){const e=this._floor?Math.floor(t):t;return this._inf.format(e)}return It(this._floor?Math.floor(t):Ft(t,3),this._padTo)}}class ut{constructor(t,e,s){let n;if(this._opts=s,this._opts.timeZone)this._dt=t;else if(\"fixed\"===t.zone.type){const e=t.offset/60*-1,s=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&y.create(s).isValid?(n=s,this._dt=t):(n=\"UTC\",this._dt=0===t.offset?t:t.setZone(\"UTC\").plus({minutes:t.offset}),this._originalZone=t.zone)}else\"system\"===t.zone.type?this._dt=t:\"iana\"===t.zone.type?(this._dt=t,n=t.zone.name):(n=\"UTC\",this._dt=t.setZone(\"UTC\").plus({minutes:t.offset}),this._originalZone=t.zone);const r=Object.assign(Object.assign({},this._opts),{timeZone:this._opts.timeZone||n});this._dtf=st(e,r)}get dtf(){return this._dtf}format(){return this._originalZone?this.formatToParts().map((({value:t})=>t)).join(\"\"):this.dtf.format(this._dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this._dt.toJSDate());return this._originalZone?t.map((t=>{if(\"timeZoneName\"===t.type){const e=this._originalZone.offsetName(this._dt.ts,{locale:this._dt.locale,format:this._opts.timeZoneName});return Object.assign(Object.assign({},t),{value:e})}return t})):t}resolvedOptions(){return this._dtf.resolvedOptions()}}class ct{constructor(t,e,s){this._opts=Object.assign({style:\"long\"},s),!e&&Et()&&(this._rtf=function(t,e={}){const s=JSON.stringify([t,e]);let n=it[s];return n||(n=new h.RelativeTimeFormat(t,e),it[s]=n),n}(t,s))}format(t,e){return this._rtf?this._rtf.format(t,e):function(t,e,s=\"always\",n=!1){const r=Ye.normalizeUnit(t),i={years:[\"year\",\"yr.\"],quarters:[\"quarter\",\"qtr.\"],months:[\"month\",\"mo.\"],weeks:[\"week\",\"wk.\"],days:[\"day\",\"day\",\"days\"],hours:[\"hour\",\"hr.\"],minutes:[\"minute\",\"min.\"],seconds:[\"second\",\"sec.\"],milliseconds:[]}[r],o=-1===[\"hours\",\"minutes\",\"seconds\"].indexOf(r);if(\"auto\"===s&&o){const t=\"days\"===r;switch(e){case 1:return t?\"tomorrow\":`next ${i[0]}`;case-1:return t?\"yesterday\":`last ${i[0]}`;case 0:return t?\"today\":`this ${i[0]}`}}const a=Object.is(e,-0)||e<0,u=Math.abs(e),c=1===u,l=n?c?i[1]:i[2]||i[1]:c?i[0]:r;return a?`${u} ${l} ago`:`in ${u} ${l}`}(e,t,this._opts.numeric,\"long\"!==this._opts.style)}formatToParts(t,e){return this._rtf?this._rtf.formatToParts(t,e):[]}}class lt{constructor(t,e,s,n){const[r,i,o]=function(t){const e=t.indexOf(\"-x-\");-1!==e&&(t=t.substring(0,e));const s=t.indexOf(\"-u-\");if(-1===s)return[t];{let e,n;try{e=st(t).resolvedOptions(),n=t}catch(r){const i=t.substring(0,s);e=st(i).resolvedOptions(),n=i}const{numberingSystem:r,calendar:i}=e;return[n,r,i]}}(t);this.locale=r,this.numberingSystem=e||i,this.outputCalendar=s||o,this._intl=function(t,e,s){return s||e?(t.includes(\"-u-\")||(t+=\"-u\"),s&&(t+=`-ca-${s}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this._weekdaysCache={format:{},standalone:{}},this._monthsCache={format:{},standalone:{}},this._meridiemCache=void 0,this._eraCache={},this._specifiedLocale=n,this._fastNumbersCached=void 0}get fastNumbers(){return void 0===this._fastNumbersCached&&(this._fastNumbersCached=this._supportsFastNumbers()),this._fastNumbersCached}static fromOpts(t){return lt.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,e,s,n=!1){const r=t||St.defaultLocale,i=r||(n?\"en-US\":(rt||(rt=(new h.DateTimeFormat).resolvedOptions().locale),rt)),o=e||St.defaultNumberingSystem,a=s||St.defaultOutputCalendar;return new lt(i,o,a,r)}static resetCache(){rt=void 0,tt={},et={},nt={},it={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:s}={}){return lt.create(t,e,s)}listingMode(){const t=this.isEnglish(),e=!(null!==this.numberingSystem&&\"latn\"!==this.numberingSystem||null!==this.outputCalendar&&\"gregory\"!==this.outputCalendar);return t&&e?\"en\":\"intl\"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?lt.create(t.locale||this._specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone(Object.assign(Object.assign({},t),{defaultToEN:!0}))}redefaultToSystem(t={}){return this.clone(Object.assign(Object.assign({},t),{defaultToEN:!1}))}months(t,e=!1){return ot(this,t,H,(t=>{const s=e?{month:t,day:\"numeric\"}:{month:t},n=e?\"format\":\"standalone\";return this._monthsCache[n][t]||(this._monthsCache[n][t]=function(t){const e=[];for(let s=1;s<=12;s++){const n=Js.utc(2016,s,1);e.push(t(n))}return e}((t=>this.extract(t,s,\"month\")))),this._monthsCache[n][t]}))}weekdays(t,e=!1){return ot(this,t,Y,(t=>{const s=e?{weekday:t,year:\"numeric\",month:\"long\",day:\"numeric\"}:{weekday:t},n=e?\"format\":\"standalone\";return this._weekdaysCache[n][t]||(this._weekdaysCache[n][t]=function(t){const e=[];for(let s=1;s<=7;s++){const n=Js.utc(2016,11,13+s);e.push(t(n))}return e}((t=>this.extract(t,s,\"weekday\")))),this._weekdaysCache[n][t]}))}meridiems(){return ot(this,\"long\",(()=>G),(()=>(void 0===this._meridiemCache&&(this._meridiemCache=[Js.utc(2016,11,13,9),Js.utc(2016,11,13,19)].map((t=>this.extract(t,{hour:\"numeric\",hourCycle:\"h12\"},\"dayPeriod\")))),this._meridiemCache)))}eras(t){return ot(this,t,X,(t=>{const e={era:t};return this._eraCache[t]||(this._eraCache[t]=[Js.utc(-40,1,1),Js.utc(2017,1,1)].map((t=>this.extract(t,e,\"era\")))),this._eraCache[t]}))}extract(t,e,s){const n=this.dtFormatter(t,e).formatToParts().find((t=>t.type.toLowerCase()===s.toLowerCase()));if(!n)throw new Error(`Invalid extract field ${s}`);return n.value}numberFormatter(t={}){return new at(this._intl,this.fastNumbers,t)}dtFormatter(t,e={}){return new ut(t,this._intl,e)}relFormatter(t={}){return new ct(this._intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const s=JSON.stringify([t,e]);let n=tt[s];return n||(n=new h.ListFormat(t,e),tt[s]=n),n}(this._intl,t)}isEnglish(){return!!~[\"en\",\"en-us\"].indexOf(this.locale.toLowerCase())||new h.DateTimeFormat(this._intl).resolvedOptions().locale.startsWith(\"en-us\")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}_supportsFastNumbers(){return(!this.numberingSystem||\"latn\"===this.numberingSystem)&&(\"latn\"===this.numberingSystem||!this.locale||this.locale.startsWith(\"en\")||\"latn\"===h.DateTimeFormat(this._intl).resolvedOptions().numberingSystem)}}let ht=null;class dt extends l{constructor(t){super(),this._fixed=t}static get utcInstance(){return null===ht&&(ht=new dt(0)),ht}get isValid(){return!0}get ianaName(){return 0===this._fixed?\"Etc/UTC\":`Etc/GMT${Jt(-this._fixed,\"narrow\")}`}get name(){return 0===this._fixed?\"UTC\":`UTC${Jt(this._fixed,\"narrow\")}`}get type(){return\"fixed\"}get isUniversal(){return!0}static instance(t){return 0===t?dt.utcInstance:new dt(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);if(e)return new dt(Ht(e[1],e[2]))}return null}offsetName(){return this.name}formatOffset(t,e){return Jt(this._fixed,e)}offset(){return this._fixed}equals(t){return\"fixed\"===t.type&&t._fixed===this._fixed}}class mt extends l{constructor(t){super(),this._zoneName=t,Object.setPrototypeOf(this,mt.prototype)}get type(){return\"invalid\"}get name(){return this._zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return\"\"}offset(){return NaN}equals(){return!1}get isValid(){return!1}}let ft=null;class yt extends l{static get instance(){return null===ft&&(ft=new yt),ft}get type(){return\"system\"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:s}){return Wt(t,e,s)}formatOffset(t,e){return Jt(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return\"system\"===t.type}get isValid(){return!0}}const _t=(t,e)=>{if(Mt(t)||null===t)return e;if(t instanceof l)return t;if(\"string\"==typeof t){const s=t.toLowerCase();return\"default\"===s?e:\"local\"===s||\"system\"===s?yt.instance:\"utc\"===s||\"gmt\"===s?dt.utcInstance:dt.parseSpecifier(s)||y.create(t)}return Nt(t)?dt.instance(t):\"object\"==typeof t&&t.offset&&\"number\"==typeof t.offset?t:new mt(t)};let gt,pt,wt,Ot=()=>Date.now(),bt=\"system\",vt=60,Tt=!1;class St{static get now(){return Ot}static set now(t){Ot=t}static set defaultZoneLike(t){bt=t}static set defaultZone(t){bt=t}static get defaultZone(){return _t(bt,yt.instance)}static get defaultLocale(){return gt}static set defaultLocale(t){gt=t}static get defaultNumberingSystem(){return pt}static set defaultNumberingSystem(t){pt=t}static get defaultOutputCalendar(){return wt}static set defaultOutputCalendar(t){wt=t}static get twoDigitCutoffYear(){return vt}static set twoDigitCutoffYear(t){vt=t%100}static get throwOnInvalid(){return Tt}static set throwOnInvalid(t){Tt=t}static resetCaches(){lt.resetCache(),y.resetCache()}}function kt(t){return void 0!==t}function Mt(t){return void 0===t}function Nt(t){return\"number\"==typeof t}function Dt(t){return Nt(t)&&t%1==0}function Et(){try{return void 0!==h&&!!h.RelativeTimeFormat}catch(t){return!1}}function jt(t,e,s){if(0===t.length)return;return t.reduce(((t,n)=>{const r=[e(n),n];return s(t[0],r[0])===t[0]?t:r}),[e(t[0]),t[0]])[1]}function xt(t,e,s){return Dt(t)&&t>=e&&t<=s}function It(t,e=2){const s=t<0?\"-\":\"\",n=s?-1*+t:t;let r;return r=n.toString().length=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function At(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,s=t-1,n=(s+Math.floor(s/4)-Math.floor(s/100)+Math.floor(s/400))%7;return 4===e||3===n?53:52}function Ut(t){return t>99?t:t>St.twoDigitCutoffYear?1900+t:2e3+t}function Wt(t,e,s,n){const r=new Date(t),i={hourCycle:\"h23\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\",hour:\"2-digit\",minute:\"2-digit\",timeZone:n},o=Object.assign({timeZoneName:e},i),a=new h.DateTimeFormat(s,o).formatToParts(r).find((t=>\"timezonename\"===t.type.toLowerCase()));return a?a.value:null}function Ht(t,e){let s=parseInt(t,10);Number.isNaN(s)&&(s=0);const n=parseInt(e,10)||0;return 60*s+(s<0||Object.is(s,-0)?-n:n)}function Pt(t){const e=Number(t);if(\"boolean\"==typeof t||\"\"===t||Number.isNaN(e))throw new a(`Invalid unit value ${t}`);return e}function Rt(t,e){return Object.keys(t).reduce(((s,n)=>(void 0!==t[n]&&null!==t[n]&&(s[e(n)]=Pt(t[n])),s)),{})}function Jt(t,e){const s=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),r=t>=0?\"+\":\"-\";switch(e){case\"short\":return`${r}${It(s,2)}:${It(n,2)}`;case\"narrow\":return`${r}${s}${n>0?`:${n}`:\"\"}`;case\"techie\":return`${r}${It(s,2)}${It(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Yt(t){return function(t,e){return e.reduce(((e,s)=>(e[s]=t[s],e)),{})}(t,[\"hour\",\"minute\",\"second\",\"millisecond\"])}const Gt=[\"years\",\"quarters\",\"months\",\"weeks\",\"days\",\"hours\",\"minutes\",\"seconds\",\"milliseconds\"],Bt=Gt.slice(0).reverse(),Qt=[\"years\",\"months\",\"days\",\"hours\",\"minutes\",\"seconds\",\"milliseconds\"];function Kt(t,e){let s=\"\";for(const n of t)n.literal?s+=n.val:s+=e(n.val);return s}const Xt={D:w,DD:O,DDD:v,DDDD:T,t:S,tt:k,ttt:M,tttt:N,T:D,TT:E,TTT:j,TTTT:x,f:I,ff:C,fff:$,ffff:L,F:V,FF:Z,FFF:z,FFFF:q};class te{constructor(t,e){this._opts=e,this._loc=t,this._systemLoc=void 0}static create(t,e={}){return new te(t,e)}static parseFormat(t){let e=null,s=\"\",n=!1;const r=[];for(let i=0;i0&&r.push({literal:n||/^\\s+$/.test(s),val:s}),e=null,s=\"\",n=!n):n||o===e?s+=o:(s.length>0&&r.push({literal:/^\\s+$/.test(s),val:s}),s=o,e=o)}return s.length>0&&r.push({literal:n||/^\\s+$/.test(s),val:s}),r}static macroTokenToFormatOpts(t){return Xt[t]}formatWithSystemDefault(t,e){void 0===this._systemLoc&&(this._systemLoc=this._loc.redefaultToSystem());return this._systemLoc.dtFormatter(t,Object.assign(Object.assign({},this._opts),e)).format()}dtFormatter(t,e={}){return this._loc.dtFormatter(t,Object.assign(Object.assign({},this._opts),e))}formatDateTime(t,e){return this.dtFormatter(t,e).format()}formatDateTimeParts(t,e){return this.dtFormatter(t,e).formatToParts()}formatInterval(t,e={}){if(!t.isValid)throw Error(\"Invalid Interval provided!\");return this.dtFormatter(t.start,e).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,e={}){return this.dtFormatter(t,e).resolvedOptions()}num(t,e=0){if(this._opts.forceSimple)return It(t,e);const s=Object.assign({},this._opts);return e>0&&(s.padTo=e),this._loc.numberFormatter(s).format(t)}formatDateTimeFromString(t,e){const s=\"en\"===this._loc.listingMode(),n=this._loc.outputCalendar&&\"gregory\"!==this._loc.outputCalendar,r=(e,s)=>this._loc.extract(t,e,s),i=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?\"Z\":t.isValid?t.zone.formatOffset(t.ts,e.format):\"\",o=()=>s?function(t){return G[t.hour<12?0:1]}(t):r({hour:\"numeric\",hourCycle:\"h12\"},\"dayPeriod\"),a=(e,n)=>s?function(t,e){return H(e)[t.month-1]}(t,e):r(n?{month:e}:{month:e,day:\"numeric\"},\"month\"),u=(e,n)=>s?function(t,e){return Y(e)[t.weekday-1]}(t,e):r(n?{weekday:e}:{weekday:e,month:\"long\",day:\"numeric\"},\"weekday\"),c=e=>{const s=te.macroTokenToFormatOpts(e);return s?this.formatWithSystemDefault(t,s):e},l=e=>s?function(t,e){return X(e)[t.year<0?0:1]}(t,e):r({era:e},\"era\");return Kt(te.parseFormat(e),(e=>{switch(e){case\"S\":return this.num(t.millisecond);case\"u\":case\"SSS\":return this.num(t.millisecond,3);case\"s\":return this.num(t.second);case\"ss\":return this.num(t.second,2);case\"uu\":return this.num(Math.floor(t.millisecond/10),2);case\"uuu\":return this.num(Math.floor(t.millisecond/100));case\"m\":return this.num(t.minute);case\"mm\":return this.num(t.minute,2);case\"h\":return this.num(t.hour%12==0?12:t.hour%12);case\"hh\":return this.num(t.hour%12==0?12:t.hour%12,2);case\"H\":return this.num(t.hour);case\"HH\":return this.num(t.hour,2);case\"Z\":return i({format:\"narrow\",allowZ:this._opts.allowZ});case\"ZZ\":return i({format:\"short\",allowZ:this._opts.allowZ});case\"ZZZ\":return i({format:\"techie\",allowZ:this._opts.allowZ});case\"ZZZZ\":return t.zone.offsetName(t.ts,{format:\"short\",locale:this._loc.locale})||\"\";case\"ZZZZZ\":return t.zone.offsetName(t.ts,{format:\"long\",locale:this._loc.locale})||\"\";case\"z\":return t.zoneName||\"\";case\"a\":return o();case\"d\":return n?r({day:\"numeric\"},\"day\"):this.num(t.day);case\"dd\":return n?r({day:\"2-digit\"},\"day\"):this.num(t.day,2);case\"c\":case\"E\":return this.num(t.weekday);case\"ccc\":return u(\"short\",!0);case\"cccc\":return u(\"long\",!0);case\"ccccc\":return u(\"narrow\",!0);case\"EEE\":return u(\"short\",!1);case\"EEEE\":return u(\"long\",!1);case\"EEEEE\":return u(\"narrow\",!1);case\"L\":return n?r({month:\"numeric\",day:\"numeric\"},\"month\"):this.num(t.month);case\"LL\":return n?r({month:\"2-digit\",day:\"numeric\"},\"month\"):this.num(t.month,2);case\"LLL\":return a(\"short\",!0);case\"LLLL\":return a(\"long\",!0);case\"LLLLL\":return a(\"narrow\",!0);case\"M\":return n?r({month:\"numeric\"},\"month\"):this.num(t.month);case\"MM\":return n?r({month:\"2-digit\"},\"month\"):this.num(t.month,2);case\"MMM\":return a(\"short\",!1);case\"MMMM\":return a(\"long\",!1);case\"MMMMM\":return a(\"narrow\",!1);case\"y\":return n?r({year:\"numeric\"},\"year\"):this.num(t.year);case\"yy\":return n?r({year:\"2-digit\"},\"year\"):this.num(parseInt(t.year.toString().slice(-2),10),2);case\"yyyy\":return n?r({year:\"numeric\"},\"year\"):this.num(t.year,4);case\"yyyyyy\":return n?r({year:\"numeric\"},\"year\"):this.num(t.year,6);case\"G\":return l(\"short\");case\"GG\":return l(\"long\");case\"GGGGG\":return l(\"narrow\");case\"kk\":return this.num(parseInt(t.weekYear.toString().slice(-2),10),2);case\"kkkk\":return this.num(t.weekYear,4);case\"W\":return this.num(t.weekNumber);case\"WW\":return this.num(t.weekNumber,2);case\"o\":return this.num(t.ordinal);case\"ooo\":return this.num(t.ordinal,3);case\"q\":return this.num(t.quarter);case\"qq\":return this.num(t.quarter,2);case\"X\":return this.num(Math.floor(t.ts/1e3));case\"x\":return this.num(t.ts);default:return c(e)}}))}formatDurationFromString(t,e){const s=t=>{switch(t[0]){case\"S\":return\"milliseconds\";case\"s\":return\"seconds\";case\"m\":return\"minutes\";case\"h\":return\"hours\";case\"d\":return\"days\";case\"M\":return\"months\";case\"y\":return\"years\";default:return}},n=te.parseFormat(e),r=n.reduce(((t,{literal:e,val:s})=>e?t:t.concat(s)),[]);return Kt(n,(t=>e=>{const n=s(e);return n?this.num(t.get(n),e.length):e})(t.shiftTo(...r.map(s).filter((t=>!!t)))))}}function ee(...t){const e=t.reduce(((t,e)=>t+e.source),\"\");return RegExp(`^${e}$`)}function se(...t){return e=>t.reduce((([t,s,n],r)=>{const[i,o,a]=r(e,n);return[Object.assign(Object.assign({},t),i),o||s,a]}),[{},null,1]).slice(0,2)}function ne(t,...e){if(null==t)return[null,null];for(const[s,n]of e){const e=s.exec(t);if(e)return n(e)}return[null,null]}function re(...t){return(e,s)=>{const n={};let r;for(r=0;r\"number\"==typeof t&&(e||t&&l)?-t:t;return[{years:d(Ct(s)),months:d(Ct(n)),weeks:d(Ct(r)),days:d(Ct(i)),hours:d(Ct(o)),minutes:d(Ct(a)),seconds:d(Ct(u),\"-0\"===u),milliseconds:d(Zt(c),h)}]}const be={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ve(t,e,s,n,r,i,o){let a;t&&(a=t.length>3?P.indexOf(t)+1:R.indexOf(t)+1);return{year:2===e.length?Ut(Vt(e)):Vt(e),month:U.indexOf(s)+1,day:Vt(n),hour:Vt(r),minute:Vt(i),second:Vt(o),weekday:a}}const Te=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;function Se(t){const[,e,s,n,r,i,o,a,u,c,l,h]=t,d=ve(e,r,n,s,i,o,a);let m;return m=u?be[u]:c?0:Ht(l,h),[d,new dt(m)]}const ke=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,Me=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,Ne=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;function De(t){const[,e,s,n,r,i,o,a]=t;return[ve(e,r,n,s,i,o,a),dt.utcInstance]}function Ee(t){const[,e,s,n,r,i,o,a]=t;return[ve(e,a,s,n,r,i,o),dt.utcInstance]}const je=ee(/([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/,ce),xe=ee(/(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/,ce),Ie=ee(/(\\d{4})-?(\\d{3})/,ce),Ve=ee(ue),Ce=se((function(t,e){return[{year:fe(t,e,0),month:fe(t,e+1,1),day:fe(t,e+2,1)},null,e+3]}),ye,_e,ge),Ze=se(le,ye,_e,ge),Fe=se(he,ye,_e,ge),$e=se(ye,_e,ge);const ze=ee(/(\\d{4})-(\\d\\d)-(\\d\\d)/,me),Le=ee(de),qe=se(ye,_e,ge);class Ae{constructor(t,e){this.reason=t,this.explanation=e,this._formattedExplanation=\"\",e&&(this._formattedExplanation=`: ${e}`)}toMessage(){return`${this.reason}${this._formattedExplanation}`}}const Ue={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},We=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},Ue),He=365.2425,Pe=30.436875,Re=Object.assign({years:{quarters:4,months:12,weeks:52.1775,days:He,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:Pe,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},Ue);function Je(t,e,s,n,r){const i=t[r][s],o=e[s]/i,a=!(Math.sign(o)===Math.sign(n[r]))&&0!==n[r]&&Math.abs(o)<=1?function(t){return t<0?Math.floor(t):Math.ceil(t)}(o):Math.trunc(o);n[r]=n[r]+a,e[s]=e[s]-a*i}class Ye{constructor(t){let e,s;\"longterm\"===t.conversionAccuracy||!1?(s=\"longterm\",e=Re):(s=\"casual\",e=We),t.matrix&&(e=t.matrix),this._values=t.values||{},this._loc=t.loc||lt.create(),this._conversionAccuracy=s,this._invalid=t.invalid||null,this._matrix=e,this._isLuxonDuration=!0}get conversionAccuracy(){return this._conversionAccuracy}get invalidExplanation(){return this._invalid?this._invalid.explanation:null}get invalidReason(){return this._invalid?this._invalid.reason:null}get isValid(){return null===this._invalid}get locale(){return this.isValid?this._loc.locale:void 0}get matrix(){return this._matrix}get numberingSystem(){return this.isValid?this._loc.numberingSystem:void 0}static fromISOTime(t,e={}){const[s]=function(t){return ne(t,[pe,se(ye)])}(t);return s?Ye.fromObject(s,e):Ye.invalid(\"unparsable\",`the input \"${t}\" can't be parsed as ISO 8601`)}static fromMillis(t,e={}){return Ye.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||\"object\"!=typeof t)throw new a(\"Duration.fromObject: argument expected to be an object, got \"+(null===t?\"null\":typeof t));return new Ye({values:Rt(t,Ye.normalizeUnit),loc:lt.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(t){if(Nt(t))return Ye.fromMillis(t);if(Ye.isDuration(t))return t;if(\"object\"==typeof t)return Ye.fromObject(t);throw new a(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[s]=function(t){return ne(t,[we,Oe])}(t);return s?Ye.fromObject(s,e):Ye.invalid(\"unparsable\",`the input \"${t}\" can't be parsed as ISO 8601`)}static isDuration(t){return!!t&&t._isLuxonDuration||!1}static invalid(t,e){if(!t)throw new a(\"need to specify a reason the Duration is invalid\");const n=t instanceof Ae?t:new Ae(t,e);if(St.throwOnInvalid)throw new s(n);return new Ye({invalid:n})}static normalizeUnit(t){const e={year:\"years\",years:\"years\",quarter:\"quarters\",quarters:\"quarters\",month:\"months\",months:\"months\",week:\"weeks\",weeks:\"weeks\",day:\"days\",days:\"days\",hour:\"hours\",hours:\"hours\",minute:\"minutes\",minutes:\"minutes\",second:\"seconds\",seconds:\"seconds\",millisecond:\"milliseconds\",milliseconds:\"milliseconds\"}[t];if(!e)throw new r(t);return e}getMaxUnit(t=!1){const e=t?Qt:Gt,s=this.shiftTo(...e).toObject();return e.find((t=>(s[t]||0)>0))||Bt[0]}toFormat(t,e={floor:!0}){const s=Object.assign(Object.assign({},e),{floor:!1!==e.round&&!1!==e.floor});return this.isValid?te.create(this._loc,s).formatDurationFromString(this,t):\"Invalid Duration\"}toHuman(t={}){const e=this.getMaxUnit(!0),s=t.onlyHumanUnits?Qt:Gt,n=this.shiftTo(...s.slice(s.indexOf(e))).toObject(),r=s.map((e=>{const s=n[e];return Mt(s)||0===s?null:this._loc.numberFormatter(Object.assign(Object.assign({style:\"unit\",unitDisplay:\"long\"},t),{unit:e.slice(0,-1)})).format(s)})).filter((t=>t)),i=Object.assign({type:\"conjunction\",style:t.listStyle||\"narrow\"},t);return this._loc.listFormatter(i).format(r)}toObject(){return this.isValid?Object.assign({},this._values):{}}toISO(){if(!this.isValid)return null;let t=\"P\";return 0!==this.years&&(t+=this.years+\"Y\"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+\"M\"),0!==this.weeks&&(t+=this.weeks+\"W\"),0!==this.days&&(t+=this.days+\"D\"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+=\"T\"),0!==this.hours&&(t+=this.hours+\"H\"),0!==this.minutes&&(t+=this.minutes+\"M\"),0===this.seconds&&0===this.milliseconds||(t+=Ft(this.seconds+this.milliseconds/1e3,3)+\"S\"),\"P\"===t&&(t+=\"T0S\"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t=Object.assign(Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:\"extended\"},t),{includeOffset:!1});return Js.fromMillis(e,{zone:\"UTC\"}).toISOTime(t)}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as(\"milliseconds\")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=Ye.fromDurationLike(t),s={};return Gt.forEach((t=>{void 0===e._values[t]&&void 0===this._values[t]||(s[t]=e.get(t)+this.get(t))})),this._clone(this,{values:s},!0)}minus(t){if(!this.isValid)return this;const e=Ye.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};return Object.keys(this._values).forEach((s=>{e[s]=Pt(t(this._values[s],s))})),this._clone(this,{values:e},!0)}get(t){return this[Ye.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const e=Object.assign(Object.assign({},this._values),Rt(t,Ye.normalizeUnit));return this._clone(this,{values:e})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:s,matrix:n}={}){const r={loc:this._loc.clone({locale:t,numberingSystem:e}),matrix:n,conversionAccuracy:s};return this._clone(this,r)}as(t){return this.shiftTo(t).get(t)}normalize(){if(!this.isValid)return this;const t=this.toObject();return function(t,e){let s;Bt.forEach((n=>{Mt(e[n])||(s&&Je(t,e,s,e,n),s=n)}))}(this._matrix,t),this._clone(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=function(t={}){return Object.entries(t).reduce(((t,[e,s])=>(0!==s&&(t[e]=s),t)),{})}(this.normalize().shiftToAll().toObject());return this._clone(this,{values:t},!0)}shiftTo(...t){if(!this.isValid||0===t.length)return this;t=t.map((t=>Ye.normalizeUnit(t)));const e={},s={},n=this.toObject();let r;return Gt.forEach((i=>{if(t.indexOf(i)>=0){r=i;let t=0;Object.keys(s).forEach((e=>{t+=this._matrix[e][i]*s[e],s[e]=0})),Nt(n[i])&&(t+=n[i]);const o=Math.trunc(t);e[i]=o,s[i]=(1e3*t-1e3*o)/1e3,Object.keys(n).forEach((t=>{Gt.indexOf(t)>Gt.indexOf(i)&&Je(this._matrix,n,t,e,i)}))}else Nt(n[i])&&(s[i]=n[i])})),Object.keys(s).forEach((t=>{const n=s[t];0!==n&&(e[r]+=t===r?n:n/this._matrix[r][t])})),this._clone(this,{values:e},!0).normalize()}shiftToAll(){return this.isValid?this.shiftTo(\"years\",\"months\",\"weeks\",\"days\",\"hours\",\"minutes\",\"seconds\",\"milliseconds\"):this}negate(){if(!this.isValid)return this;const t={};return Object.keys(this._values).forEach((e=>{t[e]=0===this._values[e]?0:-this._values[e]})),this._clone(this,{values:t},!0)}get years(){return this.isValid?this._values.years||0:NaN}get quarters(){return this.isValid?this._values.quarters||0:NaN}get months(){return this.isValid?this._values.months||0:NaN}get weeks(){return this.isValid?this._values.weeks||0:NaN}get days(){return this.isValid?this._values.days||0:NaN}get hours(){return this.isValid?this._values.hours||0:NaN}get minutes(){return this.isValid?this._values.minutes||0:NaN}get seconds(){return this.isValid?this._values.seconds||0:NaN}get milliseconds(){return this.isValid?this._values.milliseconds||0:NaN}equals(t){if(!this.isValid||!t.isValid)return!1;if(!this._loc.equals(t._loc))return!1;for(const n of Gt)if(e=this._values[n],s=t._values[n],!(void 0===e||0===e?void 0===s||0===s:e===s))return!1;var e,s;return!0}_clone(t,e,s=!1){const n={values:s?e.values:Object.assign(Object.assign({},t._values),e.values||{}),loc:t._loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Ye(n)}}const Ge=\"Invalid Interval\";function Be(t){if(Js.isDateTime(t))return t;if(t&&t.valueOf&&Nt(t.valueOf()))return Js.fromJSDate(t);if(t&&\"object\"==typeof t)return Js.fromObject(t);throw new a(`Unknown datetime argument: ${t}, of type ${typeof t}`)}class Qe{constructor(t){this._s=t.start,this._e=t.end,this._invalid=t.invalid||null,this._isLuxonInterval=!0}get invalidReason(){return this._invalid?this._invalid.reason:null}get isValid(){return null===this.invalidReason}get start(){return this.isValid?this._s:null}get end(){return this.isValid?this._e:null}static fromDateTimes(t,e){const s=Be(t),n=Be(e),r=function(t,e){return t&&t.isValid?e&&e.isValid?et._s.valueOf()-e._s.valueOf())).reduce((([t,e],s)=>e?e.overlaps(s)||e.abutsStart(s)?[t,e.union(s)]:[t.concat([e]),s]:[t,s]),[[],null]);return s&&e.push(s),e}static xor(t){let e=null,s=0;const n=[],r=t.map((t=>[{time:t._s,type:\"s\"},{time:t._e,type:\"e\"}])),i=Array.prototype.concat(...r).sort(((t,e)=>+t.time-+e.time));for(const t of i)s+=\"s\"===t.type?1:-1,1===s?e=t.time:(e&&e.valueOf()!==t.time.valueOf()&&n.push(Qe.fromDateTimes(e,t.time)),e=null);return Qe.merge(n)}length(t=\"milliseconds\"){return this.toDuration(t).get(t)}count(t=\"milliseconds\"){if(!this.isValid)return NaN;const e=this.start.startOf(t),s=this.end.startOf(t);return Math.floor(s.diff(e,t).get(t))+ +(s.valueOf()!==this.end.valueOf())}hasSame(t){return!!this.isValid&&(this.isEmpty()||this._e.minus(1).hasSame(this._s,t))}isEmpty(){return this._s.valueOf()===this._e.valueOf()}isAfter(t){return!!this.isValid&&this._s>t}isBefore(t){return!!this.isValid&&this._e<=t}contains(t){return this._s<=t&&this._e>t}set({start:t,end:e}={}){return this.isValid?Qe.fromDateTimes(t||this._s,e||this._e):this}splitAt(...t){const e=t.map(Be).filter((t=>this.contains(t))).sort(),s=[];let n=this._s,r=0;for(;n+this._e?this._e:t;s.push(Qe.fromDateTimes(n,i)),n=i,r+=1}return s}splitBy(t){const e=Ye.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as(\"milliseconds\"))return[];let s,n=this._s,r=1;const i=[];for(;nt*r)));s=+t>+this._e?this._e:t,i.push(Qe.fromDateTimes(n,s)),n=s,r+=1}return i}divideEqually(t){return this.isValid?this.splitBy({milliseconds:this.length()/t}).slice(0,t):[]}overlaps(t){return this._e>t._s&&this._s=t._e)}equals(t){return!(!this.isValid||!t.isValid)&&(this._s.equals(t._s)&&this._e.equals(t._e))}intersection(t){if(!this.isValid)return this;const e=this._s>t._s?this._s:t._s,s=this._e=s?null:Qe.fromDateTimes(e,s)}union(t){if(!this.isValid)return this;const e=this._st._e?this._e:t._e;return Qe.fromDateTimes(e,s)}difference(...t){return Qe.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this._s.toISO()} – ${this._e.toISO()})`:Ge}toLocaleString(t=w,e={}){return this.isValid?te.create(this._s.loc.clone(e),t).formatInterval(this):Ge}toISO(t={}){return this.isValid?`${this._s.toISO(t)}/${this._e.toISO(t)}`:Ge}toISODate(){return this.isValid?`${this._s.toISODate()}/${this._e.toISODate()}`:Ge}toISOTime(t={}){return this.isValid?`${this._s.toISOTime(t)}/${this._e.toISOTime(t)}`:Ge}toFormat(t,{separator:e=\" - \"}={}){return this.isValid?`${this._s.toFormat(t)}${e}${this._e.toFormat(t)}`:Ge}toDuration(t=\"milliseconds\",e={}){return this.isValid?this._e.diff(this._s,t,e):Ye.invalid(this._invalid.reason)}mapEndpoints(t){return Qe.fromDateTimes(t(this._s),t(this._e))}}class Ke{static hasDST(t=St.defaultZone){const e=Js.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return y.isValidZone(t)}static normalizeZone(t){return _t(t,St.defaultZone)}static months(t=\"long\",{locale:e,locObj:s,numberingSystem:n,outputCalendar:r=\"gregory\"}={}){return(s||lt.create(e,n,r)).months(t)}static monthsFormat(t=\"long\",{locale:e,locObj:s,numberingSystem:n,outputCalendar:r=\"gregory\"}={}){return(s||lt.create(e,n,r)).months(t,!0)}static weekdays(t=\"long\",{locale:e,locObj:s,numberingSystem:n}={}){return(s||lt.create(e,n)).weekdays(t)}static weekdaysFormat(t=\"long\",{locale:e,locObj:s,numberingSystem:n}={}){return(s||lt.create(e,n)).weekdays(t,!0)}static meridiems({locale:t}={}){return lt.create(t).meridiems()}static eras(t=\"short\",{locale:e}={}){return lt.create(e,void 0,\"gregory\").eras(t)}static features(){return{relative:Et()}}}function Xe(t,e){const s=t=>t.toUTC(0,{keepLocalTime:!0}).startOf(\"days\").valueOf(),n=s(e)-s(t);return Math.floor(Ye.fromMillis(n).as(\"days\"))}const ts=(t,e,s,n)=>{let[r,i,o,a]=function(t,e,s){const n=[[\"years\",(t,e)=>e.year-t.year],[\"quarters\",(t,e)=>e.quarter-t.quarter+4*(e.year-t.year)],[\"months\",(t,e)=>e.month-t.month+12*(e.year-t.year)],[\"weeks\",(t,e)=>{const s=Xe(t,e);return(s-s%7)/7}],[\"days\",Xe]],r={},i=t;let o,a;for(const[u,c]of n)s.indexOf(u)>=0&&(o=u,r[u]=c(t,e),a=i.plus(r),a>e?(r[u]--,(t=i.plus(r))>e&&(a=t,r[u]--,t=i.plus(r))):t=a);return[t,r,a,o]}(t,e,s);const u=+e-+r,c=s.filter((t=>[\"hours\",\"minutes\",\"seconds\",\"milliseconds\"].indexOf(t)>=0));0===c.length&&(o0?Ye.fromMillis(u,n).shiftTo(...c).plus(l):l},es={arab:\"[٠-٩]\",arabext:\"[۰-۹]\",bali:\"[᭐-᭙]\",beng:\"[০-৯]\",deva:\"[०-९]\",fullwide:\"[0-9]\",gujr:\"[૦-૯]\",hanidec:\"[〇|一|二|三|四|五|六|七|八|九]\",khmr:\"[០-៩]\",knda:\"[೦-೯]\",laoo:\"[໐-໙]\",limb:\"[᥆-᥏]\",mlym:\"[൦-൯]\",mong:\"[᠐-᠙]\",mymr:\"[၀-၉]\",orya:\"[୦-୯]\",tamldec:\"[௦-௯]\",telu:\"[౦-౯]\",thai:\"[๐-๙]\",tibt:\"[༠-༩]\",latn:\"\\\\d\"},ss={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ns=es.hanidec.replace(/[\\[|\\]]/g,\"\").split(\"\");function rs(t,e=\"\"){return new RegExp(`${es[t.numberingSystem||\"latn\"]}${e}`)}const is=\"missing Intl.DateTimeFormat.formatToParts support\";function os(t,e=(t=>t)){return{regex:t,deser:([t])=>e(function(t){const e=parseInt(t,10);if(!isNaN(e))return e;let s=\"\";for(let e=0;e=e&&n<=r){s+=n-e;break}}}return parseInt(s,10)}(t))}}const as=`[ ${String.fromCharCode(160)}]`,us=new RegExp(as,\"g\");function cs(t){return t.replace(/\\./g,\"\\\\.?\").replace(us,as)}function ls(t){return t.replace(/\\./g,\"\").replace(us,\" \").toLowerCase()}function hs(t,e){return{regex:RegExp(t.map(cs).join(\"|\")),deser:([s])=>t.findIndex((t=>ls(s)===ls(t)))+e}}function ds(t,e){return{regex:t,deser:([,t,e])=>Ht(t,e),groups:e}}function ms(t){return{regex:t,deser:([t])=>t}}const fs={year:{\"2-digit\":\"yy\",numeric:\"yyyyy\"},month:{numeric:\"M\",\"2-digit\":\"MM\",short:\"MMM\",long:\"MMMM\"},day:{numeric:\"d\",\"2-digit\":\"dd\"},weekday:{short:\"EEE\",long:\"EEEE\"},dayPeriod:\"a\",hour12:{numeric:\"h\",\"2-digit\":\"hh\"},hour24:{numeric:\"H\",\"2-digit\":\"HH\"},hour:{numeric:\"h\",\"2-digit\":\"hh\"},minute:{numeric:\"m\",\"2-digit\":\"mm\"},second:{numeric:\"s\",\"2-digit\":\"ss\"},timeZoneName:{long:\"ZZZZZ\",short:\"ZZZ\"}};let ys;function _s(t){return!!t&&!!t.invalidReason}function gs(t,e){return Array.prototype.concat(...t.map((t=>function(t,e){if(t.literal)return t;const s=Os(te.macroTokenToFormatOpts(t.val),e);return null==s||s.includes(void 0)?t:s}(t,e))))}function ps(t,e,s){const n=gs(te.parseFormat(s),t),r=n.map((e=>function(t,e){const s=rs(e),n=rs(e,\"{2}\"),r=rs(e,\"{3}\"),i=rs(e,\"{4}\"),o=rs(e,\"{6}\"),a=rs(e,\"{1,2}\"),u=rs(e,\"{1,3}\"),c=rs(e,\"{1,6}\"),l=rs(e,\"{1,9}\"),h=rs(e,\"{2,4}\"),d=rs(e,\"{4,6}\"),m=t=>{return{regex:RegExp((e=t.val,e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\"))),deser:([t])=>t,literal:!0};var e},f=(f=>{if(t.literal)return m(f);switch(f.val){case\"G\":return hs(e.eras(\"short\"),0);case\"GG\":return hs(e.eras(\"long\"),0);case\"y\":return os(c);case\"yy\":case\"kk\":return os(h,Ut);case\"yyyy\":case\"kkkk\":return os(i);case\"yyyyy\":return os(d);case\"yyyyyy\":return os(o);case\"M\":case\"L\":case\"d\":case\"H\":case\"h\":case\"m\":case\"q\":case\"s\":case\"W\":return os(a);case\"MM\":case\"LL\":case\"dd\":case\"HH\":case\"hh\":case\"mm\":case\"qq\":case\"ss\":case\"WW\":return os(n);case\"MMM\":return hs(e.months(\"short\",!0),1);case\"MMMM\":return hs(e.months(\"long\",!0),1);case\"LLL\":return hs(e.months(\"short\",!1),1);case\"LLLL\":return hs(e.months(\"long\",!1),1);case\"o\":case\"S\":return os(u);case\"ooo\":case\"SSS\":return os(r);case\"u\":return ms(l);case\"a\":return hs(e.meridiems(),0);case\"E\":case\"c\":return os(s);case\"EEE\":return hs(e.weekdays(\"short\",!1),1);case\"EEEE\":return hs(e.weekdays(\"long\",!1),1);case\"ccc\":return hs(e.weekdays(\"short\",!0),1);case\"cccc\":return hs(e.weekdays(\"long\",!0),1);case\"Z\":case\"ZZ\":return ds(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case\"ZZZ\":return ds(new RegExp(`([+-]${a.source})(${n.source})?`),2);case\"z\":return ms(/[a-z_+-/]{1,256}?/i);default:return m(f)}})(t)||{invalidReason:is};return Object.assign(Object.assign({},f),{token:t})}(e,t))),i=r.find(_s);if(i)return{input:e,tokens:n,invalidReason:i.invalidReason};{const t=function(t){return`^${t.map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),\"\")}$`}(r),s=RegExp(t,\"i\"),[i,a]=function(t,e,s){const n=e.exec(t),r={};if(null!==n){let t=1;s.forEach((e=>{const s=e.groups?e.groups+1:1;e.literal||(r[e.token.val[0]]=e.deser(n.slice(t,t+s))),t+=s}))}return[n,r]}(e,s,r),[u,c,l]=a?function(t){let e,s=null;return kt(t.z)&&(s=y.create(t.z)),kt(t.Z)&&(s||(s=new dt(+t.Z)),e=+t.Z),Mt(t.q)||(t.M=3*(t.q-1)+1),Mt(t.h)||(t.h<12&&1===t.a?t.h=t.h+12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),Mt(t.u)||(t.S=Zt(t.u)||0),[Object.keys(t).reduce(((e,s)=>{const n=(t=>{switch(t){case\"S\":return\"millisecond\";case\"s\":return\"second\";case\"m\":return\"minute\";case\"h\":case\"H\":return\"hour\";case\"d\":return\"day\";case\"o\":return\"ordinal\";case\"L\":case\"M\":return\"month\";case\"y\":return\"year\";case\"E\":case\"c\":return\"weekday\";case\"W\":return\"weekNumber\";case\"k\":return\"weekYear\";case\"q\":return\"quarter\";default:return null}})(s);return n&&(e[n]=t[s]),e}),{}),s,e]}(a):[null,null,void 0];if(\"a\"in a&&\"H\"in a)throw new o(\"Can't include meridiem when specifying 24-hour format\");return{input:e,tokens:n,regex:s,rawMatches:i,matches:a,result:u,zone:c,specificOffset:l}}}function ws(t){return t.replace(/\\u202F/g,\" \")}function Os(t,e){if(!t)return null;const s=te.create(e,t).dtFormatter(function(t){return void 0===ys&&(ys=Js.fromMillis(1555555555555,{locale:t.locale})),ys}(e)),n=s.formatToParts(),r=s.resolvedOptions();return n.map((e=>function(t,e,s){const{type:n,value:r}=t;if(\"literal\"===n){const t=/^\\s+$/.test(r);return{literal:!t,val:t?\" \":r}}const i=e[n];let o=n;\"hour\"===n&&(o=null!=e.hour12?e.hour12?\"hour12\":\"hour24\":null!=e.hourCycle?\"h11\"===e.hourCycle||\"h12\"===e.hourCycle?\"hour12\":\"hour24\":s.hour12?\"hour12\":\"hour24\");let a=fs[o];if(\"object\"==typeof a&&(a=a[i]),a)return{literal:!1,val:a}}(e,t,r)))}const bs=[0,31,59,90,120,151,181,212,243,273,304,334],vs=[0,31,60,91,121,152,182,213,244,274,305,335];function Ts(t,e){return new Ae(\"unit out of range\",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Ss(t,e,s){const n=new Date(Date.UTC(t,e-1,s));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const r=n.getUTCDay();return 0===r?7:r}function ks(t,e,s){return s+($t(t)?vs:bs)[e-1]}function Ms(t,e){const s=$t(t)?vs:bs,n=s.findIndex((t=>tAt(e)?(o=e+1,a=1):o=e,Object.assign({weekYear:o,weekNumber:a,weekday:i},Yt(t))}function Ds(t){const{weekYear:e,weekNumber:s,weekday:n}=t,r=Ss(e,1,4),i=zt(e);let o,a=7*s+n-r-3;a<1?(o=e-1,a+=zt(o)):a>i?(o=e+1,a-=zt(e)):o=e;const{month:u,day:c}=Ms(o,a);return Object.assign({year:o,month:u,day:c},Yt(t))}function Es(t){const{year:e,month:s,day:n}=t,r=ks(e,s,n);return Object.assign({year:e,ordinal:r},Yt(t))}function js(t){const{year:e,ordinal:s}=t,{month:n,day:r}=Ms(e,s);return Object.assign({year:e,month:n,day:r},Yt(t))}function xs(t){const e=Dt(t.year),s=xt(t.month,1,12),n=xt(t.day,1,Lt(t.year,t.month));return e?s?!n&&Ts(\"day\",t.day):Ts(\"month\",t.month):Ts(\"year\",t.year)}function Is(t){const{hour:e,minute:s,second:n,millisecond:r}=t,i=xt(e,0,23)||24===e&&0===s&&0===n&&0===r,o=xt(s,0,59),a=xt(n,0,59),u=xt(r,0,999);return i?o?a?!u&&Ts(\"millisecond\",r):Ts(\"second\",n):Ts(\"minute\",s):Ts(\"hour\",e)}const Vs=\"Invalid DateTime\",Cs=864e13;function Zs(t,e,s){let n=t-60*e*1e3;const r=s.offset(n);if(e===r)return[n,e];n-=60*(r-e)*1e3;const i=s.offset(n);return r===i?[n,r]:[t-60*Math.min(r,i)*1e3,Math.max(r,i)]}function Fs(t,e){const s=new Date(t+=60*e*1e3);return{year:s.getUTCFullYear(),month:s.getUTCMonth()+1,day:s.getUTCDate(),hour:s.getUTCHours(),minute:s.getUTCMinutes(),second:s.getUTCSeconds(),millisecond:s.getUTCMilliseconds()}}function $s(t,e,s){return Zs(qt(t),e,s)}function zs(t,e,s,n,r,i){const{setZone:o,zone:a}=s;if(t&&0!==Object.keys(t).length||e){const n=e||a,r=Js.fromObject(t||void 0,Object.assign(Object.assign({},s),{zone:n,specificOffset:i}));return o?r:r.setZone(a)}return Js.invalid(new Ae(\"unparsable\",`the input \"${r}\" can't be parsed as ${n}`))}function Ls(t,e,s=!0){return t.isValid?te.create(lt.create(\"en-US\"),{allowZ:s,forceSimple:!0}).formatDateTimeFromString(t,e):null}const qs={year:0,month:1,day:1,hour:0,minute:0,second:0,millisecond:0},As={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Us={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ws=[\"year\",\"month\",\"day\",\"hour\",\"minute\",\"second\",\"millisecond\"],Hs=[\"weekYear\",\"weekNumber\",\"weekday\",\"hour\",\"minute\",\"second\",\"millisecond\"],Ps=[\"year\",\"ordinal\",\"hour\",\"minute\",\"second\",\"millisecond\"];function Rs(t){const e={year:\"year\",years:\"year\",quarter:\"quarter\",quarters:\"quarter\",month:\"month\",months:\"month\",day:\"day\",days:\"day\",hour:\"hour\",hours:\"hour\",minute:\"minute\",minutes:\"minute\",second:\"second\",seconds:\"second\",millisecond:\"millisecond\",milliseconds:\"millisecond\",weekday:\"weekday\",weekdays:\"weekday\",weeknumber:\"weekNumber\",weeksnumber:\"weekNumber\",weeknumbers:\"weekNumber\",weekyear:\"weekYear\",weekyears:\"weekYear\",ordinal:\"ordinal\"}[t.toLowerCase()];if(!e)throw new r(t);return e}class Js{constructor(t){const e=t.zone||St.defaultZone;let s,n,r=t.invalid||(Number.isNaN(t.ts)?new Ae(\"invalid timestamp\"):null)||(e.isValid?null:Js._unsupportedZone(e));if(this._ts=Mt(t.ts)?St.now():t.ts,!r){if(!!t.old&&t.old.ts===this._ts&&t.old.zone.equals(e))[n,s]=[t.old.c,t.old.o];else{const t=e.offset(this._ts);n=Fs(this._ts,t),r=Number.isNaN(n.year)?new Ae(\"invalid input\"):null,n=r?void 0:n,s=r?void 0:t}}this._zone=e,this._loc=t.loc||lt.create(),this._invalid=r,this._weekData=null,this._c=n,this._o=s,this._isLuxonDateTime=!0}get invalidExplanation(){return this._invalid?this._invalid.explanation:void 0}get invalidReason(){return this._invalid?this._invalid.reason:void 0}get isValid(){return null===this._invalid}get loc(){return this.isValid?this._loc.clone():void 0}get locale(){return this.isValid?this._loc.locale:void 0}get numberingSystem(){return this.isValid?this._loc.numberingSystem:void 0}get outputCalendar(){return this.isValid?this._loc.outputCalendar:void 0}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this._c.year:NaN}get quarter(){return this.isValid?Math.ceil(this._c.month/3):NaN}get month(){return this.isValid?this._c.month:NaN}get day(){return this.isValid?this._c.day:NaN}get hour(){return this.isValid?this._c.hour:NaN}get minute(){return this.isValid?this._c.minute:NaN}get second(){return this.isValid?this._c.second:NaN}get millisecond(){return this.isValid?this._c.millisecond:NaN}get weekYear(){return this.isValid?this._possiblyCachedWeekData(this).weekYear:NaN}get weekNumber(){return this.isValid?this._possiblyCachedWeekData(this).weekNumber:NaN}get weekday(){return this.isValid?this._possiblyCachedWeekData(this).weekday:NaN}get ordinal(){return this.isValid?Es(this._c).ordinal:NaN}get monthShort(){return this.isValid?Ke.months(\"short\",{locObj:this._loc})[this.month-1]:null}get monthLong(){return this.isValid?Ke.months(\"long\",{locObj:this._loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Ke.weekdays(\"short\",{locObj:this._loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Ke.weekdays(\"long\",{locObj:this._loc})[this.weekday-1]:null}get offset(){return this.isValid?+this._o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this._ts,{format:\"short\",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this._ts,{format:\"long\",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}get isInLeapYear(){return $t(this.year)}get daysInMonth(){return Lt(this.year,this.month)}get daysInYear(){return this.isValid?zt(this.year):NaN}get weeksInWeekYear(){return this.isValid?At(this.weekYear):NaN}get ts(){return this._ts}static now(){return new Js({})}static local(...t){const[e,s]=this._lastOpts(t),[n,r,i,o,a,u,c]=s;return Js._quickDT({year:n,month:r,day:i,hour:o,minute:a,second:u,millisecond:c},e)}static utc(...t){const[e,s]=this._lastOpts(t),[n,r,i,o,a,u,c]=s;return e.zone=dt.utcInstance,this._quickDT({year:n,month:r,day:i,hour:o,minute:a,second:u,millisecond:c},e)}static fromJSDate(t,e={}){const s=(n=t,\"[object Date]\"===Object.prototype.toString.call(n)?t.valueOf():NaN);var n;if(Number.isNaN(s))return Js.invalid(\"invalid input\");const r=_t(e.zone,St.defaultZone);return r.isValid?new Js({ts:s,zone:r,loc:lt.fromObject(e)}):Js.invalid(Js._unsupportedZone(r))}static fromMillis(t,e={}){if(Nt(t))return t<-Cs||t>Cs?Js.invalid(\"Timestamp out of range\"):new Js({ts:t,zone:_t(e.zone,St.defaultZone),loc:lt.fromObject(e)});throw new a(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(!Nt(t))throw new a(\"fromSeconds requires a numerical input\");return new Js({ts:1e3*t,zone:_t(e.zone,St.defaultZone),loc:lt.fromObject(e)})}static fromObject(t={},e={}){const s=_t(e.zone,St.defaultZone);if(!s.isValid)return Js.invalid(Js._unsupportedZone(s));const n=St.now(),r=Nt(e.specificOffset)?e.specificOffset:s.offset(n),i=Rt(t,Rs),a=kt(i.ordinal),u=kt(i.year),c=kt(i.month)||kt(i.day),l=u||c,h=i.weekYear||i.weekNumber,d=lt.fromObject(e);if((l||a)&&h)throw new o(\"Can't mix weekYear/weekNumber units with year/month/day or ordinals\");if(c&&a)throw new o(\"Can't mix ordinal dates with month/day\");const m=h||i.weekday&&!l,f=Fs(n,r),y={containsGregor:l,containsOrdinal:a,loc:d,normalized:i,obj:t,offsetProvis:r,useWeekData:m,zoneToUse:s};return m?Js._buildObject(y,Hs,As,Ns(f)):a?Js._buildObject(y,Ps,Us,Es(f)):Js._buildObject(y,Ws,qs,f)}static fromISO(t,e={}){const[s,n]=function(t){return ne(t,[je,Ce],[xe,Ze],[Ie,Fe],[Ve,$e])}(t);return zs(s,n,e,\"ISO 8601\",t)}static fromRFC2822(t,e={}){const[s,n]=function(t){return ne(function(t){return t.replace(/\\([^()]*\\)|[\\n\\t]/g,\" \").replace(/(\\s\\s+)/g,\" \").trim()}(t),[Te,Se])}(t);return zs(s,n,e,\"RFC 2822\",t)}static fromHTTP(t,e={}){const[s,n]=function(t){return ne(t,[ke,De],[Me,De],[Ne,Ee])}(t);return zs(s,n,e,\"HTTP\",t)}static fromFormat(t,e,s={}){if(Mt(t)||Mt(e))throw new a(\"fromFormat requires an input string and a format\");const{locale:n,numberingSystem:r}=s,i=lt.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),[o,u,c,l]=function(t,e,s){const{result:n,zone:r,specificOffset:i,invalidReason:o}=ps(t,ws(e),ws(s));return[n,r,i,o]}(i,t,e);return l?Js.invalid(l):zs(o,u||null,s,`format ${e}`,t,c)}static fromString(t,e,s={}){return Js.fromFormat(t,e,s)}static fromSQL(t,e={}){const[s,n]=function(t){return ne(t,[ze,Ce],[Le,qe])}(t);return zs(s,n,e,\"SQL\",t)}static invalid(t,s){if(!t)throw new a(\"need to specify a reason the DateTime is invalid\");const n=t instanceof Ae?t:new Ae(t,s);if(St.throwOnInvalid)throw new e(n);return new Js({invalid:n})}static isDateTime(t){return!(!t||!t._isLuxonDateTime)}static parseFormatForOpts(t,e={}){const s=Os(t,lt.fromObject(e));return s?s.map((t=>t?t.val:null)).join(\"\"):null}static min(...t){if(!t.every(Js.isDateTime))throw new a(\"min requires all arguments be DateTimes\");return jt(t,(t=>t.valueOf()),Math.min)}static max(...t){if(!t.every(Js.isDateTime))throw new a(\"max requires all arguments be DateTimes\");return jt(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,s={}){const{locale:n,numberingSystem:r}=s;return ps(lt.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,s={}){return Js.fromFormatExplain(t,e,s)}static expandFormat(t,e={}){return gs(te.parseFormat(t),lt.fromObject(e)).map((t=>t.val)).join(\"\")}static _buildObject(t,e,s,n){let r=!1;e.forEach((e=>{kt(t.normalized[e])?r=!0:t.normalized[e]=r?s[e]:n[e]}));const i=(t.useWeekData?function(t){const e=Dt(t.weekYear),s=xt(t.weekNumber,1,At(t.weekYear)),n=xt(t.weekday,1,7);return e?s?!n&&Ts(\"weekday\",t.weekday):Ts(\"week\",t.weekNumber):Ts(\"weekYear\",t.weekYear)}(t.normalized):t.containsOrdinal?function(t){const e=Dt(t.year),s=xt(t.ordinal,1,zt(t.year));return e?!s&&Ts(\"ordinal\",t.ordinal):Ts(\"year\",t.year)}(t.normalized):xs(t.normalized))||Is(t.normalized);if(i)return Js.invalid(i);const o=t.useWeekData?Ds(t.normalized):t.containsOrdinal?js(t.normalized):t.normalized,[a,u]=$s(o,t.offsetProvis,t.zoneToUse),c=new Js({ts:a,zone:t.zoneToUse,o:u,loc:t.loc});return t.normalized.weekday&&t.containsGregor&&t.obj.weekday!==c.weekday?Js.invalid(\"mismatched weekday\",`you can't specify both a weekday of ${t.normalized.weekday} and a date of ${c.toISO()}`):c}static _lastOpts(t){let e,s={};return t.length>0&&\"object\"==typeof t[t.length-1]?(s=t.pop(),e=t):e=Array.from(t),[s,e]}static _quickDT(t,e){const s=_t(e.zone,St.defaultZone),n=lt.fromObject(e),r=St.now();let i,o;if(kt(t.year)){for(const e of Ws)Mt(t[e])&&(t[e]=qs[e]);const e=xs(t)||Is(t);if(e)return Js.invalid(e);const n=s.offset(r);[i,o]=$s(t,n,s)}else i=r;return new Js({ts:i,zone:s,loc:n,o:o})}static _diffRelative(t,e,s){const n=!!Mt(s.round)||s.round,r=(t,r)=>{t=Ft(t,n||s.calendary?0:2,!0);return e._loc.clone(s).relFormatter(s).format(t,r)},i=n=>s.calendary?e.hasSame(t,n)?0:e.startOf(n).diff(t.startOf(n),n).get(n):e.diff(t,n).get(n);if(s.unit)return r(i(s.unit),s.unit);for(const t of s.units){const e=i(t);if(Math.abs(e)>=1)return r(e,t)}return r(t>e?-0:0,s.units[s.units.length-1])}static _unsupportedZone(t){return new Ae(\"unsupported zone\",`the zone \"${t.name}\" is not supported`)}get(t){return this[t]}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,e=6e4,s=qt(this._c),n=this.zone.offset(s-t),r=this.zone.offset(s+t),i=this.zone.offset(s-n*e),o=this.zone.offset(s-r*e);if(i===o)return[this];const a=s-i*e,u=s-o*e,c=Fs(a,i),l=Fs(u,o);return c.hour===l.hour&&c.minute===l.minute&&c.second===l.second&&c.millisecond===l.millisecond?[this._clone({ts:a}),this._clone({ts:u})]:[this]}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:s,calendar:n}=te.create(this._loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:s,outputCalendar:n}}toLocal(){return this.setZone(St.defaultZone)}toUTC(t=0,e={}){return this.setZone(dt.instance(t),e)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:s=!1}={}){if((t=_t(t,St.defaultZone)).equals(this.zone))return this;if(t.isValid){let n=this._ts;if(e||s){const e=t.offset(this._ts);n=$s(this.toObject(),e,t)[0]}return this._clone({ts:n,zone:t})}return Js.invalid(Js._unsupportedZone(t))}reconfigure(t){const e=this._loc.clone(t);return this._clone({loc:e})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=Rt(t,Rs),s=kt(e.weekYear)||kt(e.weekNumber)||kt(e.weekday),n=kt(e.ordinal),r=kt(e.year),i=kt(e.month)||kt(e.day),a=r||i,u=e.weekYear||e.weekNumber;if((a||n)&&u)throw new o(\"Can't mix weekYear/weekNumber units with year/month/day or ordinals\");if(i&&n)throw new o(\"Can't mix ordinal dates with month/day\");let c;s?c=Ds(Object.assign(Object.assign({},Ns(this._c)),e)):Mt(e.ordinal)?(c=Object.assign(Object.assign({},this.toObject()),e),Mt(e.day)&&(c.day=Math.min(Lt(c.year,c.month),c.day))):c=js(Object.assign(Object.assign({},Es(this._c)),e));const[l,h]=$s(c,this._o,this.zone);return this._clone({ts:l,o:h})}plus(t){if(!this.isValid)return this;const e=Ye.fromDurationLike(t);return this._clone(this._adjustTime(e))}minus(t){if(!this.isValid)return this;const e=Ye.fromDurationLike(t).negate();return this._clone(this._adjustTime(e))}startOf(t){if(!this.isValid)return this;const e={},s=Ye.normalizeUnit(t);switch(s){case\"years\":e.month=1;case\"quarters\":case\"months\":e.day=1;case\"weeks\":case\"days\":e.hour=0;case\"hours\":e.minute=0;case\"minutes\":e.second=0;case\"seconds\":e.millisecond=0}if(\"weeks\"===s&&(e.weekday=1),\"quarters\"===s){const t=Math.ceil(this.month/3);e.month=3*(t-1)+1}return this.set(e)}endOf(t){return this.plus({[t]:1}).startOf(t).minus({milliseconds:1})}toFormat(t,e={}){return this.isValid?te.create(this._loc.redefaultToEN(e)).formatDateTimeFromString(this,t):Vs}toLocaleString(t=w,e={}){return this.isValid?te.create(this._loc.clone(e),t).formatDateTime(this):Vs}toLocaleParts(t={}){return this.isValid?te.create(this._loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t=\"extended\",suppressSeconds:e=!1,suppressMilliseconds:s=!1,includeOffset:n=!0,extendedZone:r=!1}={}){if(!this.isValid)return null;const i=\"extended\"===t;return[this._toISODate(i),\"T\",this._toISOTime(i,e,s,n,r)].join(\"\")}toISODate(t={format:\"extended\"}){let e=\"basic\"===t.format?\"yyyyMMdd\":\"yyyy-MM-dd\";return this.year>9999&&(e=\"+\"+e),Ls(this,e)}toISOWeekDate(){return Ls(this,\"kkkk-'W'WW-c\")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:e=!1,includeOffset:s=!0,includePrefix:n=!1,extendedZone:r=!1,format:i=\"extended\"}={}){return this.isValid?[n?\"T\":\"\",this._toISOTime(\"extended\"===i,e,t,s,r)].join(\"\"):null}toRFC2822(){return Ls(this,\"EEE, dd LLL yyyy HH:mm:ss ZZZ\",!1)}toHTTP(){return Ls(this.toUTC(),\"EEE, dd LLL yyyy HH:mm:ss 'GMT'\")}toSQLDate(){return this.isValid?this._toISODate(!0):null}toSQLTime({includeOffset:t=!0,includeZone:e=!1,includeOffsetSpace:s=!0}={}){let n=\"HH:mm:ss.SSS\";return(e||t)&&(s&&(n+=\" \"),e?n+=\"z\":t&&(n+=\"ZZ\")),Ls(this,n,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Vs}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this._ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={includeConfig:!1}){if(!this.isValid)return{};const e=Object.assign({},this._c);return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this._loc.numberingSystem,e.locale=this._loc.locale),e}toJSDate(){return new Date(this.isValid?this._ts:NaN)}diff(t,e=\"milliseconds\",s={}){if(!this.isValid||!t.isValid){const e=this.invalidReason||t.invalidReason;return Ye.invalid(e,\"created by diffing an invalid DateTime\")}const n=(o=e,Array.isArray(o)?o:[o]).map(Ye.normalizeUnit),r=t.valueOf()>this.valueOf(),i=ts(r?this:t,r?t:this,n,Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},s));var o;return r?i.negate():i}diffNow(t=\"milliseconds\",e={}){return this.diff(Js.now(),t,e)}until(t){return Qe.fromDateTimes(this,t)}hasSame(t,e){if(!this.isValid)return!1;const s=t.valueOf(),n=this.setZone(t.zone,{keepLocalTime:!0});return+n.startOf(e)<=s&&s<=+n.endOf(e)}equals(t){return this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this._loc.equals(t._loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||Js.fromObject({},{zone:this.zone}),s=t.padding?this9999||this._c.year<0;let s=\"\";return e&&this._c.year>=0&&(s+=\"+\"),s+=It(this._c.year,e?6:4),t?(s+=\"-\",s+=It(this._c.month),s+=\"-\",s+=It(this._c.day)):(s+=It(this._c.month),s+=It(this._c.day)),s}_toISOTime(t,e,s,n,r){let i=It(this._c.hour);return t?(i+=\":\",i+=It(this._c.minute),0===this._c.millisecond&&0===this._c.second&&e||(i+=\":\")):i+=It(this._c.minute),0===this._c.millisecond&&0===this._c.second&&e||(i+=It(this._c.second),0===this._c.millisecond&&s||(i+=\".\",i+=It(this._c.millisecond,3))),n&&(this.isOffsetFixed&&0===this.offset&&!r?i+=\"Z\":this._o<0?(i+=\"-\",i+=It(Math.trunc(-this._o/60)),i+=\":\",i+=It(Math.trunc(-this._o%60))):(i+=\"+\",i+=It(Math.trunc(this._o/60)),i+=\":\",i+=It(Math.trunc(this._o%60)))),r&&(i+=\"[\"+this.zone.ianaName+\"]\"),i}}Js.DATE_SHORT=w,Js.DATE_MED=O,Js.DATE_MED_WITH_WEEKDAY=b,Js.DATE_FULL=v,Js.DATE_HUGE=T,Js.TIME_SIMPLE=S,Js.TIME_WITH_SECONDS=k,Js.TIME_WITH_SHORT_OFFSET=M,Js.TIME_WITH_LONG_OFFSET=N,Js.TIME_24_SIMPLE=D,Js.TIME_24_WITH_SECONDS=E,Js.TIME_24_WITH_SHORT_OFFSET=j,Js.TIME_24_WITH_LONG_OFFSET=x,Js.DATETIME_SHORT=I,Js.DATETIME_SHORT_WITH_SECONDS=V,Js.DATETIME_MED=C,Js.DATETIME_MED_WITH_SECONDS=Z,Js.DATETIME_MED_WITH_WEEKDAY=F,Js.DATETIME_FULL=$,Js.DATETIME_FULL_WITH_SECONDS=z,Js.DATETIME_HUGE=L,Js.DATETIME_HUGE_WITH_SECONDS=q;const Ys=\"4.3.1\";export{Js as DateTime,Ye as Duration,dt as FixedOffsetZone,y as IANAZone,Ke as Info,Qe as Interval,h as Intl,mt as InvalidZone,Gt as ORDERED_UNITS,Bt as REVERSE_ORDERED_UNITS,St as Settings,yt as SystemZone,Ys as VERSION,l as Zone};\n\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { EMPTY } from 'rxjs';\r\nimport { catchError } from 'rxjs/operators';\r\n\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class MDNSQueryService {\r\n\tprivate readonly logger: ILogger;\r\n\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\tprivate readonly httpClient: HttpClient\r\n\t) {\r\n\t\tthis.logger = logger.createScopedLogger('MDNSQueryService');\r\n\t}\r\n\r\n\tpublic scanViaHTTPGet(mDnsHostName: string): void {\r\n\t\tthis.logger.trace('scanViaHTTPGet()', mDnsHostName);\r\n\t\tthis.httpClient\r\n\t\t\t.get(`https://${mDnsHostName}`)\r\n\t\t\t.pipe(catchError((_err) => EMPTY))\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: (result) => {\r\n\t\t\t\t\tthis.logger.trace('scanViaHTTPGet result', `https://${mDnsHostName}`, result);\r\n\t\t\t\t},\r\n\t\t\t\terror: (error) => {\r\n\t\t\t\t\tthis.logger.error('scanViaHTTPGet', 'error', JSON.stringify(error));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n}\r\n","import { Injectable, OnDestroy } from '@angular/core';\r\nimport {\r\n\tBehaviorSubject,\r\n\tObservable,\r\n\tReplaySubject,\r\n\tSubject,\r\n\tcatchError,\r\n\tfilter,\r\n\tmap,\r\n\tof,\r\n\ttake,\r\n\ttakeUntil,\r\n\tthrowError\r\n} from 'rxjs';\r\nimport { DateTime } from 'ts-luxon';\r\n\r\nimport { DeviceDetection } from '@shure/cloud/shared/models/devices';\r\nimport { OktaInterfaceService, monitorLoginState } from '@shure/cloud/shared/okta/data-access';\r\nimport { MDNSQueryService } from '@shure/cloud/shared/services/mdns-query';\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { DeviceClaimingDiscoveryApiService } from '../api/device-claiming-discovery-api.service';\r\n\r\nimport {\r\n\tDetectedDeviceGQL,\r\n\tDetectedDeviceVariables,\r\n\tOnDetectedDevicesGQL,\r\n\tOnDetectedDevicesVariables\r\n} from './graphql/generated/cloud-sys-api';\r\nimport { GqlUtils } from './mappers/gql.utils';\r\nimport { SysApiDetectionTokenApiService } from './sys-api-detection-token-api.service';\r\n\r\n//\r\n// Once this service is started, it lives for the life of the application.\r\n//\r\n@Injectable()\r\nexport class SysApiDeviceClaimingDiscoveryApiService implements DeviceClaimingDiscoveryApiService, OnDestroy {\r\n\tpublic unclaimedDevices$ = new BehaviorSubject([]);\r\n\tpublic scanInProgess$ = new BehaviorSubject(false);\r\n\tpublic deviceDiscoveryError$ = new ReplaySubject(1);\r\n\r\n\tprivate destroy$ = new Subject();\r\n\tprivate readonly logger: ILogger;\r\n\tprivate auditUnclaimedDevicesTimer: ReturnType | undefined;\r\n\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\tprivate readonly mdnsQuery: MDNSQueryService,\r\n\t\tprivate readonly generateDetectionToken: SysApiDetectionTokenApiService,\r\n\t\tprivate readonly detectedDevicesGQL: DetectedDeviceGQL,\r\n\t\tprivate readonly onDetectedDevicesGQL: OnDetectedDevicesGQL,\r\n\t\tprivate readonly oktaService: OktaInterfaceService\r\n\t) {\r\n\t\tthis.logger = logger.createScopedLogger('SysApiDeviceClaimingDiscoveryApiService');\r\n\r\n\t\tmonitorLoginState(this.oktaService, {\r\n\t\t\t// no need for a onLogin handler since users of the service invoke newScan() to start things off.\r\n\t\t\tonLogOut: this.destroy.bind(this)\r\n\t\t});\r\n\t}\r\n\r\n\tpublic ngOnDestroy(): void {\r\n\t\tthis.scanInProgess$.next(false);\r\n\t\tclearTimeout(this.auditUnclaimedDevicesTimer);\r\n\t\tthis.destroy$.next();\r\n\t\tthis.destroy$.complete();\r\n\t}\r\n\r\n\tpublic destroy(): void {\r\n\t\tthis.logger.debug('destroy()', 'scan in progress: ', this.scanInProgess$.value);\r\n\t\tthis.ngOnDestroy();\r\n\t}\r\n\r\n\tpublic newScan(): void {\r\n\t\tthis.logger.trace('newScan()', 'Scan started for unclaimed devices', this.scanInProgess$.value);\r\n\t\tif (this.scanInProgess$.value === true) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.scanInProgess$.next(true);\r\n\t\tthis.unclaimedDevices$.next([]);\r\n\t\tthis.destroy$ = new Subject();\r\n\r\n\t\tthis.generateDetectionToken\r\n\t\t\t.detectionToken$()\r\n\t\t\t.pipe(\r\n\t\t\t\ttake(1),\r\n\t\t\t\tmap((result) => {\r\n\t\t\t\t\tthis.logger.trace('newScan()', 'Detection token received', result);\r\n\t\t\t\t\t// temporarily not using the subscription. Normally, this should be removed\r\n\t\t\t\t\t// but we intend to add it back once we've implemented the subscription Ack\r\n\t\t\t\t\t// capability\r\n\t\t\t\t\t// this.issueDetectionEventSubscription(result.token);\r\n\t\t\t\t\tthis.mdnsQuery.scanViaHTTPGet(result.token + '.local');\r\n\t\t\t\t\tthis.issueDetectionEventQuery(result.token);\r\n\t\t\t\t\tthis.scheduleDetectionTokenAudit(result.expiresAt);\r\n\t\t\t\t}),\r\n\t\t\t\tcatchError((error) => {\r\n\t\t\t\t\tthis.logger.error('newScan', 'Error', JSON.stringify(error));\r\n\t\t\t\t\treturn of({ error: error.message });\r\n\t\t\t\t})\r\n\t\t\t)\r\n\t\t\t.subscribe();\r\n\t}\r\n\r\n\tprivate issueDetectionEventQuery(token: string): void {\r\n\t\tthis.logger.trace('issueDetectionEventQuery()', 'Unclaimed device detection query', { token });\r\n\r\n\t\tthis.unclaimedDevicesQuery$(token)\r\n\t\t\t.pipe(takeUntil(this.destroy$))\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: (detectedDeviceInfo) => {\r\n\t\t\t\t\tdetectedDeviceInfo.forEach((detectionEvent) => {\r\n\t\t\t\t\t\tthis.handleNewDeviceDetection(detectionEvent);\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\t\t\t\terror: (error) => {\r\n\t\t\t\t\tthis.deviceDiscoveryError$.next(error);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\r\n\tprivate issueDetectionEventSubscription(token: string): void {\r\n\t\tthis.unclaimedDevicesSubscription$(token)\r\n\t\t\t.pipe(takeUntil(this.destroy$))\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: (detectionEvent) => {\r\n\t\t\t\t\tthis.handleNewDeviceDetection(detectionEvent);\r\n\t\t\t\t},\r\n\t\t\t\terror: (error) => {\r\n\t\t\t\t\tthis.deviceDiscoveryError$.next(error);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\r\n\tprivate handleNewDeviceDetection(deviceDetection: DeviceDetection | undefined): void {\r\n\t\tthis.logger.trace('handleNewDetectionEvent', 'Handle detection of claimable device', deviceDetection);\r\n\r\n\t\tif (deviceDetection && deviceDetection?.claimable) {\r\n\t\t\tconst currentDevices = this.unclaimedDevices$.value;\r\n\t\t\tconst index = currentDevices.findIndex((obj) => obj.device.id === deviceDetection.device.id);\r\n\t\t\tif (index >= 0) {\r\n\t\t\t\tcurrentDevices[index] = deviceDetection;\r\n\t\t\t} else {\r\n\t\t\t\tcurrentDevices.push(deviceDetection);\r\n\t\t\t}\r\n\t\t\tthis.unclaimedDevices$.next([...currentDevices]);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate scheduleDetectionTokenAudit(expiresAt: string): void {\r\n\t\tconst timeout =\r\n\t\t\tMath.max(DateTime.fromISO(expiresAt).toUnixInteger() - DateTime.now().toUnixInteger(), 2) * 1000;\r\n\t\tthis.logger.trace('scheduleDetectionTokenAudit', 'Claiming timer audit', {\r\n\t\t\ttimeout\r\n\t\t});\r\n\r\n\t\tthis.auditUnclaimedDevicesTimer = setTimeout(() => {\r\n\t\t\tthis.destroy();\r\n\t\t\tthis.newScan();\r\n\t\t}, timeout);\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * @param token: the current detection token devices may be responding to.\r\n\t * @returns An observable to the query result.\r\n\t *\r\n\t * Note: we're using a fetchPolicy of 'no-cache' becuase we don't need these\r\n\t * query results in the apollo cache, taking up space.\r\n\t * See:\r\n\t * https://www.apollographql.com/docs/react/data/queries/#supported-fetch-policies\r\n\t * for details\r\n\t */\r\n\tprivate unclaimedDevicesQuery$(token: string): Observable {\r\n\t\tconst fetchVar: DetectedDeviceVariables = {\r\n\t\t\ttokenId: token\r\n\t\t};\r\n\t\treturn this.detectedDevicesGQL\r\n\t\t\t.watch(fetchVar, {\r\n\t\t\t\tfetchPolicy: 'no-cache',\r\n\t\t\t\tpollInterval: 2000\r\n\t\t\t})\r\n\t\t\t.valueChanges.pipe(\r\n\t\t\t\tmap((result) => {\r\n\t\t\t\t\tif (GqlUtils.isSuccess(result)) {\r\n\t\t\t\t\t\treturn result.data?.detectedDevices;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst err = GqlUtils.decomposeGQLError(result);\r\n\t\t\t\t\tthis.logger.error('unclaimedDevicesQuery$', 'Fetch error', JSON.stringify(err));\r\n\t\t\t\t\tthrowError(() => err);\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}),\r\n\r\n\t\t\t\tcatchError((error) => {\r\n\t\t\t\t\tthis.logger.error('unclaimedDevicesQuery$', 'Error', JSON.stringify(error));\r\n\t\t\t\t\treturn throwError(() => error);\r\n\t\t\t\t}),\r\n\t\t\t\ttakeUntil(this.destroy$)\r\n\t\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * @param token: the current detection token devices may be responding to.\r\n\t * @returns Observable to stream of token detected devices.\r\n\t *\r\n\t * Note: we're using a fetchPolicy of 'no-cache' becuase we don't need these\r\n\t * query results in the apollo cache, taking up space.\r\n\t */\r\n\tprivate unclaimedDevicesSubscription$(token: string): Observable {\r\n\t\tconst subscriptionVar: OnDetectedDevicesVariables = {\r\n\t\t\ttokenId: token\r\n\t\t};\r\n\t\treturn this.onDetectedDevicesGQL\r\n\t\t\t.subscribe(subscriptionVar, {\r\n\t\t\t\tfetchPolicy: 'no-cache'\r\n\t\t\t})\r\n\t\t\t.pipe(\r\n\t\t\t\tfilter((result) => !!result.data),\r\n\t\t\t\tfilter((result) => !!result.data?.detectedDevices),\r\n\t\t\t\tmap((result) => {\r\n\t\t\t\t\treturn result.data?.detectedDevices;\r\n\t\t\t\t}),\r\n\r\n\t\t\t\tcatchError((error) => {\r\n\t\t\t\t\tthis.logger.error('unclaimedDevicesSubscription$', 'Error', JSON.stringify(error));\r\n\t\t\t\t\treturn throwError(() => error);\r\n\t\t\t\t})\r\n\t\t\t);\r\n\t}\r\n}\r\n","import { Injectable, signal } from '@angular/core';\r\nimport {\r\n\tBehaviorSubject,\r\n\tObservable,\r\n\tSubject,\r\n\tSubscriber,\r\n\tSubscription,\r\n\tfilter,\r\n\tfrom,\r\n\tmap,\r\n\tmerge,\r\n\ttake,\r\n\ttakeUntil,\r\n\ttap\r\n} from 'rxjs';\r\n\r\nimport { ApolloCacheManager } from '@shure/cloud/shared/apollo';\r\nimport { OktaInterfaceService, monitorLoginState } from '@shure/cloud/shared/okta/data-access';\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { DeviceDiscoveryApiService } from '../api/device-discovery-api.service';\r\n\r\nimport {\r\n\tDiscoveredDevicesQueryGQL,\r\n\tDiscoveredDevicesQueryOpResult,\r\n\tDiscoveredDevicesSubscriptionGQL,\r\n\tDiscoveryDeviceFragment\r\n} from './graphql/generated/cloud-sys-api';\r\n\r\nexport const DISCOVERED_DEVICES_QUERY_PAGE_SIZE = 50;\r\n\r\nexport interface DeviceDiscoveryEvent {\r\n\tadded?: DiscoveryDeviceFragment;\r\n\tupdated?: DiscoveryDeviceFragment;\r\n\tremoved?: string;\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class SysApiDeviceDiscoveryApiService implements DeviceDiscoveryApiService {\r\n\t// signal to help with Device Loading Indicator\r\n\tpublic readonly deviceDiscoveryInProgress = signal(false);\r\n\tpublic readonly numDiscoveredDevices = signal(-1);\r\n\t//\r\n\tprivate destroy$ = new Subject();\r\n\tprivate readonly logger: ILogger;\r\n\r\n\tprivate deviceAddedInternal$ = new Subject();\r\n\tprivate deviceRemovedInternal$ = new Subject();\r\n\tprivate discoveredDevicesMap = new Map();\r\n\tprivate discoveredDevicesInternal$ = new BehaviorSubject([]);\r\n\r\n\tprivate _discoveryEvents$ = new Subject();\r\n\r\n\tprivate paginatedQueryEndCursor$: Subject | undefined = undefined;\r\n\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\tprivate readonly discoveredDevicesQueryGQL: DiscoveredDevicesQueryGQL,\r\n\t\tprivate readonly discoveredDevicesSubscriptionGQL: DiscoveredDevicesSubscriptionGQL,\r\n\t\tprivate readonly oktaService: OktaInterfaceService,\r\n\t\tprivate readonly apolloCacheManager: ApolloCacheManager\r\n\t) {\r\n\t\tthis.logger = logger.createScopedLogger('DaiDeviceDiscoveryService');\r\n\r\n\t\tmonitorLoginState(this.oktaService, {\r\n\t\t\tonLogIn: this.initService.bind(this),\r\n\t\t\tonLogOut: this.suspendService.bind(this)\r\n\t\t});\r\n\t}\r\n\r\n\tpublic deviceAdded$(): Observable {\r\n\t\treturn this.deviceAddedInternal$.asObservable();\r\n\t}\r\n\r\n\tpublic deviceRemoved$(): Observable {\r\n\t\treturn this.deviceRemovedInternal$.asObservable();\r\n\t}\r\n\r\n\tpublic discoveryEvents$(): Observable {\r\n\t\treturn merge(\r\n\t\t\tthis._discoveryEvents$,\r\n\t\t\tfrom([...this.discoveredDevicesMap.values()].map((device) => ({ added: device })))\r\n\t\t);\r\n\t}\r\n\r\n\tpublic discoveredDevicesCount$(): Observable {\r\n\t\treturn this.discoveredDevicesInternal$.pipe(map((devices) => devices.length));\r\n\t}\r\n\r\n\tpublic getDiscoveredDevicesByQuery$(\r\n\t\telementQueryFunction: (id: string) => Observable,\r\n\t\telementFilterFunction?: (element: ElementType) => boolean\r\n\t): Observable {\r\n\t\treturn new Observable((observer: Subscriber) => {\r\n\t\t\tobserver.next([]); // Start by emitting empty array in case no devices that pass the filter exist\r\n\t\t\ttry {\r\n\t\t\t\tconst returnedDevices = new Map();\r\n\t\t\t\tconst queryHandlers = new Map();\r\n\t\t\t\tthis.discoveryEvents$().subscribe((e) => {\r\n\t\t\t\t\tif ('added' in e && e.added?.id) {\r\n\t\t\t\t\t\tconst queryHandler = elementQueryFunction(e.added?.id)\r\n\t\t\t\t\t\t\t.pipe(filter((d) => (elementFilterFunction ? elementFilterFunction(d) : true)))\r\n\t\t\t\t\t\t\t// eslint-disable-next-line rxjs/no-nested-subscribe\r\n\t\t\t\t\t\t\t.subscribe((d) => {\r\n\t\t\t\t\t\t\t\treturnedDevices.set(d.id, d);\r\n\t\t\t\t\t\t\t\tobserver.next([...returnedDevices.values()]);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\tqueryHandlers.set(e.added?.id, queryHandler);\r\n\t\t\t\t\t} else if ('removed' in e && e.removed) {\r\n\t\t\t\t\t\tconst queryHandler = queryHandlers.get(e.removed);\r\n\t\t\t\t\t\tif (queryHandler) {\r\n\t\t\t\t\t\t\tqueryHandler.unsubscribe();\r\n\t\t\t\t\t\t\tqueryHandlers.delete(e.removed);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturnedDevices.delete(e.removed);\r\n\t\t\t\t\t\tobserver.next([...returnedDevices.values()]);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// finalizer method... to automatically unsbubscribe from all queries\r\n\t\t\t\t// when/if no one is subscribe to the Observable.\r\n\t\t\t\tobserver.add(() => {\r\n\t\t\t\t\tqueryHandlers.forEach((queryHandler) => queryHandler.unsubscribe());\r\n\t\t\t\t});\r\n\t\t\t} catch (error) {\r\n\t\t\t\tobserver.error();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprivate initService(): void {\r\n\t\tthis.logger.information('initService', 'user logged in, initializing service');\r\n\r\n\t\t// we need a new destroy$ subject since it is \"completed\" when the user logs out.\r\n\t\tthis.destroy$ = new Subject();\r\n\r\n\t\tthis.discoveredDevicesMap.clear();\r\n\t\tthis.deviceDiscoveryInProgress.set(true);\r\n\t\tthis.emitDiscoveredDevices();\r\n\t\tthis.subscribeDiscoveredDevices();\r\n\r\n\t\tthis.paginatedQueryEndCursor$ = new Subject();\r\n\t\tthis.paginatedQueryEndCursor$.subscribe({\r\n\t\t\tnext: (endCursor) => {\r\n\t\t\t\tthis.queryDiscoveredDevicesNetwork(endCursor);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.paginatedQueryEndCursor$.next(null); // trigger the initial query;\r\n\t}\r\n\r\n\tprivate suspendService(): void {\r\n\t\tthis.logger.information('suspendService', 'user logged out, suspending service');\r\n\t\tthis.discoveredDevicesMap.clear();\r\n\t\tthis.emitDiscoveredDevices();\r\n\t\tthis.destroy$.next();\r\n\t\tthis.destroy$.complete();\r\n\t\tthis.paginatedQueryEndCursor$?.complete();\r\n\t\tthis.deviceDiscoveryInProgress.set(false);\r\n\t}\r\n\r\n\tprivate handleDeviceAdded(device: DiscoveryDeviceFragment): void {\r\n\t\tthis.logger.information('handleDeviceAdded', '', JSON.stringify({ device }));\r\n\r\n\t\tthis._discoveryEvents$.next({ added: device });\r\n\t\tthis.deviceAddedInternal$.next(device.id);\r\n\t\tthis.discoveredDevicesMap.set(device.id, device);\r\n\t\tthis.emitDiscoveredDevices();\r\n\t}\r\n\r\n\tprivate handleDeviceRemoved(id: string): void {\r\n\t\tthis.logger.information('handleDeviceRemoved', '', { id });\r\n\r\n\t\tthis._discoveryEvents$.next({ removed: id });\r\n\t\tthis.deviceRemovedInternal$.next(id);\r\n\t\tthis.discoveredDevicesMap.delete(id);\r\n\t\tthis.emitDiscoveredDevices();\r\n\r\n\t\t// remove the entry from the apollo cache. The only other way it would\r\n\t\t// get removed is the app refreshing or closing down.\r\n\t\tthis.apolloCacheManager.getApolloCache('sysApi')?.evict({ id: `Device:${id}` });\r\n\t}\r\n\r\n\tprivate emitDiscoveredDevices(): void {\r\n\t\tthis.discoveredDevicesInternal$.next([...this.discoveredDevicesMap.values()]);\r\n\t\tthis.numDiscoveredDevices.set(this.discoveredDevicesMap.size);\r\n\t}\r\n\r\n\tprivate subscribeDiscoveredDevices(): void {\r\n\t\tthis.discoveredDevicesSubscriptionGQL\r\n\t\t\t.subscribe(\r\n\t\t\t\t{},\r\n\t\t\t\t{\r\n\t\t\t\t\terrorPolicy: 'ignore',\r\n\t\t\t\t\tfetchPolicy: 'network-only' // always fetch from network, then store in cache\r\n\t\t\t\t}\r\n\t\t\t)\r\n\t\t\t.pipe(takeUntil(this.destroy$))\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: (change) => {\r\n\t\t\t\t\tif (change.data) {\r\n\t\t\t\t\t\tif ('added' in change.data.discoveredDevices) {\r\n\t\t\t\t\t\t\tthis.handleDeviceAdded(change.data.discoveredDevices.added);\r\n\t\t\t\t\t\t} else if ('removed' in change.data.discoveredDevices) {\r\n\t\t\t\t\t\t\tthis.handleDeviceRemoved(change.data.discoveredDevices.removed);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tcomplete: () => {\r\n\t\t\t\t\tthis.logger.warning('subscribeDiscoveredDevices', 'completed');\r\n\t\t\t\t},\r\n\r\n\t\t\t\terror: (err) => {\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tthis.logger.error('subscribeDiscoveredDevices', 'error', JSON.stringify({ err }));\r\n\t\t\t\t\t\tthis.subscribeDiscoveredDevices();\r\n\t\t\t\t\t}, 10000);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\r\n\tprivate queryDiscoveredDevicesNetwork(afterCursor: string | null): void {\r\n\t\tthis.discoveredDevicesQueryGQL\r\n\t\t\t.fetch(\r\n\t\t\t\t{\r\n\t\t\t\t\tfirst: DISCOVERED_DEVICES_QUERY_PAGE_SIZE,\r\n\t\t\t\t\tafter: afterCursor,\r\n\t\t\t\t\tdeviceModels: []\r\n\t\t\t\t},\r\n\t\t\t\t{ fetchPolicy: 'network-only' }\r\n\t\t\t)\r\n\t\t\t.pipe(\r\n\t\t\t\ttake(1),\r\n\t\t\t\ttap((devices) => this.processDiscoveredDevicesQueryResult(devices.data))\r\n\t\t\t)\r\n\t\t\t.subscribe();\r\n\t}\r\n\r\n\tprivate processDiscoveredDevicesQueryResult(devices: DiscoveredDevicesQueryOpResult): void {\r\n\t\tconst { hasNextPage, endCursor } = devices.discoveredDevicesConnection.pageInfo;\r\n\r\n\t\t// if there's more data on the server, trigger the next query.\r\n\t\tif (hasNextPage && endCursor && endCursor.length !== 0) {\r\n\t\t\tthis.paginatedQueryEndCursor$?.next(endCursor);\r\n\t\t} else {\r\n\t\t\tthis.deviceDiscoveryInProgress.set(false);\r\n\t\t}\r\n\t\tdevices.discoveredDevicesConnection.edges\r\n\t\t\t.map((d) => d.node)\r\n\t\t\t.filter((d): d is DiscoveryDeviceFragment => !!d)\r\n\t\t\t.forEach((d) => this.handleDeviceAdded(d));\r\n\t}\r\n}\r\n","import { Duration } from 'ts-luxon';\r\n\r\nexport function mapDurationFromSysApi(duration: string | null | undefined): number {\r\n\tif (!duration) return 0;\r\n\r\n\t// Converts ISO 8601 time duration to ms\r\n\treturn Duration.fromISO(duration).toMillis();\r\n}\r\n\r\n/**\r\n * Map uptime (ISO 8601 time duration) to [h]:mm:ss if it exists.\r\n */\r\nexport function mapUptimeDurationFromSysApi(uptime: string | undefined | null): string | undefined {\r\n\tif (!uptime) {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\treturn Duration.fromISO(uptime).toFormat('hh:mm:ss');\r\n}\r\n","import { DeviceBatteryState } from '@shure/shared/angular/data-access/system-api/models';\r\n\r\nimport { BatteryState } from '../graphql/generated/cloud-sys-api';\r\n\r\nexport function mapBatteryStateFromSysApi(batteryState: BatteryState | null | undefined): DeviceBatteryState {\r\n\tswitch (batteryState) {\r\n\t\tcase BatteryState.Calculating:\r\n\t\t\treturn DeviceBatteryState.Calculating;\r\n\t\tcase BatteryState.Charging:\r\n\t\t\treturn DeviceBatteryState.Charging;\r\n\t\tcase BatteryState.Discharging:\r\n\t\t\treturn DeviceBatteryState.Discharging;\r\n\t\tcase BatteryState.Empty:\r\n\t\t\treturn DeviceBatteryState.Empty;\r\n\t\tcase BatteryState.Full:\r\n\t\t\treturn DeviceBatteryState.Full;\r\n\t\tcase BatteryState.OptimalStorage:\r\n\t\t\treturn DeviceBatteryState.OptimalStorage;\r\n\t\tdefault:\r\n\t\t\treturn DeviceBatteryState.Calculating;\r\n\t}\r\n}\r\n","import { FirmwarePackage } from '@shure/cloud/shared/models/devices';\r\n\r\nimport { PropertyPanelDeviceFragment } from '../graphql/generated/cloud-sys-api';\r\n\r\nexport function mapFirmwarePackagesFromSysApi(\r\n\tavailablePkgs: PropertyPanelDeviceFragment['features']['availablePackages']\r\n): FirmwarePackage[] {\r\n\tconst array = Array.from(availablePkgs?.primaryPackages ?? []);\r\n\r\n\tconst sortFn = (a: FirmwarePackage, b: FirmwarePackage): number => {\r\n\t\t// example: 12.34.56.7 -> 00012000340005600007\r\n\t\tconst aVersion = a.version\r\n\t\t\t.split('.')\r\n\t\t\t.map((n) => n.toString().padStart(5, '0')) // max of 65535 per hextet\r\n\t\t\t.join('');\r\n\r\n\t\tconst bVersion = b.version\r\n\t\t\t.split('.')\r\n\t\t\t.map((n) => n.toString().padStart(5, '0')) // max of 65535 per hextet\r\n\t\t\t.join('');\r\n\r\n\t\tif (aVersion > bVersion) {\r\n\t\t\treturn -1;\r\n\t\t} else if (bVersion > aVersion) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\r\n\t\treturn 0;\r\n\t};\r\n\r\n\treturn array.sort(sortFn);\r\n}\r\n","import { DateTime } from 'ts-luxon';\r\n\r\nimport { LicenseInfo, LicenseState } from '@shure/cloud/shared/models/devices';\r\n\r\nimport { DeviceLicenseInfoFragment, LicenseState as SysApiLicenseState } from '../graphql/generated/cloud-sys-api';\r\n\r\nexport function mapLicenseInfoFromSysApi(licenseInfos: DeviceLicenseInfoFragment[]): LicenseInfo | undefined {\r\n\tconst validLicense = licenseInfos.find((license) => license.state === SysApiLicenseState.Valid);\r\n\tif (!validLicense) {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\treturn {\r\n\t\tstate: mapLicenseStateFromSysApi(validLicense.state),\r\n\t\tcount: validLicense.count,\r\n\t\texpirationDate: validLicense.expirationDate ? DateTime.fromISO(validLicense.expirationDate) : undefined\r\n\t};\r\n}\r\n\r\nfunction mapLicenseStateFromSysApi(state: SysApiLicenseState): LicenseState {\r\n\treturn state;\r\n}\r\n","import { DeviceMicState } from '@shure/shared/angular/data-access/system-api/models';\r\n\r\nimport { MicStatus } from '../graphql/generated/cloud-sys-api';\r\n\r\nexport function mapMicStatusFromSysApi(micStatus: MicStatus | null | undefined): DeviceMicState {\r\n\tswitch (micStatus) {\r\n\t\tcase MicStatus.Active:\r\n\t\t\treturn DeviceMicState.Active;\r\n\t\tcase MicStatus.Mute:\r\n\t\t\treturn DeviceMicState.Mute;\r\n\t\tcase MicStatus.Off:\r\n\t\t\treturn DeviceMicState.Off;\r\n\t\tcase MicStatus.OnCharger:\r\n\t\t\treturn DeviceMicState.OnCharger;\r\n\t\tcase MicStatus.OutOfRange:\r\n\t\t\treturn DeviceMicState.OutOfRange;\r\n\t\tcase MicStatus.Standby:\r\n\t\t\treturn DeviceMicState.Standby;\r\n\t\tdefault:\r\n\t\t\treturn DeviceMicState.Unknown;\r\n\t}\r\n}\r\n","import { ProxiedTransmitter, ProxiedTransmitterStatus } from '@shure/cloud/shared/models/devices';\r\nimport { DoubleStuffProxiedTransmitterStatus } from '@shure/shared/angular/data-access/system-api/core';\r\n\r\nimport { DoublestuffProxiedTransmitterFragment } from '../graphql/generated/cloud-sys-api';\r\n\r\nexport function mapProxiedTransmitterFromSysApi(\r\n\ttransmitter?: DoublestuffProxiedTransmitterFragment | null\r\n): ProxiedTransmitter {\r\n\treturn {\r\n\t\tstatus: mapProxiedTransmitterStatusFromSysApi(transmitter?.status),\r\n\t\tname: transmitter?.name,\r\n\t\tonline: transmitter?.online,\r\n\t\tbatteryLevel: mapProxiedTransmitterBatteryLevelFromSysApi(transmitter?.batteryLevelPercentage),\r\n\t\tmuted: transmitter?.muted ?? undefined\r\n\t};\r\n}\r\n\r\nfunction mapProxiedTransmitterStatusFromSysApi(\r\n\ttransmitterStatus?: DoubleStuffProxiedTransmitterStatus | null\r\n): ProxiedTransmitterStatus {\r\n\tswitch (transmitterStatus) {\r\n\t\tcase 'ACTIVE':\r\n\t\t\treturn ProxiedTransmitterStatus.Active;\r\n\t\tcase 'CHARGING':\r\n\t\t\treturn ProxiedTransmitterStatus.Charging;\r\n\t\tdefault:\r\n\t\t\treturn ProxiedTransmitterStatus.Unknown;\r\n\t}\r\n}\r\n\r\nfunction mapProxiedTransmitterBatteryLevelFromSysApi(batteryLevel?: number | null): number | undefined {\r\n\tif (batteryLevel === undefined || batteryLevel === null) {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\treturn batteryLevel / 100;\r\n}\r\n","import assertNever from 'assert-never';\r\nimport { Duration } from 'ts-luxon';\r\n\r\nimport { IpMode, DeviceState } from '@shure/cloud/shared/models/devices';\r\nimport { DeviceStatus } from '@shure/shared/angular/data-access/system-api/core';\r\nimport { DeviceModel } from '@shure/shared/angular/data-access/system-api/models';\r\n\r\nimport { IpMode as SysApiMode } from '../graphql/generated/cloud-sys-api';\r\n// wangth: The usage of this value should be removed, and replaced with test for isMissing attribute,\r\n// which should go all the way to UI.\r\nexport const MISSING_VALUE = '..';\r\n\r\nexport function mapFeatureValueFromSysApi(value?: string | null): string {\r\n\treturn value ?? MISSING_VALUE;\r\n}\r\n\r\nexport function mapIpModeFromSysApi(value: SysApiMode | undefined): IpMode | undefined {\r\n\tif (value === undefined) {\r\n\t\treturn undefined;\r\n\t}\r\n\tswitch (value) {\r\n\t\tcase SysApiMode.Dhcp:\r\n\t\t\treturn IpMode.DHCP;\r\n\t\tcase SysApiMode.Static:\r\n\t\t\treturn IpMode.STATIC;\r\n\t\tdefault:\r\n\t\t\tassertNever(value);\r\n\t}\r\n}\r\n\r\n/**\r\n * TODO: Remove this mapping and use the value directly from GraphQL. We want to make this change\r\n * as part of a larger refactoring to create a default DeviceImageProvider, which will allow us\r\n * to remove all of the individual device behavior projects:\r\n * https://bitbucket.shure.com/projects/WPLT/repos/shure.web.apps/pull-requests/3859/overview?commentId=176994\r\n */\r\nexport function mapDeviceModelFromSysApi(model: string): DeviceModel {\r\n\tswitch (model) {\r\n\t\tcase 'MXA920-S':\r\n\t\t\treturn DeviceModel.MXA920S;\r\n\t\tcase 'MXA920-R':\r\n\t\t\treturn DeviceModel.MXA920R;\r\n\t\tcase 'P300':\r\n\t\t\treturn DeviceModel.P300;\r\n\t\tcase 'MXWAPXD2':\r\n\t\t\treturn DeviceModel.MXWAPXD2;\r\n\t\tcase 'MXA710-4FT':\r\n\t\t\treturn DeviceModel.MXA7104FT;\r\n\t\tcase 'MXA710-2FT':\r\n\t\t\treturn DeviceModel.MXA7102FT;\r\n\t\tcase 'ANIUSB-MATRIX':\r\n\t\t\treturn DeviceModel.ANIUSB;\r\n\t\tcase 'MXA901-R':\r\n\t\t\treturn DeviceModel.MXA901R;\r\n\t\tcase 'MXA901-S':\r\n\t\t\treturn DeviceModel.MXA901S;\r\n\t\tcase 'MXA902-S':\r\n\t\t\treturn DeviceModel.MXA902S;\r\n\t\tcase 'MXW1X':\r\n\t\t\treturn DeviceModel.MXW1X;\r\n\t\tcase 'MXW2X':\r\n\t\t\treturn DeviceModel.MXW2X;\r\n\t\tcase 'MXW6X':\r\n\t\t\treturn DeviceModel.MXW6X;\r\n\t\tcase 'MXW8X':\r\n\t\t\treturn DeviceModel.MXW8X;\r\n\t\tcase 'IMX-Room':\r\n\t\t\treturn DeviceModel.IMXROOM;\r\n\t\tcase 'MXN5-C':\r\n\t\t\treturn DeviceModel.MXN5C;\r\n\t\tcase 'ANX4':\r\n\t\t\treturn DeviceModel.MCR;\r\n\t\tcase 'AD600':\r\n\t\t\treturn DeviceModel.AD600;\r\n\t\tcase 'ADTD':\r\n\t\t\treturn DeviceModel.ADTD;\r\n\t\tcase 'ADTQ':\r\n\t\t\treturn DeviceModel.ADTQ;\r\n\t\tdefault:\r\n\t\t\treturn model;\r\n\t}\r\n}\r\n\r\nexport function mapDeviceStateFromSysApi(deviceStatus: DeviceStatus): DeviceState {\r\n\tswitch (deviceStatus) {\r\n\t\tcase DeviceStatus.Discovered:\r\n\t\t\treturn DeviceState.Discovered;\r\n\t\tcase DeviceStatus.Error:\r\n\t\t\treturn DeviceState.Error;\r\n\t\tcase DeviceStatus.Offline:\r\n\t\t\treturn DeviceState.Offline;\r\n\t\tcase DeviceStatus.Online:\r\n\t\t\treturn DeviceState.Online;\r\n\t\tdefault:\r\n\t\t\treturn DeviceState.Error;\r\n\t}\r\n}\r\n\r\nexport function mapUptimeDurationFromSysApi(duration: string | undefined): string {\r\n\tif (!duration || duration === MISSING_VALUE) return '';\r\n\r\n\t// Converts ISO 8601 time duration to [h]:mm:ss\r\n\treturn Duration.fromISO(duration).toFormat('hh:mm:ss');\r\n}\r\n","import { PropertyPanelDevice } from '@shure/cloud/shared/models/devices';\r\nimport { mapDurationFromSysApi } from '@shure/shared/angular/data-access/system-api/mappers';\r\n\r\nimport { DeviceStatus, PropertyPanelDeviceFragment } from '../graphql/generated/cloud-sys-api';\r\n\r\nimport { mapBatteryStateFromSysApi } from './map-battery-state';\r\nimport { mapFirmwarePackagesFromSysApi } from './map-firmware-packages';\r\nimport { mapLicenseInfoFromSysApi } from './map-license-info';\r\nimport { mapMicStatusFromSysApi } from './map-mic-status';\r\nimport { mapProxiedTransmitterFromSysApi } from './map-proxied-transmitter';\r\nimport {\r\n\tmapDeviceModelFromSysApi,\r\n\tmapFeatureValueFromSysApi,\r\n\tmapIpModeFromSysApi,\r\n\tmapUptimeDurationFromSysApi\r\n} from './utils';\r\n\r\nexport function mapPropertyPanelDeviceFromSysApi(deviceSysApi: PropertyPanelDeviceFragment): PropertyPanelDevice {\r\n\tconst {\r\n\t\tid,\r\n\t\tvirtual,\r\n\t\tdescription: { features: descriptionFeatures },\r\n\t\tinterface: { model: deviceModel },\r\n\t\tfeatures: {\r\n\t\t\tbatteryLevel,\r\n\t\t\tmicStatus,\r\n\t\t\tname,\r\n\t\t\taudioMute,\r\n\t\t\tserialNumber,\r\n\t\t\tidentify,\r\n\t\t\tdanteAudioNetwork,\r\n\t\t\taudioNetwork,\r\n\t\t\tcontrolNetwork,\r\n\t\t\tfirmware,\r\n\t\t\tuptime,\r\n\t\t\tavailablePackages,\r\n\t\t\tdoublestuffProxiedTransmitters,\r\n\t\t\taudioChannelCount,\r\n\t\t\tlicense\r\n\t\t}\r\n\t} = deviceSysApi;\r\n\r\n\tconst device: PropertyPanelDevice = {\r\n\t\tid: id,\r\n\t\tname: mapFeatureValueFromSysApi(name?.name),\r\n\t\tmodel: mapDeviceModelFromSysApi(deviceModel ?? ''),\r\n\t\tisVirtual: virtual,\r\n\t\tfeatures: {\r\n\t\t\tbatteryLevel: {\r\n\t\t\t\tpercentage: batteryLevel?.percentage ?? 0,\r\n\t\t\t\tstatus: {\r\n\t\t\t\t\tcurrentState: mapBatteryStateFromSysApi(batteryLevel?.status.currentState),\r\n\t\t\t\t\ttargetState: mapBatteryStateFromSysApi(batteryLevel?.status.targetState),\r\n\t\t\t\t\tmsToTargetState: mapDurationFromSysApi(batteryLevel?.status.timeToTargetState)\r\n\t\t\t\t},\r\n\t\t\t\tisMissing: !descriptionFeatures.batteryLevel?.supported\r\n\t\t\t},\r\n\t\t\tmicStatus: {\r\n\t\t\t\tstatus: mapMicStatusFromSysApi(micStatus?.status),\r\n\t\t\t\tisMissing: !descriptionFeatures.micStatus?.supported\r\n\t\t\t},\r\n\t\t\tmute: {\r\n\t\t\t\tmuted: audioMute?.muted || false,\r\n\t\t\t\tisMissing: !descriptionFeatures.audioMute.supported\r\n\t\t\t},\r\n\t\t\tserialNumber: {\r\n\t\t\t\tserialNumber: mapFeatureValueFromSysApi(serialNumber?.serialNumber),\r\n\t\t\t\tisMissing: !descriptionFeatures.serialNumber.supported\r\n\t\t\t},\r\n\t\t\tidentify: {\r\n\t\t\t\tidentifying: identify?.identifying || false,\r\n\t\t\t\tisMissing: !descriptionFeatures.identify.supported\r\n\t\t\t},\r\n\t\t\tdanteName: {\r\n\t\t\t\tdanteName: mapFeatureValueFromSysApi(danteAudioNetwork?.name),\r\n\t\t\t\tisMissing: !descriptionFeatures.danteAudioNetwork.supported\r\n\t\t\t},\r\n\t\t\taudioNetwork: {\r\n\t\t\t\tgateway: mapFeatureValueFromSysApi(audioNetwork?.interface.gateway),\r\n\t\t\t\tipAddress: mapFeatureValueFromSysApi(audioNetwork?.interface.ipAddress),\r\n\t\t\t\tipMode: mapIpModeFromSysApi(audioNetwork?.interface.ipMode),\r\n\t\t\t\tsubnetMask: mapFeatureValueFromSysApi(audioNetwork?.interface.subnetMask),\r\n\t\t\t\tmacAddress: mapFeatureValueFromSysApi(audioNetwork?.interface.macAddress),\r\n\t\t\t\tisMissing: !descriptionFeatures.audioNetwork.supported\r\n\t\t\t},\r\n\t\t\tcontrolNetwork: {\r\n\t\t\t\tipMode: mapIpModeFromSysApi(controlNetwork?.interface.ipMode),\r\n\t\t\t\tipAddress:\r\n\t\t\t\t\tdeviceSysApi.status === DeviceStatus.Error\r\n\t\t\t\t\t\t? mapFeatureValueFromSysApi(deviceSysApi.protocol.dmp?.ipAddress)\r\n\t\t\t\t\t\t: mapFeatureValueFromSysApi(controlNetwork?.interface.ipAddress),\r\n\t\t\t\tsubnetMask: mapFeatureValueFromSysApi(controlNetwork?.interface.subnetMask),\r\n\t\t\t\tgateway: mapFeatureValueFromSysApi(controlNetwork?.interface.gateway),\r\n\t\t\t\tmacAddress: mapFeatureValueFromSysApi(controlNetwork?.interface.macAddress),\r\n\t\t\t\tisMissing: !descriptionFeatures.controlNetwork.supported\r\n\t\t\t},\r\n\t\t\tfirmware: {\r\n\t\t\t\tversion: mapFeatureValueFromSysApi(firmware?.version),\r\n\t\t\t\tvalid: firmware?.valid || false,\r\n\t\t\t\tisMissing: !descriptionFeatures.firmware.supported\r\n\t\t\t},\r\n\t\t\tuptime: {\r\n\t\t\t\tuptime: mapUptimeDurationFromSysApi(uptime?.uptime),\r\n\t\t\t\tisMissing: !descriptionFeatures.uptime.supported\r\n\t\t\t},\r\n\t\t\tavailablePackages: {\r\n\t\t\t\tprimaryPackages: mapFirmwarePackagesFromSysApi(availablePackages),\r\n\t\t\t\tisMissing: !descriptionFeatures.availablePackages.supported\r\n\t\t\t},\r\n\t\t\tdoublestuffProxiedTransmitters: {\r\n\t\t\t\tmic1: mapProxiedTransmitterFromSysApi(doublestuffProxiedTransmitters?.mic1),\r\n\t\t\t\tmic2: mapProxiedTransmitterFromSysApi(doublestuffProxiedTransmitters?.mic2),\r\n\t\t\t\tisMissing: !descriptionFeatures.doublestuffProxiedTransmitters?.supported\r\n\t\t\t},\r\n\t\t\taudioChannelCount: {\r\n\t\t\t\tcount: audioChannelCount?.count ?? 0,\r\n\t\t\t\tisMissing: !descriptionFeatures.audioChannelCount?.supported\r\n\t\t\t},\r\n\t\t\tlicense: {\r\n\t\t\t\tinfo: mapLicenseInfoFromSysApi(license?.info ?? []),\r\n\t\t\t\tisMissing: !descriptionFeatures.license?.supported\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn device;\r\n}\r\n","import { Injectable, Inject } from '@angular/core';\r\nimport { catchError, map, Observable, Subject, Subscription, takeUntil, tap, throwError } from 'rxjs';\r\n\r\nimport { SubscriptionManager, SubscriptionManagerConfigCreate } from '@shure/cloud/shared/apollo';\r\nimport { FirmwarePackage, PropertyPanelDevice } from '@shure/cloud/shared/models/devices';\r\nimport { UpdateResponse } from '@shure/cloud/shared/models/http';\r\nimport { OktaInterfaceService, monitorLoginState } from '@shure/cloud/shared/okta/data-access';\r\nimport { APP_ENVIRONMENT, AppEnvironment } from '@shure/cloud/shared/utils/config';\r\nimport { ApolloQueryErrorMapper } from '@shure/shared/angular/data-access/system-api/core';\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { CloudDeviceApiService } from '../api/cloud-device-api.service';\r\nimport { DevicePropertyPanelApiService } from '../api/device-property-panel-api.service';\r\n\r\nimport {\r\n\tPropertyPanelDeviceQueryGQL,\r\n\tPropertyPanelDeviceSubscriptionGQL,\r\n\tNodeChangeType\r\n} from './graphql/generated/cloud-sys-api';\r\nimport { mapPropertyPanelDeviceFromSysApi } from './mappers/map-property-panel-device';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class SysApiDevicePropertyPanelApiService extends DevicePropertyPanelApiService {\r\n\tprivate destroy$ = new Subject();\r\n\tprivate readonly logger: ILogger;\r\n\r\n\tprivate readonly devicesGqlSubscriptions = new SubscriptionManager({\r\n\t\tsubscriptionType: 'property-panel',\r\n\t\tcreate: (config): Subscription => this.createGqlSubscription(config),\r\n\t\tretryWaitMs: 5000,\r\n\t\tmaxRetryAttempts: 3\r\n\t});\r\n\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\tprivate readonly cloudDeviceService: CloudDeviceApiService,\r\n\t\tprivate readonly propertyPanelDeviceQueryGQL: PropertyPanelDeviceQueryGQL,\r\n\t\tprivate readonly propertyPanelDeviceSubscriptionGQL: PropertyPanelDeviceSubscriptionGQL,\r\n\t\tprivate readonly oktaService: OktaInterfaceService,\r\n\t\t@Inject(APP_ENVIRONMENT) private readonly appEnv: AppEnvironment\r\n\t) {\r\n\t\tsuper();\r\n\t\tthis.logger = logger.createScopedLogger('DaiDevicePropertyPanelService');\r\n\r\n\t\tmonitorLoginState(this.oktaService, {\r\n\t\t\tonLogIn: this.initService.bind(this),\r\n\t\t\tonLogOut: this.suspendService.bind(this)\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Get device by id\r\n\t * @param deviceId\r\n\t * @returns\r\n\t */\r\n\tpublic getDevice$(deviceId: string): Observable {\r\n\t\tthis.logger.trace('getDevice$()', 'propertyPanelDeviceQueryGQL', { deviceId });\r\n\r\n\t\treturn this.propertyPanelDeviceQueryGQL\r\n\t\t\t.watch(\r\n\t\t\t\t{\r\n\t\t\t\t\tnodeId: deviceId,\r\n\t\t\t\t\trequestFirmwareFields: this.appEnv.showFirmwareUpgrade ?? false,\r\n\t\t\t\t\trequestProxiedDevices: !!this.appEnv.showProxiedDevices\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\terrorPolicy: 'ignore',\r\n\t\t\t\t\treturnPartialData: true,\r\n\t\t\t\t\tfetchPolicy: 'cache-only'\r\n\t\t\t\t}\r\n\t\t\t)\r\n\t\t\t.valueChanges.pipe(\r\n\t\t\t\tmap((query) => {\r\n\t\t\t\t\tif (query.data.node && 'isDeviceNode' in query.data.node) {\r\n\t\t\t\t\t\tconst device = mapPropertyPanelDeviceFromSysApi(query.data.node);\r\n\t\t\t\t\t\tthis.logger.trace('getDevice$()', 'Done', device);\r\n\t\t\t\t\t\treturn device;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.logger.error(\r\n\t\t\t\t\t\t'getDevice$()',\r\n\t\t\t\t\t\t'Failed to query propertypanel device',\r\n\t\t\t\t\t\tJSON.stringify({ deviceId })\r\n\t\t\t\t\t);\r\n\t\t\t\t\tthrow ApolloQueryErrorMapper.getError(query);\r\n\t\t\t\t}),\r\n\t\t\t\t// establish the per-device nodeChanges subscription, if not already established.\r\n\t\t\t\ttap((device) => this.devicesGqlSubscriptions.register([device.id])),\r\n\t\t\t\tcatchError((error: Error) => {\r\n\t\t\t\t\tthis.logger.error(\r\n\t\t\t\t\t\t'getDevice$()',\r\n\t\t\t\t\t\t'Failed to query property panel device',\r\n\t\t\t\t\t\tJSON.stringify({\r\n\t\t\t\t\t\t\tdeviceId,\r\n\t\t\t\t\t\t\terror\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t);\r\n\t\t\t\t\treturn throwError(() => error);\r\n\t\t\t\t})\r\n\t\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Tell the service to \"forget\" about this device. Includes unsubscribing to\r\n\t * the more detailed property subscriptions.\r\n\t * @param nodeId\r\n\t */\r\n\tpublic forgetDevice(nodeId: string): void {\r\n\t\tthis.devicesGqlSubscriptions.deregister(nodeId);\r\n\t}\r\n\r\n\t/**\r\n\t * Set mute for a device.\r\n\t * @param deviceId\r\n\t * @param mute\r\n\t * @returns\r\n\t */\r\n\tpublic setMute(deviceId: string, mute: boolean): Observable> {\r\n\t\tthis.logger.trace('setMute()', 'Setting mute', { deviceId, mute });\r\n\t\treturn this.cloudDeviceService.setMute(deviceId, mute);\r\n\t}\r\n\r\n\t/**\r\n\t * Set device name.\r\n\t * @param deviceId\r\n\t * @param name\r\n\t * @returns\r\n\t */\r\n\tpublic setDeviceName(deviceId: string, name: string): Observable> {\r\n\t\tthis.logger.trace('setDeviceName()', 'Setting device name', JSON.stringify({ deviceId, name }));\r\n\t\treturn this.cloudDeviceService.setDeviceName(deviceId, name);\r\n\t}\r\n\r\n\t/**\r\n\t * Set device identifying state.\r\n\t * @param deviceId\r\n\t * @param identify\r\n\t * @returns\r\n\t */\r\n\tpublic setIdentify(deviceId: string, identify: boolean): Observable> {\r\n\t\tthis.logger.trace('setIdentify()', 'Setting identify', { deviceId, identify });\r\n\t\treturn this.cloudDeviceService.setIdentify(deviceId, identify);\r\n\t}\r\n\r\n\t/**\r\n\t * Reboot a device\r\n\t * @param deviceId\r\n\t * @returns\r\n\t */\r\n\tpublic rebootDevice(deviceId: string): Observable> {\r\n\t\tthis.logger.trace('rebootDevice()', 'Rebooting device', { deviceId });\r\n\t\treturn this.cloudDeviceService.rebootDevice$(deviceId);\r\n\t}\r\n\r\n\t/**\r\n\t * Request a device firmware update\r\n\t * @param deviceId\r\n\t * @param firmwarePkg\r\n\t * @returns\r\n\t */\r\n\tpublic override updateFirmware(\r\n\t\tdeviceId: string,\r\n\t\tfirmwarePkg: FirmwarePackage\r\n\t): Observable> {\r\n\t\tthis.logger.trace('updateFirmware()', 'Updating firmware', { deviceId, package: firmwarePkg });\r\n\t\treturn this.cloudDeviceService.updateFirmware$([\r\n\t\t\t{ id: deviceId, firmwarePackageKey: firmwarePkg.key, firmwarePackageVersion: firmwarePkg.version }\r\n\t\t]);\r\n\t}\r\n\r\n\tprivate initService(): void {\r\n\t\tthis.logger.information('initService', 'user logged in, initializating service');\r\n\t\tthis.destroy$ = new Subject();\r\n\t}\r\n\r\n\tprivate suspendService(): void {\r\n\t\tthis.logger.information('suspendService', 'user logged out, suspending service');\r\n\t\tthis.destroy$.next();\r\n\t\tthis.destroy$.complete();\r\n\t\tthis.devicesGqlSubscriptions.deregisterAll();\r\n\t}\r\n\r\n\tprivate createGqlSubscription({ id, retryCallback }: SubscriptionManagerConfigCreate): Subscription {\r\n\t\tconst subscriptionTypes = [\r\n\t\t\tNodeChangeType.DeviceName,\r\n\t\t\tNodeChangeType.DeviceIdentify,\r\n\t\t\tNodeChangeType.DeviceAudioMute,\r\n\t\t\tNodeChangeType.DeviceUptime,\r\n\t\t\tNodeChangeType.DeviceAvailablePackages,\r\n\t\t\tNodeChangeType.DeviceDoubleStuffProxiedTransmitters,\r\n\t\t\tNodeChangeType.DeviceBatteryLevel,\r\n\t\t\tNodeChangeType.DeviceMicStatus,\r\n\t\t\tNodeChangeType.DeviceProxiedDevices\r\n\t\t];\r\n\r\n\t\treturn this.propertyPanelDeviceSubscriptionGQL\r\n\t\t\t.subscribe(\r\n\t\t\t\t{\r\n\t\t\t\t\tid,\r\n\t\t\t\t\ttypes: subscriptionTypes,\r\n\t\t\t\t\trequestFirmwareFields: this.appEnv.showFirmwareUpgrade ?? false,\r\n\t\t\t\t\trequestProxiedDevices: !!this.appEnv.showProxiedDevices\r\n\t\t\t\t},\r\n\t\t\t\t{ fetchPolicy: 'network-only' }\r\n\t\t\t)\r\n\t\t\t.pipe(takeUntil(this.destroy$))\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: (change) => {\r\n\t\t\t\t\tthis.logger.trace('propertyPanelDeviceSubscriptionGQL', 'Received update', {\r\n\t\t\t\t\t\tid,\r\n\t\t\t\t\t\tchange\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\t\t\t\tcomplete: () => {\r\n\t\t\t\t\tthis.logger.debug('propertyPanelDeviceSubscriptionGQL', 'Completed', {\r\n\t\t\t\t\t\tid\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\t\t\t\terror: (error) => {\r\n\t\t\t\t\tthis.logger.error(\r\n\t\t\t\t\t\t'propertyPanelDeviceSubscriptionGQL',\r\n\t\t\t\t\t\t'Encountered error',\r\n\t\t\t\t\t\tJSON.stringify({\r\n\t\t\t\t\t\t\tid,\r\n\t\t\t\t\t\t\terror\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t);\r\n\t\t\t\t\tretryCallback();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { InventoryDevice } from '@shure/cloud/shared/models/devices';\r\n\r\nimport { DeviceRelationshipService } from '../api/device-relationship.service';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class SysApiDeviceRelationshipService extends DeviceRelationshipService {\r\n\tprivate proxyToHostMap = new Map();\r\n\r\n\tpublic registerProxiedDevices(hostDevice: InventoryDevice): void {\r\n\t\tconst proxiedDevices = hostDevice.features.proxiedDevices?.proxiedDevices ?? [];\r\n\t\tfor (const proxiedDevice of proxiedDevices) {\r\n\t\t\tthis.proxyToHostMap.set(proxiedDevice.id, hostDevice.id);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic removeDevice(deviceId: string): void {\r\n\t\t// Remove all associations for this device ID, whether it is a proxy or host device\r\n\t\tfor (const entry of this.proxyToHostMap.entries()) {\r\n\t\t\tif (entry[0] === deviceId || entry[1] === deviceId) {\r\n\t\t\t\tthis.proxyToHostMap.delete(entry[0]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tpublic getHostDevice(proxiedDeviceId: string): string | undefined {\r\n\t\treturn this.proxyToHostMap.get(proxiedDeviceId);\r\n\t}\r\n}\r\n","import {\r\n\tFirmwareUpdateProgress,\r\n\tFirmwareUpdateStage,\r\n\tFirmwareUpdateStatus,\r\n\tInventoryDevice,\r\n\tMissingFeatureType,\r\n\tProxiedTransmitterForInventory,\r\n\tProxiedTransmittersForInventory\r\n} from '@shure/cloud/shared/models/devices';\r\n\r\nimport { DeviceStatusService } from '../../api/device-status.service';\r\nimport { InventoryDeviceFragment, ProxiedTransmitterStatusFragment } from '../graphql/generated/cloud-sys-api';\r\n\r\nimport { mapFirmwarePackagesFromSysApi } from './map-firmware-packages';\r\nimport { mapDeviceModelFromSysApi, mapDeviceStateFromSysApi, mapFeatureValueFromSysApi } from './utils';\r\n\r\nexport function mapInventoryDeviceFromSysApi(\r\n\tdevice: InventoryDeviceFragment,\r\n\tstatusService: DeviceStatusService\r\n): InventoryDevice {\r\n\tconst name = mapFeatureValueFromSysApi(device.features.name?.name);\r\n\r\n\tconst batteryLevel = {\r\n\t\tpercentage: device.features.batteryLevel?.percentage ?? 0,\r\n\t\tisMissing: !device.description.features.batteryLevel?.supported\r\n\t};\r\n\r\n\tconst controlNetwork = {\r\n\t\tipAddress: device.features.controlNetwork\r\n\t\t\t? mapFeatureValueFromSysApi(device.features.controlNetwork.interface.ipAddress)\r\n\t\t\t: mapFeatureValueFromSysApi(device.protocol.dmp?.ipAddress),\r\n\t\tmacAddress: mapFeatureValueFromSysApi(device.features.controlNetwork?.interface.macAddress),\r\n\t\tisMissing: !device.description.features.controlNetwork.supported\r\n\t};\r\n\r\n\tconst firmware = {\r\n\t\tversion: mapFeatureValueFromSysApi(device.features.firmware?.version),\r\n\t\tvalid: device.features.firmware?.valid || true,\r\n\t\tisUpToDate: true,\r\n\t\t// TODO: LBF 7/12/2023 - firmware update not supported yet\r\n\t\t// (device.features.firmware?.valid && device.features.availablePackages?.primaryPackages?.length === 0) ||\r\n\t\t// true,\r\n\t\tisMissing: !device.description.features.firmware.supported\r\n\t};\r\n\r\n\tconst identify = {\r\n\t\tidentifying: device.features.identify?.identifying || false,\r\n\t\tisMissing: !device.description.features.identify.supported\r\n\t};\r\n\r\n\tconst serialNumber = {\r\n\t\tserialNumber: mapFeatureValueFromSysApi(device.features.serialNumber?.serialNumber),\r\n\t\tisMissing: !device.description.features.serialNumber.supported\r\n\t};\r\n\r\n\tconst updateProgress: FirmwareUpdateProgress & MissingFeatureType = {\r\n\t\tpackage: {\r\n\t\t\tkey: device.features.updateProgress?.firmwarePackageKey ?? '',\r\n\t\t\tversion: device.features.updateProgress?.firmwarePackageVersion ?? '0.0.0.0'\r\n\t\t},\r\n\t\tpercentComplete: device.features.updateProgress?.deviceProgressPercentage ?? 100,\r\n\t\tstage: device.features.updateProgress?.updateStage ?? FirmwareUpdateStage.Idle,\r\n\t\tstatus: device.features.updateProgress?.updateStatus ?? FirmwareUpdateStatus.Success,\r\n\t\tisMissing: !device.description.features.updateProgress.supported\r\n\t};\r\n\r\n\tconst doublestuffProxiedTransmitters: ProxiedTransmittersForInventory & MissingFeatureType = {\r\n\t\t...mapProxiedTransmitters(device),\r\n\t\tisMissing: !device.description.features.doublestuffProxiedTransmitters?.supported\r\n\t};\r\n\r\n\tconst availablePackages = {\r\n\t\tprimaryPackages: mapFirmwarePackagesFromSysApi(device.features.availablePackages),\r\n\t\tisMissing: !device.description.features.availablePackages.supported\r\n\t};\r\n\r\n\tconst proxiedDevices = {\r\n\t\tproxiedDevices: (device.features.proxiedDevices?.proxiedDevices ?? []).map((proxiedDevice) => proxiedDevice),\r\n\t\tisMissing: !device.description.features.proxiedDevices?.supported\r\n\t};\r\n\r\n\tconst unaugmentedDevice: Omit = {\r\n\t\tid: device.id,\r\n\t\tname,\r\n\t\tmodel: mapDeviceModelFromSysApi(device.interface.model ?? ''),\r\n\t\tvirtual: device.virtual,\r\n\t\tdeviceState: mapDeviceStateFromSysApi(device.status),\r\n\t\tfeatures: {\r\n\t\t\tbatteryLevel,\r\n\t\t\tcontrolNetwork,\r\n\t\t\tfirmware,\r\n\t\t\tidentify,\r\n\t\t\tserialNumber,\r\n\t\t\tupdateProgress,\r\n\t\t\tdoublestuffProxiedTransmitters,\r\n\t\t\tavailablePackages,\r\n\t\t\tproxiedDevices\r\n\t\t}\r\n\t};\r\n\r\n\treturn {\r\n\t\t...unaugmentedDevice,\r\n\t\tconditions: statusService.conditionsFor(unaugmentedDevice)\r\n\t};\r\n}\r\n\r\nfunction mapProxiedTransmitters(device: InventoryDeviceFragment): ProxiedTransmittersForInventory {\r\n\treturn {\r\n\t\tmic1: mapProxiedTransmitter(device.features.doublestuffProxiedTransmitters?.mic1),\r\n\t\tmic2: mapProxiedTransmitter(device.features.doublestuffProxiedTransmitters?.mic2)\r\n\t};\r\n}\r\n\r\nfunction mapProxiedTransmitter(\r\n\ttransmitter?: ProxiedTransmitterStatusFragment | null\r\n): ProxiedTransmitterForInventory | null {\r\n\tif (!transmitter) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tconst batteryLevel = (transmitter.batteryLevelPercentage ?? Number.NaN) / 100;\r\n\r\n\treturn {\r\n\t\tbatteryLevel\r\n\t};\r\n}\r\n","import { Injectable, Inject, signal, effect } from '@angular/core';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\nimport {\r\n\tmap,\r\n\tObservable,\r\n\ttap,\r\n\tcatchError,\r\n\tthrowError,\r\n\tSubscription,\r\n\ttakeUntil,\r\n\tSubject,\r\n\tBehaviorSubject,\r\n\tdebounceTime,\r\n\ttake\r\n} from 'rxjs';\r\n\r\nimport { SubscriptionManager, SubscriptionManagerConfigCreate } from '@shure/cloud/shared/apollo';\r\nimport { InventoryDevice } from '@shure/cloud/shared/models/devices';\r\nimport { UpdateResponse } from '@shure/cloud/shared/models/http';\r\nimport { OktaInterfaceService, monitorLoginState } from '@shure/cloud/shared/okta/data-access';\r\nimport { APP_ENVIRONMENT, AppEnvironment } from '@shure/cloud/shared/utils/config';\r\nimport { ApolloQueryErrorMapper } from '@shure/shared/angular/data-access/system-api/core';\r\nimport { ILogger } from '@shure/shared/angular/utils/logging';\r\n\r\nimport { CloudDeviceApiService } from '../api/cloud-device-api.service';\r\nimport { DeviceDiscoveryApiService } from '../api/device-discovery-api.service';\r\nimport { DeviceRelationshipService } from '../api/device-relationship.service';\r\nimport { DeviceStatusService } from '../api/device-status.service';\r\nimport { InventoryDevicesApiService } from '../api/inventory-devices-api.service';\r\n\r\nimport {\r\n\tNodeChangeType,\r\n\tInventoryDeviceByIdQueryGQL,\r\n\tInventoryDeviceSubscriptionGQL\r\n} from './graphql/generated/cloud-sys-api';\r\nimport { mapInventoryDeviceFromSysApi } from './mappers/map-inventory-device';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class SysApiInventoryDevicesApiService implements InventoryDevicesApiService {\r\n\tpublic deviceInventoryQueryInProgress$ = new BehaviorSubject(false);\r\n\tpublic deviceInventory$ = new BehaviorSubject([]);\r\n\r\n\t// Public signal for the device inventory loading indicator. Set to true when initial loading begins\r\n\t// and false when we think we're initially loaded. Once set to false when initial loading is done\r\n\t// it will not be set to true again unless the user were to logout/in or refresh the page.\r\n\tpublic deviceInventoryLoading = signal(false);\r\n\r\n\t// This signal is used like a popcorn time to help control the deviceInventoryLoading signal.\r\n\t// If we haven't loaded all the devices in the inventory, but changes stop occuring, this is set to false\r\n\t// Similar to a popcorn timer... when the kernels stop popping, or in our case, the inventory device count\r\n\t// stops changing, the timer goes off.\r\n\tprivate inventoryCountChangedBeforeTimeout = signal(false);\r\n\r\n\t// This signal is tied to the number of devices in the inventory. It is compared to the number\r\n\t// of discoverd devices signal exposed by the discovery service to know how many devices we should expect\r\n\t// in the inventory.\r\n\tprivate deviceInventoryCount = toSignal(this.getInventoryDevicesCount$());\r\n\r\n\tprotected readonly logger: ILogger;\r\n\tprivate destroy$ = new Subject();\r\n\r\n\tprivate readonly devicesSubscriptionManager = new SubscriptionManager({\r\n\t\tsubscriptionType: 'inventory-devices',\r\n\t\tcreate: (config): Subscription => this.createDeviceSubscription(config),\r\n\t\tretryWaitMs: 5000,\r\n\t\tmaxRetryAttempts: 3\r\n\t});\r\n\r\n\tconstructor(\r\n\t\tlogger: ILogger,\r\n\t\tprivate readonly cloudDeviceService: CloudDeviceApiService,\r\n\t\tprivate readonly inventoryDeviceSubscriptionGQL: InventoryDeviceSubscriptionGQL,\r\n\t\tprivate readonly inventoryDeviceByIdQueryGQL: InventoryDeviceByIdQueryGQL,\r\n\t\tprivate readonly deviceDiscoveryService: DeviceDiscoveryApiService,\r\n\t\tprivate readonly deviceStatusService: DeviceStatusService,\r\n\t\tprivate readonly oktaService: OktaInterfaceService,\r\n\t\tprivate readonly deviceRelationshipService: DeviceRelationshipService,\r\n\t\t@Inject(APP_ENVIRONMENT) private readonly appEnv: AppEnvironment\r\n\t) {\r\n\t\tthis.logger = logger.createScopedLogger('DaiInventoryDevicesService');\r\n\r\n\t\tmonitorLoginState(this.oktaService, {\r\n\t\t\tonLogIn: this.initService.bind(this),\r\n\t\t\tonLogOut: this.suspendService.bind(this)\r\n\t\t});\r\n\r\n\t\teffect(\r\n\t\t\t() => {\r\n\t\t\t\tconst discoveryInProgress = this.deviceDiscoveryService.deviceDiscoveryInProgress();\r\n\t\t\t\tconst numDiscoveredDevices = this.deviceDiscoveryService.numDiscoveredDevices();\r\n\t\t\t\tconst numInventoryDevices = this.deviceInventoryCount();\r\n\t\t\t\tconst inventoryCountChangedBeforeTimeout = this.inventoryCountChangedBeforeTimeout();\r\n\r\n\t\t\t\tlet tempIsLoading = discoveryInProgress || numDiscoveredDevices !== numInventoryDevices;\r\n\t\t\t\tif (tempIsLoading === false) {\r\n\t\t\t\t\tthis.inventoryCountChangedBeforeTimeout.set(false);\r\n\t\t\t\t} else if (inventoryCountChangedBeforeTimeout === false) {\r\n\t\t\t\t\ttempIsLoading = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.logger.debug(\r\n\t\t\t\t\t'deviceInventoryLoading',\r\n\t\t\t\t\t'signal',\r\n\t\t\t\t\t`DiscoveryInProgress: ${discoveryInProgress}\\n` +\r\n\t\t\t\t\t\t`Num Discovered Devices: ${numDiscoveredDevices}\\n` +\r\n\t\t\t\t\t\t`Num Inventory Devices: ${numInventoryDevices}\\n` +\r\n\t\t\t\t\t\t`Inv Count Δ B4 Timeout: ${inventoryCountChangedBeforeTimeout}\\n` +\r\n\t\t\t\t\t\t`Is Loading (result): ${tempIsLoading}`\r\n\t\t\t\t);\r\n\t\t\t\tthis.deviceInventoryLoading.set(tempIsLoading);\r\n\t\t\t},\r\n\t\t\t{ allowSignalWrites: true }\r\n\t\t);\r\n\t}\r\n\r\n\tpublic getInventoryDevicesCount$(): Observable {\r\n\t\treturn this.getInventoryDevices$().pipe(map((devices) => devices.length));\r\n\t}\r\n\r\n\tpublic getInventoryDevices$(): Observable {\r\n\t\treturn this.deviceInventory$.asObservable();\r\n\t}\r\n\r\n\tpublic getInventoryDevice$(deviceId: string): Observable {\r\n\t\treturn this.inventoryDeviceByIdQueryGQL\r\n\t\t\t.watch(\r\n\t\t\t\t{\r\n\t\t\t\t\tnodeId: deviceId,\r\n\t\t\t\t\trequestFirmwareFields: this.appEnv.showFirmwareUpgrade ?? false,\r\n\t\t\t\t\trequestProxiedDevices: this.appEnv.showProxiedDevices ?? false\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\terrorPolicy: 'ignore',\r\n\t\t\t\t\tfetchPolicy: 'cache-first'\r\n\t\t\t\t}\r\n\t\t\t)\r\n\t\t\t.valueChanges.pipe(\r\n\t\t\t\ttap(() => {\r\n\t\t\t\t\tthis.logger.debug('inventoryDeviceByIdQueryGQL', 'Received update', JSON.stringify({ deviceId }));\r\n\t\t\t\t}),\r\n\t\t\t\tmap((query) => {\r\n\t\t\t\t\tconst device = query.data.node;\r\n\t\t\t\t\tif (device && 'isDevice' in device) {\r\n\t\t\t\t\t\tconst inventoryDevice = mapInventoryDeviceFromSysApi(device, this.deviceStatusService);\r\n\t\t\t\t\t\tthis.deviceRelationshipService.registerProxiedDevices(inventoryDevice);\r\n\t\t\t\t\t\treturn inventoryDevice;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthrow ApolloQueryErrorMapper.getError(query);\r\n\t\t\t\t}),\r\n\t\t\t\ttap((device) => {\r\n\t\t\t\t\t// when query response received, set up the per-device subscription.\r\n\t\t\t\t\tthis.devicesSubscriptionManager.register([device.id]);\r\n\t\t\t\t}),\r\n\t\t\t\tcatchError((error: Error) => {\r\n\t\t\t\t\tthis.logger.error(\r\n\t\t\t\t\t\t'getInventoryDevice$()',\r\n\t\t\t\t\t\t'Failed to query device',\r\n\t\t\t\t\t\tJSON.stringify({ deviceId, error })\r\n\t\t\t\t\t);\r\n\t\t\t\t\treturn throwError(() => error);\r\n\t\t\t\t})\r\n\t\t\t);\r\n\t}\r\n\r\n\tpublic setMute(deviceId: string, mute: boolean): Observable> {\r\n\t\tthis.logger.trace('setMute()', 'Setting mute', { deviceId, mute });\r\n\t\treturn this.cloudDeviceService.setMute(deviceId, mute);\r\n\t}\r\n\r\n\tpublic setIdentify(deviceId: string, identify: boolean): Observable> {\r\n\t\tthis.logger.trace('setIdentify()', 'Setting identify', { deviceId, identify });\r\n\t\treturn this.cloudDeviceService.setIdentify(deviceId, identify);\r\n\t}\r\n\r\n\tpublic setDeviceName(deviceId: string, name: string): Observable> {\r\n\t\tthis.logger.trace('setDeviceName()', 'Setting device name', { deviceId, name });\r\n\t\treturn this.cloudDeviceService.setDeviceName(deviceId, name);\r\n\t}\r\n\r\n\tprivate initService(): void {\r\n\t\tthis.logger.information('initService', 'user logged in, initializating service');\r\n\t\tthis.destroy$ = new Subject();\r\n\t\tthis.inventoryCountChangedBeforeTimeout.set(true);\r\n\t\tthis.getInventoryDevicesCount$()\r\n\t\t\t.pipe(\r\n\t\t\t\tdebounceTime(10000),\r\n\t\t\t\ttake(1), // we don't need this subscription running past the first debounce expiration.\r\n\t\t\t\ttakeUntil(this.destroy$)\r\n\t\t\t)\r\n\t\t\t.subscribe(() => {\r\n\t\t\t\tthis.inventoryCountChangedBeforeTimeout.set(false);\r\n\t\t\t});\r\n\r\n\t\tthis.deviceDiscoveryService\r\n\t\t\t.deviceRemoved$()\r\n\t\t\t.pipe(takeUntil(this.destroy$))\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: (removedDevice) => {\r\n\t\t\t\t\tthis.devicesSubscriptionManager.deregister(removedDevice);\r\n\t\t\t\t\tthis.deviceRelationshipService.removeDevice(removedDevice);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\tthis.getInventoryDevicessInteral();\r\n\t}\r\n\r\n\tprivate suspendService(): void {\r\n\t\tthis.logger.information('suspendService', 'user logged out, suspending service');\r\n\t\tthis.inventoryCountChangedBeforeTimeout.set(false);\r\n\t\tthis.destroy$.next();\r\n\t\tthis.destroy$.complete();\r\n\t\tthis.devicesSubscriptionManager.deregisterAll();\r\n\t}\r\n\r\n\tprivate getInventoryDevicessInteral(): void {\r\n\t\tthis.deviceDiscoveryService\r\n\t\t\t.getDiscoveredDevicesByQuery$(\r\n\t\t\t\t(id) => this.getInventoryDevice$(id).pipe(takeUntil(this.destroy$)),\r\n\t\t\t\t(_device) => true // filter function (don't remove any)\r\n\t\t\t)\r\n\t\t\t.pipe(\r\n\t\t\t\ttap((devices) => this.deviceInventory$.next(devices)),\r\n\t\t\t\ttakeUntil(this.destroy$)\r\n\t\t\t)\r\n\t\t\t.subscribe();\r\n\t}\r\n\r\n\tprivate createDeviceSubscription({ id, retryCallback }: SubscriptionManagerConfigCreate): Subscription {\r\n\t\tconst subscriptionTypes = [\r\n\t\t\tNodeChangeType.DeviceName,\r\n\t\t\tNodeChangeType.DeviceIdentify,\r\n\t\t\tNodeChangeType.DeviceUpdateProgress,\r\n\t\t\tNodeChangeType.DeviceAvailablePackages,\r\n\t\t\tNodeChangeType.DeviceDoubleStuffProxiedTransmitters,\r\n\t\t\tNodeChangeType.DeviceBatteryLevel,\r\n\t\t\tNodeChangeType.DeviceProxiedDevices\r\n\t\t];\r\n\r\n\t\treturn this.inventoryDeviceSubscriptionGQL\r\n\t\t\t.subscribe(\r\n\t\t\t\t{\r\n\t\t\t\t\tid,\r\n\t\t\t\t\ttypes: subscriptionTypes,\r\n\t\t\t\t\trequestFirmwareFields: this.appEnv.showFirmwareUpgrade ?? false,\r\n\t\t\t\t\trequestProxiedDevices: this.appEnv.showProxiedDevices ?? false\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\terrorPolicy: 'ignore',\r\n\t\t\t\t\tfetchPolicy: 'network-only' // we always want subscription data from the server\r\n\t\t\t\t}\r\n\t\t\t)\r\n\t\t\t.pipe(takeUntil(this.destroy$))\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: () => {\r\n\t\t\t\t\tthis.logger.debug(\r\n\t\t\t\t\t\t'inventoryDeviceSubscriptionGQL',\r\n\t\t\t\t\t\t'Received update',\r\n\t\t\t\t\t\tJSON.stringify({\r\n\t\t\t\t\t\t\tid\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t);\r\n\t\t\t\t},\r\n\t\t\t\tcomplete: () => {\r\n\t\t\t\t\tthis.logger.warning('inventoryDeviceSubscriptionGQL', 'subscription completed', {\r\n\t\t\t\t\t\tid\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\t\t\t\terror: (error) => {\r\n\t\t\t\t\tthis.logger.error(\r\n\t\t\t\t\t\t'inventoryDeviceSubscriptionGQL',\r\n\t\t\t\t\t\t'Encountered error',\r\n\t\t\t\t\t\tJSON.stringify({ id, error })\r\n\t\t\t\t\t);\r\n\t\t\t\t\tretryCallback();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n}\r\n","import { PercentPipe } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { APOLLO_NAMED_OPTIONS, NamedOptions } from 'apollo-angular';\r\n\r\nimport {\r\n\tCloudDeviceApiService,\r\n\tDEVICE_DISCOVERY_CLAIMING_SERVICE,\r\n\tDetectionTokenApiService,\r\n\tDeviceClaimingApiService,\r\n\tDeviceClaimingDiscoveryApiService,\r\n\tDeviceDiscoveryApiService,\r\n\tDevicePropertyPanelApiService,\r\n\tDeviceStatusService,\r\n\tInventoryDevicesApiService\r\n} from '../api';\r\nimport { DeviceRelationshipService } from '../api/device-relationship.service';\r\n\r\nimport { SysApiCloudDeviceApiService } from './sys-api-cloud-device-api.service';\r\nimport { SysApiConnectionService } from './sys-api-connection.service';\r\nimport { SysApiDetectionTokenApiService } from './sys-api-detection-token-api.service';\r\nimport { SysApiDeviceClaimingApiService } from './sys-api-device-claiming-api.service';\r\nimport { SysApiDeviceClaimingDiscoveryApiService } from './sys-api-device-claiming-discovery-api.service';\r\nimport { SysApiDeviceDiscoveryApiService } from './sys-api-device-discovery-api.service';\r\nimport { SysApiDevicePropertyPanelApiService } from './sys-api-device-property-panel-api.service';\r\nimport { SysApiDeviceRelationshipService } from './sys-api-device-relationship.service';\r\nimport { SysApiInventoryDevicesApiService } from './sys-api-inventory-devices-api.service';\r\n\r\n@NgModule({\r\n\tproviders: [\r\n\t\tDeviceStatusService,\r\n\t\t{\r\n\t\t\tprovide: CloudDeviceApiService,\r\n\t\t\tuseClass: SysApiCloudDeviceApiService\r\n\t\t},\r\n\t\t{\r\n\t\t\tprovide: DetectionTokenApiService,\r\n\t\t\tuseClass: SysApiDetectionTokenApiService\r\n\t\t},\r\n\t\t{\r\n\t\t\tprovide: DeviceClaimingApiService,\r\n\t\t\tuseClass: SysApiDeviceClaimingApiService\r\n\t\t},\r\n\t\t{\r\n\t\t\tprovide: DeviceClaimingDiscoveryApiService,\r\n\t\t\tuseClass: SysApiDeviceClaimingDiscoveryApiService\r\n\t\t},\r\n\t\t{\r\n\t\t\tprovide: DeviceDiscoveryApiService,\r\n\t\t\tuseClass: SysApiDeviceDiscoveryApiService\r\n\t\t},\r\n\t\t{\r\n\t\t\tprovide: DeviceRelationshipService,\r\n\t\t\tuseClass: SysApiDeviceRelationshipService\r\n\t\t},\r\n\t\t{\r\n\t\t\tprovide: InventoryDevicesApiService,\r\n\t\t\tuseClass: SysApiInventoryDevicesApiService\r\n\t\t},\r\n\t\t{\r\n\t\t\tprovide: DevicePropertyPanelApiService,\r\n\t\t\tuseClass: SysApiDevicePropertyPanelApiService\r\n\t\t},\r\n\t\t{\r\n\t\t\tprovide: DEVICE_DISCOVERY_CLAIMING_SERVICE,\r\n\t\t\tuseClass: SysApiDeviceClaimingDiscoveryApiService\r\n\t\t},\r\n\t\tSysApiConnectionService,\r\n\t\t{\r\n\t\t\tprovide: APOLLO_NAMED_OPTIONS,\r\n\t\t\tuseFactory(sysApiConnectionService: SysApiConnectionService): NamedOptions {\r\n\t\t\t\tconst options: NamedOptions = {\r\n\t\t\t\t\tsysApi: sysApiConnectionService.createApolloClientOptions()\r\n\t\t\t\t};\r\n\t\t\t\treturn options;\r\n\t\t\t},\r\n\t\t\tdeps: [SysApiConnectionService]\r\n\t\t},\r\n\t\tPercentPipe\r\n\t]\r\n})\r\nexport class SysApiDevicesDataAccessModule {}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBO,SAAS,UAAU,WAAW,SAAS;AAC1C,MAAI,CAAC,WAAW;AACZ,UAAM,IAAI,eAAe,OAAO;AAAA,EACpC;AACJ;AAGA,SAAS,kBAAkB,MAAM;AAC7B,SAAO,WAAY;AACf,QAAI,gBAAgB,QAAQ,IAAI,KAAK,gBAAgB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6BAA6B,CAAC,gBAAgB,oBAAoB;IAClE,qBAAqB;MACpB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;IAED,wBAAwB,CAAC,eAAe,eAAe;IACvD,qBAAqB,CAAC,kBAAkB,kBAAkB;IAC1D,8BAA8B;MAC7B;MACA;MACA;MACA;MACA;;IAED,UAAU;MACT;MACA;MACA;MACA;MACA;MACA;MACA;;IAED,2BAA2B,CAAC,qCAAqC,4BAA4B;IAC7F,mBAAmB;MAClB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;IAED,gCAAgC,CAAC,0CAA0C;IAC3E,wBAAwB;MACvB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;IAED,sBAAsB;MACrB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;IAED,mCAAmC,CAAA;IACnC,wCAAwC,CAAC,8CAA8C;IACvF,gCAAgC;MAC/B;MACA;;IAED,8BAA8B,CAAC,mDAAmD,0BAA0B;IAC5G,gCAAgC;MAC/B;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;IAED,gCAAgC,CAAC,wCAAwC,4BAA4B;IACrG,aAAa,CAAC,2BAA2B,gCAAgC,sBAAs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C,cAAc,WAAW;IAC9C,gBAAgB;MACf;MACA;MACA;MACA;MACA;;IAED,yBAAyB,CAAC,iCAAiC,sBAAsB;IACjF,6BAA6B,CAAC,gBAAgB,oBAAoB;IAClE,qBAAqB;MACpB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;IAED,6BAA6B,CAAC,mCAAmC,gCAAgC;IACjG,wBAAwB,CAAC,eAAe,eAAe;IACvD,qBAAqB,CAAC,kBAAkB,kBAAkB;IAC1D,8BAA8B;MAC7B;MACA;MACA;MACA;MACA;;IAED,UAAU;MACT;MACA;MACA;MACA;MACA;MACA;MACA;;IAED,2BAA2B,CAAC,qCAAqC,4BAA4B;IAC7F,mBAAmB;MAClB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;IAED,gCAAgC,CAAC,0CAA0C;IAC3E,wBAAwB;MACvB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;IAED,sBAAsB;MACrB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;IAED,mCAAmC,CAAA;IACnC,wCAAwC,CAAC,8CAA8C;IACvF,gCAAgC;M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,MAAK;AACV,aAAK,OAAO,MACX,kCACA,mBACA,KAAK,UAAU;UACd;SACA,CAAC;MAEJ;MACA,UAAU,MAAK;AACd,aAAK,OAAO,QAAQ,kCAAkC,0BAA0B;UAC/E;SACA;MACF;MACA,OAAO,CAAC,UAAS;AAChB,aAAK,OAAO,MACX,kCACA,qBACA,KAAK,UAAU,EAAE,IAAI,MAAK,CAAE,CAAC;AAE9B,sBAAa;MACd;KACA;EACH;;;oBA9OY,mCAAgC,mBAAA,OAAA,GAAA,mBAAA,qBAAA,GAAA,mBAAA,8BAAA,GAAA,mBAAA,2BAAA,GAAA,mBAAA,yBAAA,GAAA,mBAAA,mBAAA,GAAA,mBAAA,oBAAA,GAAA,mBAAA,yBAAA,GAAA,mBAuCnC,eAAe,CAAA;AAAA;qGAvCZ,mCAAgC,SAAhC,kCAAgC,WAAA,YADnB,OAAM,CAAA;AAC1B,IAAO,mCAAP;;;AC0CA,IAAO,iCAAP,MAAO,+BAA6B;;;oBAA7B,gCAA6B;AAAA;8FAA7B,+BAA6B,CAAA;mGApD9B;EACV;EACA;IACC,SAAS;IACT,UAAU;;EAEX;IACC,SAAS;IACT,UAAU;;EAEX;IACC,SAAS;IACT,UAAU;;EAEX;IACC,SAAS;IACT,UAAU;;EAEX;IACC,SAAS;IACT,UAAU;;EAEX;IACC,SAAS;IACT,UAAU;;EAEX;IACC,SAAS;IACT,UAAU;;EAEX;IACC,SAAS;IACT,UAAU;;EAEX;IACC,SAAS;IACT,UAAU;;EAEX;EACA;IACC,SAAS;IACT,WAAW,yBAAgD;AAC1D,YAAM,UAAwB;QAC7B,QAAQ,wBAAwB,0BAAyB;;AAE1D,aAAO;IACR;IACA,MAAM,CAAC,uBAAuB;;EAE/B;EACA,CAAA;AAEI,IAAO,gCAAP;","names":["InvariantError","invariant","_a","count","value","invariant","invariant","version","init_version","invariant","init_invariant","invariant","init_invariant","i","_","OperationTypeNode","DirectiveLocation","Kind","i","indent","result","TokenKind","i","instanceOf","x","x","result","result","map","result","isDigit","a","b","i","j","map","root","result","i","x","wrap","i","parseValue","invariant","init_invariant","init_invariant","invariant","TypeKind","map","result","x","invariant","init_invariant","s","i","j","result","a","b","map","invariant","init_invariant","onError","invariant","init_invariant","result","invariant","init_invariant","onError","document","result","invariant","init_invariant","onError","e","init_validate","i","document","result","getFieldDef","invariant","collectSubfields","init_invariant","possibleTypes","i","result","document","syntaxError","init_validate","result","_e","document","getFieldDef","invariant","init_invariant","init_validate","document","result","invariant","init_invariant","getNamedType","invariant","getNamedType","init_invariant","init_validate","document","init_validate","x","sortFields","invariant","map","init_invariant","n","invariant","i","possibleTypes","f","init_invariant","stringifyValue","invariant","init_invariant","BreakingChangeType","DangerousChangeType","version","init_graphql","init_version","_a","invariant","root","document","result","init_directives","init_graphql","hasOwnProperty","i","map","create","document","invariant","_a","result","stringify","s","invariant","d","x","_a","document","DocumentTransform","invariant","print","init_graphql","result","map","p","invariant","i","document","init_graphql","d","document","_a","count","i","hasOwnProperty","DeepMerger","result","_a","i","isReference","extras","o","it","i","n","Observable","x","e","m","Subscription","SubscriptionObserver","subscribe","forEach","map","C","filter","reduce","first","concat","v","value","s","from","observable","of","root","result","Symbol","Observable","i","e","observable","Observable","result","Observable","Concast","result","_a","sources","_","Observable","result","_a","i","result","result","value","result","k","Observable","print","init_utilities","init_directives","Observable","init_utilities","observable","invariant","Observable","init_utilities","result","_a","setContext","init_utilities","result","init_graphql","util","assertNever","k","e","_","objectUtil","first","t","i","map","m","map","x","s","errorUtil","f","result","_a","check","version","ctx","min","max","i","issues","a","b","x","first","elements","me","e","effect","processed","p","p2","ZodFirstPartyTypeKind","o","m","k","k2","exports","p","o","m","k","k2","v","result","exports","p","z","o","m","k","k2","v","result","z","passthrough","toLink","ApolloLink","isTerminating","x","y","first","empty","from","split","concat","execute","module","Observable","_createForOfIteratorHelperLoose","o","it","_unsupportedIterableToArray","i","_arrayLikeToArray","n","_defineProperties","_createClass","getMethod","getSpecies","SymbolSpecies","isObservable","x","hostReportError","e","enqueue","cleanupSubscription","closeSubscription","flushSubscription","notifySubscription","m","onNotify","hasSymbols","hasSymbol","getSymbol","SymbolIterator","SymbolObservable","Subscription","SubscriptionObserver","init_module","subscribe","forEach","map","C","filter","reduce","first","concat","v","value","s","from","observable","of","o","m","k","k2","v","result","z","MessagePortLink","identity","x","x","isObject","isAsyncIterable","isObservable","isPromise","signal","x","isObject","ARRAY_VALUE","ARRAY_ERROR","AsyncSink","signal","i","n","isAsyncIterable","isPromise","isObservable","observable","x","e","signal","it","signal","i","r","e","e","e","signal","WithAbortAsyncIterable","signal","sum","count","it","catchError","signal","it","c","e","result","resolve","reject","signal","i","identity","signal","signal","i","signal","signal","i","signal","signal","i","signal","i","signal","i","signal","i","wrapPromiseWithIndex","signal","i","NEVER_PROMISE","identity","e","r","isArray","identity","h","signal","i","signal","signal","i","signal","x","y","signal","i","signal","i","isEmpty","signal","_","signal","i","result","comparer","signal","it","comparer","signal","result","it","comparer","signal","wrapPromiseWithIndex","merge","NEVER_PROMISE","signal","i","comparer","signal","it","comparer","signal","signal","_","of","signal","signal","it","e","wrapPromiseWithIndex","signal","i","count","signal","signal","signal","signal","i","count","signal","i","comparer","signal","signal","result","i","signal","i","signal","throwError","signal","signal","self","r","AsyncIterableReadableByteStream","signal","map","x","e","_","observable","observable","it","f","signal","signal","signal","x","i","AsyncSink","catchError","from","isEmpty","merge","of","throwError","result","o","m","k","k2","exports","p","init_utilities","Observable","ApolloLink","x","y","first","invariant","from","execute","init_utilities","_a","init_utilities","onError","init_utilities","init_utilities","init_utilities","result","err","ApolloError","_a","hasOwnProperty","_a","i","result","_e","p","e","init_utilities","print","init_utilities","init_utilities","_a","print","version","_b","d","invariant","_c","parseError","Observable","HttpLink","toString","hasOwnProperty","a","b","k","init_utilities","defaultMakeData","forEach","slice","hasOwnProperty","Trie","i","map","isObjRef","max","maybe","Slot","hasOwnProperty","a","b","dep","_a","e","i","subscribe","dep","m","hasOwnProperty","Trie","wrap","max","subscribe","cache","init_utilities","ApolloCache","wrap","document","_a","MissingFieldError","_a","i","init_utilities","init_utilities","_a","result","document","EntityStore","invariant","from","_a","count","root","CacheGroup","EntityStore","Root","_a","Layer","p","Stump","root","init_utilities","init_graphql","init_utilities","init_utilities","ObjectCanon","i","StoreReader","wrap","_a","result","i","_","result","invariant","init_graphql","init_utilities","init_utilities","caches","cache","init_utilities","from","invariant","_a","d","i","s","p","_a","_","Policies","existing","merge","incoming","invariant","possibleTypes","result","supertypeSet","i","_a","from","invariant","StoreWriter","_a","result","dataId","context","merge","invariant","e","i","value","selectionSet","from","_a","map","invariant","InMemoryCache","wrap","c","_a","e","invariant","diff","result","document","init_utilities","NetworkStatus","init_utilities","init_utilities","_a","i","hasOwnProperty","ObservableQuery","_a","first","last","_e","result","diff","v","invariant","info","document","Observable","_a","invariant","init_graphql","init_utilities","LocalState","_a","document","result","execute","invariant","d","_","node","init_utilities","init_utilities","QueryInfo","diff","_a","result","document","result","init_utilities","hasOwnProperty","QueryManager","_a","defaultOptions","_e","document","hasClientExports","self","invariant","result","diff","cache","DELETE","observable","variables","Observable","print","execute","sourcesWithInfo","networkStatus","data","init_utilities","ApolloClient","_a","defaultOptions","_e","invariant","execute","c","map","result","init_graphql","normalize","result","i","fromPromise","result","t","Subscription","gql","init_utilities","_e","i","init_utilities","Observable","init_utilities","Observable","result","e","ErrorLink","init_utilities","_a","max","count","_a","max","count","RetryableOperation","_a","o","RetryLink","Observable","init_utilities","init_utilities","_a","GraphQLWsLink","Observable","print","init_utilities","init_graphql","CloseCode","MessageType","__await","v","__asyncGenerator","g","i","q","n","a","b","e","r","f","retries","isLikeCloseEvent","c","ws","listeners","message","_a","l","socket","_","errOrCloseEvent","subscribe","iterator","possibleTypes","from","count","init_utilities","possibleTypes","x","_","UpdateState","CreateState","DeleteState","result","AnalogAudioOutputMode","AnalogLevel","AnalogLogicPresetSwitch","AssociationStatus","AudioActivityLevel","AudioChannelGroup","AudioChannelInputSourceType","AudioChannelRole","AudioCoverageAreaType","AudioMetersLightingMode","AutoLevelConfiguration","AutoLevelMode","AutoLevelPosition","AutoLevelTone","AutoPositionStatus","AutomixMode","AutomixerInputDisengagedBehavior","BatteryState","ChargingMode","CloneRoomStatus","ColorTheme","CompatibilityLevel","CompressorLevel","CoverageMode","CredentialsState","DanteAudioEncryptionStatus","DenoiserLevel","DeverbIntensity","DeviceDeploymentStage","DeviceOptimizationStatus","DeviceResetScope","DeviceSpecificEqualizerContour","DeviceStatus","DirectOutputTapPoint","DisassociationStatus","DoubleStuffProxiedTransmitterStatus","EapMethod8021X","EqFilterType","EqualizerContour","EqualizerPreset","ErrorCode","EthernetPowerSourceType","FirmwareUpdateRequestState","FirmwareUpdateStage","FirmwareUpdateStatus","GlobalMicStatus","GlobalMicStatusInput","GroupAssociationStatus","GroupAssociationWarning","GroupOptimizationStatus","IpMode","LastAuthenticationStatus8021X","LicenseActivationState","LicenseCancelationState","LicenseDeactivationState","LicenseState","LicenseType","LightingColor","LightingMode","LightingState","LightingStyle","LinkingOperationResult","LinkingStatus","LobeWidth","MeterChangeType","MeteringMode","MicOptimizationMode","MicPolarPattern","MicStatus","MicStatusInput","MuteButtonMode","MuteControlFunction","NetworkMode","NodeChangeType","NoiseDetectionSensitivity","NoiseReductionLevel","NoiseRemovalLevel","NonLinearProcessingLevel","OptimizeRoomProgressType","OutputSignalPath","PcPeripheralStatus","PendingClaimStatus","Placement","ReverbType","RfActivityLevel","RoomCloningStrategy","RoomDeploymentOverallResult","RoomDeploymentProgressType","RoomDeploymentStage","RoomOptimizationStage","RoomOptimizationStatus","SignalType","StereoAudioChannelSpatialSeparation","UnlinkingOperationResult","UsbTerminalType","gql","Subscription","result","result","result","AnalogAudioOutputMode","AnalogLevel","AnalogLogicPresetSwitch","AnalogLogicPresetSwitchStatus","AssociationStatus","AudioActivityLevel","AudioChannelGroup","AudioChannelInputSourceType","AudioChannelRole","AudioCoverageAreaType","AudioMetersLightingMode","AutoLevelConfiguration","AutoLevelMode","AutoLevelPosition","AutoLevelTone","AutoPositionStatus","AutomixMode","AutomixerInputDisengagedBehavior","BatteryState","ChargingMode","CloneRoomStatus","ColorTheme","CompatibilityLevel","CompressorLevel","ConferencingOperationMode","CoverageMode","CredentialsState","DanteAudioEncryptionStatus","DenoiserLevel","DeverbIntensity","DeviceDeploymentStage","DeviceOptimizationStatus","DeviceResetScope","DeviceSpecificEqualizerContour","DeviceStatus","DirectOutputTapPoint","DisassociationStatus","DoubleStuffProxiedTransmitterStatus","EapMethod8021X","EqFilterType","EqualizerContour","EqualizerPreset","ErrorCode","EthernetPowerSourceType","FirmwarePackageDownloadRequestState","FirmwarePackageDownloadStage","FirmwareUpdateRequestState","FirmwareUpdateStage","FirmwareUpdateStatus","GlobalMicStatus","GlobalMicStatusInput","GroupAssociationStatus","GroupAssociationWarning","GroupOptimizationStatus","IpMode","LastAuthenticationStatus8021X","LicenseActivationState","LicenseCancelationState","LicenseDeactivationState","LicenseState","LicenseStateV2","LicenseType","LicenseTypeV2","LightingColor","LightingMode","LightingState","LightingStyle","LinkingOperationResult","LinkingStatus","LoadPerDeviceStateResult","LobeWidth","Loudspeaker","MeterChangeType","MeteringMode","MicOptimizationMode","MicPolarPattern","MicStatus","MicStatusInput","MuteButtonMode","MuteControlFunction","NetworkInterfaceStatus","NetworkMode","NodeChangeType","NoiseDetectionSensitivity","NoiseReductionLevel","NoiseRemovalLevel","NonLinearProcessingLevel","OperationalStatus","OptimizeRoomProgressType","OutputSignalPath","PcPeripheralStatus","Placement","ReverbType","RfActivityLevel","RfDensityMode","RfPower","RoomCloningStrategy","RoomDeploymentOverallResult","RoomDeploymentProgressType","RoomDeploymentStage","RoomOptimizationStage","RoomOptimizationStatus","SaveDeviceStateOption","SavePerDeviceStateResult","SignalType","StereoAudioChannelSpatialSeparation","TransmitterLightingBehavior","TransmitterSwitchBehavior","UnlinkingOperationResult","UsbTerminalType","init_utilities","_ApolloCacheManager","ApolloCacheManager","APOLLO_TYPE_POLICY_PROVIDERS","_ApolloCacheFactory","possibleTypes","x","APOLLO_TYPE_POLICY_PROVIDERS","ApolloCacheManager","ApolloCacheFactory","e","a","b","ApolloConnectionService","ApolloConnectionService","possibleTypes","from","ApolloCacheFactory","init_utilities","init_graphql","ApolloConnectionService","possibleTypes","from","count","ApolloCacheFactory","init_utilities","mergePolicyNoKey","deepMergePolicyNoKey","e","i","mergePolicyNoKeyKeepTypename","isReference","mergePolicyFixedTypename","_e","_SysApiTypePolicyProvider","SysApiTypePolicyProvider","ApolloConnectionService","APOLLO_TYPE_POLICY_PROVIDERS","SysApiTypePolicyProvider","p","result","provider","maxRetryDelay","init_graphql","f","SelectionComparison","s","result","f","result","result","_a","d","ErrorCode","t","_a","e","s","n","r","o","a","u","c","l","f","i","y","_","h","d","m","as","result","result","e","d","a","b","n","MISSING_VALUE","IpMode","assertNever","DeviceStatus","t"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,320,321,322,323,324,325,327,328,329,367]}