{"version":3,"file":"js/469.8aa6007c.js","sources":["../../frontend/node_modules/rxjs/dist/esm5/internal/Observable.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/pipe.js","../../frontend/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js","../../frontend/node_modules/rxjs/dist/esm5/internal/Subject.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/noop.js","../../frontend/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js","../../frontend/node_modules/rxjs/dist/esm5/internal/Subscriber.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js","../../frontend/node_modules/rxjs/dist/esm5/internal/Subscription.js","../../frontend/node_modules/rxjs/dist/esm5/internal/config.js","../../frontend/node_modules/rxjs/dist/esm5/internal/observable/empty.js","../../frontend/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/map.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/share.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/tap.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js","../../frontend/node_modules/rxjs/dist/esm5/internal/Scheduler.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js","../../frontend/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js","../../frontend/node_modules/rxjs/dist/esm5/internal/symbol/observable.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/errorContext.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/identity.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/isFunction.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/isIterable.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/isPromise.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/lift.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js","../../frontend/node_modules/@apollo/client/utilities/graphql/transform.js","../../frontend/node_modules/@apollo/client/utilities/graphql/storeUtils.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduler/async.js","../../frontend/node_modules/@apollo/client/utilities/internal/mapObservableFragment.js","../../frontend/node_modules/@apollo/client/utilities/internal/getFragmentQueryDocument.js","../../frontend/node_modules/@apollo/client/cache/core/cache.js","../../frontend/node_modules/@apollo/client/utilities/internal/combineLatestBatched.js","../../frontend/node_modules/rxjs/dist/esm5/internal/observable/timer.js","../../frontend/node_modules/@apollo/client/utilities/internal/bindCacheKey.js","../../frontend/node_modules/@apollo/client/utilities/internal/DeepMerger.js","../../frontend/node_modules/@apollo/client/utilities/internal/makeReference.js","../../frontend/node_modules/@apollo/client/cache/inmemory/helpers.js","../../frontend/node_modules/@apollo/client/cache/inmemory/entityStore.js","../../frontend/node_modules/@apollo/client/utilities/internal/argumentsObjectFromField.js","../../frontend/node_modules/@apollo/client/utilities/internal/getStoreKeyName.js","../../frontend/node_modules/@apollo/client/cache/inmemory/key-extractor.js","../../frontend/node_modules/@apollo/client/cache/inmemory/reactiveVars.js","../../frontend/node_modules/@apollo/client/cache/inmemory/policies.js","../../frontend/node_modules/@apollo/client/utilities/internal/storeKeyNameFromField.js","../../frontend/node_modules/@apollo/client/cache/core/types/common.js","../../frontend/node_modules/@apollo/client/cache/inmemory/readFromStore.js","../../frontend/node_modules/@apollo/client/utilities/internal/mergeDeepArray.js","../../frontend/node_modules/@apollo/client/cache/inmemory/writeToStore.js","../../frontend/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js","../../frontend/node_modules/rxjs/dist/esm5/internal/Notification.js","../../frontend/node_modules/@apollo/client/utilities/internal/hasDirectives.js","../../frontend/node_modules/@apollo/client/incremental/handlers/notImplemented.js","../../frontend/node_modules/@apollo/client/link/core/execute.js","../../frontend/node_modules/@apollo/client/utilities/internal/removeFragmentSpreads.js","../../frontend/node_modules/rxjs/dist/esm5/internal/observable/throwError.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js","../../frontend/node_modules/rxjs/dist/esm5/internal/observable/from.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js","../../frontend/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js","../../frontend/node_modules/rxjs/dist/esm5/internal/util/args.js","../../frontend/node_modules/rxjs/dist/esm5/internal/observable/of.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/catchError.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/filter.js","../../frontend/node_modules/rxjs/dist/esm5/internal/observable/concat.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js","../../frontend/node_modules/@apollo/client/errors/LinkError.js","../../frontend/node_modules/@apollo/client/masking/maskDefinition.js","../../frontend/node_modules/@apollo/client/utilities/isNetworkRequestSettled.js","../../frontend/node_modules/@apollo/client/utilities/internal/graphQLResultHasError.js","../../frontend/node_modules/@apollo/client/utilities/internal/filterMap.js","../../frontend/node_modules/@apollo/client/utilities/internal/toQueryResult.js","../../frontend/node_modules/@apollo/client/utilities/internal/removeDirectivesFromDocument.js","../../frontend/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js","../../frontend/node_modules/@apollo/client/core/ObservableQuery.js","../../frontend/node_modules/@apollo/client/utilities/isNetworkRequestInFlight.js","../../frontend/node_modules/@apollo/client/core/QueryInfo.js","../../frontend/node_modules/@apollo/client/core/QueryManager.js","../../frontend/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js","../../frontend/node_modules/@apollo/client/utilities/internal/hasForcedResolvers.js","../../frontend/node_modules/@apollo/client/utilities/internal/getFragmentDefinition.js","../../frontend/node_modules/@apollo/client/utilities/internal/isDocumentNode.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/finalize.js","../../frontend/node_modules/@apollo/client/masking/maskOperation.js","../../frontend/node_modules/@apollo/client/masking/maskFragment.js","../../frontend/node_modules/rxjs/dist/esm5/internal/operators/materialize.js","../../frontend/node_modules/@apollo/client/core/ApolloClient.js","../../frontend/node_modules/@apollo/client/core/networkStatus.js","../../frontend/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js","../../frontend/node_modules/@apollo/client/errors/CombinedProtocolErrors.js","../../frontend/node_modules/@apollo/client/errors/ServerError.js","../../frontend/node_modules/@apollo/client/errors/UnconventionalError.js","../../frontend/node_modules/@apollo/client/errors/index.js","../../frontend/node_modules/@apollo/client/errors/isErrorLike.js","../../frontend/node_modules/@apollo/client/errors/utils.js","../../frontend/node_modules/@apollo/client/link/core/ApolloLink.js","../../frontend/node_modules/@apollo/client/link/utils/createOperation.js","../../frontend/node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js","../../frontend/node_modules/@apollo/client/utilities/graphql/operations.js","../../frontend/node_modules/@apollo/client/errors/ServerParseError.js","../../frontend/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js","../../frontend/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js","../../frontend/node_modules/@apollo/client/link/http/BaseHttpLink.js","../../frontend/node_modules/@apollo/client/link/utils/filterOperationVariables.js","../../frontend/node_modules/@apollo/client/link/http/selectURI.js","../../frontend/node_modules/@apollo/client/link/http/rewriteURIForGET.js","../../frontend/node_modules/@apollo/client/link/http/HttpLink.js","../../frontend/node_modules/@apollo/client/masking/utils.js","../../frontend/node_modules/@apollo/client/utilities/caching/sizes.js","../../frontend/node_modules/@apollo/client/utilities/graphql/DocumentTransform.js","../../frontend/node_modules/@apollo/client/utilities/graphql/print.js","../../frontend/node_modules/graphql/language/characterClasses.mjs","../../frontend/node_modules/graphql/language/printString.mjs","../../frontend/node_modules/graphql/language/printer.mjs","../../frontend/node_modules/graphql/language/blockString.mjs","../../frontend/node_modules/@apollo/client/utilities/internal/caches.js","../../frontend/node_modules/@apollo/client/utilities/internal/canonicalStringify.js","../../frontend/node_modules/@apollo/client/utilities/internal/checkDocument.js","../../frontend/node_modules/@apollo/client/utilities/internal/compact.js","../../frontend/node_modules/@apollo/client/utilities/internal/constants.js","../../frontend/node_modules/@apollo/client/utilities/internal/createFragmentMap.js","../../frontend/node_modules/@apollo/client/utilities/internal/equalByQuery.js","../../frontend/node_modules/@apollo/client/utilities/internal/getDefaultValues.js","../../frontend/node_modules/@apollo/client/utilities/internal/getFragmentDefinitions.js","../../frontend/node_modules/@apollo/client/utilities/internal/getFragmentFromSelection.js","../../frontend/node_modules/@apollo/client/utilities/internal/getMainDefinition.js","../../frontend/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js","../../frontend/node_modules/@apollo/client/utilities/internal/getOperationName.js","../../frontend/node_modules/@apollo/client/utilities/internal/getQueryDefinition.js","../../frontend/node_modules/@apollo/client/utilities/internal/globals/global.js","../../frontend/node_modules/@apollo/client/utilities/internal/globals/maybe.js","../../frontend/node_modules/@apollo/client/utilities/internal/isArray.js","../../frontend/node_modules/@apollo/client/utilities/internal/isField.js","../../frontend/node_modules/@apollo/client/utilities/internal/isNonEmptyArray.js","../../frontend/node_modules/@apollo/client/utilities/internal/isNonNullObject.js","../../frontend/node_modules/@apollo/client/utilities/internal/makeUniqueId.js","../../frontend/node_modules/@apollo/client/utilities/internal/maybeDeepFreeze.js","../../frontend/node_modules/@apollo/client/utilities/internal/memoize.js","../../frontend/node_modules/@apollo/client/utilities/internal/mergeOptions.js","../../frontend/node_modules/@apollo/client/utilities/internal/preventUnhandledRejection.js","../../frontend/node_modules/@apollo/client/utilities/internal/resultKeyNameFromField.js","../../frontend/node_modules/@apollo/client/utilities/internal/shouldInclude.js","../../frontend/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js","../../frontend/node_modules/@apollo/client/utilities/internal/valueToObjectRepresentation.js","../../frontend/node_modules/@apollo/client/utilities/invariant/index.js","../../frontend/node_modules/@wry/caches/lib/strong.js","../../frontend/node_modules/@wry/caches/lib/weak.js","../../frontend/node_modules/@wry/equality/lib/index.js","../../frontend/node_modules/@wry/trie/lib/index.js","../../frontend/node_modules/@zag-js/anatomy/dist/create-anatomy.mjs","../../frontend/node_modules/@zag-js/core/dist/state.mjs","../../frontend/node_modules/@zag-js/dismissable/dist/layer-stack.mjs","../../frontend/node_modules/@zag-js/dom-query/dist/chunk-QZ7TP4HQ.mjs","../../frontend/node_modules/@zag-js/dom-query/dist/computed-style.mjs","../../frontend/node_modules/@zag-js/dom-query/dist/when-node.mjs","../../frontend/node_modules/@zag-js/core/dist/types.mjs","../../frontend/node_modules/@zag-js/core/dist/replace-tracker.mjs","../../frontend/node_modules/@zag-js/react/dist/use-layout-effect.mjs","../../frontend/node_modules/@zag-js/react/dist/bindable.mjs","../../frontend/node_modules/@zag-js/react/dist/stable.mjs","../../frontend/node_modules/@zag-js/react/dist/track.mjs","../../frontend/node_modules/@zag-js/react/dist/machine.mjs","../../frontend/node_modules/@zag-js/react/dist/refs.mjs","../../frontend/node_modules/@zag-js/core/dist/scope.mjs","../../frontend/node_modules/@zag-js/react/dist/normalize-props.mjs","../../frontend/node_modules/@zag-js/types/dist/prop-types.mjs","../../frontend/node_modules/@zag-js/toast/dist/toast.store.mjs","../../frontend/node_modules/@zag-js/utils/dist/object.mjs","../../frontend/node_modules/axios/lib/utils.js","../../frontend/node_modules/axios/lib/helpers/isURLSameOrigin.js","../../frontend/node_modules/axios/lib/helpers/bind.js","../../frontend/node_modules/axios/lib/helpers/parseHeaders.js","../../frontend/node_modules/axios/lib/helpers/sanitizeHeaderValue.js","../../frontend/node_modules/axios/lib/core/AxiosHeaders.js","../../frontend/node_modules/axios/lib/core/AxiosError.js","../../frontend/node_modules/axios/lib/helpers/toFormData.js","../../frontend/node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../frontend/node_modules/axios/lib/helpers/buildURL.js","../../frontend/node_modules/axios/lib/core/InterceptorManager.js","../../frontend/node_modules/axios/lib/defaults/transitional.js","../../frontend/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../frontend/node_modules/axios/lib/platform/browser/classes/FormData.js","../../frontend/node_modules/axios/lib/platform/browser/classes/Blob.js","../../frontend/node_modules/axios/lib/platform/common/utils.js","../../frontend/node_modules/axios/lib/platform/index.js","../../frontend/node_modules/axios/lib/platform/browser/index.js","../../frontend/node_modules/axios/lib/helpers/formDataToJSON.js","../../frontend/node_modules/axios/lib/core/methodList.js","../../frontend/node_modules/axios/lib/defaults/index.js","../../frontend/node_modules/axios/lib/helpers/toURLEncodedForm.js","../../frontend/node_modules/axios/lib/core/transformData.js","../../frontend/node_modules/axios/lib/cancel/isCancel.js","../../frontend/node_modules/axios/lib/cancel/CanceledError.js","../../frontend/node_modules/axios/lib/core/settle.js","../../frontend/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js","../../frontend/node_modules/axios/lib/helpers/parseProtocol.js","../../frontend/node_modules/axios/lib/helpers/speedometer.js","../../frontend/node_modules/axios/lib/helpers/throttle.js","../../frontend/node_modules/axios/lib/helpers/progressEventReducer.js","../../frontend/node_modules/axios/lib/helpers/cookies.js","../../frontend/node_modules/axios/lib/core/buildFullPath.js","../../frontend/node_modules/axios/lib/helpers/isAbsoluteURL.js","../../frontend/node_modules/axios/lib/helpers/combineURLs.js","../../frontend/node_modules/axios/lib/core/mergeConfig.js","../../frontend/node_modules/axios/lib/core/setFormDataHeaders.js","../../frontend/node_modules/axios/lib/helpers/resolveConfig.js","../../frontend/node_modules/axios/lib/adapters/xhr.js","../../frontend/node_modules/axios/lib/helpers/trackStream.js","../../frontend/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js","../../frontend/node_modules/axios/lib/adapters/fetch.js","../../frontend/node_modules/axios/lib/helpers/composeSignals.js","../../frontend/node_modules/axios/lib/adapters/adapters.js","../../frontend/node_modules/axios/lib/core/dispatchRequest.js","../../frontend/node_modules/axios/lib/helpers/validator.js","../../frontend/node_modules/axios/lib/core/Axios.js","../../frontend/node_modules/axios/lib/cancel/CancelToken.js","../../frontend/node_modules/axios/lib/helpers/HttpStatusCode.js","../../frontend/node_modules/axios/lib/axios.js","../../frontend/node_modules/axios/lib/helpers/spread.js","../../frontend/node_modules/axios/lib/helpers/isAxiosError.js","../../frontend/node_modules/clsx/dist/clsx.mjs","../../frontend/node_modules/graphql/language/ast.mjs","../../frontend/node_modules/graphql/language/kinds_.mjs","../../frontend/node_modules/graphql/language/visitor.mjs","../../frontend/node_modules/graphql/jsutils/devAssert.mjs","../../frontend/node_modules/graphql/jsutils/inspect.mjs","../../frontend/node_modules/i18next/dist/esm/i18next.js","../../frontend/node_modules/js-cookie/dist/js.cookie.mjs","../../frontend/node_modules/mitt/dist/mitt.mjs","../../frontend/node_modules/optimism/lib/index.js","../../frontend/node_modules/@wry/context/lib/slot.js","../../frontend/node_modules/@wry/context/lib/index.js","../../frontend/node_modules/optimism/lib/context.js","../../frontend/node_modules/optimism/lib/helpers.js","../../frontend/node_modules/optimism/lib/entry.js","../../frontend/node_modules/optimism/lib/dep.js","../../frontend/node_modules/reconnecting-eventsource/build/esm/reconnecting-eventsource.js","../../frontend/node_modules/tslib/tslib.es6.mjs","../../frontend/node_modules/zustand/esm/middleware.mjs","../../frontend/node_modules/zustand/esm/vanilla.mjs"],"sourcesContent":["import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nvar Observable = (function () {\n    function Observable(subscribe) {\n        if (subscribe) {\n            this._subscribe = subscribe;\n        }\n    }\n    Observable.prototype.lift = function (operator) {\n        var observable = new Observable();\n        observable.source = this;\n        observable.operator = operator;\n        return observable;\n    };\n    Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n        var _this = this;\n        var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n        errorContext(function () {\n            var _a = _this, operator = _a.operator, source = _a.source;\n            subscriber.add(operator\n                ?\n                    operator.call(subscriber, source)\n                : source\n                    ?\n                        _this._subscribe(subscriber)\n                    :\n                        _this._trySubscribe(subscriber));\n        });\n        return subscriber;\n    };\n    Observable.prototype._trySubscribe = function (sink) {\n        try {\n            return this._subscribe(sink);\n        }\n        catch (err) {\n            sink.error(err);\n        }\n    };\n    Observable.prototype.forEach = function (next, promiseCtor) {\n        var _this = this;\n        promiseCtor = getPromiseCtor(promiseCtor);\n        return new promiseCtor(function (resolve, reject) {\n            var subscriber = new SafeSubscriber({\n                next: function (value) {\n                    try {\n                        next(value);\n                    }\n                    catch (err) {\n                        reject(err);\n                        subscriber.unsubscribe();\n                    }\n                },\n                error: reject,\n                complete: resolve,\n            });\n            _this.subscribe(subscriber);\n        });\n    };\n    Observable.prototype._subscribe = function (subscriber) {\n        var _a;\n        return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n    };\n    Observable.prototype[Symbol_observable] = function () {\n        return this;\n    };\n    Observable.prototype.pipe = function () {\n        var operations = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            operations[_i] = arguments[_i];\n        }\n        return pipeFromArray(operations)(this);\n    };\n    Observable.prototype.toPromise = function (promiseCtor) {\n        var _this = this;\n        promiseCtor = getPromiseCtor(promiseCtor);\n        return new promiseCtor(function (resolve, reject) {\n            var value;\n            _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });\n        });\n    };\n    Observable.create = function (subscribe) {\n        return new Observable(subscribe);\n    };\n    return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n    var _a;\n    return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n    return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n    return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { identity } from './identity';\nexport function pipe() {\n    var fns = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        fns[_i] = arguments[_i];\n    }\n    return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n    if (fns.length === 0) {\n        return identity;\n    }\n    if (fns.length === 1) {\n        return fns[0];\n    }\n    return function piped(input) {\n        return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n    };\n}\n//# sourceMappingURL=pipe.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nvar ReplaySubject = (function (_super) {\n    __extends(ReplaySubject, _super);\n    function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) {\n        if (_bufferSize === void 0) { _bufferSize = Infinity; }\n        if (_windowTime === void 0) { _windowTime = Infinity; }\n        if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider; }\n        var _this = _super.call(this) || this;\n        _this._bufferSize = _bufferSize;\n        _this._windowTime = _windowTime;\n        _this._timestampProvider = _timestampProvider;\n        _this._buffer = [];\n        _this._infiniteTimeWindow = true;\n        _this._infiniteTimeWindow = _windowTime === Infinity;\n        _this._bufferSize = Math.max(1, _bufferSize);\n        _this._windowTime = Math.max(1, _windowTime);\n        return _this;\n    }\n    ReplaySubject.prototype.next = function (value) {\n        var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;\n        if (!isStopped) {\n            _buffer.push(value);\n            !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n        }\n        this._trimBuffer();\n        _super.prototype.next.call(this, value);\n    };\n    ReplaySubject.prototype._subscribe = function (subscriber) {\n        this._throwIfClosed();\n        this._trimBuffer();\n        var subscription = this._innerSubscribe(subscriber);\n        var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer;\n        var copy = _buffer.slice();\n        for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n            subscriber.next(copy[i]);\n        }\n        this._checkFinalizedStatuses(subscriber);\n        return subscription;\n    };\n    ReplaySubject.prototype._trimBuffer = function () {\n        var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow;\n        var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n        _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n        if (!_infiniteTimeWindow) {\n            var now = _timestampProvider.now();\n            var last = 0;\n            for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n                last = i;\n            }\n            last && _buffer.splice(0, last + 1);\n        }\n    };\n    return ReplaySubject;\n}(Subject));\nexport { ReplaySubject };\n//# sourceMappingURL=ReplaySubject.js.map","import { createErrorClass } from './createErrorClass';\nexport var ObjectUnsubscribedError = createErrorClass(function (_super) {\n    return function ObjectUnsubscribedErrorImpl() {\n        _super(this);\n        this.name = 'ObjectUnsubscribedError';\n        this.message = 'object unsubscribed';\n    };\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { __extends, __values } from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nvar Subject = (function (_super) {\n    __extends(Subject, _super);\n    function Subject() {\n        var _this = _super.call(this) || this;\n        _this.closed = false;\n        _this.currentObservers = null;\n        _this.observers = [];\n        _this.isStopped = false;\n        _this.hasError = false;\n        _this.thrownError = null;\n        return _this;\n    }\n    Subject.prototype.lift = function (operator) {\n        var subject = new AnonymousSubject(this, this);\n        subject.operator = operator;\n        return subject;\n    };\n    Subject.prototype._throwIfClosed = function () {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n    };\n    Subject.prototype.next = function (value) {\n        var _this = this;\n        errorContext(function () {\n            var e_1, _a;\n            _this._throwIfClosed();\n            if (!_this.isStopped) {\n                if (!_this.currentObservers) {\n                    _this.currentObservers = Array.from(_this.observers);\n                }\n                try {\n                    for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {\n                        var observer = _c.value;\n                        observer.next(value);\n                    }\n                }\n                catch (e_1_1) { e_1 = { error: e_1_1 }; }\n                finally {\n                    try {\n                        if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n                    }\n                    finally { if (e_1) throw e_1.error; }\n                }\n            }\n        });\n    };\n    Subject.prototype.error = function (err) {\n        var _this = this;\n        errorContext(function () {\n            _this._throwIfClosed();\n            if (!_this.isStopped) {\n                _this.hasError = _this.isStopped = true;\n                _this.thrownError = err;\n                var observers = _this.observers;\n                while (observers.length) {\n                    observers.shift().error(err);\n                }\n            }\n        });\n    };\n    Subject.prototype.complete = function () {\n        var _this = this;\n        errorContext(function () {\n            _this._throwIfClosed();\n            if (!_this.isStopped) {\n                _this.isStopped = true;\n                var observers = _this.observers;\n                while (observers.length) {\n                    observers.shift().complete();\n                }\n            }\n        });\n    };\n    Subject.prototype.unsubscribe = function () {\n        this.isStopped = this.closed = true;\n        this.observers = this.currentObservers = null;\n    };\n    Object.defineProperty(Subject.prototype, \"observed\", {\n        get: function () {\n            var _a;\n            return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Subject.prototype._trySubscribe = function (subscriber) {\n        this._throwIfClosed();\n        return _super.prototype._trySubscribe.call(this, subscriber);\n    };\n    Subject.prototype._subscribe = function (subscriber) {\n        this._throwIfClosed();\n        this._checkFinalizedStatuses(subscriber);\n        return this._innerSubscribe(subscriber);\n    };\n    Subject.prototype._innerSubscribe = function (subscriber) {\n        var _this = this;\n        var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;\n        if (hasError || isStopped) {\n            return EMPTY_SUBSCRIPTION;\n        }\n        this.currentObservers = null;\n        observers.push(subscriber);\n        return new Subscription(function () {\n            _this.currentObservers = null;\n            arrRemove(observers, subscriber);\n        });\n    };\n    Subject.prototype._checkFinalizedStatuses = function (subscriber) {\n        var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;\n        if (hasError) {\n            subscriber.error(thrownError);\n        }\n        else if (isStopped) {\n            subscriber.complete();\n        }\n    };\n    Subject.prototype.asObservable = function () {\n        var observable = new Observable();\n        observable.source = this;\n        return observable;\n    };\n    Subject.create = function (destination, source) {\n        return new AnonymousSubject(destination, source);\n    };\n    return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = (function (_super) {\n    __extends(AnonymousSubject, _super);\n    function AnonymousSubject(destination, source) {\n        var _this = _super.call(this) || this;\n        _this.destination = destination;\n        _this.source = source;\n        return _this;\n    }\n    AnonymousSubject.prototype.next = function (value) {\n        var _a, _b;\n        (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n    };\n    AnonymousSubject.prototype.error = function (err) {\n        var _a, _b;\n        (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n    };\n    AnonymousSubject.prototype.complete = function () {\n        var _a, _b;\n        (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n    };\n    AnonymousSubject.prototype._subscribe = function (subscriber) {\n        var _a, _b;\n        return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n    };\n    return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","export var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })();\nexport function errorNotification(error) {\n    return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n    return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n    return {\n        kind: kind,\n        value: value,\n        error: error,\n    };\n}\n//# sourceMappingURL=NotificationFactories.js.map","import { __extends } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nvar Subscriber = (function (_super) {\n    __extends(Subscriber, _super);\n    function Subscriber(destination) {\n        var _this = _super.call(this) || this;\n        _this.isStopped = false;\n        if (destination) {\n            _this.destination = destination;\n            if (isSubscription(destination)) {\n                destination.add(_this);\n            }\n        }\n        else {\n            _this.destination = EMPTY_OBSERVER;\n        }\n        return _this;\n    }\n    Subscriber.create = function (next, error, complete) {\n        return new SafeSubscriber(next, error, complete);\n    };\n    Subscriber.prototype.next = function (value) {\n        if (this.isStopped) {\n            handleStoppedNotification(nextNotification(value), this);\n        }\n        else {\n            this._next(value);\n        }\n    };\n    Subscriber.prototype.error = function (err) {\n        if (this.isStopped) {\n            handleStoppedNotification(errorNotification(err), this);\n        }\n        else {\n            this.isStopped = true;\n            this._error(err);\n        }\n    };\n    Subscriber.prototype.complete = function () {\n        if (this.isStopped) {\n            handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n        }\n        else {\n            this.isStopped = true;\n            this._complete();\n        }\n    };\n    Subscriber.prototype.unsubscribe = function () {\n        if (!this.closed) {\n            this.isStopped = true;\n            _super.prototype.unsubscribe.call(this);\n            this.destination = null;\n        }\n    };\n    Subscriber.prototype._next = function (value) {\n        this.destination.next(value);\n    };\n    Subscriber.prototype._error = function (err) {\n        try {\n            this.destination.error(err);\n        }\n        finally {\n            this.unsubscribe();\n        }\n    };\n    Subscriber.prototype._complete = function () {\n        try {\n            this.destination.complete();\n        }\n        finally {\n            this.unsubscribe();\n        }\n    };\n    return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n    return _bind.call(fn, thisArg);\n}\nvar ConsumerObserver = (function () {\n    function ConsumerObserver(partialObserver) {\n        this.partialObserver = partialObserver;\n    }\n    ConsumerObserver.prototype.next = function (value) {\n        var partialObserver = this.partialObserver;\n        if (partialObserver.next) {\n            try {\n                partialObserver.next(value);\n            }\n            catch (error) {\n                handleUnhandledError(error);\n            }\n        }\n    };\n    ConsumerObserver.prototype.error = function (err) {\n        var partialObserver = this.partialObserver;\n        if (partialObserver.error) {\n            try {\n                partialObserver.error(err);\n            }\n            catch (error) {\n                handleUnhandledError(error);\n            }\n        }\n        else {\n            handleUnhandledError(err);\n        }\n    };\n    ConsumerObserver.prototype.complete = function () {\n        var partialObserver = this.partialObserver;\n        if (partialObserver.complete) {\n            try {\n                partialObserver.complete();\n            }\n            catch (error) {\n                handleUnhandledError(error);\n            }\n        }\n    };\n    return ConsumerObserver;\n}());\nvar SafeSubscriber = (function (_super) {\n    __extends(SafeSubscriber, _super);\n    function SafeSubscriber(observerOrNext, error, complete) {\n        var _this = _super.call(this) || this;\n        var partialObserver;\n        if (isFunction(observerOrNext) || !observerOrNext) {\n            partialObserver = {\n                next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n                error: error !== null && error !== void 0 ? error : undefined,\n                complete: complete !== null && complete !== void 0 ? complete : undefined,\n            };\n        }\n        else {\n            var context_1;\n            if (_this && config.useDeprecatedNextContext) {\n                context_1 = Object.create(observerOrNext);\n                context_1.unsubscribe = function () { return _this.unsubscribe(); };\n                partialObserver = {\n                    next: observerOrNext.next && bind(observerOrNext.next, context_1),\n                    error: observerOrNext.error && bind(observerOrNext.error, context_1),\n                    complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),\n                };\n            }\n            else {\n                partialObserver = observerOrNext;\n            }\n        }\n        _this.destination = new ConsumerObserver(partialObserver);\n        return _this;\n    }\n    return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\nfunction handleUnhandledError(error) {\n    if (config.useDeprecatedSynchronousErrorHandling) {\n        captureError(error);\n    }\n    else {\n        reportUnhandledError(error);\n    }\n}\nfunction defaultErrorHandler(err) {\n    throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n    var onStoppedNotification = config.onStoppedNotification;\n    onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); });\n}\nexport var EMPTY_OBSERVER = {\n    closed: true,\n    next: noop,\n    error: defaultErrorHandler,\n    complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","import { createErrorClass } from './createErrorClass';\nexport var UnsubscriptionError = createErrorClass(function (_super) {\n    return function UnsubscriptionErrorImpl(errors) {\n        _super(this);\n        this.message = errors\n            ? errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n  ')\n            : '';\n        this.name = 'UnsubscriptionError';\n        this.errors = errors;\n    };\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","import { __read, __spreadArray, __values } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nvar Subscription = (function () {\n    function Subscription(initialTeardown) {\n        this.initialTeardown = initialTeardown;\n        this.closed = false;\n        this._parentage = null;\n        this._finalizers = null;\n    }\n    Subscription.prototype.unsubscribe = function () {\n        var e_1, _a, e_2, _b;\n        var errors;\n        if (!this.closed) {\n            this.closed = true;\n            var _parentage = this._parentage;\n            if (_parentage) {\n                this._parentage = null;\n                if (Array.isArray(_parentage)) {\n                    try {\n                        for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {\n                            var parent_1 = _parentage_1_1.value;\n                            parent_1.remove(this);\n                        }\n                    }\n                    catch (e_1_1) { e_1 = { error: e_1_1 }; }\n                    finally {\n                        try {\n                            if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);\n                        }\n                        finally { if (e_1) throw e_1.error; }\n                    }\n                }\n                else {\n                    _parentage.remove(this);\n                }\n            }\n            var initialFinalizer = this.initialTeardown;\n            if (isFunction(initialFinalizer)) {\n                try {\n                    initialFinalizer();\n                }\n                catch (e) {\n                    errors = e instanceof UnsubscriptionError ? e.errors : [e];\n                }\n            }\n            var _finalizers = this._finalizers;\n            if (_finalizers) {\n                this._finalizers = null;\n                try {\n                    for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {\n                        var finalizer = _finalizers_1_1.value;\n                        try {\n                            execFinalizer(finalizer);\n                        }\n                        catch (err) {\n                            errors = errors !== null && errors !== void 0 ? errors : [];\n                            if (err instanceof UnsubscriptionError) {\n                                errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));\n                            }\n                            else {\n                                errors.push(err);\n                            }\n                        }\n                    }\n                }\n                catch (e_2_1) { e_2 = { error: e_2_1 }; }\n                finally {\n                    try {\n                        if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);\n                    }\n                    finally { if (e_2) throw e_2.error; }\n                }\n            }\n            if (errors) {\n                throw new UnsubscriptionError(errors);\n            }\n        }\n    };\n    Subscription.prototype.add = function (teardown) {\n        var _a;\n        if (teardown && teardown !== this) {\n            if (this.closed) {\n                execFinalizer(teardown);\n            }\n            else {\n                if (teardown instanceof Subscription) {\n                    if (teardown.closed || teardown._hasParent(this)) {\n                        return;\n                    }\n                    teardown._addParent(this);\n                }\n                (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n            }\n        }\n    };\n    Subscription.prototype._hasParent = function (parent) {\n        var _parentage = this._parentage;\n        return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n    };\n    Subscription.prototype._addParent = function (parent) {\n        var _parentage = this._parentage;\n        this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n    };\n    Subscription.prototype._removeParent = function (parent) {\n        var _parentage = this._parentage;\n        if (_parentage === parent) {\n            this._parentage = null;\n        }\n        else if (Array.isArray(_parentage)) {\n            arrRemove(_parentage, parent);\n        }\n    };\n    Subscription.prototype.remove = function (teardown) {\n        var _finalizers = this._finalizers;\n        _finalizers && arrRemove(_finalizers, teardown);\n        if (teardown instanceof Subscription) {\n            teardown._removeParent(this);\n        }\n    };\n    Subscription.EMPTY = (function () {\n        var empty = new Subscription();\n        empty.closed = true;\n        return empty;\n    })();\n    return Subscription;\n}());\nexport { Subscription };\nexport var EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n    return (value instanceof Subscription ||\n        (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n    if (isFunction(finalizer)) {\n        finalizer();\n    }\n    else {\n        finalizer.unsubscribe();\n    }\n}\n//# sourceMappingURL=Subscription.js.map","export var config = {\n    onUnhandledError: null,\n    onStoppedNotification: null,\n    Promise: undefined,\n    useDeprecatedSynchronousErrorHandling: false,\n    useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","import { Observable } from '../Observable';\nexport var EMPTY = new Observable(function (subscriber) { return subscriber.complete(); });\nexport function empty(scheduler) {\n    return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n    return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });\n}\n//# sourceMappingURL=empty.js.map","import { __asyncValues, __awaiter, __generator, __values } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n    if (input instanceof Observable) {\n        return input;\n    }\n    if (input != null) {\n        if (isInteropObservable(input)) {\n            return fromInteropObservable(input);\n        }\n        if (isArrayLike(input)) {\n            return fromArrayLike(input);\n        }\n        if (isPromise(input)) {\n            return fromPromise(input);\n        }\n        if (isAsyncIterable(input)) {\n            return fromAsyncIterable(input);\n        }\n        if (isIterable(input)) {\n            return fromIterable(input);\n        }\n        if (isReadableStreamLike(input)) {\n            return fromReadableStreamLike(input);\n        }\n    }\n    throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n    return new Observable(function (subscriber) {\n        var obs = obj[Symbol_observable]();\n        if (isFunction(obs.subscribe)) {\n            return obs.subscribe(subscriber);\n        }\n        throw new TypeError('Provided object does not correctly implement Symbol.observable');\n    });\n}\nexport function fromArrayLike(array) {\n    return new Observable(function (subscriber) {\n        for (var i = 0; i < array.length && !subscriber.closed; i++) {\n            subscriber.next(array[i]);\n        }\n        subscriber.complete();\n    });\n}\nexport function fromPromise(promise) {\n    return new Observable(function (subscriber) {\n        promise\n            .then(function (value) {\n            if (!subscriber.closed) {\n                subscriber.next(value);\n                subscriber.complete();\n            }\n        }, function (err) { return subscriber.error(err); })\n            .then(null, reportUnhandledError);\n    });\n}\nexport function fromIterable(iterable) {\n    return new Observable(function (subscriber) {\n        var e_1, _a;\n        try {\n            for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {\n                var value = iterable_1_1.value;\n                subscriber.next(value);\n                if (subscriber.closed) {\n                    return;\n                }\n            }\n        }\n        catch (e_1_1) { e_1 = { error: e_1_1 }; }\n        finally {\n            try {\n                if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1);\n            }\n            finally { if (e_1) throw e_1.error; }\n        }\n        subscriber.complete();\n    });\n}\nexport function fromAsyncIterable(asyncIterable) {\n    return new Observable(function (subscriber) {\n        process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); });\n    });\n}\nexport function fromReadableStreamLike(readableStream) {\n    return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n    var asyncIterable_1, asyncIterable_1_1;\n    var e_2, _a;\n    return __awaiter(this, void 0, void 0, function () {\n        var value, e_2_1;\n        return __generator(this, function (_b) {\n            switch (_b.label) {\n                case 0:\n                    _b.trys.push([0, 5, 6, 11]);\n                    asyncIterable_1 = __asyncValues(asyncIterable);\n                    _b.label = 1;\n                case 1: return [4, asyncIterable_1.next()];\n                case 2:\n                    if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4];\n                    value = asyncIterable_1_1.value;\n                    subscriber.next(value);\n                    if (subscriber.closed) {\n                        return [2];\n                    }\n                    _b.label = 3;\n                case 3: return [3, 1];\n                case 4: return [3, 11];\n                case 5:\n                    e_2_1 = _b.sent();\n                    e_2 = { error: e_2_1 };\n                    return [3, 11];\n                case 6:\n                    _b.trys.push([6, , 9, 10]);\n                    if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8];\n                    return [4, _a.call(asyncIterable_1)];\n                case 7:\n                    _b.sent();\n                    _b.label = 8;\n                case 8: return [3, 10];\n                case 9:\n                    if (e_2) throw e_2.error;\n                    return [7];\n                case 10: return [7];\n                case 11:\n                    subscriber.complete();\n                    return [2];\n            }\n        });\n    });\n}\n//# sourceMappingURL=innerFrom.js.map","import { __extends } from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n    return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nvar OperatorSubscriber = (function (_super) {\n    __extends(OperatorSubscriber, _super);\n    function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n        var _this = _super.call(this, destination) || this;\n        _this.onFinalize = onFinalize;\n        _this.shouldUnsubscribe = shouldUnsubscribe;\n        _this._next = onNext\n            ? function (value) {\n                try {\n                    onNext(value);\n                }\n                catch (err) {\n                    destination.error(err);\n                }\n            }\n            : _super.prototype._next;\n        _this._error = onError\n            ? function (err) {\n                try {\n                    onError(err);\n                }\n                catch (err) {\n                    destination.error(err);\n                }\n                finally {\n                    this.unsubscribe();\n                }\n            }\n            : _super.prototype._error;\n        _this._complete = onComplete\n            ? function () {\n                try {\n                    onComplete();\n                }\n                catch (err) {\n                    destination.error(err);\n                }\n                finally {\n                    this.unsubscribe();\n                }\n            }\n            : _super.prototype._complete;\n        return _this;\n    }\n    OperatorSubscriber.prototype.unsubscribe = function () {\n        var _a;\n        if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n            var closed_1 = this.closed;\n            _super.prototype.unsubscribe.call(this);\n            !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n        }\n    };\n    return OperatorSubscriber;\n}(Subscriber));\nexport { OperatorSubscriber };\n//# sourceMappingURL=OperatorSubscriber.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n    return operate(function (source, subscriber) {\n        var index = 0;\n        source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n            subscriber.next(project.call(thisArg, value, index++));\n        }));\n    });\n}\n//# sourceMappingURL=map.js.map","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay) {\n    if (delay === void 0) { delay = 0; }\n    return operate(function (source, subscriber) {\n        source.subscribe(createOperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); }));\n    });\n}\n//# sourceMappingURL=observeOn.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options) {\n    if (options === void 0) { options = {}; }\n    var _a = options.connector, connector = _a === void 0 ? function () { return new Subject(); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d;\n    return function (wrapperSource) {\n        var connection;\n        var resetConnection;\n        var subject;\n        var refCount = 0;\n        var hasCompleted = false;\n        var hasErrored = false;\n        var cancelReset = function () {\n            resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n            resetConnection = undefined;\n        };\n        var reset = function () {\n            cancelReset();\n            connection = subject = undefined;\n            hasCompleted = hasErrored = false;\n        };\n        var resetAndUnsubscribe = function () {\n            var conn = connection;\n            reset();\n            conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n        };\n        return operate(function (source, subscriber) {\n            refCount++;\n            if (!hasErrored && !hasCompleted) {\n                cancelReset();\n            }\n            var dest = (subject = subject !== null && subject !== void 0 ? subject : connector());\n            subscriber.add(function () {\n                refCount--;\n                if (refCount === 0 && !hasErrored && !hasCompleted) {\n                    resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n                }\n            });\n            dest.subscribe(subscriber);\n            if (!connection &&\n                refCount > 0) {\n                connection = new SafeSubscriber({\n                    next: function (value) { return dest.next(value); },\n                    error: function (err) {\n                        hasErrored = true;\n                        cancelReset();\n                        resetConnection = handleReset(reset, resetOnError, err);\n                        dest.error(err);\n                    },\n                    complete: function () {\n                        hasCompleted = true;\n                        cancelReset();\n                        resetConnection = handleReset(reset, resetOnComplete);\n                        dest.complete();\n                    },\n                });\n                innerFrom(source).subscribe(connection);\n            }\n        })(wrapperSource);\n    };\n}\nfunction handleReset(reset, on) {\n    var args = [];\n    for (var _i = 2; _i < arguments.length; _i++) {\n        args[_i - 2] = arguments[_i];\n    }\n    if (on === true) {\n        reset();\n        return;\n    }\n    if (on === false) {\n        return;\n    }\n    var onSubscriber = new SafeSubscriber({\n        next: function () {\n            onSubscriber.unsubscribe();\n            reset();\n        },\n    });\n    return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);\n}\n//# sourceMappingURL=share.js.map","import { ReplaySubject } from '../ReplaySubject';\nimport { share } from './share';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n    var _a, _b, _c;\n    var bufferSize;\n    var refCount = false;\n    if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n        (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler);\n    }\n    else {\n        bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity);\n    }\n    return share({\n        connector: function () { return new ReplaySubject(bufferSize, windowTime, scheduler); },\n        resetOnError: true,\n        resetOnComplete: false,\n        resetOnRefCountZero: refCount,\n    });\n}\n//# sourceMappingURL=shareReplay.js.map","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n    var tapObserver = isFunction(observerOrNext) || error || complete\n        ?\n            { next: observerOrNext, error: error, complete: complete }\n        : observerOrNext;\n    return tapObserver\n        ? operate(function (source, subscriber) {\n            var _a;\n            (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n            var isUnsub = true;\n            source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n                var _a;\n                (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n                subscriber.next(value);\n            }, function () {\n                var _a;\n                isUnsub = false;\n                (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n                subscriber.complete();\n            }, function (err) {\n                var _a;\n                isUnsub = false;\n                (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n                subscriber.error(err);\n            }, function () {\n                var _a, _b;\n                if (isUnsub) {\n                    (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n                }\n                (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n            }));\n        })\n        :\n            identity;\n}\n//# sourceMappingURL=tap.js.map","import { __extends } from \"tslib\";\nimport { Subscription } from '../Subscription';\nvar Action = (function (_super) {\n    __extends(Action, _super);\n    function Action(scheduler, work) {\n        return _super.call(this) || this;\n    }\n    Action.prototype.schedule = function (state, delay) {\n        if (delay === void 0) { delay = 0; }\n        return this;\n    };\n    return Action;\n}(Subscription));\nexport { Action };\n//# sourceMappingURL=Action.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var intervalProvider = {\n    setInterval: function (handler, timeout) {\n        var args = [];\n        for (var _i = 2; _i < arguments.length; _i++) {\n            args[_i - 2] = arguments[_i];\n        }\n        var delegate = intervalProvider.delegate;\n        if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n            return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n        }\n        return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n    },\n    clearInterval: function (handle) {\n        var delegate = intervalProvider.delegate;\n        return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n    },\n    delegate: undefined,\n};\n//# sourceMappingURL=intervalProvider.js.map","import { __extends } from \"tslib\";\nimport { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nvar AsyncAction = (function (_super) {\n    __extends(AsyncAction, _super);\n    function AsyncAction(scheduler, work) {\n        var _this = _super.call(this, scheduler, work) || this;\n        _this.scheduler = scheduler;\n        _this.work = work;\n        _this.pending = false;\n        return _this;\n    }\n    AsyncAction.prototype.schedule = function (state, delay) {\n        var _a;\n        if (delay === void 0) { delay = 0; }\n        if (this.closed) {\n            return this;\n        }\n        this.state = state;\n        var id = this.id;\n        var scheduler = this.scheduler;\n        if (id != null) {\n            this.id = this.recycleAsyncId(scheduler, id, delay);\n        }\n        this.pending = true;\n        this.delay = delay;\n        this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n        return this;\n    };\n    AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) {\n        if (delay === void 0) { delay = 0; }\n        return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n    };\n    AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) {\n        if (delay === void 0) { delay = 0; }\n        if (delay != null && this.delay === delay && this.pending === false) {\n            return id;\n        }\n        if (id != null) {\n            intervalProvider.clearInterval(id);\n        }\n        return undefined;\n    };\n    AsyncAction.prototype.execute = function (state, delay) {\n        if (this.closed) {\n            return new Error('executing a cancelled action');\n        }\n        this.pending = false;\n        var error = this._execute(state, delay);\n        if (error) {\n            return error;\n        }\n        else if (this.pending === false && this.id != null) {\n            this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n        }\n    };\n    AsyncAction.prototype._execute = function (state, _delay) {\n        var errored = false;\n        var errorValue;\n        try {\n            this.work(state);\n        }\n        catch (e) {\n            errored = true;\n            errorValue = e ? e : new Error('Scheduled action threw falsy error');\n        }\n        if (errored) {\n            this.unsubscribe();\n            return errorValue;\n        }\n    };\n    AsyncAction.prototype.unsubscribe = function () {\n        if (!this.closed) {\n            var _a = this, id = _a.id, scheduler = _a.scheduler;\n            var actions = scheduler.actions;\n            this.work = this.state = this.scheduler = null;\n            this.pending = false;\n            arrRemove(actions, this);\n            if (id != null) {\n                this.id = this.recycleAsyncId(scheduler, id, null);\n            }\n            this.delay = null;\n            _super.prototype.unsubscribe.call(this);\n        }\n    };\n    return AsyncAction;\n}(Action));\nexport { AsyncAction };\n//# sourceMappingURL=AsyncAction.js.map","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nvar Scheduler = (function () {\n    function Scheduler(schedulerActionCtor, now) {\n        if (now === void 0) { now = Scheduler.now; }\n        this.schedulerActionCtor = schedulerActionCtor;\n        this.now = now;\n    }\n    Scheduler.prototype.schedule = function (work, delay, state) {\n        if (delay === void 0) { delay = 0; }\n        return new this.schedulerActionCtor(this, work).schedule(state, delay);\n    };\n    Scheduler.now = dateTimestampProvider.now;\n    return Scheduler;\n}());\nexport { Scheduler };\n//# sourceMappingURL=Scheduler.js.map","import { __extends } from \"tslib\";\nimport { Scheduler } from '../Scheduler';\nvar AsyncScheduler = (function (_super) {\n    __extends(AsyncScheduler, _super);\n    function AsyncScheduler(SchedulerAction, now) {\n        if (now === void 0) { now = Scheduler.now; }\n        var _this = _super.call(this, SchedulerAction, now) || this;\n        _this.actions = [];\n        _this._active = false;\n        return _this;\n    }\n    AsyncScheduler.prototype.flush = function (action) {\n        var actions = this.actions;\n        if (this._active) {\n            actions.push(action);\n            return;\n        }\n        var error;\n        this._active = true;\n        do {\n            if ((error = action.execute(action.state, action.delay))) {\n                break;\n            }\n        } while ((action = actions.shift()));\n        this._active = false;\n        if (error) {\n            while ((action = actions.shift())) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    };\n    return AsyncScheduler;\n}(Scheduler));\nexport { AsyncScheduler };\n//# sourceMappingURL=AsyncScheduler.js.map","export var dateTimestampProvider = {\n    now: function () {\n        return (dateTimestampProvider.delegate || Date).now();\n    },\n    delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var timeoutProvider = {\n    setTimeout: function (handler, timeout) {\n        var args = [];\n        for (var _i = 2; _i < arguments.length; _i++) {\n            args[_i - 2] = arguments[_i];\n        }\n        var delegate = timeoutProvider.delegate;\n        if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n            return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n        }\n        return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n    },\n    clearTimeout: function (handle) {\n        var delegate = timeoutProvider.delegate;\n        return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n    },\n    delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","export function getSymbolIterator() {\n    if (typeof Symbol !== 'function' || !Symbol.iterator) {\n        return '@@iterator';\n    }\n    return Symbol.iterator;\n}\nexport var iterator = getSymbolIterator();\n//# sourceMappingURL=iterator.js.map","export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();\n//# sourceMappingURL=observable.js.map","export function arrRemove(arr, item) {\n    if (arr) {\n        var index = arr.indexOf(item);\n        0 <= index && arr.splice(index, 1);\n    }\n}\n//# sourceMappingURL=arrRemove.js.map","export function createErrorClass(createImpl) {\n    var _super = function (instance) {\n        Error.call(instance);\n        instance.stack = new Error().stack;\n    };\n    var ctorFunc = createImpl(_super);\n    ctorFunc.prototype = Object.create(Error.prototype);\n    ctorFunc.prototype.constructor = ctorFunc;\n    return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","import { config } from '../config';\nvar context = null;\nexport function errorContext(cb) {\n    if (config.useDeprecatedSynchronousErrorHandling) {\n        var isRoot = !context;\n        if (isRoot) {\n            context = { errorThrown: false, error: null };\n        }\n        cb();\n        if (isRoot) {\n            var _a = context, errorThrown = _a.errorThrown, error = _a.error;\n            context = null;\n            if (errorThrown) {\n                throw error;\n            }\n        }\n    }\n    else {\n        cb();\n    }\n}\nexport function captureError(err) {\n    if (config.useDeprecatedSynchronousErrorHandling && context) {\n        context.errorThrown = true;\n        context.error = err;\n    }\n}\n//# sourceMappingURL=errorContext.js.map","export function executeSchedule(parentSubscription, scheduler, work, delay, repeat) {\n    if (delay === void 0) { delay = 0; }\n    if (repeat === void 0) { repeat = false; }\n    var scheduleSubscription = scheduler.schedule(function () {\n        work();\n        if (repeat) {\n            parentSubscription.add(this.schedule(null, delay));\n        }\n        else {\n            this.unsubscribe();\n        }\n    }, delay);\n    parentSubscription.add(scheduleSubscription);\n    if (!repeat) {\n        return scheduleSubscription;\n    }\n}\n//# sourceMappingURL=executeSchedule.js.map","export function identity(x) {\n    return x;\n}\n//# sourceMappingURL=identity.js.map","export var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n    return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n//# sourceMappingURL=isAsyncIterable.js.map","export function isFunction(value) {\n    return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n    return isFunction(input[Symbol_observable]);\n}\n//# sourceMappingURL=isInteropObservable.js.map","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n    return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n//# sourceMappingURL=isIterable.js.map","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n    return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n//# sourceMappingURL=isPromise.js.map","import { __asyncGenerator, __await, __generator } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n    return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() {\n        var reader, _a, value, done;\n        return __generator(this, function (_b) {\n            switch (_b.label) {\n                case 0:\n                    reader = readableStream.getReader();\n                    _b.label = 1;\n                case 1:\n                    _b.trys.push([1, , 9, 10]);\n                    _b.label = 2;\n                case 2:\n                    if (!true) return [3, 8];\n                    return [4, __await(reader.read())];\n                case 3:\n                    _a = _b.sent(), value = _a.value, done = _a.done;\n                    if (!done) return [3, 5];\n                    return [4, __await(void 0)];\n                case 4: return [2, _b.sent()];\n                case 5: return [4, __await(value)];\n                case 6: return [4, _b.sent()];\n                case 7:\n                    _b.sent();\n                    return [3, 2];\n                case 8: return [3, 10];\n                case 9:\n                    reader.releaseLock();\n                    return [7];\n                case 10: return [2];\n            }\n        });\n    });\n}\nexport function isReadableStreamLike(obj) {\n    return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n//# sourceMappingURL=isReadableStreamLike.js.map","import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n    return value && isFunction(value.schedule);\n}\n//# sourceMappingURL=isScheduler.js.map","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n    return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n    return function (source) {\n        if (hasLift(source)) {\n            return source.lift(function (liftedSource) {\n                try {\n                    return init(liftedSource, this);\n                }\n                catch (err) {\n                    this.error(err);\n                }\n            });\n        }\n        throw new TypeError('Unable to lift unknown Observable type');\n    };\n}\n//# sourceMappingURL=lift.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n    timeoutProvider.setTimeout(function () {\n        var onUnhandledError = config.onUnhandledError;\n        if (onUnhandledError) {\n            onUnhandledError(err);\n        }\n        else {\n            throw err;\n        }\n    });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","export function createInvalidObservableTypeError(input) {\n    return new TypeError(\"You provided \" + (input !== null && typeof input === 'object' ? 'an invalid object' : \"'\" + input + \"'\") + \" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.\");\n}\n//# sourceMappingURL=throwUnobservableError.js.map","import { Kind, visit } from \"graphql\";\nconst TYPENAME_FIELD = {\n    kind: Kind.FIELD,\n    name: {\n        kind: Kind.NAME,\n        value: \"__typename\",\n    },\n};\n/**\n * Adds `__typename` to all selection sets in the document except for the root\n * selection set.\n *\n * @param doc - The `ASTNode` to add `__typename` to\n *\n * @example\n *\n * ```ts\n * const document = gql`\n *   # ...\n * `;\n *\n * const withTypename = addTypenameToDocument(document);\n * ```\n */\nexport const addTypenameToDocument = Object.assign(function (doc) {\n    return visit(doc, {\n        SelectionSet: {\n            enter(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                const { selections } = node;\n                if (!selections) {\n                    return;\n                }\n                // If selections already have a __typename, or are part of an\n                // introspection query, do nothing.\n                const skip = selections.some((selection) => {\n                    return (selection.kind === Kind.FIELD &&\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                const field = parent;\n                if (field.kind === Kind.FIELD &&\n                    field.directives &&\n                    field.directives.some((d) => d.name.value === \"export\")) {\n                    return;\n                }\n                // Create and return a new SelectionSet with a __typename Field.\n                return {\n                    ...node,\n                    selections: [...selections, TYPENAME_FIELD],\n                };\n            },\n        },\n    });\n}, {\n    added(field) {\n        return field === TYPENAME_FIELD;\n    },\n});\n//# sourceMappingURL=transform.js.map","/**\n * Determines if a given object is a reference object.\n *\n * @param obj - The object to check if its a reference object\n *\n * @example\n *\n * ```ts\n * import { isReference } from \"@apollo/client/utilities\";\n *\n * isReference({ __ref: \"User:1\" }); // true\n * isReference({ __typename: \"User\", id: 1 }); // false\n * ```\n */\nexport function isReference(obj) {\n    return Boolean(obj && typeof obj === \"object\" && typeof obj.__ref === \"string\");\n}\n//# sourceMappingURL=storeUtils.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector) {\n    if (keySelector === void 0) { keySelector = identity; }\n    comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n    return operate(function (source, subscriber) {\n        var previousKey;\n        var first = true;\n        source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n            var currentKey = keySelector(value);\n            if (first || !comparator(previousKey, currentKey)) {\n                first = false;\n                previousKey = currentKey;\n                subscriber.next(value);\n            }\n        }));\n    });\n}\nfunction defaultCompare(a, b) {\n    return a === b;\n}\n//# sourceMappingURL=distinctUntilChanged.js.map","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport var asyncScheduler = new AsyncScheduler(AsyncAction);\nexport var async = asyncScheduler;\n//# sourceMappingURL=async.js.map","import { map, shareReplay } from \"rxjs\";\nimport { memoize } from \"./memoize.js\";\nfunction mapObservableFragment(observable, mapFn) {\n    let currentResult;\n    let stableMappedResult;\n    function toMapped(result) {\n        if (result !== currentResult) {\n            currentResult = result;\n            stableMappedResult = mapFn(currentResult);\n        }\n        return stableMappedResult;\n    }\n    return Object.assign(observable.pipe(map(toMapped), shareReplay({ bufferSize: 1, refCount: true })), {\n        getCurrentResult: () => toMapped(observable.getCurrentResult()),\n    });\n}\nexport const mapObservableFragmentMemoized = memoize(function mapObservableFragmentMemoized(observable, \n/**\n * used together with `observable` as memoization key, `mapFn` is explicitly not used as memoization key\n */\n_cacheKey, mapFn) {\n    return mapObservableFragment(observable, mapFn);\n}, { max: 1, makeCacheKey: (args) => args.slice(0, 2) });\n//# sourceMappingURL=mapObservableFragment.js.map","import { invariant, newInvariantError, } from \"@apollo/client/utilities/invariant\";\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 {\n*   a\n*   b\n*   c\n* }\n* ```\n*\n* Turns into:\n*\n* ```graphql\n* {\n*   ...foo\n* }\n*\n* fragment foo on Foo {\n*   a\n*   b\n*   c\n* }\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*\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function getFragmentQueryDocument(document, fragmentName) {\n    let 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    const fragments = [];\n    document.definitions.forEach((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                10,\n                definition.operation,\n                definition.name ? ` named '${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, 11, 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    const query = {\n        ...document,\n        definitions: [\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,\n        ],\n    };\n    return query;\n}\n//# sourceMappingURL=getFragmentQueryDocument.js.map\n","import { WeakCache } from \"@wry/caches\";\nimport { equal } from \"@wry/equality\";\nimport { Trie } from \"@wry/trie\";\nimport { wrap } from \"optimism\";\nimport { distinctUntilChanged, map, Observable, ReplaySubject, share, shareReplay, tap, timer, } from \"rxjs\";\nimport { cacheSizes, canonicalStringify } from \"@apollo/client/utilities\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { bindCacheKey, combineLatestBatched, equalByQuery, getApolloCacheMemoryInternals, getFragmentDefinition, getFragmentQueryDocument, mapObservableFragmentMemoized, } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nexport class ApolloCache {\n    assumeImmutableResults = false;\n    // Function used to lookup a fragment when a fragment definition is not part\n    // of the GraphQL document. This is useful for caches, such as InMemoryCache,\n    // that register fragments ahead of time so they can be referenced by name.\n    lookupFragment(fragmentName) {\n        return null;\n    }\n    // Transactional API\n    /**\n     * Executes multiple cache operations as a single batch, ensuring that\n     * watchers are only notified once after all operations complete. This is\n     * useful for improving performance when making multiple cache updates, as it\n     * prevents unnecessary re-renders or query refetches between individual\n     * operations.\n     *\n     * The `batch` method supports both optimistic and non-optimistic updates, and\n     * provides fine-grained control over which cache layer receives the updates\n     * and when watchers are notified.\n     *\n     * For usage instructions, see [Interacting with cached data: `cache.batch`](https://www.apollographql.com/docs/react/caching/cache-interaction#using-cachebatch).\n     *\n     * @example\n     *\n     * ```js\n     * cache.batch({\n     *   update(cache) {\n     *     cache.writeQuery({\n     *       query: GET_TODOS,\n     *       data: { todos: updatedTodos },\n     *     });\n     *     cache.evict({ id: \"Todo:123\" });\n     *   },\n     * });\n     * ```\n     *\n     * @example\n     *\n     * ```js\n     * // Optimistic update with a custom layer ID\n     * cache.batch({\n     *   optimistic: \"add-todo-optimistic\",\n     *   update(cache) {\n     *     cache.modify({\n     *       fields: {\n     *         todos(existing = []) {\n     *           return [...existing, newTodoRef];\n     *         },\n     *       },\n     *     });\n     *   },\n     * });\n     * ```\n     *\n     * @returns The return value of the `update` function.\n     */\n    batch(options) {\n        const optimisticId = typeof options.optimistic === \"string\" ? options.optimistic\n            : options.optimistic === false ? null\n                : void 0;\n        let updateResult;\n        this.performTransaction(() => (updateResult = options.update(this)), optimisticId);\n        return updateResult;\n    }\n    recordOptimisticTransaction(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    transformDocument(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    transformForLink(document) {\n        return document;\n    }\n    identify(object) {\n        return;\n    }\n    gc() {\n        return [];\n    }\n    modify(options) {\n        return false;\n    }\n    readQuery(options, optimistic = !!options.optimistic) {\n        return this.read({\n            ...options,\n            rootId: options.id || \"ROOT_QUERY\",\n            optimistic,\n        });\n    }\n    fragmentWatches = new Trie(true);\n    /**\n    * Watches the cache store of the fragment according to the options specified\n    * and returns an `Observable`. We can subscribe to this\n    * `Observable` and receive updated results through an\n    * observer when the cache store changes.\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    * @since 3.10.0\n    * @param options - An object of type `WatchFragmentOptions` that allows\n    * the cache to identify the fragment and optionally specify whether to react\n    * to optimistic updates.\n    */\n    watchFragment(options) {\n        const { fragment, fragmentName, from } = options;\n        const query = this.getFragmentDoc(fragment, fragmentName);\n        const fromArray = Array.isArray(from) ? from : [from];\n        const ids = fromArray.map((value) => {\n            // While our TypeScript types do not allow for `undefined` as a valid\n            // `from`, its possible `useFragment` gives us an `undefined` since it\n            // calls` cache.identify` and provides that value to `from`. We are\n            // adding this fix here however to ensure those using plain JavaScript\n            // and using `cache.identify` themselves will avoid seeing the obscure\n            // warning.\n            const id = value == null ? value : this.toCacheId(value);\n            if (__DEV__) {\n                const actualFragmentName = fragmentName || getFragmentDefinition(fragment).name.value;\n                if (id === undefined) {\n                    __DEV__ && invariant.warn(119, actualFragmentName);\n                }\n            }\n            return id;\n        });\n        if (!Array.isArray(from)) {\n            const observable = this.watchSingleFragment(ids[0], query, options);\n            // Unfortunately we forgot to allow for `null` on watchFragment in 4.0\n            // when `from` is a single record. As such, we need to fallback to {}\n            // when diff.result is null to maintain backwards compatibility. We\n            // should plan to change this in v5. We do however support `null` if\n            // `from` is explicitly `null`.\n            //\n            // NOTE: Using `from` with an array will maintain `null` properly\n            // without the need for a similar fallback since watchFragment with\n            // arrays is new functionality in v4.1.\n            return from === null ? observable : (mapObservableFragmentMemoized(observable, Symbol.for(\"apollo.transform.individualResult\"), (result) => ({\n                ...result,\n                data: result.data ?? {},\n            })));\n        }\n        let currentResult;\n        function toResult(results) {\n            const result = results.reduce((memo, result, idx) => {\n                memo.data.push(result.data);\n                memo.complete &&= result.complete;\n                memo.dataState = memo.complete ? \"complete\" : \"partial\";\n                if (result.missing) {\n                    memo.missing ||= {};\n                    memo.missing[idx] = result.missing;\n                }\n                return memo;\n            }, {\n                data: [],\n                dataState: \"complete\",\n                complete: true,\n            });\n            if (!equal(currentResult, result)) {\n                currentResult = result;\n            }\n            return currentResult;\n        }\n        if (ids.length === 0) {\n            return emptyArrayObservable;\n        }\n        let subscribed = false;\n        const observables = ids.map((id) => this.watchSingleFragment(id, query, options));\n        const observable = combineLatestBatched(observables).pipe(map(toResult), tap({\n            subscribe: () => (subscribed = true),\n            unsubscribe: () => (subscribed = false),\n        }), shareReplay({ bufferSize: 1, refCount: true }));\n        return Object.assign(observable, {\n            getCurrentResult: () => {\n                if (subscribed && currentResult) {\n                    return currentResult;\n                }\n                const results = observables.map((observable) => observable.getCurrentResult());\n                return toResult(results);\n            },\n        });\n    }\n    /**\n     * Can be overridden by subclasses to delay calling the provided callback\n     * until after all broadcasts have been completed - e.g. in a cache scenario\n     * where many watchers are notified in parallel.\n     */\n    onAfterBroadcast = (cb) => cb();\n    watchSingleFragment(id, fragmentQuery, options) {\n        if (id === null) {\n            return nullObservable;\n        }\n        const { optimistic = true, variables } = options;\n        const cacheKey = [\n            fragmentQuery,\n            canonicalStringify({ id, optimistic, variables }),\n        ];\n        const cacheEntry = this.fragmentWatches.lookupArray(cacheKey);\n        if (!cacheEntry.observable) {\n            let subscribed = false;\n            let currentResult;\n            function getNewestResult(diff) {\n                const data = diff.result;\n                if (!currentResult ||\n                    !equalByQuery(fragmentQuery, { data: currentResult.data }, { data }, options.variables)) {\n                    currentResult = {\n                        data,\n                        dataState: diff.complete ? \"complete\" : \"partial\",\n                        complete: diff.complete,\n                    };\n                    if (diff.missing) {\n                        currentResult.missing = diff.missing.missing;\n                    }\n                }\n                return currentResult;\n            }\n            const observable = new Observable((observer) => {\n                subscribed = true;\n                const cleanup = this.watch({\n                    variables,\n                    returnPartialData: true,\n                    id,\n                    query: fragmentQuery,\n                    optimistic,\n                    immediate: true,\n                    callback: (diff) => {\n                        observable.dirty = true;\n                        this.onAfterBroadcast(() => {\n                            observer.next(getNewestResult(diff));\n                            observable.dirty = false;\n                        });\n                    },\n                });\n                return () => {\n                    subscribed = false;\n                    cleanup();\n                    this.fragmentWatches.removeArray(cacheKey);\n                };\n            }).pipe(distinctUntilChanged(), share({\n                connector: () => new ReplaySubject(1),\n                // debounce so a synchronous unsubscribe+resubscribe doesn't tear down the watch and create a new one\n                resetOnRefCountZero: () => timer(0),\n            }));\n            cacheEntry.observable = Object.assign(observable, {\n                dirty: false,\n                getCurrentResult: () => {\n                    if (subscribed && currentResult) {\n                        return currentResult;\n                    }\n                    return getNewestResult(this.diff({\n                        id,\n                        query: fragmentQuery,\n                        returnPartialData: true,\n                        optimistic,\n                        variables,\n                    }));\n                },\n            });\n        }\n        return cacheEntry.observable;\n    }\n    // Make sure we compute the same (===) fragment query document every\n    // time we receive the same fragment in readFragment.\n    getFragmentDoc = wrap(getFragmentQueryDocument, {\n        max: cacheSizes[\"cache.fragmentQueryDocuments\"] ||\n            1000 /* defaultCacheSizes[\"cache.fragmentQueryDocuments\"] */,\n        cache: WeakCache,\n        makeCacheKey: bindCacheKey(this),\n    });\n    readFragment(options, optimistic = !!options.optimistic) {\n        const id = options.from !== undefined ? this.toCacheId(options.from) : options.id;\n        return this.read({\n            ...options,\n            query: this.getFragmentDoc(options.fragment, options.fragmentName),\n            rootId: id,\n            optimistic,\n        });\n    }\n    writeQuery({ id, data, ...options }) {\n        return this.write(Object.assign(options, {\n            dataId: id || \"ROOT_QUERY\",\n            result: data,\n        }));\n    }\n    writeFragment({ data, fragment, fragmentName, ...options }) {\n        const id = options.from !== undefined ? this.toCacheId(options.from) : options.id;\n        return this.write(Object.assign(options, {\n            query: this.getFragmentDoc(fragment, fragmentName),\n            dataId: id,\n            result: data,\n        }));\n    }\n    updateQuery(options, update) {\n        return this.batch({\n            update(cache) {\n                const value = cache.readQuery(options);\n                const data = update(value);\n                if (data === void 0 || data === null)\n                    return value;\n                cache.writeQuery({ ...options, data });\n                return data;\n            },\n        });\n    }\n    updateFragment(options, update) {\n        return this.batch({\n            update(cache) {\n                const value = cache.readFragment(options);\n                const data = update(value);\n                if (data === void 0 || data === null)\n                    return value;\n                cache.writeFragment({ ...options, data });\n                return data;\n            },\n        });\n    }\n    toCacheId(from) {\n        return typeof from === \"string\" ? from : this.identify(from);\n    }\n}\nif (__DEV__) {\n    ApolloCache.prototype.getMemoryInternals = getApolloCacheMemoryInternals;\n}\nconst nullResult = Object.freeze({\n    data: null,\n    dataState: \"complete\",\n    complete: true,\n});\nconst nullObservable = Object.assign(new Observable((observer) => {\n    observer.next(nullResult);\n}), { dirty: false, getCurrentResult: () => nullResult });\nconst emptyArrayResult = Object.freeze({\n    data: [],\n    dataState: \"complete\",\n    complete: true,\n});\nconst emptyArrayObservable = Object.assign(new Observable((observer) => {\n    observer.next(emptyArrayResult);\n}), { getCurrentResult: () => emptyArrayResult });\n//# sourceMappingURL=cache.js.map\n","import { EMPTY, Observable } from \"rxjs\";\n/**\n * Like `combineLatest` but with some differences:\n *\n * - It only works on arrays as an input\n * - Batches updates to each array index that contains a referentially equal\n *   observable\n * - Doesn't allow for custom scheduler\n * - Expects array of constructed observables instead of `Array<ObservableInput>`\n */\nexport function combineLatestBatched(observables) {\n    if (observables.length === 0) {\n        return EMPTY;\n    }\n    return new Observable((observer) => {\n        const { length } = observables;\n        // Keeps track of current values for each observable\n        const values = new Array(length);\n        // Used to batch an update each item in the array that share an observable\n        // so that they can be emitted together.\n        const indexesByObservable = new Map();\n        observables.forEach((source, idx) => {\n            if (!indexesByObservable.has(source)) {\n                indexesByObservable.set(source, new Set());\n            }\n            indexesByObservable.get(source).add(idx);\n        });\n        // Track the number of active subscriptions so we know when to complete this\n        // observable\n        let active = indexesByObservable.size;\n        // Track how many observables are left to emit their first value\n        let remainingFirstValues = indexesByObservable.size;\n        let currentBatch;\n        // Subscribe to each unique observable instead of the raw source array of\n        // observables since we want at most 1-subscription per unique observable.\n        // This ensures an update can write to multiple indexes before emitting the\n        // result.\n        indexesByObservable.forEach((indexes, source) => {\n            let hasFirstValue = false;\n            const subscription = source.subscribe({\n                next: (value) => {\n                    indexes.forEach((idx) => (values[idx] = value));\n                    if (!hasFirstValue) {\n                        hasFirstValue = true;\n                        remainingFirstValues--;\n                    }\n                    if (!remainingFirstValues) {\n                        currentBatch ||= new Set(observables.filter((obs) => obs.dirty));\n                        currentBatch.delete(source);\n                        if (!currentBatch.size) {\n                            observer.next(values.slice());\n                            currentBatch = undefined;\n                        }\n                    }\n                },\n                complete: () => {\n                    active--;\n                    if (!active) {\n                        observer.complete();\n                    }\n                },\n                error: observer.error.bind(observer),\n            });\n            observer.add(subscription);\n        });\n    });\n}\n//# sourceMappingURL=combineLatestBatched.js.map","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime, intervalOrScheduler, scheduler) {\n    if (dueTime === void 0) { dueTime = 0; }\n    if (scheduler === void 0) { scheduler = asyncScheduler; }\n    var intervalDuration = -1;\n    if (intervalOrScheduler != null) {\n        if (isScheduler(intervalOrScheduler)) {\n            scheduler = intervalOrScheduler;\n        }\n        else {\n            intervalDuration = intervalOrScheduler;\n        }\n    }\n    return new Observable(function (subscriber) {\n        var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n        if (due < 0) {\n            due = 0;\n        }\n        var n = 0;\n        return scheduler.schedule(function () {\n            if (!subscriber.closed) {\n                subscriber.next(n++);\n                if (0 <= intervalDuration) {\n                    this.schedule(undefined, intervalDuration);\n                }\n                else {\n                    subscriber.complete();\n                }\n            }\n        }, due);\n    });\n}\n//# sourceMappingURL=timer.js.map","import { defaultMakeCacheKey } from \"optimism\";\n/**\n * A variant of `optimism`'s `defaultMakeCacheKey` function that allows us to\n * pre-bind some arguments to be part of the cache key Trie path.\n *\n * This should always be used in place of `defaultMakeCacheKey` to bind\n * the `this` context of classes owning wrapped functions, to ensure that\n * the cache keys are collected from memory when the owning object is garbage collected.\n *\n * Without this, cache keys can stay in memory indefinitely, even though the owning\n * Apollo Client instance is long gone.\n * This is a risk in long-running processes with `[DocumentNode, string, string]`\n * style cache keys with persistent document nodes.\n */\nexport function bindCacheKey(...prebound) {\n    return defaultMakeCacheKey.bind(null, ...prebound);\n}\n//# sourceMappingURL=bindCacheKey.js.map","import { isNonNullObject } from \"./isNonNullObject.js\";\nconst { hasOwnProperty } = Object.prototype;\nconst defaultReconciler = function (target, source, property) {\n    return this.merge(target[property], source[property]);\n};\nconst objForKey = (key) => {\n    return isNaN(+key) ? {} : [];\n};\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport class DeepMerger {\n    options;\n    reconciler;\n    constructor(options = {}) {\n        this.options = options;\n        this.reconciler = options.reconciler || defaultReconciler;\n    }\n    merge(target, source, mergeOptions = {}) {\n        const atPath = mergeOptions.atPath;\n        if (atPath?.length) {\n            const [head, ...tail] = atPath;\n            if (target === undefined) {\n                target = objForKey(head);\n            }\n            let nestedTarget = target[head];\n            if (nestedTarget === undefined && tail.length) {\n                nestedTarget = objForKey(tail[0]);\n            }\n            const nestedSource = this.merge(nestedTarget, source, {\n                ...mergeOptions,\n                atPath: tail,\n            });\n            if (nestedTarget !== nestedSource) {\n                target = this.shallowCopyForMerge(target);\n                target[head] = nestedSource;\n            }\n            return target;\n        }\n        if (Array.isArray(target) &&\n            Array.isArray(source) &&\n            this.options.arrayMerge === \"truncate\" &&\n            target.length > source.length) {\n            target = target.slice(0, source.length);\n            this.pastCopies.add(target);\n        }\n        if (isNonNullObject(source) && isNonNullObject(target)) {\n            Object.keys(source).forEach((sourceKey) => {\n                if (hasOwnProperty.call(target, sourceKey)) {\n                    const targetValue = target[sourceKey];\n                    if (source[sourceKey] !== targetValue) {\n                        const result = this.reconciler(target, source, sourceKey);\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    isObject = isNonNullObject;\n    pastCopies = new Set();\n    shallowCopyForMerge(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 = {\n                        __proto__: Object.getPrototypeOf(value),\n                        ...value,\n                    };\n                }\n                this.pastCopies.add(value);\n            }\n        }\n        return value;\n    }\n}\n//# sourceMappingURL=DeepMerger.js.map\n","/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function makeReference(id) {\n    return { __ref: String(id) };\n}\n//# sourceMappingURL=makeReference.js.map\n","import { isReference } from \"@apollo/client/utilities\";\nimport { compact, createFragmentMap, DeepMerger, getFragmentDefinitions, isArray, isField, isNonNullObject, resultKeyNameFromField, shouldInclude, } from \"@apollo/client/utilities/internal\";\nexport const { hasOwnProperty: hasOwn } = Object.prototype;\nexport function defaultDataIdFromObject({ __typename, id, _id }, context) {\n    if (typeof __typename === \"string\") {\n        if (context) {\n            context.keyObject =\n                id != null ? { id }\n                    : _id != null ? { _id }\n                        : void 0;\n        }\n        // If there is no object.id, fall back to object._id.\n        if (id == null && _id != null) {\n            id = _id;\n        }\n        if (id != null) {\n            return `${__typename}:${typeof id === \"number\" || typeof id === \"string\" ?\n                id\n                : JSON.stringify(id)}`;\n        }\n    }\n}\nconst defaultConfig = {\n    dataIdFromObject: defaultDataIdFromObject,\n    resultCaching: true,\n};\nexport function normalizeConfig(config) {\n    return compact(defaultConfig, config);\n}\nexport function getTypenameFromStoreObject(store, objectOrReference) {\n    return isReference(objectOrReference) ?\n        store.get(objectOrReference.__ref, \"__typename\")\n        : objectOrReference && objectOrReference.__typename;\n}\nexport const TypeOrFieldNameRegExp = /^[_a-z][_0-9a-z]*/i;\nexport function fieldNameFromStoreName(storeFieldName) {\n    const 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((item) => selectionSetMatchesResult(selectionSet, item, variables))\n            : selectionSet.selections.every((field) => {\n                if (isField(field) && shouldInclude(field, variables)) {\n                    const 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    const fragmentMap = createFragmentMap(getFragmentDefinitions(document));\n    return {\n        fragmentMap,\n        lookupFragment(name) {\n            let def = fragmentMap[name];\n            if (!def && fragments) {\n                def = fragments.lookup(name);\n            }\n            return def || null;\n        },\n    };\n}\n//# sourceMappingURL=helpers.js.map","import { equal } from \"@wry/equality\";\nimport { Trie } from \"@wry/trie\";\nimport { dep } from \"optimism\";\nimport { isReference } from \"@apollo/client/utilities\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { DeepMerger, isNonNullObject, makeReference, maybeDeepFreeze, } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nimport { fieldNameFromStoreName, hasOwn } from \"./helpers.js\";\nconst DELETE = {};\nconst delModifier = () => DELETE;\nconst INVALIDATE = {};\nexport class EntityStore {\n    policies;\n    group;\n    data = {};\n    constructor(policies, group) {\n        this.policies = policies;\n        this.group = group;\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    toObject() {\n        return { ...this.data };\n    }\n    has(dataId) {\n        return this.lookup(dataId, true) !== void 0;\n    }\n    get(dataId, fieldName) {\n        this.group.depend(dataId, fieldName);\n        if (hasOwn.call(this.data, dataId)) {\n            const 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    lookup(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 {};\n        }\n    }\n    merge(older, newer) {\n        let 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        const existing = typeof older === \"string\" ? this.lookup((dataId = older)) : older;\n        const 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\", 105);\n        const merged = new DeepMerger({\n            reconciler: storeObjectReconciler,\n        }).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                const fieldsToDirty = {};\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.__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((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[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                        const fieldName = fieldNameFromStoreName(storeFieldName);\n                        if (fieldName !== storeFieldName &&\n                            !this.policies.hasKeyArgs(merged.__typename, fieldName)) {\n                            fieldsToDirty[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.__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.__typename;\n                }\n                Object.keys(fieldsToDirty).forEach((fieldName) => this.group.dirty(dataId, fieldName));\n            }\n        }\n    }\n    modify(dataId, fields, exact) {\n        const storeObject = this.lookup(dataId);\n        if (storeObject) {\n            const changedFields = {};\n            let needToMerge = false;\n            let allDeleted = true;\n            const sharedDetails = {\n                DELETE,\n                INVALIDATE,\n                isReference,\n                toReference: this.toReference,\n                canRead: this.canRead,\n                readField: (fieldNameOrOptions, from) => this.policies.readField(typeof fieldNameOrOptions === \"string\" ?\n                    {\n                        fieldName: fieldNameOrOptions,\n                        from: from || makeReference(dataId),\n                    }\n                    : fieldNameOrOptions, { store: this }),\n            };\n            Object.keys(storeObject).forEach((storeFieldName) => {\n                const fieldName = fieldNameFromStoreName(storeFieldName);\n                let fieldValue = storeObject[storeFieldName];\n                if (fieldValue === void 0)\n                    return;\n                const modify = typeof fields === \"function\" ? fields : (fields[storeFieldName] || (exact ? undefined : fields[fieldName]));\n                if (modify) {\n                    let newValue = modify === delModifier ? DELETE : (modify(maybeDeepFreeze(fieldValue), {\n                        ...sharedDetails,\n                        fieldName,\n                        storeFieldName,\n                        storage: this.getStorage(dataId, storeFieldName),\n                    }));\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[storeFieldName] = newValue;\n                            needToMerge = true;\n                            fieldValue = newValue;\n                            if (__DEV__) {\n                                const checkReference = (ref) => {\n                                    if (this.lookup(ref.__ref) === undefined) {\n                                        __DEV__ && invariant.warn(106, 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                                    let seenReference = false;\n                                    let someNonReference;\n                                    for (const value of newValue) {\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                                                const [id] = this.policies.identify(value);\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                                            __DEV__ && invariant.warn(107, someNonReference);\n                                            break;\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n                if (fieldValue !== void 0) {\n                    allDeleted = false;\n                }\n            });\n            if (needToMerge) {\n                this.merge(dataId, changedFields);\n                if (allDeleted) {\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    delete(dataId, fieldName, args) {\n        const storeObject = this.lookup(dataId);\n        if (storeObject) {\n            const typename = this.getFieldValue(storeObject, \"__typename\");\n            const storeFieldName = fieldName && args ?\n                this.policies.getStoreFieldName({ typename, fieldName, args })\n                : fieldName;\n            return this.modify(dataId, storeFieldName ?\n                {\n                    [storeFieldName]: delModifier,\n                }\n                : delModifier, !!args);\n        }\n        return false;\n    }\n    evict(options, limit) {\n        let 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    clear() {\n        this.replace(null);\n    }\n    extract() {\n        const obj = this.toObject();\n        const extraRootIds = [];\n        this.getRootIdSet().forEach((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    replace(newData) {\n        Object.keys(this.data).forEach((dataId) => {\n            if (!(newData && hasOwn.call(newData, dataId))) {\n                this.delete(dataId);\n            }\n        });\n        if (newData) {\n            const { __META, ...rest } = newData;\n            Object.keys(rest).forEach((dataId) => {\n                this.merge(dataId, rest[dataId]);\n            });\n            if (__META) {\n                __META.extraRootIds.forEach(this.retain, this);\n            }\n        }\n    }\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    rootIds = {};\n    retain(rootId) {\n        return (this.rootIds[rootId] = (this.rootIds[rootId] || 0) + 1);\n    }\n    release(rootId) {\n        if (this.rootIds[rootId] > 0) {\n            const count = --this.rootIds[rootId];\n            if (!count)\n                delete this.rootIds[rootId];\n            return count;\n        }\n        return 0;\n    }\n    // Return a Set<string> of all the ID strings that have been retained by\n    // this layer/root *and* any layers/roots beneath it.\n    getRootIdSet(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    gc() {\n        const ids = this.getRootIdSet();\n        const snapshot = this.toObject();\n        ids.forEach((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        const idsToRemove = Object.keys(snapshot);\n        if (idsToRemove.length) {\n            let root = this;\n            while (root instanceof Layer)\n                root = root.parent;\n            idsToRemove.forEach((id) => root.delete(id));\n        }\n        return idsToRemove;\n    }\n    // Lazily tracks { __ref: <dataId> } strings contained by this.data[dataId].\n    refs = {};\n    findChildRefIds(dataId) {\n        if (!hasOwn.call(this.refs, dataId)) {\n            const found = (this.refs[dataId] = {});\n            const root = this.data[dataId];\n            if (!root)\n                return found;\n            const workSet = 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.forEach((obj) => {\n                if (isReference(obj)) {\n                    found[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((key) => {\n                        const 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.add(child);\n                        }\n                    });\n                }\n            });\n        }\n        return this.refs[dataId];\n    }\n    makeCacheKey() {\n        return this.group.keyMaker.lookupArray(arguments);\n    }\n    // Bound function that can be passed around to provide easy access to fields\n    // of Reference objects as well as ordinary objects.\n    getFieldValue = (objectOrReference, storeFieldName) => maybeDeepFreeze(isReference(objectOrReference) ?\n        this.get(objectOrReference.__ref, storeFieldName)\n        : objectOrReference && objectOrReference[storeFieldName]);\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    canRead = (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    toReference = (objOrIdOrRef, mergeIntoStore) => {\n        if (typeof objOrIdOrRef === \"string\") {\n            return makeReference(objOrIdOrRef);\n        }\n        if (isReference(objOrIdOrRef)) {\n            return objOrIdOrRef;\n        }\n        const [id] = this.policies.identify(objOrIdOrRef);\n        if (id) {\n            const ref = makeReference(id);\n            if (mergeIntoStore) {\n                this.merge(id, objOrIdOrRef);\n            }\n            return ref;\n        }\n    };\n    get supportsResultCaching() {\n        return this.group.caching;\n    }\n}\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.\nclass CacheGroup {\n    caching;\n    parent;\n    d = null;\n    // Used by the EntityStore#makeCacheKey method to compute cache keys\n    // specific to this CacheGroup.\n    keyMaker;\n    constructor(caching, parent = null) {\n        this.caching = caching;\n        this.parent = parent;\n        this.resetCaching();\n    }\n    resetCaching() {\n        this.d = this.caching ? dep() : null;\n        this.keyMaker = new Trie();\n    }\n    depend(dataId, storeFieldName) {\n        if (this.d) {\n            this.d(makeDepKey(dataId, storeFieldName));\n            const 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    dirty(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}\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}\nclass Root extends EntityStore {\n    constructor({ policies, resultCaching = true, seed, }) {\n        super(policies, new CacheGroup(resultCaching));\n        if (seed)\n            this.replace(seed);\n    }\n    stump = new Stump(this);\n    addLayer(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    removeLayer() {\n        // Never remove the root layer.\n        return this;\n    }\n    storageTrie = new Trie();\n    getStorage() {\n        return this.storageTrie.lookupArray(arguments);\n    }\n}\nEntityStore.Root = Root;\n// Not exported, since all Layer instances are created by the addLayer method\n// of the EntityStore.Root class.\nclass Layer extends EntityStore {\n    id;\n    parent;\n    replay;\n    group;\n    constructor(id, parent, replay, group) {\n        super(parent.policies, group);\n        this.id = id;\n        this.parent = parent;\n        this.replay = replay;\n        this.group = group;\n        replay(this);\n    }\n    addLayer(layerId, replay) {\n        return new Layer(layerId, this, replay, this.group);\n    }\n    removeLayer(layerId) {\n        // Remove all instances of the given id, not just the first one.\n        const 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((dataId) => {\n                    const ownStoreObject = this.data[dataId];\n                    const 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((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((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    toObject() {\n        return {\n            ...this.parent.toObject(),\n            ...this.data,\n        };\n    }\n    findChildRefIds(dataId) {\n        const fromParent = this.parent.findChildRefIds(dataId);\n        return hasOwn.call(this.data, dataId) ?\n            {\n                ...fromParent,\n                ...super.findChildRefIds(dataId),\n            }\n            : fromParent;\n    }\n    getStorage(...args) {\n        let p = this.parent;\n        while (p.parent)\n            p = p.parent;\n        return p.getStorage(...args);\n    }\n}\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.\nclass Stump extends Layer {\n    constructor(root) {\n        super(\"EntityStore.Stump\", root, () => { }, new CacheGroup(root.group.caching, root.group));\n    }\n    removeLayer() {\n        // Never remove the Stump layer.\n        return this;\n    }\n    merge(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}\nfunction storeObjectReconciler(existingObject, incomingObject, property) {\n    const existingValue = existingObject[property];\n    const 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 && store.supportsResultCaching);\n}\n//# sourceMappingURL=entityStore.js.map\n","import { valueToObjectRepresentation } from \"./valueToObjectRepresentation.js\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function argumentsObjectFromField(field, variables) {\n    if (field.arguments && field.arguments.length) {\n        const argObj = {};\n        field.arguments.forEach(({ name, value }) => valueToObjectRepresentation(argObj, name, value, variables));\n        return argObj;\n    }\n    return null;\n}\n//# sourceMappingURL=argumentsObjectFromField.js.map\n","import { canonicalStringify } from \"./canonicalStringify.js\";\nconst KNOWN_DIRECTIVES = [\n    \"connection\",\n    \"include\",\n    \"skip\",\n    \"client\",\n    \"rest\",\n    \"export\",\n    \"nonreactive\",\n    \"stream\",\n];\n// Default stable JSON.stringify implementation used by getStoreKeyName. Can be\n// updated/replaced with something better by calling\n// getStoreKeyName.setStringify(newStringifyFunction).\nlet storeKeyNameStringify = canonicalStringify;\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport const 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            const filterKeys = directives[\"connection\"][\"filter\"] ?\n                directives[\"connection\"][\"filter\"]\n                : [];\n            filterKeys.sort();\n            const filteredArgs = {};\n            filterKeys.forEach((key) => {\n                filteredArgs[key] = args[key];\n            });\n            const stringifiedArgs = storeKeyNameStringify(filteredArgs);\n            if (stringifiedArgs !== \"{}\") {\n                return `${directives[\"connection\"][\"key\"]}(${stringifiedArgs})`;\n            }\n        }\n        return directives[\"connection\"][\"key\"];\n    }\n    let 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        const stringifiedArgs = storeKeyNameStringify(args);\n        if (stringifiedArgs !== \"{}\") {\n            completeFieldName += `(${stringifiedArgs})`;\n        }\n    }\n    if (directives) {\n        Object.keys(directives).forEach((key) => {\n            if (KNOWN_DIRECTIVES.indexOf(key) !== -1)\n                return;\n            if (directives[key] && Object.keys(directives[key]).length) {\n                completeFieldName += `@${key}(${storeKeyNameStringify(directives[key])})`;\n            }\n            else {\n                completeFieldName += `@${key}`;\n            }\n        });\n    }\n    return completeFieldName;\n}, {\n    setStringify(s) {\n        const previous = storeKeyNameStringify;\n        storeKeyNameStringify = s;\n        return previous;\n    },\n});\n//# sourceMappingURL=getStoreKeyName.js.map\n","import { argumentsObjectFromField, DeepMerger, isArray, isNonEmptyArray, isNonNullObject, } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nimport { hasOwn } from \"./helpers.js\";\n// Mapping from JSON-encoded KeySpecifier strings to associated information.\nconst specifierInfoCache = {};\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    const cacheKey = JSON.stringify(spec);\n    return specifierInfoCache[cacheKey] || (specifierInfoCache[cacheKey] = {});\n}\nexport function keyFieldsFnFromSpecifier(specifier) {\n    const info = lookupSpecifierInfo(specifier);\n    return (info.keyFieldsFn || (info.keyFieldsFn = (object, context) => {\n            const extract = (from, key) => context.readField(key, from);\n            const keyObject = (context.keyObject = collectSpecifierPaths(specifier, (schemaKeyPath) => {\n                let 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, 108, schemaKeyPath.join(\".\"), object);\n                return extracted;\n            }));\n            return `${context.typename}:${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    const info = lookupSpecifierInfo(specifier);\n    return (info.keyArgsFn ||\n        (info.keyArgsFn = (args, { field, variables, fieldName }) => {\n            const collected = collectSpecifierPaths(specifier, (keyPath) => {\n                const firstKey = keyPath[0];\n                const firstChar = firstKey.charAt(0);\n                if (firstChar === \"@\") {\n                    if (field && isNonEmptyArray(field.directives)) {\n                        const directiveName = 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                        const d = field.directives.find((d) => d.name.value === directiveName);\n                        // Fortunately argumentsObjectFromField works for DirectiveNode!\n                        const 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                    const variableName = firstKey.slice(1);\n                    if (variables && hasOwn.call(variables, variableName)) {\n                        const 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            const 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    const merger = new DeepMerger();\n    return getSpecifierPaths(specifier).reduce((collected, path) => {\n        let 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 (let i = path.length - 1; i >= 0; --i) {\n                toMerge = { [path[i]]: toMerge };\n            }\n            collected = merger.merge(collected, toMerge);\n        }\n        return collected;\n    }, {});\n}\nexport function getSpecifierPaths(spec) {\n    const info = lookupSpecifierInfo(spec);\n    if (!info.paths) {\n        const paths = (info.paths = []);\n        const currentPath = [];\n        spec.forEach((s, i) => {\n            if (isArray(s)) {\n                getSpecifierPaths(s).forEach((p) => paths.push(currentPath.concat(p)));\n                currentPath.length = 0;\n            }\n            else {\n                currentPath.push(s);\n                if (!isArray(spec[i + 1])) {\n                    paths.push(currentPath.slice(0));\n                    currentPath.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((child) => 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(), (path) => extractKeyPath(value, path));\n    }\n    return value;\n}\n//# sourceMappingURL=key-extractor.js.map\n","import { dep, Slot } from \"optimism\";\n// Contextual Slot that acquires its value when custom read functions are\n// called in Policies#readField.\nexport const cacheSlot = new Slot();\nconst cacheInfoMap = new WeakMap();\nfunction getCacheInfo(cache) {\n    let 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((rv) => 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((rv) => rv.attachCache(cache));\n}\nexport function makeVar(value) {\n    const caches = new Set();\n    const listeners = new Set();\n    const rv = function (newValue) {\n        if (arguments.length > 0) {\n            if (value !== newValue) {\n                value = newValue;\n                caches.forEach((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                const oldListeners = Array.from(listeners);\n                listeners.clear();\n                oldListeners.forEach((listener) => 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            const cache = cacheSlot.getValue();\n            if (cache) {\n                attach(cache);\n                getCacheInfo(cache).dep(rv);\n            }\n        }\n        return value;\n    };\n    rv.onNextChange = (listener) => {\n        listeners.add(listener);\n        return () => {\n            listeners.delete(listener);\n        };\n    };\n    const attach = (rv.attachCache = (cache) => {\n        caches.add(cache);\n        getCacheInfo(cache).vars.add(rv);\n        return rv;\n    });\n    rv.forgetCache = (cache) => caches.delete(cache);\n    return rv;\n}\nfunction broadcast(cache) {\n    if (cache.broadcastWatches) {\n        cache.broadcastWatches();\n    }\n}\n//# sourceMappingURL=reactiveVars.js.map","import { equal } from \"@wry/equality\";\nimport { disableWarningsSlot } from \"@apollo/client/masking\";\nimport { isReference } from \"@apollo/client/utilities\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { streamInfoSymbol } from \"@apollo/client/utilities/internal\";\nimport { argumentsObjectFromField, getStoreKeyName, isArray, isNonNullObject, storeKeyNameFromField, stringifyForDisplay, } from \"@apollo/client/utilities/internal\";\nimport { invariant, newInvariantError, } from \"@apollo/client/utilities/invariant\";\nimport { defaultDataIdFromObject, fieldNameFromStoreName, hasOwn, selectionSetMatchesResult, storeValueIsStoreObject, TypeOrFieldNameRegExp, } from \"./helpers.js\";\nimport { keyArgsFnFromSpecifier, keyFieldsFnFromSpecifier, } from \"./key-extractor.js\";\nimport { cacheSlot } from \"./reactiveVars.js\";\nfunction argsFromFieldSpecifier(spec) {\n    return (spec.args !== void 0 ? spec.args\n        : spec.field ? argumentsObjectFromField(spec.field, spec.variables)\n            : null);\n}\nconst nullKeyFieldsFn = () => void 0;\nconst simpleKeyArgsFn = (_args, context) => context.fieldName;\n// These merge functions can be selected by specifying merge:true or\n// merge:false in a field policy.\nconst mergeTrueFn = (existing, incoming, { mergeObjects }) => mergeObjects(existing, incoming);\nconst mergeFalseFn = (_, incoming) => incoming;\nexport const defaultStreamFieldMergeFn = (existing, incoming, { streamFieldInfo, existingData }) => {\n    if (!existing && !existingData) {\n        return incoming;\n    }\n    const results = [];\n    const previous = existing ?? existingData;\n    const length = streamFieldInfo?.isLastChunk ?\n        incoming.length\n        : Math.max(previous.length, incoming.length);\n    for (let i = 0; i < length; i++) {\n        results[i] = incoming[i] === undefined ? previous[i] : incoming[i];\n    }\n    return results;\n};\nexport class Policies {\n    config;\n    typePolicies = {};\n    toBeAdded = {};\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    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    fuzzySubtypes = new Map();\n    cache;\n    rootIdsByTypename = {};\n    rootTypenamesById = {};\n    usingPossibleTypes = false;\n    constructor(config) {\n        this.config = config;\n        this.config = {\n            dataIdFromObject: defaultDataIdFromObject,\n            ...config,\n        };\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    identify(object, partialContext) {\n        const policies = this;\n        const typename = (partialContext &&\n            (partialContext.typename || partialContext.storeObject?.__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        const storeObject = (partialContext && partialContext.storeObject) || object;\n        const context = {\n            ...partialContext,\n            typename,\n            storeObject,\n            readField: (partialContext && partialContext.readField) ||\n                ((...args) => {\n                    const options = normalizeReadFieldOptions(args, storeObject);\n                    return policies.readField(options, {\n                        store: policies.cache[\"data\"],\n                        variables: options.variables,\n                    });\n                }),\n        };\n        let id;\n        const policy = typename && this.getTypePolicy(typename);\n        let keyFn = (policy && policy.keyFn) || this.config.dataIdFromObject;\n        disableWarningsSlot.withValue(true, () => {\n            while (keyFn) {\n                const specifierOrId = keyFn({ ...object, ...storeObject }, context);\n                if (isArray(specifierOrId)) {\n                    keyFn = keyFieldsFnFromSpecifier(specifierOrId);\n                }\n                else {\n                    id = specifierOrId;\n                    break;\n                }\n            }\n        });\n        id = id ? String(id) : void 0;\n        return context.keyObject ? [id, context.keyObject] : [id];\n    }\n    addTypePolicies(typePolicies) {\n        Object.keys(typePolicies).forEach((typename) => {\n            const { queryType, mutationType, subscriptionType, ...incoming } = typePolicies[typename];\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    updateTypePolicy(typename, incoming, existingFieldPolicies) {\n        const existing = this.getTypePolicy(typename);\n        const { keyFields, fields } = incoming;\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((fieldName) => {\n                let existing = existingFieldPolicies[fieldName];\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                // So here we avoid merging an inherited field policy with an updated one.\n                if (!existing || existing?.typename !== typename) {\n                    existing = existingFieldPolicies[fieldName] = { typename };\n                }\n                const incoming = fields[fieldName];\n                if (typeof incoming === \"function\") {\n                    existing.read = incoming;\n                }\n                else {\n                    const { keyArgs, read, merge } = incoming;\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    setRootTypename(which, typename = which) {\n        const rootId = \"ROOT_\" + which.toUpperCase();\n        const old = this.rootTypenamesById[rootId];\n        if (typename !== old) {\n            invariant(!old || old === which, 109, 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    addPossibleTypes(possibleTypes) {\n        this.usingPossibleTypes = true;\n        Object.keys(possibleTypes).forEach((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((subtype) => {\n                this.getSupertypeSet(subtype, true).add(supertype);\n                const 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    getTypePolicy(typename) {\n        if (!hasOwn.call(this.typePolicies, typename)) {\n            const policy = (this.typePolicies[typename] = {});\n            policy.fields = {};\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            let supertypes = this.supertypeMap.get(typename);\n            if (!supertypes && 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 = 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((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                        const fuzzySupertypes = this.supertypeMap.get(fuzzy);\n                        if (fuzzySupertypes) {\n                            fuzzySupertypes.forEach((supertype) => supertypes.add(supertype));\n                        }\n                    }\n                });\n            }\n            if (supertypes && supertypes.size) {\n                supertypes.forEach((supertype) => {\n                    const { fields, ...rest } = this.getTypePolicy(supertype);\n                    Object.assign(policy, rest);\n                    Object.assign(policy.fields, fields);\n                });\n            }\n        }\n        const 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((policy) => {\n                this.updateTypePolicy(typename, policy, this.typePolicies[typename].fields);\n            });\n        }\n        return this.typePolicies[typename];\n    }\n    getFieldPolicy(typename, fieldName) {\n        if (typename) {\n            return this.getTypePolicy(typename).fields[fieldName];\n        }\n    }\n    getSupertypeSet(subtype, createIfMissing) {\n        let supertypeSet = this.supertypeMap.get(subtype);\n        if (!supertypeSet && createIfMissing) {\n            this.supertypeMap.set(subtype, (supertypeSet = new Set()));\n        }\n        return supertypeSet;\n    }\n    fragmentMatches(fragment, typename, result, variables) {\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        const 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            const typenameSupertypeSet = this.getSupertypeSet(typename, true);\n            const workQueue = [typenameSupertypeSet];\n            const maybeEnqueue = (subtype) => {\n                const supertypeSet = this.getSupertypeSet(subtype, false);\n                if (supertypeSet &&\n                    supertypeSet.size &&\n                    workQueue.indexOf(supertypeSet) < 0) {\n                    workQueue.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            let needToCheckFuzzySubtypes = !!(result && this.fuzzySubtypes.size);\n            let 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 (let i = 0; i < workQueue.length; ++i) {\n                const supertypeSet = workQueue[i];\n                if (supertypeSet.has(supertype)) {\n                    if (!typenameSupertypeSet.has(supertype)) {\n                        if (checkingFuzzySubtypes) {\n                            __DEV__ && invariant.warn(110, 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);\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.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((regExp, fuzzyString) => {\n                        const match = typename.match(regExp);\n                        if (match && match[0] === typename) {\n                            maybeEnqueue(fuzzyString);\n                        }\n                    });\n                }\n            }\n        }\n        return false;\n    }\n    hasKeyArgs(typename, fieldName) {\n        const policy = this.getFieldPolicy(typename, fieldName);\n        return !!(policy && policy.keyFn);\n    }\n    getStoreFieldName(fieldSpec) {\n        const { typename, fieldName } = fieldSpec;\n        const policy = this.getFieldPolicy(typename, fieldName);\n        let storeFieldName;\n        let keyFn = policy && policy.keyFn;\n        if (keyFn && typename) {\n            const context = {\n                typename,\n                fieldName,\n                field: fieldSpec.field || null,\n                variables: fieldSpec.variables,\n            };\n            const args = argsFromFieldSpecifier(fieldSpec);\n            while (keyFn) {\n                const 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    readField(options, context) {\n        const objectOrReference = options.from;\n        if (!objectOrReference)\n            return;\n        const nameOrField = options.field || options.fieldName;\n        if (!nameOrField)\n            return;\n        if (options.typename === void 0) {\n            const typename = context.store.getFieldValue(objectOrReference, \"__typename\");\n            if (typename)\n                options.typename = typename;\n        }\n        const storeFieldName = this.getStoreFieldName(options);\n        const fieldName = fieldNameFromStoreName(storeFieldName);\n        const existing = context.store.getFieldValue(objectOrReference, storeFieldName);\n        const policy = this.getFieldPolicy(options.typename, fieldName);\n        const read = policy && policy.read;\n        if (read) {\n            const 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    getReadFunction(typename, fieldName) {\n        const policy = this.getFieldPolicy(typename, fieldName);\n        return policy && policy.read;\n    }\n    getMergeFunction(parentTypename, fieldName, childTypename) {\n        let policy = this.getFieldPolicy(parentTypename, fieldName);\n        let merge = policy && policy.merge;\n        if (!merge && childTypename) {\n            policy = this.getTypePolicy(childTypename);\n            merge = policy && policy.merge;\n        }\n        return merge;\n    }\n    runMergeFunction(existing, incoming, { field, typename, merge, path }, context, storage) {\n        // Preserve the value in case `context.overwrite` is set.\n        const existingData = existing;\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        const streamInfo = context.extensions?.[streamInfoSymbol]\n            ?.deref()\n            ?.peekArray(path);\n        if (streamInfo) {\n            const { current, previous } = streamInfo;\n            if (previous &&\n                equal(previous.incoming, incoming) &&\n                equal(previous.streamFieldInfo, current)) {\n                return previous.result;\n            }\n        }\n        const result = merge(existing, incoming, makeMergeFieldFunctionOptions(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,\n            fieldName: field.name.value,\n            field,\n            variables: context.variables,\n            path,\n        }, context, storage || {}, existingData));\n        if (streamInfo) {\n            streamInfo.previous = {\n                incoming,\n                streamFieldInfo: streamInfo.current,\n                result,\n            };\n        }\n        return result;\n    }\n}\nfunction makeFieldFunctionOptions(policies, objectOrReference, fieldSpec, context, storage) {\n    const storeFieldName = policies.getStoreFieldName(fieldSpec);\n    const fieldName = fieldNameFromStoreName(storeFieldName);\n    const variables = fieldSpec.variables || context.variables;\n    const { toReference, canRead } = context.store;\n    return {\n        args: argsFromFieldSpecifier(fieldSpec),\n        field: fieldSpec.field || null,\n        fieldName,\n        storeFieldName,\n        variables,\n        isReference,\n        toReference,\n        storage,\n        cache: policies.cache,\n        canRead,\n        readField(...args) {\n            return policies.readField(normalizeReadFieldOptions(args, objectOrReference, variables), context);\n        },\n        mergeObjects: makeMergeObjectsFunction(context.store),\n    };\n}\nfunction makeMergeFieldFunctionOptions(policies, objectOrReference, fieldSpec, context, storage, existingData) {\n    const options = {\n        ...makeFieldFunctionOptions(policies, objectOrReference, fieldSpec, context, storage),\n        extensions: context.extensions,\n        existingData,\n    };\n    const extensions = context.extensions;\n    if (extensions && streamInfoSymbol in extensions) {\n        const { [streamInfoSymbol]: streamInfo, ...otherExtensions } = extensions;\n        const streamFieldInfo = streamInfo?.deref()?.peekArray(fieldSpec.path);\n        if (streamFieldInfo) {\n            options.streamFieldInfo = streamFieldInfo.current;\n        }\n        // If the only key in `extensions` was the stream details key, we didn't\n        // receive any remote extensions, so we reset extensions back to undefined\n        options.extensions =\n            Object.keys(otherExtensions).length === 0 ? undefined : otherExtensions;\n    }\n    return options;\n}\nexport function normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables) {\n    const { 0: fieldNameOrOptions, 1: from, length: argc } = readFieldArgs;\n    let 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 = { ...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 (__DEV__ && options.from === void 0) {\n        __DEV__ && invariant.warn(111, 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(112);\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            const eType = store.getFieldValue(existing, \"__typename\");\n            const iType = store.getFieldValue(incoming, \"__typename\");\n            const 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 { ...existing, ...incoming };\n            }\n        }\n        return incoming;\n    };\n}\n//# sourceMappingURL=policies.js.map\n","import { getStoreKeyName } from \"./getStoreKeyName.js\";\nimport { valueToObjectRepresentation } from \"./valueToObjectRepresentation.js\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function storeKeyNameFromField(field, variables) {\n    let directivesObj = null;\n    if (field.directives) {\n        directivesObj = {};\n        field.directives.forEach((directive) => {\n            directivesObj[directive.name.value] = {};\n            if (directive.arguments) {\n                directive.arguments.forEach(({ name, value }) => valueToObjectRepresentation(directivesObj[directive.name.value], name, value, variables));\n            }\n        });\n    }\n    let argObj = null;\n    if (field.arguments && field.arguments.length) {\n        argObj = {};\n        field.arguments.forEach(({ name, value }) => valueToObjectRepresentation(argObj, name, value, variables));\n    }\n    return getStoreKeyName(field.name.value, argObj, directivesObj);\n}\n//# sourceMappingURL=storeKeyNameFromField.js.map\n","export class MissingFieldError extends Error {\n    message;\n    path;\n    query;\n    variables;\n    constructor(message, path, query, variables) {\n        // 'Error' breaks prototype chain here\n        super(message);\n        this.message = message;\n        this.path = path;\n        this.query = query;\n        this.variables = variables;\n        this.name = \"MissingFieldError\";\n        if (Array.isArray(this.path)) {\n            this.missing = this.message;\n            for (let i = this.path.length - 1; i >= 0; --i) {\n                this.missing = { [this.path[i]]: this.missing };\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    }\n    missing;\n}\n//# sourceMappingURL=common.js.map","import { Kind } from \"graphql\";\nimport { wrap } from \"optimism\";\nimport { addTypenameToDocument, cacheSizes, canonicalStringify, isReference, } from \"@apollo/client/utilities\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { compact, DeepMerger, getDefaultValues, getFragmentFromSelection, getMainDefinition, getQueryDefinition, isArray, isField, isNonNullObject, makeReference, maybeDeepFreeze, mergeDeepArray, resultKeyNameFromField, shouldInclude, } from \"@apollo/client/utilities/internal\";\nimport { invariant, newInvariantError, } from \"@apollo/client/utilities/invariant\";\nimport { MissingFieldError } from \"../core/types/common.js\";\nimport { maybeDependOnExistenceOfEntity, supportsResultCaching, } from \"./entityStore.js\";\nimport { extractFragmentContext, getTypenameFromStoreObject, } from \"./helpers.js\";\nfunction execSelectionSetKeyArgs(options) {\n    return [options.selectionSet, options.objectOrReference, options.context];\n}\nexport class StoreReader {\n    // cached version of executeSelectionSet\n    executeSelectionSet;\n    // cached version of executeSubSelectedArray\n    executeSubSelectedArray;\n    config;\n    knownResults = new WeakMap();\n    constructor(config) {\n        this.config = config;\n        // memoized functions in this class will be \"garbage-collected\"\n        // by recreating the whole `StoreReader` in\n        // `InMemoryCache.resetResultsCache`\n        // (triggered from `InMemoryCache.gc` with `resetResultCache: true`)\n        this.executeSelectionSet = wrap((options) => {\n            const peekArgs = execSelectionSetKeyArgs(options);\n            const other = this.executeSelectionSet.peek(...peekArgs);\n            if (other) {\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: cacheSizes[\"inMemoryCache.executeSelectionSet\"] ||\n                50000 /* defaultCacheSizes[\"inMemoryCache.executeSelectionSet\"] */,\n            keyArgs: execSelectionSetKeyArgs,\n            // Note that the parameters of makeCacheKey are determined by the\n            // array returned by keyArgs.\n            makeCacheKey(selectionSet, parent, context) {\n                if (supportsResultCaching(context.store)) {\n                    return context.store.makeCacheKey(selectionSet, isReference(parent) ? parent.__ref : parent, context.varString);\n                }\n            },\n        });\n        this.executeSubSelectedArray = wrap((options) => {\n            maybeDependOnExistenceOfEntity(options.context.store, options.enclosingRef.__ref);\n            return this.execSubSelectedArrayImpl(options);\n        }, {\n            max: cacheSizes[\"inMemoryCache.executeSubSelectedArray\"] ||\n                10000 /* defaultCacheSizes[\"inMemoryCache.executeSubSelectedArray\"] */,\n            makeCacheKey({ field, array, context }) {\n                if (supportsResultCaching(context.store)) {\n                    return context.store.makeCacheKey(field, array, context.varString);\n                }\n            },\n        });\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    diffQueryAgainstStore({ store, query, rootId = \"ROOT_QUERY\", variables, returnPartialData = true, }) {\n        const policies = this.config.cache.policies;\n        variables = compact(getDefaultValues(getQueryDefinition(query)), variables);\n        const rootRef = makeReference(rootId);\n        const execResult = this.executeSelectionSet({\n            selectionSet: getMainDefinition(query).selectionSet,\n            objectOrReference: rootRef,\n            enclosingRef: rootRef,\n            context: {\n                store,\n                query,\n                policies,\n                variables,\n                varString: canonicalStringify(variables),\n                ...extractFragmentContext(query, this.config.fragments),\n            },\n        });\n        let missing;\n        if (execResult.missing) {\n            missing = new MissingFieldError(firstMissing(execResult.missing), execResult.missing, query, variables);\n        }\n        const complete = !missing;\n        const { result } = execResult;\n        return {\n            result: complete ? result\n                : returnPartialData ?\n                    Object.keys(result).length === 0 ?\n                        null\n                        : result\n                    : null,\n            complete,\n            missing,\n        };\n    }\n    isFresh(result, parent, selectionSet, context) {\n        if (supportsResultCaching(context.store) &&\n            this.knownResults.get(result) === selectionSet) {\n            const latest = this.executeSelectionSet.peek(selectionSet, parent, context);\n            if (latest && result === latest.result) {\n                return true;\n            }\n        }\n        return false;\n    }\n    // Uncached version of executeSelectionSet.\n    execSelectionSetImpl({ selectionSet, objectOrReference, enclosingRef, context, }) {\n        if (isReference(objectOrReference) &&\n            !context.policies.rootTypenamesById[objectOrReference.__ref] &&\n            !context.store.has(objectOrReference.__ref)) {\n            return {\n                result: {},\n                missing: `Dangling reference to missing ${objectOrReference.__ref} object`,\n            };\n        }\n        const { variables, policies, store } = context;\n        const typename = store.getFieldValue(objectOrReference, \"__typename\");\n        const objectsToMerge = [];\n        let missing;\n        const missingMerger = new DeepMerger();\n        if (typeof typename === \"string\" && !policies.rootIdsByTypename[typename]) {\n            // Ensure we always include a default value for the __typename\n            // field, if we have one. Note that this field can be overridden by other\n            // merged objects.\n            objectsToMerge.push({ __typename: typename });\n        }\n        function handleMissing(result, resultName) {\n            if (result.missing) {\n                missing = missingMerger.merge(missing, {\n                    [resultName]: result.missing,\n                });\n            }\n            return result.result;\n        }\n        const workSet = new Set(selectionSet.selections);\n        workSet.forEach((selection) => {\n            // Omit fields with directives @skip(if: <truthy value>) or\n            // @include(if: <falsy value>).\n            if (!shouldInclude(selection, variables))\n                return;\n            if (isField(selection)) {\n                let fieldValue = policies.readField({\n                    fieldName: selection.name.value,\n                    field: selection,\n                    variables: context.variables,\n                    from: objectOrReference,\n                }, context);\n                const resultName = resultKeyNameFromField(selection);\n                if (fieldValue === void 0) {\n                    if (!addTypenameToDocument.added(selection)) {\n                        missing = missingMerger.merge(missing, {\n                            [resultName]: `Can't find field '${selection.name.value}' on ${isReference(objectOrReference) ?\n                                objectOrReference.__ref + \" object\"\n                                : \"object \" + JSON.stringify(objectOrReference, null, 2)}`,\n                        });\n                    }\n                }\n                else if (isArray(fieldValue)) {\n                    if (fieldValue.length > 0) {\n                        fieldValue = handleMissing(this.executeSubSelectedArray({\n                            field: selection,\n                            array: fieldValue,\n                            enclosingRef,\n                            context,\n                        }), resultName);\n                    }\n                }\n                else if (!selection.selectionSet) {\n                    // do nothing\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,\n                    }), resultName);\n                }\n                if (fieldValue !== void 0) {\n                    objectsToMerge.push({ [resultName]: fieldValue });\n                }\n            }\n            else {\n                const fragment = getFragmentFromSelection(selection, context.lookupFragment);\n                if (!fragment && selection.kind === Kind.FRAGMENT_SPREAD) {\n                    throw newInvariantError(113, selection.name.value);\n                }\n                if (fragment && policies.fragmentMatches(fragment, typename)) {\n                    fragment.selectionSet.selections.forEach(workSet.add, workSet);\n                }\n            }\n        });\n        const result = mergeDeepArray(objectsToMerge);\n        const finalResult = { result, missing };\n        const frozen = 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    execSubSelectedArrayImpl({ field, array, enclosingRef, context, }) {\n        let missing;\n        let missingMerger = new DeepMerger();\n        function handleMissing(childResult, i) {\n            if (childResult.missing) {\n                missing = missingMerger.merge(missing, { [i]: childResult.missing });\n            }\n            return childResult.result;\n        }\n        if (field.selectionSet) {\n            array = array.filter((item) => item === undefined || context.store.canRead(item));\n        }\n        array = array.map((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,\n                    array: item,\n                    enclosingRef,\n                    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,\n                }), i);\n            }\n            if (__DEV__) {\n                assertSelectionSetForIdValue(context.store, field, item);\n            }\n            return item;\n        });\n        return {\n            result: array,\n            missing,\n        };\n    }\n}\nfunction firstMissing(tree) {\n    try {\n        JSON.stringify(tree, (_, 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        const workSet = new Set([fieldValue]);\n        workSet.forEach((value) => {\n            if (isNonNullObject(value)) {\n                invariant(\n                    !isReference(value),\n                    114,\n                    getTypenameFromStoreObject(store, value),\n                    field.name.value\n                );\n                Object.values(value).forEach(workSet.add, workSet);\n            }\n        });\n    }\n}\n//# sourceMappingURL=readFromStore.js.map\n","import { DeepMerger } from \"./DeepMerger.js\";\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.\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function mergeDeepArray(sources) {\n    let target = sources[0] || {};\n    const count = sources.length;\n    if (count > 1) {\n        const merger = new DeepMerger();\n        for (let i = 1; i < count; ++i) {\n            target = merger.merge(target, sources[i]);\n        }\n    }\n    return target;\n}\n//# sourceMappingURL=mergeDeepArray.js.map\n","import { equal } from \"@wry/equality\";\nimport { Trie } from \"@wry/trie\";\nimport { Kind } from \"graphql\";\nimport { addTypenameToDocument, canonicalStringify, isReference, } from \"@apollo/client/utilities\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { argumentsObjectFromField, cloneDeep, getDefaultValues, getFragmentFromSelection, getOperationDefinition, isArray, isField, isNonEmptyArray, makeReference, resultKeyNameFromField, shouldInclude, streamInfoSymbol, } from \"@apollo/client/utilities/internal\";\nimport { invariant, newInvariantError, } from \"@apollo/client/utilities/invariant\";\nimport { extractFragmentContext, fieldNameFromStoreName, makeProcessedFieldsMerger, storeValueIsStoreObject, } from \"./helpers.js\";\nimport { defaultStreamFieldMergeFn, 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    const key = `${clientOnly}${deferred}`;\n    let flavored = context.flavors.get(key);\n    if (!flavored) {\n        context.flavors.set(key, (flavored =\n            context.clientOnly === clientOnly && context.deferred === deferred ?\n                context\n                : {\n                    ...context,\n                    clientOnly,\n                    deferred,\n                }));\n    }\n    return flavored;\n}\nexport class StoreWriter {\n    cache;\n    reader;\n    fragments;\n    constructor(cache, reader, fragments) {\n        this.cache = cache;\n        this.reader = reader;\n        this.fragments = fragments;\n    }\n    writeToStore(store, { query, result, dataId, variables, overwrite, extensions, }) {\n        const operationDefinition = getOperationDefinition(query);\n        const merger = makeProcessedFieldsMerger();\n        variables = {\n            ...getDefaultValues(operationDefinition),\n            ...variables,\n        };\n        const context = {\n            store,\n            written: {},\n            merge(existing, incoming) {\n                return merger.merge(existing, incoming);\n            },\n            variables: variables,\n            varString: canonicalStringify(variables),\n            ...extractFragmentContext(query, this.fragments),\n            overwrite: !!overwrite,\n            incomingById: new Map(),\n            clientOnly: false,\n            deferred: false,\n            flavors: new Map(),\n            extensions,\n        };\n        const ref = this.processSelectionSet({\n            result: result || {},\n            dataId,\n            selectionSet: operationDefinition.selectionSet,\n            mergeTree: { map: new Map() },\n            context,\n            path: [],\n        });\n        if (!isReference(ref)) {\n            throw newInvariantError(115, 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(({ storeObject, mergeTree, fieldNodeSet }, dataId) => {\n            const entityRef = makeReference(dataId);\n            if (mergeTree && mergeTree.map.size) {\n                const 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 (__DEV__ && !context.overwrite) {\n                const fieldsWithSelectionSets = {};\n                fieldNodeSet.forEach((field) => {\n                    if (field.selectionSet) {\n                        fieldsWithSelectionSets[field.name.value] = true;\n                    }\n                });\n                const hasSelectionSet = (storeFieldName) => fieldsWithSelectionSets[fieldNameFromStoreName(storeFieldName)] ===\n                    true;\n                const hasMergeFunction = (storeFieldName) => {\n                    const childTree = mergeTree && mergeTree.map.get(storeFieldName);\n                    return Boolean(childTree && childTree.info && childTree.info.merge);\n                };\n                Object.keys(storeObject).forEach((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(storeFieldName) &&\n                        !hasMergeFunction(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    processSelectionSet({ dataId, result, selectionSet, context, \n    // This object allows processSelectionSet to report useful information\n    // to its callers without explicitly returning that information.\n    mergeTree, path: currentPath, }) {\n        const { policies } = this.cache;\n        // This variable will be repeatedly updated using context.merge to\n        // accumulate all fields that need to be written into the store.\n        let incoming = {};\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        const 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        const readField = (...args) => {\n            const options = normalizeReadFieldOptions(args, incoming, context.variables);\n            if (isReference(options.from)) {\n                const info = context.incomingById.get(options.from.__ref);\n                if (info) {\n                    const result = policies.readField({\n                        ...options,\n                        from: info.storeObject,\n                    }, context);\n                    if (result !== void 0) {\n                        return result;\n                    }\n                }\n            }\n            return policies.readField(options, context);\n        };\n        const 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((context, field) => {\n            const resultFieldKey = resultKeyNameFromField(field);\n            const value = result[resultFieldKey];\n            const path = [...currentPath, field.name.value];\n            fieldNodeSet.add(field);\n            if (value !== void 0) {\n                const storeFieldName = policies.getStoreFieldName({\n                    typename,\n                    fieldName: field.name.value,\n                    field,\n                    variables: context.variables,\n                });\n                const childTree = getChildMergeTree(mergeTree, storeFieldName);\n                let 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, path);\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                let childTypename;\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                const 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,\n                        typename,\n                        merge,\n                        path,\n                    };\n                }\n                else if (context.extensions?.[streamInfoSymbol] &&\n                    Array.isArray(incomingValue) &&\n                    hasStreamDirective(field)) {\n                    childTree.info = {\n                        field,\n                        typename,\n                        merge: defaultStreamFieldMergeFn,\n                        path,\n                    };\n                }\n                else {\n                    maybeRecycleChildMergeTree(mergeTree, storeFieldName);\n                }\n                incoming = context.merge(incoming, {\n                    [storeFieldName]: incomingValue,\n                });\n            }\n            else if (__DEV__ &&\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                invariant.error(116, 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            const [id, keyObject] = policies.identify(result, {\n                typename,\n                selectionSet,\n                fragmentMap: context.fragmentMap,\n                storeObject: incoming,\n                readField,\n            });\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            const 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            const 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            const previous = context.incomingById.get(dataId);\n            if (previous) {\n                previous.storeObject = context.merge(previous.storeObject, incoming);\n                previous.mergeTree = mergeMergeTrees(previous.mergeTree, mergeTree);\n                fieldNodeSet.forEach((field) => previous.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,\n                });\n            }\n            return dataRef;\n        }\n        return incoming;\n    }\n    processFieldValue(value, field, context, mergeTree, path) {\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 __DEV__ ? cloneDeep(value) : value;\n        }\n        if (isArray(value)) {\n            return value.map((item, i) => {\n                const value = this.processFieldValue(item, field, context, getChildMergeTree(mergeTree, i), [...path, i]);\n                maybeRecycleChildMergeTree(mergeTree, i);\n                return value;\n            });\n        }\n        return this.processSelectionSet({\n            result: value,\n            selectionSet: field.selectionSet,\n            context,\n            mergeTree,\n            path,\n        });\n    }\n    // Implements https://spec.graphql.org/draft/#sec-Field-Collection, but with\n    // some additions for tracking @client and @defer directives.\n    flattenFields(selectionSet, result, context, typename = getTypenameFromResult(result, selectionSet, context.fragmentMap)) {\n        const fieldMap = new Map();\n        const { policies } = this.cache;\n        const limitingTrie = new Trie(false); // No need for WeakMap, since limitingTrie does not escape.\n        (function flatten(selectionSet, inheritedContext) {\n            const 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((selection) => {\n                if (!shouldInclude(selection, context.variables))\n                    return;\n                let { clientOnly, deferred } = inheritedContext;\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((dir) => {\n                        const name = dir.name.value;\n                        if (name === \"client\")\n                            clientOnly = true;\n                        if (name === \"defer\") {\n                            const 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                    const 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                    const fragment = getFragmentFromSelection(selection, context.lookupFragment);\n                    if (!fragment && selection.kind === Kind.FRAGMENT_SPREAD) {\n                        throw newInvariantError(117, 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    applyMerges(mergeTree, existing, incoming, context, getStorageArgs) {\n        if (mergeTree.map.size && !isReference(incoming)) {\n            const e = \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            const i = 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 && !getStorageArgs) {\n                getStorageArgs = [isReference(e) ? e.__ref : e];\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            let changedFields;\n            const getValue = (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((childTree, storeFieldName) => {\n                const eVal = getValue(e, storeFieldName);\n                const iVal = getValue(i, 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                const aVal = this.applyMerges(childTree, eVal, iVal, context, getStorageArgs);\n                if (aVal !== iVal) {\n                    changedFields = changedFields || new Map();\n                    changedFields.set(storeFieldName, aVal);\n                }\n                if (getStorageArgs) {\n                    invariant(getStorageArgs.pop() === storeFieldName);\n                }\n            });\n            if (changedFields) {\n                // Shallow clone i so we can add changed fields to it.\n                incoming = (isArray(i) ? i.slice(0) : { ...i });\n                changedFields.forEach((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 && context.store.getStorage(...getStorageArgs));\n        }\n        return incoming;\n    }\n}\nconst emptyMergeTreePool = [];\nfunction getChildMergeTree({ map }, name) {\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    const info = left.info && right.info ?\n        {\n            ...left.info,\n            ...right.info,\n        }\n        : left.info || right.info;\n    const needToMergeMaps = left.map.size && right.map.size;\n    const map = needToMergeMaps ? new Map()\n        : left.map.size ? left.map\n            : right.map;\n    const merged = { info, map };\n    if (needToMergeMaps) {\n        const remainingRightKeys = new Set(right.map.keys());\n        left.map.forEach((leftTree, key) => {\n            merged.map.set(key, mergeMergeTrees(leftTree, right.map.get(key)));\n            remainingRightKeys.delete(key);\n        });\n        remainingRightKeys.forEach((key) => {\n            merged.map.set(key, mergeMergeTrees(right.map.get(key), left.map.get(key)));\n        });\n    }\n    return merged;\n}\nfunction hasStreamDirective(field) {\n    return (!!field.directives &&\n        field.directives.some((directive) => directive.name.value === \"stream\"));\n}\nfunction mergeTreeIsEmpty(tree) {\n    return !tree || !(tree.info || tree.map.size);\n}\nfunction maybeRecycleChildMergeTree({ map }, name) {\n    const childTree = map.get(name);\n    if (childTree && mergeTreeIsEmpty(childTree)) {\n        emptyMergeTreePool.push(childTree);\n        map.delete(name);\n    }\n}\nconst 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    const getChild = (objOrRef) => {\n        const child = store.getFieldValue(objOrRef, storeFieldName);\n        return typeof child === \"object\" && child;\n    };\n    const existing = getChild(existingRef);\n    if (!existing)\n        return;\n    const 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((key) => store.getFieldValue(incoming, key) !== void 0)) {\n        return;\n    }\n    const parentType = store.getFieldValue(existingRef, \"__typename\") ||\n        store.getFieldValue(incomingObj, \"__typename\");\n    const fieldName = fieldNameFromStoreName(storeFieldName);\n    const typeDotName = `${parentType}.${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    const 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((child) => {\n            const typename = store.getFieldValue(child, \"__typename\");\n            if (typeof typename === \"string\" && !childTypenames.includes(typename)) {\n                childTypenames.push(typename);\n            }\n        });\n    }\n    __DEV__ && invariant.warn(118, 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, Array.isArray(existing) ? [...existing] : { ...existing }, Array.isArray(incoming) ? [...incoming] : { ...incoming });\n}\nfunction getTypenameFromResult(result, selectionSet, fragmentMap) {\n    let fragments;\n    for (const selection of selectionSet.selections) {\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 (const selection of fragments) {\n            const typename = getTypenameFromResult(result, getFragmentFromSelection(selection, fragmentMap).selectionSet, fragmentMap);\n            if (typeof typename === \"string\") {\n                return typename;\n            }\n        }\n    }\n}\n//# sourceMappingURL=writeToStore.js.map\n","import { equal } from \"@wry/equality\";\nimport { wrap } from \"optimism\";\nimport { addTypenameToDocument, cacheSizes, canonicalStringify, DocumentTransform, isReference, print, } from \"@apollo/client/utilities\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { getInMemoryCacheMemoryInternals } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nimport { ApolloCache } from \"../core/cache.js\";\nimport { EntityStore, supportsResultCaching } from \"./entityStore.js\";\nimport { hasOwn, normalizeConfig } from \"./helpers.js\";\nimport { Policies } from \"./policies.js\";\nimport { forgetCache, makeVar, recallCache } from \"./reactiveVars.js\";\nimport { StoreReader } from \"./readFromStore.js\";\nimport { StoreWriter } from \"./writeToStore.js\";\nexport class InMemoryCache extends ApolloCache {\n    data;\n    optimisticData;\n    config;\n    watches = new Set();\n    storeReader;\n    storeWriter;\n    addTypenameTransform = new DocumentTransform(addTypenameToDocument);\n    maybeBroadcastWatch;\n    // Override the default value, since InMemoryCache result objects are frozen\n    // in development and expected to remain logically immutable in production.\n    assumeImmutableResults = true;\n    // Dynamically imported code can augment existing typePolicies or\n    // possibleTypes by calling cache.policies.addTypePolicies or\n    // cache.policies.addPossibletypes.\n    policies;\n    makeVar = makeVar;\n    constructor(config = {}) {\n        super();\n        this.config = normalizeConfig(config);\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    }\n    init() {\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        const 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    resetResultCache() {\n        const { fragments } = this.config;\n        this.addTypenameTransform.resetCache();\n        fragments?.resetCaches();\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({ cache: this, fragments })), fragments);\n        this.maybeBroadcastWatch = wrap((c, options) => {\n            return this.broadcastWatch(c, options);\n        }, {\n            max: cacheSizes[\"inMemoryCache.maybeBroadcastWatch\"] ||\n                5000 /* defaultCacheSizes[\"inMemoryCache.maybeBroadcastWatch\"] */,\n            makeCacheKey: (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                const store = c.optimistic ? this.optimisticData : this.data;\n                if (supportsResultCaching(store)) {\n                    const { optimistic, id, variables } = c;\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, id, 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((group) => group.resetCaching());\n    }\n    restore(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    extract(optimistic = false) {\n        return (optimistic ? this.optimisticData : this.data).extract();\n    }\n    read(options) {\n        const { \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 = false, } = options;\n        return this.storeReader.diffQueryAgainstStore({\n            ...options,\n            store: options.optimistic ? this.optimisticData : this.data,\n            config: this.config,\n            returnPartialData,\n        }).result;\n    }\n    write(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    modify(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        const 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, false);\n        }\n        finally {\n            if (!--this.txCount && options.broadcast !== false) {\n                this.broadcastWatches();\n            }\n        }\n    }\n    diff(options) {\n        return this.storeReader.diffQueryAgainstStore({\n            ...options,\n            store: options.optimistic ? this.optimisticData : this.data,\n            rootId: options.id || \"ROOT_QUERY\",\n            config: this.config,\n        });\n    }\n    watch(watch) {\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 () => {\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    gc(options) {\n        canonicalStringify.reset();\n        print.reset();\n        const ids = this.optimisticData.gc();\n        if (options && !this.txCount && options.resetResultCache) {\n            this.resetResultCache();\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    retain(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    release(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    identify(object) {\n        if (isReference(object))\n            return object.__ref;\n        try {\n            return this.policies.identify(object)[0];\n        }\n        catch (e) {\n            __DEV__ && invariant.warn(e);\n        }\n    }\n    evict(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 = { ...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    reset(options) {\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((watch) => 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    removeOptimistic(idToRemove) {\n        const newOptimisticData = this.optimisticData.removeLayer(idToRemove);\n        if (newOptimisticData !== this.optimisticData) {\n            this.optimisticData = newOptimisticData;\n            this.broadcastWatches();\n        }\n    }\n    txCount = 0;\n    /**\n    * Executes multiple cache operations as a single batch, ensuring that\n    * watchers are only notified once after all operations complete. This is\n    * useful for improving performance when making multiple cache updates, as it\n    * prevents unnecessary re-renders or query refetches between individual\n    * operations.\n    * \n    * The `batch` method supports both optimistic and non-optimistic updates, and\n    * provides fine-grained control over which cache layer receives the updates\n    * and when watchers are notified.\n    * \n    * For usage instructions, see [Interacting with cached data: `cache.batch`](https://www.apollographql.com/docs/react/caching/cache-interaction#using-cachebatch).\n    * \n    * @example\n    * \n    * ```js\n    * cache.batch({\n    *   update(cache) {\n    *     cache.writeQuery({\n    *       query: GET_TODOS,\n    *       data: { todos: updatedTodos },\n    *     });\n    *     cache.evict({ id: \"Todo:123\" });\n    *   },\n    * });\n    * ```\n    * \n    * @example\n    * \n    * ```js\n    * // Optimistic update with a custom layer ID\n    * cache.batch({\n    *   optimistic: \"add-todo-optimistic\",\n    *   update(cache) {\n    *     cache.modify({\n    *       fields: {\n    *         todos(existing = []) {\n    *           return [...existing, newTodoRef];\n    *         },\n    *       },\n    *     });\n    *   },\n    * });\n    * ```\n    * \n    * @returns The return value of the `update` function.\n    */\n    batch(options) {\n        const { update, optimistic = true, removeOptimistic, onWatchUpdated, } = options;\n        let updateResult;\n        const perform = (layer) => {\n            const { data, optimisticData } = this;\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        const 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({\n                ...options,\n                onWatchUpdated(watch) {\n                    alreadyDirty.add(watch);\n                    return false;\n                },\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({\n                ...options,\n                onWatchUpdated(watch, diff) {\n                    const 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            });\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((watch) => 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    performTransaction(update, optimisticId) {\n        return this.batch({\n            update,\n            optimistic: optimisticId || optimisticId !== null,\n        });\n    }\n    transformDocument(document) {\n        return this.addTypenameTransform.transformDocument(this.addFragmentsToDocument(document));\n    }\n    fragmentMatches(fragment, typename) {\n        return this.policies.fragmentMatches(fragment, typename);\n    }\n    lookupFragment(fragmentName) {\n        return this.config.fragments?.lookup(fragmentName) || null;\n    }\n    resolvesClientField(typename, fieldName) {\n        return !!this.policies.getReadFunction(typename, fieldName);\n    }\n    broadcastWatches(options) {\n        if (!this.txCount) {\n            const prevOnAfter = this.onAfterBroadcast;\n            const callbacks = new Set();\n            this.onAfterBroadcast = (cb) => {\n                callbacks.add(cb);\n            };\n            try {\n                this.watches.forEach((c) => this.maybeBroadcastWatch(c, options));\n                callbacks.forEach((cb) => cb());\n            }\n            finally {\n                this.onAfterBroadcast = prevOnAfter;\n            }\n        }\n    }\n    addFragmentsToDocument(document) {\n        const { fragments } = this.config;\n        return fragments ? fragments.transform(document) : 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    broadcastWatch(c, options) {\n        const { lastDiff } = c;\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        const 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}\nif (__DEV__) {\n    InMemoryCache.prototype.getMemoryInternals = getInMemoryCacheMemoryInternals;\n}\n//# sourceMappingURL=inMemoryCache.js.map\n","import { EMPTY } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nimport { isFunction } from './util/isFunction';\nexport var NotificationKind;\n(function (NotificationKind) {\n    NotificationKind[\"NEXT\"] = \"N\";\n    NotificationKind[\"ERROR\"] = \"E\";\n    NotificationKind[\"COMPLETE\"] = \"C\";\n})(NotificationKind || (NotificationKind = {}));\nvar Notification = (function () {\n    function Notification(kind, value, error) {\n        this.kind = kind;\n        this.value = value;\n        this.error = error;\n        this.hasValue = kind === 'N';\n    }\n    Notification.prototype.observe = function (observer) {\n        return observeNotification(this, observer);\n    };\n    Notification.prototype.do = function (nextHandler, errorHandler, completeHandler) {\n        var _a = this, kind = _a.kind, value = _a.value, error = _a.error;\n        return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler();\n    };\n    Notification.prototype.accept = function (nextOrObserver, error, complete) {\n        var _a;\n        return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next)\n            ? this.observe(nextOrObserver)\n            : this.do(nextOrObserver, error, complete);\n    };\n    Notification.prototype.toObservable = function () {\n        var _a = this, kind = _a.kind, value = _a.value, error = _a.error;\n        var result = kind === 'N'\n            ?\n                of(value)\n            :\n                kind === 'E'\n                    ?\n                        throwError(function () { return error; })\n                    :\n                        kind === 'C'\n                            ?\n                                EMPTY\n                            :\n                                0;\n        if (!result) {\n            throw new TypeError(\"Unexpected notification kind \" + kind);\n        }\n        return result;\n    };\n    Notification.createNext = function (value) {\n        return new Notification('N', value);\n    };\n    Notification.createError = function (err) {\n        return new Notification('E', undefined, err);\n    };\n    Notification.createComplete = function () {\n        return Notification.completeNotification;\n    };\n    Notification.completeNotification = new Notification('C');\n    return Notification;\n}());\nexport { Notification };\nexport function observeNotification(notification, observer) {\n    var _a, _b, _c;\n    var _d = notification, kind = _d.kind, value = _d.value, error = _d.error;\n    if (typeof kind !== 'string') {\n        throw new TypeError('Invalid notification, missing \"kind\"');\n    }\n    kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer);\n}\n//# sourceMappingURL=Notification.js.map","import { BREAK, visit } from \"graphql\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function hasDirectives(names, root, all) {\n    const nameSet = new Set(names);\n    const uniqueCount = nameSet.size;\n    visit(root, {\n        Directive(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}\n//# sourceMappingURL=hasDirectives.js.map\n","import { hasDirectives } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nexport class NotImplementedHandler {\n    isIncrementalResult(_) {\n        return false;\n    }\n    prepareRequest(request) {\n        invariant(!hasDirectives([\"defer\", \"stream\"], request.query), 67);\n        return request;\n    }\n    extractErrors() { }\n    // This code path can never be reached, so we won't implement it.\n    startRequest = undefined;\n}\n//# sourceMappingURL=notImplemented.js.map\n","import { ApolloLink } from \"./ApolloLink.js\";\nexport const execute = ApolloLink.execute;\n//# sourceMappingURL=execute.js.map","import { visit } from \"graphql\";\nexport function removeMaskedFragmentSpreads(document) {\n    return visit(document, {\n        FragmentSpread(node) {\n            if (!node.directives?.some(({ name }) => name.value === \"unmask\")) {\n                return null;\n            }\n        },\n    });\n}\n//# sourceMappingURL=removeFragmentSpreads.js.map","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nexport function throwError(errorOrErrorFactory, scheduler) {\n    var errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; };\n    var init = function (subscriber) { return subscriber.error(errorFactory()); };\n    return new Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init);\n}\n//# sourceMappingURL=throwError.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent) {\n    if (concurrent === void 0) { concurrent = Infinity; }\n    if (isFunction(resultSelector)) {\n        return mergeMap(function (a, i) { return map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom(project(a, i))); }, concurrent);\n    }\n    else if (typeof resultSelector === 'number') {\n        concurrent = resultSelector;\n    }\n    return operate(function (source, subscriber) { return mergeInternals(source, subscriber, project, concurrent); });\n}\n//# sourceMappingURL=mergeMap.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n    var buffer = [];\n    var active = 0;\n    var index = 0;\n    var isComplete = false;\n    var checkComplete = function () {\n        if (isComplete && !buffer.length && !active) {\n            subscriber.complete();\n        }\n    };\n    var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); };\n    var doInnerSub = function (value) {\n        expand && subscriber.next(value);\n        active++;\n        var innerComplete = false;\n        innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function (innerValue) {\n            onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n            if (expand) {\n                outerNext(innerValue);\n            }\n            else {\n                subscriber.next(innerValue);\n            }\n        }, function () {\n            innerComplete = true;\n        }, undefined, function () {\n            if (innerComplete) {\n                try {\n                    active--;\n                    var _loop_1 = function () {\n                        var bufferedValue = buffer.shift();\n                        if (innerSubScheduler) {\n                            executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); });\n                        }\n                        else {\n                            doInnerSub(bufferedValue);\n                        }\n                    };\n                    while (buffer.length && active < concurrent) {\n                        _loop_1();\n                    }\n                    checkComplete();\n                }\n                catch (err) {\n                    subscriber.error(err);\n                }\n            }\n        }));\n    };\n    source.subscribe(createOperatorSubscriber(subscriber, outerNext, function () {\n        isComplete = true;\n        checkComplete();\n    }));\n    return function () {\n        additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n    };\n}\n//# sourceMappingURL=mergeInternals.js.map","import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay) {\n    if (delay === void 0) { delay = 0; }\n    return operate(function (source, subscriber) {\n        subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay));\n    });\n}\n//# sourceMappingURL=subscribeOn.js.map","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n    if (!input) {\n        throw new Error('Iterable cannot be null');\n    }\n    return new Observable(function (subscriber) {\n        executeSchedule(subscriber, scheduler, function () {\n            var iterator = input[Symbol.asyncIterator]();\n            executeSchedule(subscriber, scheduler, function () {\n                iterator.next().then(function (result) {\n                    if (result.done) {\n                        subscriber.complete();\n                    }\n                    else {\n                        subscriber.next(result.value);\n                    }\n                });\n            }, 0, true);\n        });\n    });\n}\n//# sourceMappingURL=scheduleAsyncIterable.js.map","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n    return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n//# sourceMappingURL=from.js.map","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n    if (input != null) {\n        if (isInteropObservable(input)) {\n            return scheduleObservable(input, scheduler);\n        }\n        if (isArrayLike(input)) {\n            return scheduleArray(input, scheduler);\n        }\n        if (isPromise(input)) {\n            return schedulePromise(input, scheduler);\n        }\n        if (isAsyncIterable(input)) {\n            return scheduleAsyncIterable(input, scheduler);\n        }\n        if (isIterable(input)) {\n            return scheduleIterable(input, scheduler);\n        }\n        if (isReadableStreamLike(input)) {\n            return scheduleReadableStreamLike(input, scheduler);\n        }\n    }\n    throw createInvalidObservableTypeError(input);\n}\n//# sourceMappingURL=scheduled.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n    return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=scheduleObservable.js.map","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n    return new Observable(function (subscriber) {\n        var i = 0;\n        return scheduler.schedule(function () {\n            if (i === input.length) {\n                subscriber.complete();\n            }\n            else {\n                subscriber.next(input[i++]);\n                if (!subscriber.closed) {\n                    this.schedule();\n                }\n            }\n        });\n    });\n}\n//# sourceMappingURL=scheduleArray.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n    return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=schedulePromise.js.map","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n    return new Observable(function (subscriber) {\n        var iterator;\n        executeSchedule(subscriber, scheduler, function () {\n            iterator = input[Symbol_iterator]();\n            executeSchedule(subscriber, scheduler, function () {\n                var _a;\n                var value;\n                var done;\n                try {\n                    (_a = iterator.next(), value = _a.value, done = _a.done);\n                }\n                catch (err) {\n                    subscriber.error(err);\n                    return;\n                }\n                if (done) {\n                    subscriber.complete();\n                }\n                else {\n                    subscriber.next(value);\n                }\n            }, 0, true);\n        });\n        return function () { return isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); };\n    });\n}\n//# sourceMappingURL=scheduleIterable.js.map","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n    return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n//# sourceMappingURL=scheduleReadableStreamLike.js.map","import { createErrorClass } from './createErrorClass';\nexport var EmptyError = createErrorClass(function (_super) {\n    return function EmptyErrorImpl() {\n        _super(this);\n        this.name = 'EmptyError';\n        this.message = 'no elements in sequence';\n    };\n});\n//# sourceMappingURL=EmptyError.js.map","import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n    return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n    return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n    return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n    return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n//# sourceMappingURL=args.js.map","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of() {\n    var args = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        args[_i] = arguments[_i];\n    }\n    var scheduler = popScheduler(args);\n    return from(args, scheduler);\n}\n//# sourceMappingURL=of.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n    return operate(function (source, subscriber) {\n        var innerSub = null;\n        var syncUnsub = false;\n        var handledResult;\n        innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) {\n            handledResult = innerFrom(selector(err, catchError(selector)(source)));\n            if (innerSub) {\n                innerSub.unsubscribe();\n                innerSub = null;\n                handledResult.subscribe(subscriber);\n            }\n            else {\n                syncUnsub = true;\n            }\n        }));\n        if (syncUnsub) {\n            innerSub.unsubscribe();\n            innerSub = null;\n            handledResult.subscribe(subscriber);\n        }\n    });\n}\n//# sourceMappingURL=catchError.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n    return operate(function (source, subscriber) {\n        var index = 0;\n        source.subscribe(createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); }));\n    });\n}\n//# sourceMappingURL=filter.js.map","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat() {\n    var args = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        args[_i] = arguments[_i];\n    }\n    return concatAll()(from(args, popScheduler(args)));\n}\n//# sourceMappingURL=concat.js.map","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent) {\n    if (concurrent === void 0) { concurrent = Infinity; }\n    return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n    return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map","const registry = new WeakSet();\n/**\n* @internal Please do not use directly.\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function registerLinkError(error) {\n    registry.add(error);\n}\n/**\n * A facade error type that keeps a registry of errors emitted from the link\n * chain. `LinkError` is not an error class itself but rather a utility to\n * detect whether an error originated from the link chain.\n *\n * @remarks\n *\n * Use `LinkError` to distinguish between errors from the link chain and custom\n * errors. This is helpful for retrying an operation at the call site only when\n * the error originates from the link chain.\n *\n * @example\n *\n * The following example creates a custom wrapped query function that detects\n * whether the query includes an operation name and throws if not.\n *\n * ```ts\n * import { LinkError } from \"@apollo/client/errors\";\n *\n * async function runQuery<TData>(query: TypedDocumentNode<TData>) {\n *   if (!hasOperationName(query)) {\n *     throw new Error(\"Queries should have operation names.\");\n *   }\n *\n *   return client.watchQuery({ query });\n * }\n *\n * try {\n *   const result = await runQuery(query);\n * } catch (error) {\n *   // Only log the error if the error wasn't our own custom thrown error\n *   if (LinkError.is(error)) {\n *     console.log(\"Got network error:\", error.message);\n *   }\n * }\n * ```\n */\nexport const LinkError = {\n    /**\n     * A method that determines whether an error originated from the link chain.\n     * `is` does not provide any type narrowing.\n     *\n     * @example\n     *\n     * ```ts\n     * if (LinkError.is(error)) {\n     *   // The error originated from the link chain\n     *   console.log(\"Got network error:\", error.message);\n     * }\n     * ```\n     */\n    is: (error) => registry.has(error),\n};\n//# sourceMappingURL=LinkError.js.map\n","import { Kind } from \"graphql\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { maybeDeepFreeze, resultKeyNameFromField, } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nimport { disableWarningsSlot, getFragmentMaskMode } from \"./utils.js\";\nexport function maskDefinition(data, selectionSet, context) {\n    return disableWarningsSlot.withValue(true, () => {\n        const masked = maskSelectionSet(data, selectionSet, context, false);\n        if (Object.isFrozen(data)) {\n            maybeDeepFreeze(masked);\n        }\n        return masked;\n    });\n}\nfunction getMutableTarget(data, mutableTargets) {\n    if (mutableTargets.has(data)) {\n        return mutableTargets.get(data);\n    }\n    const mutableTarget = Array.isArray(data) ? [] : {};\n    mutableTargets.set(data, mutableTarget);\n    return mutableTarget;\n}\nfunction maskSelectionSet(data, selectionSet, context, migration, path) {\n    const { knownChanged } = context;\n    const memo = getMutableTarget(data, context.mutableTargets);\n    if (Array.isArray(data)) {\n        for (const [index, item] of Array.from(data.entries())) {\n            if (item === null) {\n                memo[index] = null;\n                continue;\n            }\n            const masked = maskSelectionSet(item, selectionSet, context, migration, __DEV__ ? `${path || \"\"}[${index}]` : void 0);\n            if (knownChanged.has(masked)) {\n                knownChanged.add(memo);\n            }\n            memo[index] = masked;\n        }\n        return knownChanged.has(memo) ? memo : data;\n    }\n    for (const selection of selectionSet.selections) {\n        let value;\n        // we later want to add accessor warnings to the final result\n        // so we need a new object to add the accessor warning to\n        if (migration) {\n            knownChanged.add(memo);\n        }\n        if (selection.kind === Kind.FIELD) {\n            const keyName = resultKeyNameFromField(selection);\n            const childSelectionSet = selection.selectionSet;\n            value = memo[keyName] || data[keyName];\n            if (value === void 0) {\n                continue;\n            }\n            if (childSelectionSet && value !== null) {\n                const masked = maskSelectionSet(data[keyName], childSelectionSet, context, migration, __DEV__ ? `${path || \"\"}.${keyName}` : void 0);\n                if (knownChanged.has(masked)) {\n                    value = masked;\n                }\n            }\n            if (!__DEV__) {\n                memo[keyName] = value;\n            }\n            if (__DEV__) {\n                if (migration &&\n                    keyName !== \"__typename\" &&\n                    // either the field is not present in the memo object\n                    // or it has a `get` descriptor, not a `value` descriptor\n                    // => it is a warning accessor and we can overwrite it\n                    // with another accessor\n                    !Object.getOwnPropertyDescriptor(memo, keyName)?.value) {\n                    Object.defineProperty(memo, keyName, getAccessorWarningDescriptor(keyName, value, path || \"\", context.operationName, context.operationType));\n                }\n                else {\n                    delete memo[keyName];\n                    memo[keyName] = value;\n                }\n            }\n        }\n        if (selection.kind === Kind.INLINE_FRAGMENT &&\n            (!selection.typeCondition ||\n                context.cache.fragmentMatches(selection, data.__typename))) {\n            value = maskSelectionSet(data, selection.selectionSet, context, migration, path);\n        }\n        if (selection.kind === Kind.FRAGMENT_SPREAD) {\n            const fragmentName = selection.name.value;\n            const fragment = context.fragmentMap[fragmentName] ||\n                (context.fragmentMap[fragmentName] =\n                    context.cache.lookupFragment(fragmentName));\n            invariant(fragment, 39, fragmentName);\n            const mode = getFragmentMaskMode(selection);\n            if (mode !== \"mask\") {\n                value = maskSelectionSet(data, fragment.selectionSet, context, mode === \"migrate\", path);\n            }\n        }\n        if (knownChanged.has(value)) {\n            knownChanged.add(memo);\n        }\n    }\n    if (\"__typename\" in data && !(\"__typename\" in memo)) {\n        memo.__typename = data.__typename;\n    }\n    // This check prevents cases where masked fields may accidentally be\n    // returned as part of this object when the fragment also selects\n    // additional fields from the same child selection.\n    if (Object.keys(memo).length !== Object.keys(data).length) {\n        knownChanged.add(memo);\n    }\n    return knownChanged.has(memo) ? memo : data;\n}\nfunction getAccessorWarningDescriptor(fieldName, value, path, operationName, operationType) {\n    let getValue = () => {\n        if (disableWarningsSlot.getValue()) {\n            return value;\n        }\n        __DEV__ && invariant.warn(40, operationName ?\n            `${operationType} '${operationName}'`\n            : `anonymous ${operationType}`, `${path}.${fieldName}`.replace(/^\\./, \"\"));\n        getValue = () => value;\n        return value;\n    };\n    return {\n        get() {\n            return getValue();\n        },\n        set(newValue) {\n            getValue = () => newValue;\n        },\n        enumerable: true,\n        configurable: true,\n    };\n}\n//# sourceMappingURL=maskDefinition.js.map\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//# sourceMappingURL=isNetworkRequestSettled.js.map","/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function graphQLResultHasError(result) {\n    return !!result.errors?.length;\n}\n//# sourceMappingURL=graphQLResultHasError.js.map\n","import { Observable } from \"rxjs\";\nexport function filterMap(fn, makeContext = () => undefined) {\n    return (source) => new Observable((subscriber) => {\n        let context = makeContext();\n        return source.subscribe({\n            next(value) {\n                let result;\n                try {\n                    result = fn(value, context);\n                }\n                catch (e) {\n                    subscriber.error(e);\n                }\n                if (result === undefined) {\n                    return;\n                }\n                subscriber.next(result);\n            },\n            error(err) {\n                subscriber.error(err);\n            },\n            complete() {\n                subscriber.complete();\n            },\n        });\n    });\n}\n//# sourceMappingURL=filterMap.js.map","/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function toQueryResult(value) {\n    const result = {\n        data: value.data,\n    };\n    if (value.error) {\n        result.error = value.error;\n    }\n    return result;\n}\n//# sourceMappingURL=toQueryResult.js.map\n","import { Kind, visit } from \"graphql\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nimport { checkDocument } from \"./checkDocument.js\";\nimport { createFragmentMap } from \"./createFragmentMap.js\";\nimport { getFragmentDefinition } from \"./getFragmentDefinition.js\";\nimport { getFragmentDefinitions } from \"./getFragmentDefinitions.js\";\nimport { getOperationDefinition } from \"./getOperationDefinition.js\";\nimport { isArray } from \"./isArray.js\";\nimport { isNonEmptyArray } from \"./isNonEmptyArray.js\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\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    const getInUseByOperationName = makeInUseGetterFunction(\"\");\n    const getInUseByFragmentName = makeInUseGetterFunction(\"\");\n    const getInUse = (ancestors) => {\n        for (let p = 0, ancestor; 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        invariant.error(14);\n        return null;\n    };\n    let operationCount = 0;\n    for (let i = doc.definitions.length - 1; i >= 0; --i) {\n        if (doc.definitions[i].kind === Kind.OPERATION_DEFINITION) {\n            ++operationCount;\n        }\n    }\n    const directiveMatcher = getDirectiveMatcher(directives);\n    const shouldRemoveField = (nodeDirectives) => isNonEmptyArray(nodeDirectives) &&\n        nodeDirectives\n            .map(directiveMatcher)\n            .some((config) => config && config.remove);\n    const 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    let firstVisitMadeChanges = false;\n    const fieldOrInlineFragmentVisitor = {\n        enter(node) {\n            if (shouldRemoveField(node.directives)) {\n                firstVisitMadeChanges = true;\n                return null;\n            }\n        },\n    };\n    const 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() {\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(node, _key, _parent, _path, ancestors) {\n                const inUse = getInUse(ancestors);\n                if (inUse) {\n                    inUse.variables.add(node.name.value);\n                }\n            },\n        },\n        FragmentSpread: {\n            enter(node, _key, _parent, _path, ancestors) {\n                if (shouldRemoveField(node.directives)) {\n                    firstVisitMadeChanges = true;\n                    return null;\n                }\n                const 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(node, _key, _parent, path) {\n                originalFragmentDefsByPath.set(JSON.stringify(path), node);\n            },\n            leave(node, _key, _parent, path) {\n                const 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((selection) => selection.kind === Kind.FIELD &&\n                        selection.name.value === \"__typename\")) {\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(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    const populateTransitiveVars = (inUse) => {\n        if (!inUse.transitiveVars) {\n            inUse.transitiveVars = new Set(inUse.variables);\n            if (!inUse.removed) {\n                inUse.fragmentSpreads.forEach((childFragmentName) => {\n                    populateTransitiveVars(getInUseByFragmentName(childFragmentName)).transitiveVars.forEach((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    const allFragmentNamesUsed = new Set();\n    docWithoutDirectiveSubtrees.definitions.forEach((def) => {\n        if (def.kind === Kind.OPERATION_DEFINITION) {\n            populateTransitiveVars(getInUseByOperationName(def.name && def.name.value)).fragmentSpreads.forEach((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((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((childFragmentName) => {\n            allFragmentNamesUsed.add(childFragmentName);\n        });\n    });\n    const fragmentWillBeRemoved = (fragmentName) => !!(\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    const enterVisitor = {\n        enter(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(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                    const usedVariableNames = 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.size < node.variableDefinitions.length) {\n                        return {\n                            ...node,\n                            variableDefinitions: node.variableDefinitions.filter((varDef) => usedVariableNames.has(varDef.variable.name.value)),\n                        };\n                    }\n                }\n            },\n        },\n    }));\n}\nfunction makeInUseGetterFunction(defaultKey) {\n    const map = new Map();\n    return function inUseGetterFunction(key = defaultKey) {\n        let 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}\nfunction getDirectiveMatcher(configs) {\n    const names = new Map();\n    const tests = new Map();\n    configs.forEach((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 (directive) => {\n        let config = names.get(directive.name.value);\n        if (!config && tests.size) {\n            tests.forEach((testConfig, test) => {\n                if (test(directive)) {\n                    config = testConfig;\n                }\n            });\n        }\n        return config;\n    };\n}\nfunction isEmpty(op, fragmentMap) {\n    return (!op ||\n        op.selectionSet.selections.every((selection) => selection.kind === Kind.FRAGMENT_SPREAD &&\n            isEmpty(fragmentMap[selection.name.value], fragmentMap)));\n}\nfunction nullIfDocIsEmpty(doc) {\n    return (isEmpty(getOperationDefinition(doc) || getFragmentDefinition(doc), createFragmentMap(getFragmentDefinitions(doc)))) ?\n        null\n        : doc;\n}\n//# sourceMappingURL=removeDirectivesFromDocument.js.map\n","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nvar BehaviorSubject = (function (_super) {\n    __extends(BehaviorSubject, _super);\n    function BehaviorSubject(_value) {\n        var _this = _super.call(this) || this;\n        _this._value = _value;\n        return _this;\n    }\n    Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n        get: function () {\n            return this.getValue();\n        },\n        enumerable: false,\n        configurable: true\n    });\n    BehaviorSubject.prototype._subscribe = function (subscriber) {\n        var subscription = _super.prototype._subscribe.call(this, subscriber);\n        !subscription.closed && subscriber.next(this._value);\n        return subscription;\n    };\n    BehaviorSubject.prototype.getValue = function () {\n        var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value;\n        if (hasError) {\n            throw thrownError;\n        }\n        this._throwIfClosed();\n        return _value;\n    };\n    BehaviorSubject.prototype.next = function (value) {\n        _super.prototype.next.call(this, (this._value = value));\n    };\n    return BehaviorSubject;\n}(Subject));\nexport { BehaviorSubject };\n//# sourceMappingURL=BehaviorSubject.js.map","import { equal } from \"@wry/equality\";\nimport { BehaviorSubject, filter, Observable, share, Subject, tap } from \"rxjs\";\nimport { isNetworkRequestInFlight, isNetworkRequestSettled, } from \"@apollo/client/utilities\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { compact, equalByQuery, extensionsSymbol, filterMap, getOperationDefinition, getOperationName, getQueryDefinition, preventUnhandledRejection, toQueryResult, variablesUnknownSymbol, } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nimport { NetworkStatus } from \"./networkStatus.js\";\nconst { assign, hasOwnProperty } = Object;\nconst uninitialized = {\n    loading: true,\n    networkStatus: NetworkStatus.loading,\n    data: undefined,\n    dataState: \"empty\",\n    partial: true,\n};\nconst empty = {\n    loading: false,\n    networkStatus: NetworkStatus.ready,\n    data: undefined,\n    dataState: \"empty\",\n    partial: true,\n};\nexport class ObservableQuery {\n    options;\n    queryName;\n    variablesUnknown = false;\n    /**\n    * @internal will be read and written from `QueryInfo`\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    _lastWrite;\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 query() {\n        return this.lastQuery;\n    }\n    /**\n     * An object containing the variables that were provided for the query.\n     */\n    get variables() {\n        return this.options.variables;\n    }\n    unsubscribeFromCache;\n    input;\n    subject;\n    isTornDown;\n    queryManager;\n    subscriptions = new Set();\n    /**\n     * If an `ObservableQuery` is created with a `network-only` fetch policy,\n     * it should actually start receiving cache updates, but not before it has\n     * received the first result from the network.\n     */\n    waitForNetworkResult;\n    lastQuery;\n    linkSubscription;\n    pollingInfo;\n    get networkStatus() {\n        return this.subject.getValue().result.networkStatus;\n    }\n    get cache() {\n        return this.queryManager.cache;\n    }\n    constructor({ queryManager, options, transformedQuery = queryManager.transform(options.query), }) {\n        this.queryManager = queryManager;\n        // active state\n        this.waitForNetworkResult = options.fetchPolicy === \"network-only\";\n        this.isTornDown = false;\n        this.subscribeToMore = this.subscribeToMore.bind(this);\n        this.maskResult = this.maskResult.bind(this);\n        const { watchQuery: { fetchPolicy: defaultFetchPolicy = \"cache-first\" } = {}, } = queryManager.defaultOptions;\n        const { fetchPolicy = defaultFetchPolicy, \n        // Make sure we don't store \"standby\" as the initialFetchPolicy.\n        initialFetchPolicy = fetchPolicy === \"standby\" ? defaultFetchPolicy : (fetchPolicy), } = options;\n        if (options[variablesUnknownSymbol]) {\n            invariant(fetchPolicy === \"standby\", 82);\n            this.variablesUnknown = true;\n        }\n        this.lastQuery = transformedQuery;\n        this.options = {\n            ...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,\n            // This ensures this.options.fetchPolicy always has a string value, in\n            // case options.fetchPolicy was not provided.\n            fetchPolicy,\n            variables: this.getVariablesWithDefaults(options.variables),\n        };\n        this.initializeObservablesQueue();\n        this[\"@@observable\"] = () => this;\n        if (Symbol.observable) {\n            this[Symbol.observable] = () => this;\n        }\n        const opDef = getOperationDefinition(this.query);\n        this.queryName = opDef && opDef.name && opDef.name.value;\n    }\n    initializeObservablesQueue() {\n        this.subject = new BehaviorSubject({\n            query: this.query,\n            variables: this.variables,\n            result: uninitialized,\n            meta: {},\n        });\n        const observable = this.subject.pipe(tap({\n            subscribe: () => {\n                if (!this.subject.observed) {\n                    this.reobserve();\n                    // TODO: See if we can rework updatePolling to better handle this.\n                    // reobserve calls updatePolling but this `subscribe` callback is\n                    // called before the subject is subscribed to so `updatePolling`\n                    // can't accurately detect if there is an active subscription.\n                    // Calling it again here ensures that it can detect if it can poll\n                    setTimeout(() => this.updatePolling());\n                }\n            },\n            unsubscribe: () => {\n                if (!this.subject.observed) {\n                    this.tearDownQuery();\n                }\n            },\n        }), filterMap(({ query, variables, result: current, meta }, context) => {\n            const { shouldEmit } = meta;\n            if (current === uninitialized) {\n                // reset internal state after `ObservableQuery.reset()`\n                context.previous = undefined;\n                context.previousVariables = undefined;\n            }\n            if (this.options.fetchPolicy === \"standby\" ||\n                shouldEmit === 2 /* EmitBehavior.never */)\n                return;\n            if (shouldEmit === 1 /* EmitBehavior.force */)\n                return emit();\n            const { previous, previousVariables } = context;\n            if (previous) {\n                const documentInfo = this.queryManager.getDocumentInfo(query);\n                const dataMasking = this.queryManager.dataMasking;\n                const maskedQuery = dataMasking ? documentInfo.nonReactiveQuery : query;\n                const resultIsEqual = dataMasking || documentInfo.hasNonreactiveDirective ?\n                    equalByQuery(maskedQuery, previous, current, variables)\n                    : equal(previous, current);\n                if (resultIsEqual && equal(previousVariables, variables)) {\n                    return;\n                }\n            }\n            if (shouldEmit === 3 /* EmitBehavior.networkStatusChange */ &&\n                (!this.options.notifyOnNetworkStatusChange ||\n                    equal(previous, current))) {\n                return;\n            }\n            return emit();\n            function emit() {\n                context.previous = current;\n                context.previousVariables = variables;\n                return current;\n            }\n        }, () => ({})));\n        this.pipe = observable.pipe.bind(observable);\n        this.subscribe = observable.subscribe.bind(observable);\n        this.input = new Subject();\n        // we want to feed many streams into `this.subject`, but none of them should\n        // be able to close `this.input`\n        this.input.complete = () => { };\n        this.input.pipe(this.operator).subscribe(this.subject);\n    }\n    // We can't use Observable['subscribe'] here as the type as it conflicts with\n    // the ability to infer T from Subscribable<T>. This limits the surface area\n    // to the non-deprecated signature which works properly with type inference.\n    /**\n     * Subscribes to the `ObservableQuery`.\n     * @param observerOrNext - Either an RxJS `Observer` with some or all callback methods,\n     * or the `next` handler that is called for each value emitted from the subscribed Observable.\n     * @returns A subscription reference to the registered handlers.\n     */\n    subscribe;\n    /**\n     * Used to stitch together functional operators into a chain.\n     *\n     * @example\n     *\n     * ```ts\n     * import { filter, map } from 'rxjs';\n     *\n     * observableQuery\n     *   .pipe(\n     *     filter(...),\n     *     map(...),\n     *   )\n     *   .subscribe(x => console.log(x));\n     * ```\n     *\n     * @returns The Observable result of all the operators having been called\n     * in the order they were passed in.\n     */\n    pipe;\n    [Symbol.observable];\n    [\"@@observable\"];\n    /**\n    * @internal\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    getCacheDiff({ optimistic = true } = {}) {\n        return this.cache.diff({\n            query: this.query,\n            variables: this.variables,\n            returnPartialData: true,\n            optimistic,\n        });\n    }\n    getInitialResult(initialFetchPolicy) {\n        let fetchPolicy = initialFetchPolicy || this.options.fetchPolicy;\n        if (this.queryManager.prioritizeCacheValues &&\n            (fetchPolicy === \"network-only\" || fetchPolicy === \"cache-and-network\")) {\n            fetchPolicy = \"cache-first\";\n        }\n        const cacheResult = () => {\n            const diff = this.getCacheDiff();\n            // TODO: queryInfo.getDiff should handle this since cache.diff returns a\n            // null when returnPartialData is false\n            const data = this.options.returnPartialData || diff.complete ?\n                diff.result ?? undefined\n                : undefined;\n            return this.maskResult({\n                data,\n                dataState: diff.complete ? \"complete\"\n                    : data === undefined ? \"empty\"\n                        : \"partial\",\n                loading: !diff.complete,\n                networkStatus: diff.complete ? NetworkStatus.ready : NetworkStatus.loading,\n                partial: !diff.complete,\n            });\n        };\n        switch (fetchPolicy) {\n            case \"cache-only\": {\n                return {\n                    ...cacheResult(),\n                    loading: false,\n                    networkStatus: NetworkStatus.ready,\n                };\n            }\n            case \"cache-first\":\n                return cacheResult();\n            case \"cache-and-network\":\n                return {\n                    ...cacheResult(),\n                    loading: true,\n                    networkStatus: NetworkStatus.loading,\n                };\n            case \"standby\":\n                return empty;\n            default:\n                return uninitialized;\n        }\n    }\n    resubscribeCache() {\n        const { variables, fetchPolicy } = this.options;\n        const query = this.query;\n        const shouldUnsubscribe = fetchPolicy === \"standby\" ||\n            fetchPolicy === \"no-cache\" ||\n            this.waitForNetworkResult;\n        const shouldResubscribe = !isEqualQuery({ query, variables }, this.unsubscribeFromCache) &&\n            !this.waitForNetworkResult;\n        if (shouldUnsubscribe || shouldResubscribe) {\n            this.unsubscribeFromCache?.();\n        }\n        if (shouldUnsubscribe || !shouldResubscribe) {\n            return;\n        }\n        const watch = {\n            query,\n            variables,\n            optimistic: true,\n            watcher: this,\n            callback: (diff) => {\n                const info = this.queryManager.getDocumentInfo(query);\n                if (info.hasClientExports || info.hasForcedResolvers) {\n                    // If this is not set to something different than `diff`, we will\n                    // not be notified about future cache changes with an equal `diff`.\n                    // That would be the case if we are working with client-only fields\n                    // that are forced or with `exports` fields that might change, causing\n                    // local resolvers to return a new result.\n                    // This is based on an implementation detail of `InMemoryCache`, which\n                    // is not optimal - but the only alternative to this would be to\n                    // resubscribe to the cache asynchonouly, which would bear the risk of\n                    // missing further synchronous updates.\n                    watch.lastDiff = undefined;\n                }\n                if (watch.lastOwnDiff === diff) {\n                    // skip cache updates that were caused by our own writes\n                    return;\n                }\n                const { result: previousResult } = this.subject.getValue();\n                if (!diff.complete &&\n                    // If we are trying to deliver an incomplete cache result, we avoid\n                    // reporting it if the query has errored, otherwise we let the broadcast try\n                    // and repair the partial result by refetching the query. This check avoids\n                    // a situation where a query that errors and another succeeds with\n                    // overlapping data does not report the partial data result to the errored\n                    // query.\n                    //\n                    // See https://github.com/apollographql/apollo-client/issues/11400 for more\n                    // information on this issue.\n                    (previousResult.error ||\n                        // Prevent to schedule a notify directly after the `ObservableQuery`\n                        // has been `reset` (which will set the `previousResult` to `uninitialized` or `empty`)\n                        // as in those cases, `resetCache` will manually call `refetch` with more intentional timing.\n                        previousResult === uninitialized ||\n                        previousResult === empty)) {\n                    return;\n                }\n                if (!equal(previousResult.data, diff.result)) {\n                    this.scheduleNotify();\n                }\n            },\n        };\n        const cancelWatch = this.cache.watch(watch);\n        this.unsubscribeFromCache = Object.assign(() => {\n            this.unsubscribeFromCache = undefined;\n            cancelWatch();\n        }, { query, variables });\n    }\n    stableLastResult;\n    getCurrentResult() {\n        const { result: current } = this.subject.getValue();\n        let value = (\n        // if the `current` result is in an error state, we will always return that\n        // error state, even if we have no observers\n        (current.networkStatus === NetworkStatus.error ||\n            // if we have observers, we are watching the cache and\n            // this.subject.getValue() will always be up to date\n            this.hasObservers() || // if we are using a `no-cache` fetch policy in which case this\n        // `ObservableQuery` cannot have been updated from the outside - in\n        // that case, we prefer to keep the current value\n        this.options.fetchPolicy === \"no-cache\")) ?\n            current\n            // otherwise, the `current` value might be outdated due to missed\n            // external updates - calculate it again\n            : this.getInitialResult();\n        if (value === uninitialized) {\n            value = this.getInitialResult();\n        }\n        if (!equal(this.stableLastResult, value)) {\n            this.stableLastResult = value;\n        }\n        return this.stableLastResult;\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     * Returns a `ResultPromise` with an additional `.retain()` method. Calling\n     * `.retain()` keeps the network operation running even if the `ObservableQuery`\n     * no longer requires the result.\n     *\n     * Note: `refetch()` guarantees that a value will be emitted from the\n     * observable, even if the result is deep equal to the previous value.\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    refetch(variables) {\n        const { fetchPolicy } = this.options;\n        const 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        if (fetchPolicy === \"no-cache\") {\n            reobserveOptions.fetchPolicy = \"no-cache\";\n        }\n        else {\n            reobserveOptions.fetchPolicy = \"network-only\";\n        }\n        if (__DEV__ && variables && hasOwnProperty.call(variables, \"variables\")) {\n            const queryDef = getQueryDefinition(this.query);\n            const vars = queryDef.variableDefinitions;\n            if (!vars || !vars.some((v) => v.variable.name.value === \"variables\")) {\n                __DEV__ && invariant.warn(83, variables, queryDef.name?.value || queryDef);\n            }\n        }\n        if (variables && !equal(this.variables, variables)) {\n            // Update the existing options with new variables\n            reobserveOptions.variables = this.options.variables =\n                this.getVariablesWithDefaults({ ...this.variables, ...variables });\n        }\n        this._lastWrite = undefined;\n        return this._reobserve(reobserveOptions, {\n            newNetworkStatus: NetworkStatus.refetch,\n        });\n    }\n    fetchMore({ query, variables, context, errorPolicy, updateQuery, }) {\n        invariant(\n            this.options.fetchPolicy !== \"cache-only\",\n            84,\n            getOperationName(this.query, \"(anonymous)\")\n        );\n        const combinedOptions = {\n            ...compact(this.options, { errorPolicy: \"none\" }, {\n                query,\n                context,\n                errorPolicy,\n            }),\n            variables: (query ? variables : ({\n                ...this.variables,\n                ...variables,\n            })),\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            notifyOnNetworkStatusChange: this.options.notifyOnNetworkStatusChange,\n        };\n        combinedOptions.query = this.transformDocument(combinedOptions.query);\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            query ?\n                this.transformDocument(this.options.query)\n                : combinedOptions.query;\n        let wasUpdated = false;\n        const isCached = this.options.fetchPolicy !== \"no-cache\";\n        if (!isCached) {\n            invariant(updateQuery, 85);\n        }\n        const { finalize, pushNotification } = this.pushOperation(NetworkStatus.fetchMore);\n        pushNotification({\n            source: \"newNetworkStatus\",\n            kind: \"N\",\n            value: {},\n        }, { shouldEmit: 3 /* EmitBehavior.networkStatusChange */ });\n        const { promise, operator } = getTrackingOperatorPromise();\n        const { observable } = this.queryManager.fetchObservableWithInfo(combinedOptions, { networkStatus: NetworkStatus.fetchMore, exposeExtensions: true });\n        const subscription = observable\n            .pipe(operator, filter((notification) => notification.kind === \"N\" && notification.source === \"network\"))\n            .subscribe({\n            next: (notification) => {\n                wasUpdated = false;\n                const fetchMoreResult = notification.value;\n                const extensions = fetchMoreResult[extensionsSymbol];\n                if (isNetworkRequestSettled(notification.value.networkStatus)) {\n                    finalize();\n                }\n                if (isCached) {\n                    // Separately getting a diff here before the batch - `onWatchUpdated` might be\n                    // called with an `undefined` `lastDiff` on the watcher if the cache was just subscribed to.\n                    const lastDiff = this.getCacheDiff();\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.cache.batch({\n                        update: (cache) => {\n                            if (updateQuery) {\n                                cache.updateQuery({\n                                    query: this.query,\n                                    variables: this.variables,\n                                    returnPartialData: true,\n                                    optimistic: false,\n                                    extensions,\n                                }, (previous) => updateQuery(previous, {\n                                    fetchMoreResult: fetchMoreResult.data,\n                                    variables: combinedOptions.variables,\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                                    extensions,\n                                });\n                            }\n                        },\n                        onWatchUpdated: (watch, diff) => {\n                            if (watch.watcher === this &&\n                                !equal(diff.result, lastDiff.result)) {\n                                wasUpdated = true;\n                                const lastResult = this.getCurrentResult();\n                                // Let the cache watch from resubscribeCache handle the final\n                                // result\n                                if (isNetworkRequestInFlight(fetchMoreResult.networkStatus)) {\n                                    pushNotification({\n                                        kind: \"N\",\n                                        source: \"network\",\n                                        value: {\n                                            ...lastResult,\n                                            networkStatus: (fetchMoreResult.networkStatus ===\n                                                NetworkStatus.error) ?\n                                                NetworkStatus.ready\n                                                : fetchMoreResult.networkStatus,\n                                            // will be overwritten anyways, just here for types sake\n                                            loading: false,\n                                            data: diff.result,\n                                            dataState: fetchMoreResult.dataState === \"streaming\" ?\n                                                \"streaming\"\n                                                : \"complete\",\n                                        },\n                                    });\n                                }\n                            }\n                        },\n                    });\n                }\n                else {\n                    // There is a possibility `lastResult` may not be set when\n                    // `fetchMore` is called which would cause this to crash. This should\n                    // only happen if we haven't previously reported a result. We don't\n                    // quite know what the right behavior should be here since this block\n                    // of code runs after the fetch result has executed on the network.\n                    // We plan to let it crash in the meantime.\n                    //\n                    // If we get bug reports due to the `data` property access on\n                    // undefined, this should give us a real-world scenario that we can\n                    // use to test against and determine the right behavior. If we do end\n                    // up changing this behavior, this may require, for example, an\n                    // adjustment to the types on `updateQuery` since that function\n                    // expects that the first argument always contains previous result\n                    // data, but not `undefined`.\n                    const lastResult = this.getCurrentResult();\n                    const data = updateQuery(lastResult.data, {\n                        fetchMoreResult: fetchMoreResult.data,\n                        variables: combinedOptions.variables,\n                    });\n                    pushNotification({\n                        kind: \"N\",\n                        value: {\n                            ...lastResult,\n                            networkStatus: NetworkStatus.ready,\n                            // will be overwritten anyways, just here for types sake\n                            loading: false,\n                            data: data,\n                            dataState: lastResult.dataState === \"streaming\" ?\n                                \"streaming\"\n                                : \"complete\",\n                        },\n                        source: \"network\",\n                    });\n                }\n            },\n        });\n        return preventUnhandledRejection(promise\n            .then((result) => toQueryResult(this.maskResult(result)))\n            .finally(() => {\n            subscription.unsubscribe();\n            finalize();\n            if (isCached && !wasUpdated) {\n                const lastResult = this.getCurrentResult();\n                if (lastResult.dataState === \"streaming\") {\n                    pushNotification({\n                        kind: \"N\",\n                        source: \"network\",\n                        value: {\n                            ...lastResult,\n                            dataState: \"complete\",\n                            networkStatus: NetworkStatus.ready,\n                        },\n                    });\n                }\n                else {\n                    pushNotification({\n                        kind: \"N\",\n                        source: \"newNetworkStatus\",\n                        value: {},\n                    }, { shouldEmit: 1 /* EmitBehavior.force */ });\n                }\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    /**\n     * A function that enables you to execute a [subscription](https://www.apollographql.com/docs/react/data/subscriptions/), usually to subscribe to specific fields that were included in the query.\n     *\n     * This function returns _another_ function that you can call to terminate the subscription.\n     */\n    subscribeToMore(options) {\n        const subscription = this.queryManager\n            .startGraphQLSubscription({\n            query: options.document,\n            variables: options.variables,\n            context: options.context,\n        })\n            .subscribe({\n            next: (subscriptionData) => {\n                const { updateQuery, onError } = options;\n                const { error } = subscriptionData;\n                if (error) {\n                    if (onError) {\n                        onError(error);\n                    }\n                    else {\n                        invariant.error(86, error);\n                    }\n                    return;\n                }\n                if (updateQuery) {\n                    this.updateQuery((previous, updateOptions) => updateQuery(previous, {\n                        subscriptionData: subscriptionData,\n                        ...updateOptions,\n                    }));\n                }\n            },\n        });\n        this.subscriptions.add(subscription);\n        return () => {\n            if (this.subscriptions.delete(subscription)) {\n                subscription.unsubscribe();\n            }\n        };\n    }\n    /**\n    * @internal\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    applyOptions(newOptions) {\n        const mergedOptions = compact(this.options, newOptions || {});\n        assign(this.options, mergedOptions);\n        this.updatePolling();\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: `setVariables()` guarantees that a value will be emitted from the\n     * observable, even if the result is deeply equal to the previous value.\n     *\n     * Note: the promise will resolve with the last emitted result\n     * when either the variables match the current variables or there\n     * are no subscribers to the query.\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    async setVariables(variables) {\n        variables = this.getVariablesWithDefaults(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 toQueryResult(this.getCurrentResult());\n        }\n        this.options.variables = variables;\n        // See comment above\n        if (!this.hasObservers()) {\n            return toQueryResult(this.getCurrentResult());\n        }\n        return this._reobserve({\n            // Reset options.fetchPolicy to its original value.\n            fetchPolicy: this.options.initialFetchPolicy,\n            variables,\n        }, { newNetworkStatus: NetworkStatus.setVariables });\n    }\n    /**\n     * A function that enables you to update the query's cached result without executing a followup GraphQL operation.\n     *\n     * See [using updateQuery and updateFragment](https://www.apollographql.com/docs/react/caching/cache-interaction/#using-updatequery-and-updatefragment) for additional information.\n     */\n    updateQuery(mapFn) {\n        const { queryManager } = this;\n        const { result, complete } = this.getCacheDiff({ optimistic: false });\n        const newResult = mapFn(result, {\n            variables: this.variables,\n            complete: !!complete,\n            previousData: result,\n        });\n        if (newResult) {\n            this.cache.writeQuery({\n                query: this.options.query,\n                data: newResult,\n                variables: this.variables,\n            });\n            queryManager.broadcastQueries();\n        }\n    }\n    /**\n     * A function that instructs the query to begin re-executing at a specified interval (in milliseconds).\n     */\n    startPolling(pollInterval) {\n        this.options.pollInterval = pollInterval;\n        this.updatePolling();\n    }\n    /**\n     * A function that instructs the query to stop polling after a previous call to `startPolling`.\n     */\n    stopPolling() {\n        this.options.pollInterval = 0;\n        this.updatePolling();\n    }\n    // Update options.fetchPolicy according to options.nextFetchPolicy.\n    applyNextFetchPolicy(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            const { fetchPolicy = \"cache-first\", initialFetchPolicy = fetchPolicy } = options;\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.reobserve.\n                options.fetchPolicy = options.nextFetchPolicy.call(options, fetchPolicy, { reason, options, observable: this, initialFetchPolicy });\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    fetch(options, networkStatus, fetchQuery, operator) {\n        // TODO Make sure we update the networkStatus (and infer fetchVariables)\n        // before actually committing to the fetch.\n        const initialFetchPolicy = this.options.fetchPolicy;\n        options.context ??= {};\n        let synchronouslyEmitted = false;\n        const onCacheHit = () => {\n            synchronouslyEmitted = true;\n        };\n        const fetchQueryOperator = // we cannot use `tap` here, since it allows only for a \"before subscription\"\n         \n        // hook with `subscribe` and we care for \"directly before and after subscription\"\n        (source) => new Observable((subscriber) => {\n            try {\n                return source.subscribe({\n                    next(value) {\n                        synchronouslyEmitted = true;\n                        subscriber.next(value);\n                    },\n                    error: (error) => subscriber.error(error),\n                    complete: () => subscriber.complete(),\n                });\n            }\n            finally {\n                if (!synchronouslyEmitted) {\n                    operation.override = networkStatus;\n                    this.input.next({\n                        kind: \"N\",\n                        source: \"newNetworkStatus\",\n                        value: {\n                            resetError: true,\n                        },\n                        query,\n                        variables,\n                        meta: {\n                            shouldEmit: 3 /* EmitBehavior.networkStatusChange */,\n                            /*\n                             * The moment this notification is emitted, `nextFetchPolicy`\n                             * might already have switched from a `network-only` to a\n                             * `cache-something` policy, so we want to ensure that the\n                             * loading state emit doesn't accidentally read from the cache\n                             * in those cases.\n                             */\n                            fetchPolicy: initialFetchPolicy,\n                        },\n                    });\n                }\n            }\n        });\n        let { observable, fromLink } = this.queryManager.fetchObservableWithInfo(options, {\n            networkStatus,\n            query: fetchQuery,\n            onCacheHit,\n            fetchQueryOperator,\n            observableQuery: this,\n        });\n        // track query and variables from the start of the operation\n        const { query, variables } = this;\n        const operation = {\n            abort: () => {\n                subscription.unsubscribe();\n            },\n            query,\n            variables,\n        };\n        this.activeOperations.add(operation);\n        let forceFirstValueEmit = networkStatus == NetworkStatus.refetch ||\n            networkStatus == NetworkStatus.setVariables;\n        observable = observable.pipe(operator, share());\n        const subscription = observable\n            .pipe(tap({\n            next: (notification) => {\n                if (notification.source === \"newNetworkStatus\" ||\n                    (notification.kind === \"N\" && notification.value.loading)) {\n                    operation.override = networkStatus;\n                }\n                else {\n                    delete operation.override;\n                }\n            },\n            finalize: () => this.activeOperations.delete(operation),\n        }))\n            .subscribe({\n            next: (value) => {\n                const meta = {};\n                if (forceFirstValueEmit &&\n                    value.kind === \"N\" &&\n                    \"loading\" in value.value &&\n                    !value.value.loading) {\n                    forceFirstValueEmit = false;\n                    meta.shouldEmit = 1 /* EmitBehavior.force */;\n                }\n                this.input.next({ ...value, query, variables, meta });\n            },\n        });\n        return { fromLink, subscription, observable };\n    }\n    // Turns polling on or off based on this.options.pollInterval.\n    didWarnCacheOnlyPolling = false;\n    updatePolling() {\n        // Avoid polling in SSR mode\n        if (this.queryManager.ssrMode) {\n            return;\n        }\n        const { pollingInfo, options: { fetchPolicy, pollInterval }, } = this;\n        const shouldCancelPolling = () => {\n            const { options } = this;\n            return (!options.pollInterval ||\n                !this.hasObservers() ||\n                options.fetchPolicy === \"cache-only\" ||\n                options.fetchPolicy === \"standby\");\n        };\n        if (shouldCancelPolling()) {\n            if (__DEV__) {\n                if (!this.didWarnCacheOnlyPolling &&\n                    pollInterval &&\n                    fetchPolicy === \"cache-only\") {\n                    __DEV__ && invariant.warn(87, getOperationName(this.query, \"(anonymous)\"));\n                    this.didWarnCacheOnlyPolling = true;\n                }\n            }\n            this.cancelPolling();\n            return;\n        }\n        if (pollingInfo?.interval === pollInterval) {\n            return;\n        }\n        const info = pollingInfo || (this.pollingInfo = {});\n        info.interval = pollInterval;\n        const maybeFetch = () => {\n            // defense against options changing after the setTimeout changes in case\n            // the call site forgets to call cancelPolling\n            if (shouldCancelPolling()) {\n                return this.cancelPolling();\n            }\n            if (this.pollingInfo) {\n                if (!isNetworkRequestInFlight(this.networkStatus) &&\n                    !this.options.skipPollAttempt?.()) {\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                    }, {\n                        newNetworkStatus: NetworkStatus.poll,\n                    }).then(poll, poll);\n                }\n                else {\n                    poll();\n                }\n            }\n        };\n        const poll = () => {\n            const info = this.pollingInfo;\n            if (info) {\n                clearTimeout(info.timeout);\n                info.timeout = setTimeout(maybeFetch, info.interval);\n            }\n        };\n        poll();\n    }\n    // This differs from stopPolling in that it does not set pollInterval to 0\n    cancelPolling() {\n        if (this.pollingInfo) {\n            clearTimeout(this.pollingInfo.timeout);\n            delete this.pollingInfo;\n        }\n    }\n    /**\n     * Reevaluate the query, optionally against new options. New options will be\n     * merged with the current options when given.\n     *\n     * Note: `variables` can be reset back to their defaults (typically empty) by calling `reobserve` with\n     * `variables: undefined`.\n     */\n    reobserve(newOptions) {\n        return this._reobserve(newOptions);\n    }\n    _reobserve(newOptions, internalOptions) {\n        this.isTornDown = false;\n        let { newNetworkStatus } = internalOptions || {};\n        this.queryManager.obsQueries.add(this);\n        const useDisposableObservable = \n        // Refetching uses a disposable Observable to allow refetches using different\n        // options, without permanently altering the options of the\n        // original ObservableQuery.\n        newNetworkStatus === NetworkStatus.refetch ||\n            // Polling uses a disposable Observable 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        const oldVariables = this.variables;\n        const oldFetchPolicy = this.options.fetchPolicy;\n        const mergedOptions = compact(this.options, newOptions || {});\n        // This request will hit the network, so even if there are no variables,\n        // we now know that's intentional. (see #12996)\n        // Even if that happens only once, we want `variablesUnknown` to stay false permanently.\n        this.variablesUnknown &&= mergedOptions.fetchPolicy === \"standby\";\n        const options = useDisposableObservable ?\n            // Disposable Observable 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        const query = this.transformDocument(options.query);\n        this.lastQuery = query;\n        // Reevaluate variables to allow resetting variables with variables: undefined,\n        // otherwise `compact` will ignore the `variables` key in `newOptions`. We\n        // do this after we run the query transform to ensure we get default\n        // variables from the transformed query.\n        //\n        // Note: updating options.variables may mutate this.options.variables\n        // in the case of a non-disposable query. This is intentional.\n        if (newOptions && \"variables\" in newOptions) {\n            options.variables = this.getVariablesWithDefaults(newOptions.variables);\n        }\n        if (!useDisposableObservable) {\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                    // A `nextFetchPolicy` function has even higher priority, though,\n                    // so in that case `applyNextFetchPolicy` must be called.\n                    typeof options.nextFetchPolicy === \"function\")) {\n                // This might mutate options.fetchPolicy\n                this.applyNextFetchPolicy(\"variables-changed\", options);\n                if (newNetworkStatus === void 0) {\n                    newNetworkStatus = NetworkStatus.setVariables;\n                }\n            }\n        }\n        const oldNetworkStatus = this.networkStatus;\n        if (!newNetworkStatus) {\n            newNetworkStatus = NetworkStatus.loading;\n            if (oldNetworkStatus !== NetworkStatus.loading &&\n                newOptions?.variables &&\n                !equal(newOptions.variables, oldVariables)) {\n                newNetworkStatus = NetworkStatus.setVariables;\n            }\n            // QueryManager does not emit any values for standby fetch policies so we\n            // want ensure that the networkStatus remains ready.\n            if (options.fetchPolicy === \"standby\") {\n                newNetworkStatus = NetworkStatus.ready;\n            }\n        }\n        if (options.fetchPolicy === \"standby\") {\n            this.cancelPolling();\n        }\n        this.resubscribeCache();\n        const { promise, operator: promiseOperator } = getTrackingOperatorPromise(\n        // This default value should only be used when using a `fetchPolicy` of\n        // `standby` since that fetch policy completes without emitting a\n        // result. Since we are converting this to a QueryResult type, we\n        // omit the extra fields from ApolloQueryResult in the default value.\n        options.fetchPolicy === \"standby\" ?\n            { data: undefined }\n            : undefined);\n        const { subscription, observable, fromLink } = this.fetch(options, newNetworkStatus, query, promiseOperator);\n        if (!useDisposableObservable && (fromLink || !this.linkSubscription)) {\n            if (this.linkSubscription) {\n                this.linkSubscription.unsubscribe();\n            }\n            this.linkSubscription = subscription;\n        }\n        const ret = Object.assign(preventUnhandledRejection(promise\n            .then((result) => toQueryResult(this.maskResult(result)))\n            .finally(() => {\n            if (!this.hasObservers() && this.activeOperations.size === 0) {\n                // If `reobserve` was called on a query without any observers,\n                // the teardown logic would never be called, so we need to\n                // call it here to ensure the query is properly torn down.\n                this.tearDownQuery();\n            }\n        })), {\n            retain: () => {\n                const subscription = observable.subscribe({});\n                const unsubscribe = () => subscription.unsubscribe();\n                promise.then(unsubscribe, unsubscribe);\n                return ret;\n            },\n        });\n        return ret;\n    }\n    hasObservers() {\n        return this.subject.observed;\n    }\n    /**\n     * Tears down the `ObservableQuery` and stops all active operations by sending a `complete` notification.\n     */\n    stop() {\n        this.subject.complete();\n        this.initializeObservablesQueue();\n        this.tearDownQuery();\n    }\n    tearDownQuery() {\n        if (this.isTornDown)\n            return;\n        this.resetNotifications();\n        this.unsubscribeFromCache?.();\n        if (this.linkSubscription) {\n            this.linkSubscription.unsubscribe();\n            delete this.linkSubscription;\n        }\n        this.stopPolling();\n        // stop all active GraphQL subscriptions\n        this.subscriptions.forEach((sub) => sub.unsubscribe());\n        this.subscriptions.clear();\n        this.queryManager.obsQueries.delete(this);\n        this.isTornDown = true;\n        this.abortActiveOperations();\n        this._lastWrite = undefined;\n    }\n    transformDocument(document) {\n        return this.queryManager.transform(document);\n    }\n    maskResult(result) {\n        const masked = this.queryManager.maskOperation({\n            document: this.query,\n            data: result.data,\n            fetchPolicy: this.options.fetchPolicy,\n            cause: this,\n        });\n        // Maintain object identity as much as possible\n        return masked === result.data ? result : { ...result, data: masked };\n    }\n    dirty = false;\n    notifyTimeout;\n    /**\n    * @internal\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    resetNotifications() {\n        if (this.notifyTimeout) {\n            clearTimeout(this.notifyTimeout);\n            this.notifyTimeout = void 0;\n        }\n        this.dirty = false;\n    }\n    /**\n    * @internal\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    scheduleNotify() {\n        if (this.dirty)\n            return;\n        this.dirty = true;\n        if (!this.notifyTimeout) {\n            this.notifyTimeout = setTimeout(() => this.notify(true), 0);\n        }\n    }\n    /**\n    * @internal\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    notify(scheduled = false) {\n        if (!scheduled) {\n            // For queries with client exports or forced resolvers, we don't want to\n            // synchronously reobserve the cache on broadcast,\n            // but actually wait for the `scheduleNotify` timeout triggered by the\n            // `cache.watch` callback from `resubscribeCache`.\n            const info = this.queryManager.getDocumentInfo(this.query);\n            if (info.hasClientExports || info.hasForcedResolvers) {\n                return;\n            }\n        }\n        const { dirty } = this;\n        this.resetNotifications();\n        if (dirty &&\n            (this.options.fetchPolicy === \"cache-only\" ||\n                this.options.fetchPolicy === \"cache-and-network\" ||\n                !this.activeOperations.size)) {\n            const diff = this.getCacheDiff();\n            if (\n            // `fromOptimisticTransaction` is not available through the `cache.diff`\n            // code path, so we need to check it this way\n            equal(diff.result, this.getCacheDiff({ optimistic: false }).result)) {\n                //If this diff did not come from an optimistic transaction\n                // 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, distinctUntilChanged still has a\n                // chance to catch it before delivery to ObservableQuery subscribers.\n                this.reobserveCacheFirst();\n            }\n            else {\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                this.input.next({\n                    kind: \"N\",\n                    value: {\n                        data: diff.result,\n                        dataState: diff.complete ? \"complete\"\n                            : diff.result ? \"partial\"\n                                : \"empty\",\n                        networkStatus: NetworkStatus.ready,\n                        loading: false,\n                        error: undefined,\n                        partial: !diff.complete,\n                    },\n                    source: \"cache\",\n                    query: this.query,\n                    variables: this.variables,\n                    meta: {},\n                });\n            }\n        }\n    }\n    activeOperations = new Set();\n    pushOperation(networkStatus) {\n        let aborted = false;\n        // track query and variables from the start of the operation\n        const { query, variables } = this;\n        const finalize = () => {\n            this.activeOperations.delete(operation);\n        };\n        const operation = {\n            override: networkStatus,\n            abort: () => {\n                aborted = true;\n                finalize();\n            },\n            query,\n            variables,\n        };\n        this.activeOperations.add(operation);\n        return {\n            finalize,\n            pushNotification: (notification, additionalMeta) => {\n                if (!aborted) {\n                    this.input.next({\n                        ...notification,\n                        query,\n                        variables,\n                        meta: { ...additionalMeta },\n                    });\n                }\n            },\n        };\n    }\n    calculateNetworkStatus(baseNetworkStatus) {\n        if (baseNetworkStatus === NetworkStatus.streaming) {\n            return baseNetworkStatus;\n        }\n        // in the future, this could be more complex logic, e.g. \"refetch\" and\n        // \"fetchMore\" having priority over \"polling\" or \"loading\" network statuses\n        // as for now we just take the \"latest\" operation that is still active,\n        // as that lines up best with previous behavior[]\n        const operation = Array.from(this.activeOperations.values())\n            .reverse()\n            .find((operation) => isEqualQuery(operation, this) && operation.override !== undefined);\n        return operation?.override ?? baseNetworkStatus;\n    }\n    abortActiveOperations() {\n        this.activeOperations.forEach((operation) => operation.abort());\n    }\n    /**\n    * @internal\n    * Called from `clearStore`.\n    *\n    * - resets the query to its initial state\n    * - cancels all active operations and their subscriptions\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    reset() {\n        // exception for cache-only queries - we reset them into a \"ready\" state\n        // as we won't trigger a refetch for them\n        const resetToEmpty = this.options.fetchPolicy === \"cache-only\";\n        this.setResult(resetToEmpty ? empty : uninitialized, {\n            shouldEmit: resetToEmpty ? 1 /* EmitBehavior.force */ : 2 /* EmitBehavior.never */,\n        });\n        this.abortActiveOperations();\n    }\n    /**\n    * @internal\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    setResult(result, additionalMeta) {\n        this.input.next({\n            source: \"setResult\",\n            kind: \"N\",\n            value: result,\n            query: this.query,\n            variables: this.variables,\n            meta: { ...additionalMeta },\n        });\n    }\n    operator = filterMap((notification) => {\n        const { query, meta } = notification;\n        if (notification.source === \"setResult\") {\n            return {\n                query,\n                variables: this.variables,\n                result: notification.value,\n                meta,\n            };\n        }\n        if (notification.kind === \"C\") {\n            return;\n        }\n        const resolvedVariables = \"resolvedVariables\" in notification ?\n            notification.resolvedVariables\n            : undefined;\n        // Usually we prefer to drop notifications that don't match this query\n        // but this breaks when used with `@export` queries that resolve variables\n        // after the request is initiated. `notification.resolvedVariables` gives us\n        // the variables the query actually resolved with during evaluation in\n        // QueryManager (which is the variables value after `@export` variables have\n        // been applied), but we need to update this query with those resolved\n        // variables maybe in the middle of a request (updating is handled below).\n        // When we update this.variables to the resolved variables, this causes\n        // isEqualQuery(notification, this) to fail for future notifications since\n        // the notification.variables holds the stale variables value. In this case,\n        // we want to allow the notification through only if the current variables\n        // value matches the resolved variables.\n        //\n        // Note: the check for matching resolved variables typically kicks in for\n        // multi-emission fetches (such as defer, or cache-and-network, etc).\n        if (notification.query !== this.query) {\n            return;\n        }\n        if (!equal(resolvedVariables, this.variables)) {\n            if (!equal(notification.variables, this.variables)) {\n                return;\n            }\n            if (resolvedVariables) {\n                this.options.variables = resolvedVariables;\n                this.resubscribeCache();\n            }\n        }\n        const variables = this.variables;\n        let result;\n        const previous = this.subject.getValue();\n        if (notification.source === \"cache\") {\n            result = notification.value;\n            if (result.networkStatus === NetworkStatus.ready &&\n                result.partial &&\n                (!this.options.returnPartialData ||\n                    previous.result.networkStatus === NetworkStatus.error) &&\n                this.options.fetchPolicy !== \"cache-only\") {\n                return;\n            }\n        }\n        else if (notification.source === \"network\") {\n            if (this.waitForNetworkResult) {\n                this.waitForNetworkResult = false;\n                this.resubscribeCache();\n            }\n            result =\n                notification.kind === \"E\" ?\n                    {\n                        ...((isEqualQuery(previous, notification) ||\n                            (resolvedVariables &&\n                                equal(resolvedVariables, previous.variables))) ?\n                            previous.result\n                            : { data: undefined, dataState: \"empty\", partial: true }),\n                        error: notification.error,\n                        networkStatus: NetworkStatus.error,\n                        loading: false,\n                    }\n                    : notification.value;\n            if (notification.kind === \"E\" && result.dataState === \"streaming\") {\n                result.dataState = \"complete\";\n            }\n            if (result.error) {\n                meta.shouldEmit = 1 /* EmitBehavior.force */;\n            }\n        }\n        else if (notification.source === \"newNetworkStatus\") {\n            const baseResult = isEqualQuery(previous, notification) ?\n                previous.result\n                : this.getInitialResult(meta.fetchPolicy);\n            const { resetError } = notification.value;\n            const error = resetError ? undefined : baseResult.error;\n            const networkStatus = error ? NetworkStatus.error : NetworkStatus.ready;\n            result = {\n                ...baseResult,\n                error,\n                networkStatus,\n            };\n        }\n        // every code path until here should have either returned or set a result,\n        // but typescript needs a little help\n        invariant(result);\n        // normalize result shape\n        if (!result.error)\n            delete result.error;\n        result.networkStatus = this.calculateNetworkStatus(result.networkStatus);\n        result.loading = isNetworkRequestInFlight(result.networkStatus);\n        result = this.maskResult(result);\n        // Preserve referential equality of masked data when the new masked\n        // result is deeply equal to the previous one. This prevents React hooks\n        // like `useMemo` or `useEffect` from firing unnecessarily.\n        if (previous.result.data !== undefined &&\n            result.data !== previous.result.data &&\n            equal(result.data, previous.result.data)) {\n            result.data = previous.result.data;\n        }\n        return { query, variables, result, meta };\n    });\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.\n    reobserveCacheFirst() {\n        const { fetchPolicy, nextFetchPolicy } = this.options;\n        if (fetchPolicy === \"cache-and-network\" || fetchPolicy === \"network-only\") {\n            this.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(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        else {\n            this.reobserve();\n        }\n    }\n    getVariablesWithDefaults(variables) {\n        return this.queryManager.getVariables(this.query, variables);\n    }\n}\nexport function logMissingFieldErrors(missing) {\n    if (__DEV__ && missing) {\n        __DEV__ && invariant.debug(88, missing);\n    }\n}\nfunction isEqualQuery(a, b) {\n    return !!(a && b && a.query === b.query && equal(a.variables, b.variables));\n}\nfunction getTrackingOperatorPromise(defaultValue) {\n    let lastValue = defaultValue, resolve, reject;\n    const promise = new Promise((res, rej) => {\n        resolve = res;\n        reject = rej;\n    });\n    const operator = tap({\n        next(value) {\n            if (value.kind === \"E\") {\n                return reject(value.error);\n            }\n            if (value.kind === \"N\" &&\n                value.source !== \"newNetworkStatus\" &&\n                !value.value.loading) {\n                lastValue = value.value;\n            }\n        },\n        finalize: () => {\n            if (lastValue) {\n                resolve(lastValue);\n            }\n            else {\n                const message = \"The operation was aborted.\";\n                const name = \"AbortError\";\n                reject(typeof DOMException !== \"undefined\" ?\n                    new DOMException(message, name)\n                    // some environments do not have `DOMException`, e.g. node\n                    // uses a normal `Error` with a `name` property instead: https://github.com/phryneas/node/blob/d0579b64f0f6b722f8e49bf8a471dd0d0604a21e/lib/internal/errors.js#L964\n                    // error.code is a legacy property that is not used anymore,\n                    // and also inconsistent across environments (in supporting\n                    // browsers it is `20`, in node `'ABORT_ERR'`) so we omit that.\n                    : Object.assign(new Error(message), { name }));\n            }\n        },\n    });\n    return { promise, operator };\n}\n//# sourceMappingURL=ObservableQuery.js.map\n","import { isNetworkRequestSettled } from \"./isNetworkRequestSettled.js\";\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 !isNetworkRequestSettled(networkStatus);\n}\n//# sourceMappingURL=isNetworkRequestInFlight.js.map","import { equal } from \"@wry/equality\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { getOperationName, graphQLResultHasError, streamInfoSymbol, } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nconst IGNORE = {};\nconst destructiveMethodCounts = new WeakMap();\nfunction wrapDestructiveCacheMethod(cache, methodName) {\n    const original = cache[methodName];\n    if (typeof original === \"function\") {\n        // @ts-expect-error this is just too generic to be typed correctly\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}\nconst queryInfoIds = new WeakMap();\n// A QueryInfo object represents a single network request, either initiated\n// from the QueryManager or from an ObservableQuery.\n// It will only ever be used for a single network call.\n// It is responsible for reporting results to the cache, merging and in a no-cache\n// scenario accumulating the response.\nexport class QueryInfo {\n    cache;\n    queryManager;\n    id;\n    observableQuery;\n    incremental;\n    constructor(queryManager, observableQuery) {\n        const cache = (this.cache = queryManager.cache);\n        const id = (queryInfoIds.get(queryManager) || 0) + 1;\n        queryInfoIds.set(queryManager, id);\n        this.id = id + \"\";\n        this.observableQuery = observableQuery;\n        this.queryManager = queryManager;\n        // Track how often cache.evict is called, since we want eviction to\n        // override the feud-stopping logic in the markQueryResult 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    /**\n    * @internal\n    * For feud-preventing behaviour, `lastWrite` should be shared by all `QueryInfo` instances of an `ObservableQuery`.\n    * In the case of a standalone `QueryInfo`, we will keep a local version.\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    _lastWrite;\n    get lastWrite() {\n        return (this.observableQuery || this)._lastWrite;\n    }\n    set lastWrite(value) {\n        (this.observableQuery || this)._lastWrite = value;\n    }\n    resetLastWrite() {\n        this.lastWrite = void 0;\n    }\n    shouldWrite(result, variables) {\n        const { lastWrite } = this;\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            // We have to compare these values because its possible the final chunk\n            // emitted in the incremental result is just `hasNext: false`. This\n            // ensures we trigger a cache write when we get `isLastChunk: true`.\n            result.extensions?.[streamInfoSymbol] ===\n                lastWrite.result.extensions?.[streamInfoSymbol]);\n    }\n    get hasNext() {\n        return this.incremental ? this.incremental.hasNext : false;\n    }\n    maybeHandleIncrementalResult(cacheData, incoming, query) {\n        const { incrementalHandler } = this.queryManager;\n        if (incrementalHandler.isIncrementalResult(incoming)) {\n            this.incremental ||= incrementalHandler.startRequest({\n                query,\n            });\n            return this.incremental.handle(cacheData, incoming);\n        }\n        return incoming;\n    }\n    markQueryResult(incoming, { document: query, variables, errorPolicy, cacheWriteBehavior, }) {\n        const diffOptions = {\n            query,\n            variables,\n            returnPartialData: true,\n            optimistic: true,\n        };\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.observableQuery?.[\"resetNotifications\"]();\n        const skipCache = cacheWriteBehavior === 0 /* CacheWriteBehavior.FORBID */;\n        const lastDiff = skipCache ? undefined : this.cache.diff(diffOptions);\n        let result = this.maybeHandleIncrementalResult(lastDiff?.result, incoming, query);\n        if (skipCache) {\n            return result;\n        }\n        if (shouldWriteResult(result, errorPolicy)) {\n            let written = false;\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.batch({\n                onWatchUpdated: (\n                // all additional options on ObservableQuery.CacheWatchOptions are\n                // optional so we can use the type here\n                watch, diff) => {\n                    if (watch.watcher === this.observableQuery) {\n                        // see comment on `lastOwnDiff` for explanation\n                        watch.lastOwnDiff = diff;\n                    }\n                },\n                update: (cache) => {\n                    if (this.shouldWrite(result, variables)) {\n                        cache.writeQuery({\n                            query,\n                            data: result.data,\n                            variables,\n                            overwrite: cacheWriteBehavior === 1 /* CacheWriteBehavior.OVERWRITE */,\n                            extensions: result.extensions,\n                        });\n                        written = true;\n                        this.lastWrite = {\n                            result,\n                            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 (lastDiff && lastDiff.complete) {\n                            // Reuse data from the last good (complete) diff that we\n                            // received, when possible.\n                            result = { ...result, data: lastDiff.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                    const diff = cache.diff(diffOptions);\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                    if (diff.complete) {\n                        result = { ...result, data: diff.result };\n                    }\n                    else if (__DEV__ &&\n                        written &&\n                        // A result that is still streaming is expected to read back\n                        // incomplete until the remaining chunks arrive.\n                        !this.hasNext) {\n                        warnAboutPartialCacheResult(query, result.data, diff);\n                    }\n                },\n            });\n        }\n        else {\n            this.lastWrite = void 0;\n        }\n        return result;\n    }\n    markMutationResult(incoming, mutation, cache = this.cache) {\n        const cacheWrites = [];\n        const skipCache = mutation.cacheWriteBehavior === 0 /* CacheWriteBehavior.FORBID */;\n        let result = this.maybeHandleIncrementalResult(skipCache ? undefined : (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.queryManager.getDocumentInfo(mutation.document).asQuery,\n            variables: mutation.variables,\n            optimistic: false,\n            returnPartialData: true,\n        }).result), incoming, mutation.document);\n        if (mutation.errorPolicy === \"ignore\") {\n            result = { ...result, errors: [] };\n        }\n        if (graphQLResultHasError(result) && mutation.errorPolicy === \"none\") {\n            return Promise.resolve(result);\n        }\n        const getResultWithDataState = () => ({\n            ...result,\n            dataState: this.hasNext ? \"streaming\" : \"complete\",\n        });\n        if (!skipCache && shouldWriteResult(result, mutation.errorPolicy)) {\n            cacheWrites.push({\n                result: result.data,\n                dataId: \"ROOT_MUTATION\",\n                query: mutation.document,\n                variables: mutation.variables,\n                extensions: result.extensions,\n            });\n            const { updateQueries } = mutation;\n            if (updateQueries) {\n                this.queryManager\n                    .getObservableQueries(\"all\")\n                    .forEach((observableQuery) => {\n                    const queryName = observableQuery && observableQuery.queryName;\n                    if (!queryName ||\n                        !Object.hasOwnProperty.call(updateQueries, queryName)) {\n                        return;\n                    }\n                    const updater = updateQueries[queryName];\n                    const { query: document, variables } = observableQuery;\n                    // Read the current query result from the store.\n                    const { result: currentQueryResult, complete } = observableQuery.getCacheDiff({ optimistic: false });\n                    if (complete && currentQueryResult) {\n                        // Run our reducer using the current query result and the mutation result.\n                        const nextQueryResult = updater(currentQueryResult, {\n                            mutationResult: getResultWithDataState(),\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,\n                            });\n                        }\n                    }\n                });\n            }\n        }\n        let refetchQueries = mutation.refetchQueries;\n        if (typeof refetchQueries === \"function\") {\n            refetchQueries = refetchQueries(getResultWithDataState());\n        }\n        if (cacheWrites.length > 0 ||\n            (refetchQueries || \"\").length > 0 ||\n            mutation.update ||\n            mutation.onQueryUpdated ||\n            mutation.removeOptimistic) {\n            const results = [];\n            this.queryManager\n                .refetchQueries({\n                updateCache: (cache) => {\n                    if (!skipCache) {\n                        cacheWrites.forEach((write) => 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                    const { update } = mutation;\n                    // Determine whether result is a SingleExecutionResult,\n                    // or the final ExecutionPatchResult.\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                            const 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.queryManager.getDocumentInfo(mutation.document)\n                                    .asQuery,\n                                variables: mutation.variables,\n                                optimistic: false,\n                                returnPartialData: true,\n                            });\n                            if (diff.complete) {\n                                result = {\n                                    ...result,\n                                    data: diff.result,\n                                };\n                            }\n                        }\n                        // If we've received the whole response, call the update function.\n                        if (!this.hasNext) {\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 && !this.hasNext) {\n                        cache.modify({\n                            id: \"ROOT_MUTATION\",\n                            fields(value, { fieldName, DELETE }) {\n                                return fieldName === \"__typename\" ? value : DELETE;\n                            },\n                        });\n                    }\n                },\n                include: 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            })\n                .forEach((result) => results.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).then(() => result);\n            }\n        }\n        return Promise.resolve(result);\n    }\n    markMutationOptimistic(optimisticResponse, mutation) {\n        const data = typeof optimisticResponse === \"function\" ?\n            optimisticResponse(mutation.variables, { IGNORE })\n            : optimisticResponse;\n        if (data === IGNORE) {\n            return false;\n        }\n        this.cache.recordOptimisticTransaction((cache) => {\n            try {\n                this.markMutationResult({ data }, mutation, cache);\n            }\n            catch (error) {\n                invariant.error(error);\n            }\n        }, this.id);\n        return true;\n    }\n    markSubscriptionResult(result, { document, variables, errorPolicy, cacheWriteBehavior, }) {\n        if (cacheWriteBehavior !== 0 /* CacheWriteBehavior.FORBID */) {\n            if (shouldWriteResult(result, errorPolicy)) {\n                this.cache.write({\n                    query: document,\n                    result: result.data,\n                    dataId: \"ROOT_SUBSCRIPTION\",\n                    variables: variables,\n                    extensions: result.extensions,\n                });\n            }\n            this.queryManager.broadcastQueries();\n        }\n    }\n}\nfunction warnAboutPartialCacheResult(query, networkResult, diff) {\n    __DEV__ && invariant.warn(\n        89,\n        getOperationName(query, \"(anonymous)\"),\n        diff.missing?.missing,\n        networkResult,\n        diff.result\n    );\n}\nfunction shouldWriteResult(result, errorPolicy = \"none\") {\n    const ignoreErrors = errorPolicy === \"ignore\" || errorPolicy === \"all\";\n    let writeWithErrors = !graphQLResultHasError(result);\n    if (!writeWithErrors && ignoreErrors && result.data) {\n        writeWithErrors = true;\n    }\n    return writeWithErrors;\n}\n//# sourceMappingURL=QueryInfo.js.map\n","import { Trie } from \"@wry/trie\";\nimport { BREAK, Kind, OperationTypeNode, visit } from \"graphql\";\nimport { Observable, throwError } from \"rxjs\";\nimport { catchError, concat, EMPTY, filter, finalize, from, lastValueFrom, map, materialize, mergeMap, of, share, shareReplay, Subject, tap, } from \"rxjs\";\nimport { canonicalStringify } from \"@apollo/client/cache\";\nimport { CombinedGraphQLErrors, graphQLResultHasProtocolErrors, registerLinkError, toErrorLike, } from \"@apollo/client/errors\";\nimport { PROTOCOL_ERRORS_SYMBOL } from \"@apollo/client/errors\";\nimport { execute } from \"@apollo/client/link\";\nimport { maskFragment, maskOperation } from \"@apollo/client/masking\";\nimport { cacheSizes, DocumentTransform, isNetworkRequestInFlight, print, } from \"@apollo/client/utilities\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { AutoCleanedWeakCache, checkDocument, extensionsSymbol, filterMap, getDefaultValues, getOperationDefinition, getOperationName, graphQLResultHasError, hasDirectives, hasForcedResolvers, isDocumentNode, isNonNullObject, makeUniqueId, mergeOptions, removeDirectivesFromDocument, streamInfoSymbol, toQueryResult, } from \"@apollo/client/utilities/internal\";\nimport { invariant, newInvariantError, } from \"@apollo/client/utilities/invariant\";\nimport { NetworkStatus } from \"./networkStatus.js\";\nimport { logMissingFieldErrors, ObservableQuery } from \"./ObservableQuery.js\";\nimport { QueryInfo } from \"./QueryInfo.js\";\nexport class QueryManager {\n    defaultOptions;\n    client;\n    /**\n     * The options that were passed to the ApolloClient constructor.\n     */\n    clientOptions;\n    assumeImmutableResults;\n    documentTransform;\n    ssrMode;\n    defaultContext;\n    dataMasking;\n    incrementalHandler;\n    localState;\n    queryDeduplication;\n    /**\n     * Whether to prioritize cache values over network results when\n     * `fetchObservableWithInfo` is called.\n     * This will essentially turn a `\"network-only\"` or `\"cache-and-network\"`\n     * fetchPolicy into a `\"cache-first\"` fetchPolicy, but without influencing\n     * the `fetchPolicy` of the `ObservableQuery`.\n     *\n     * This can e.g. be used to prioritize the cache during the first render after\n     * SSR.\n     */\n    prioritizeCacheValues = false;\n    onBroadcast;\n    mutationStore;\n    /**\n     * All ObservableQueries that currently have at least one subscriber.\n     */\n    obsQueries = new Set();\n    // Maps from queryInfo.id 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    fetchCancelFns = new Map();\n    constructor(options) {\n        const defaultDocumentTransform = new DocumentTransform((document) => this.cache.transformDocument(document), \n        // Allow the apollo cache to manage its own transform caches\n        { cache: false });\n        this.client = options.client;\n        this.defaultOptions = options.defaultOptions;\n        this.queryDeduplication = options.queryDeduplication;\n        this.clientOptions = options.clientOptions;\n        this.ssrMode = options.ssrMode;\n        this.assumeImmutableResults = options.assumeImmutableResults;\n        this.dataMasking = options.dataMasking;\n        this.localState = options.localState;\n        this.incrementalHandler = options.incrementalHandler;\n        const documentTransform = options.documentTransform;\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        this.defaultContext = options.defaultContext || {};\n        if ((this.onBroadcast = options.onBroadcast)) {\n            this.mutationStore = {};\n        }\n    }\n    get link() {\n        return this.client.link;\n    }\n    get cache() {\n        return this.client.cache;\n    }\n    /**\n     * Call this method to terminate any active query processes, making it safe\n     * to dispose of this QueryManager instance.\n     */\n    stop() {\n        this.obsQueries.forEach((oq) => oq.stop());\n        this.cancelPendingFetches(newInvariantError(90));\n    }\n    cancelPendingFetches(error) {\n        this.fetchCancelFns.forEach((cancel) => cancel(error));\n        this.fetchCancelFns.clear();\n    }\n    async mutate({ mutation, variables, optimisticResponse, updateQueries, refetchQueries = [], awaitRefetchQueries = false, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }) {\n        const queryInfo = new QueryInfo(this);\n        mutation = this.cache.transformForLink(this.transform(mutation));\n        const { hasClientExports } = this.getDocumentInfo(mutation);\n        variables = this.getVariables(mutation, variables);\n        if (hasClientExports) {\n            if (__DEV__) {\n                invariant(this.localState, 91, getOperationName(mutation, \"(anonymous)\"));\n            }\n            variables = await this.localState.getExportedVariables({\n                client: this.client,\n                document: mutation,\n                variables,\n                context,\n            });\n        }\n        const mutationStoreValue = this.mutationStore &&\n            (this.mutationStore[queryInfo.id] = {\n                mutation,\n                variables,\n                loading: true,\n                error: null,\n            });\n        const isOptimistic = optimisticResponse &&\n            queryInfo.markMutationOptimistic(optimisticResponse, {\n                document: mutation,\n                variables,\n                cacheWriteBehavior: fetchPolicy === \"no-cache\" ?\n                    0 /* CacheWriteBehavior.FORBID */\n                    : 2 /* CacheWriteBehavior.MERGE */,\n                errorPolicy,\n                context,\n                updateQueries,\n                update: updateWithProxyFn,\n                keepRootFields,\n            });\n        this.broadcastQueries();\n        return new Promise((resolve, reject) => {\n            const cause = {};\n            return this.getObservableFromLink(mutation, {\n                ...context,\n                optimisticResponse: isOptimistic ? optimisticResponse : void 0,\n            }, variables, fetchPolicy, {}, false)\n                .observable.pipe(validateDidEmitValue(), mergeMap((result) => {\n                const storeResult = { ...result };\n                return from(queryInfo.markMutationResult(storeResult, {\n                    document: mutation,\n                    variables,\n                    cacheWriteBehavior: fetchPolicy === \"no-cache\" ?\n                        0 /* CacheWriteBehavior.FORBID */\n                        : 2 /* CacheWriteBehavior.MERGE */,\n                    errorPolicy,\n                    context,\n                    update: updateWithProxyFn,\n                    updateQueries,\n                    awaitRefetchQueries,\n                    refetchQueries,\n                    removeOptimistic: isOptimistic ? queryInfo.id : void 0,\n                    onQueryUpdated,\n                    keepRootFields,\n                }));\n            }))\n                .pipe(map((storeResult) => {\n                const hasErrors = graphQLResultHasError(storeResult);\n                if (hasErrors && errorPolicy === \"none\") {\n                    throw new CombinedGraphQLErrors(removeStreamDetailsFromExtensions(storeResult));\n                }\n                if (mutationStoreValue) {\n                    mutationStoreValue.loading = false;\n                    mutationStoreValue.error = null;\n                }\n                return storeResult;\n            }))\n                .subscribe({\n                next: (storeResult) => {\n                    this.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 (!queryInfo.hasNext) {\n                        const result = {\n                            data: this.maskOperation({\n                                document: mutation,\n                                data: storeResult.data,\n                                fetchPolicy,\n                                cause,\n                            }),\n                        };\n                        if (graphQLResultHasError(storeResult)) {\n                            result.error = new CombinedGraphQLErrors(storeResult);\n                        }\n                        if (Object.keys(storeResult.extensions || {}).length) {\n                            result.extensions = storeResult.extensions;\n                        }\n                        resolve(result);\n                    }\n                },\n                error: (error) => {\n                    if (mutationStoreValue) {\n                        mutationStoreValue.loading = false;\n                        mutationStoreValue.error = error;\n                    }\n                    if (isOptimistic) {\n                        this.cache.removeOptimistic(queryInfo.id);\n                    }\n                    this.broadcastQueries();\n                    if (errorPolicy === \"ignore\") {\n                        return resolve({ data: undefined });\n                    }\n                    if (errorPolicy === \"all\") {\n                        return resolve({ data: undefined, error });\n                    }\n                    reject(error);\n                },\n            });\n        });\n    }\n    fetchQuery(options, networkStatus) {\n        checkDocument(options.query, OperationTypeNode.QUERY);\n        // do the rest asynchronously to keep the same rejection timing as\n        // checks further in `.mutate`\n        return (async () => lastValueFrom(this.fetchObservableWithInfo(options, {\n            networkStatus,\n        }).observable.pipe(filterMap((value) => {\n            switch (value.kind) {\n                case \"E\":\n                    throw value.error;\n                case \"N\": {\n                    if (value.source !== \"newNetworkStatus\")\n                        return toQueryResult(value.value);\n                }\n            }\n        })), {\n            // This default is needed when a `standby` fetch policy is used to avoid\n            // an EmptyError from rejecting this promise.\n            defaultValue: { data: undefined },\n        }))();\n    }\n    transform(document) {\n        return this.documentTransform.transformDocument(document);\n    }\n    transformCache = new AutoCleanedWeakCache(cacheSizes[\"queryManager.getDocumentInfo\"] ||\n        2000 /* defaultCacheSizes[\"queryManager.getDocumentInfo\"] */);\n    getDocumentInfo(document) {\n        const { transformCache } = this;\n        if (!transformCache.has(document)) {\n            const operationDefinition = getOperationDefinition(document);\n            const 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: hasDirectives([\"client\", \"export\"], document, true),\n                hasForcedResolvers: hasForcedResolvers(document),\n                hasNonreactiveDirective: hasDirectives([\"nonreactive\"], document),\n                hasIncrementalDirective: hasDirectives([\"defer\"], document),\n                nonReactiveQuery: addNonReactiveToNamedFragments(document),\n                clientQuery: hasDirectives([\"client\"], document) ? document : null,\n                serverQuery: removeDirectivesFromDocument([\n                    { name: \"client\", remove: true },\n                    { name: \"connection\" },\n                    { name: \"nonreactive\" },\n                    { name: \"unmask\" },\n                ], document),\n                operationType: operationDefinition?.operation,\n                defaultVars: getDefaultValues(operationDefinition),\n                // Transform any mutation or subscription operations to query operations\n                // so we can read/write them from/to the cache.\n                asQuery: {\n                    ...document,\n                    definitions: document.definitions.map((def) => {\n                        if (def.kind === \"OperationDefinition\" &&\n                            def.operation !== \"query\") {\n                            return { ...def, operation: \"query\" };\n                        }\n                        return def;\n                    }),\n                },\n            };\n            transformCache.set(document, cacheEntry);\n        }\n        const entry = transformCache.get(document);\n        if (entry.violation) {\n            throw entry.violation;\n        }\n        return entry;\n    }\n    getVariables(document, variables) {\n        const defaultVars = this.getDocumentInfo(document).defaultVars;\n        const varsWithDefaults = Object.entries(variables ?? {}).map(([key, value]) => [key, value === undefined ? defaultVars[key] : value]);\n        return {\n            ...defaultVars,\n            ...Object.fromEntries(varsWithDefaults),\n        };\n    }\n    watchQuery(options) {\n        checkDocument(options.query, OperationTypeNode.QUERY);\n        const 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 = {\n            ...options,\n            variables: this.getVariables(query, options.variables),\n        };\n        if (typeof options.notifyOnNetworkStatusChange === \"undefined\") {\n            options.notifyOnNetworkStatusChange = true;\n        }\n        const observable = new ObservableQuery({\n            queryManager: this,\n            options,\n            transformedQuery: query,\n        });\n        return observable;\n    }\n    query(options) {\n        const query = this.transform(options.query);\n        return this.fetchQuery({\n            ...options,\n            query,\n        }).then((value) => ({\n            ...value,\n            data: this.maskOperation({\n                document: query,\n                data: value?.data,\n                fetchPolicy: options.fetchPolicy,\n            }),\n        }));\n    }\n    clearStore(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(92));\n        this.obsQueries.forEach((observableQuery) => {\n            // Set loading to true so listeners don't trigger unless they want\n            // results with partial data.\n            observableQuery.reset();\n        });\n        if (this.mutationStore) {\n            this.mutationStore = {};\n        }\n        // begin removing data from the store\n        return this.cache.reset(options);\n    }\n    getObservableQueries(include = \"active\") {\n        const queries = new Set();\n        const queryNames = new Map();\n        const queryNamesAndQueryStrings = new Map();\n        const legacyQueryOptions = new Set();\n        if (Array.isArray(include)) {\n            include.forEach((desc) => {\n                if (typeof desc === \"string\") {\n                    queryNames.set(desc, desc);\n                    queryNamesAndQueryStrings.set(desc, false);\n                }\n                else if (isDocumentNode(desc)) {\n                    const queryString = print(this.transform(desc));\n                    queryNames.set(queryString, getOperationName(desc));\n                    queryNamesAndQueryStrings.set(queryString, false);\n                }\n                else if (isNonNullObject(desc) && desc.query) {\n                    legacyQueryOptions.add(desc);\n                }\n            });\n        }\n        this.obsQueries.forEach((oq) => {\n            const document = print(this.transform(oq.options.query));\n            if (include === \"all\") {\n                queries.add(oq);\n                return;\n            }\n            const { queryName, options: { fetchPolicy }, } = oq;\n            if (include === \"active\" && fetchPolicy === \"standby\") {\n                return;\n            }\n            if (include === \"active\" ||\n                (queryName && queryNamesAndQueryStrings.has(queryName)) ||\n                (document && queryNamesAndQueryStrings.has(document))) {\n                queries.add(oq);\n                if (queryName)\n                    queryNamesAndQueryStrings.set(queryName, true);\n                if (document)\n                    queryNamesAndQueryStrings.set(document, true);\n            }\n        });\n        if (legacyQueryOptions.size) {\n            legacyQueryOptions.forEach((options) => {\n                const oq = new ObservableQuery({\n                    queryManager: this,\n                    options: {\n                        ...mergeOptions(this.defaultOptions.watchQuery, options),\n                        fetchPolicy: \"network-only\",\n                    },\n                });\n                queries.add(oq);\n            });\n        }\n        if (__DEV__ && queryNamesAndQueryStrings.size) {\n            queryNamesAndQueryStrings.forEach((included, nameOrQueryString) => {\n                if (!included) {\n                    const queryName = queryNames.get(nameOrQueryString);\n                    if (queryName) {\n                        __DEV__ && invariant.warn(93, queryName);\n                    }\n                    else {\n                        __DEV__ && invariant.warn(94);\n                    }\n                }\n            });\n        }\n        return queries;\n    }\n    refetchObservableQueries(includeStandby = false) {\n        const observableQueryPromises = [];\n        this.getObservableQueries(includeStandby ? \"all\" : \"active\").forEach((observableQuery) => {\n            const { fetchPolicy } = observableQuery.options;\n            if ((includeStandby || fetchPolicy !== \"standby\") &&\n                fetchPolicy !== \"cache-only\") {\n                observableQueryPromises.push(observableQuery.refetch());\n            }\n        });\n        this.broadcastQueries();\n        return Promise.all(observableQueryPromises);\n    }\n    startGraphQLSubscription(options) {\n        let { query, variables } = options;\n        const { fetchPolicy = \"cache-first\", errorPolicy = \"none\", context = {}, extensions = {}, } = options;\n        checkDocument(query, OperationTypeNode.SUBSCRIPTION);\n        query = this.transform(query);\n        variables = this.getVariables(query, variables);\n        let restart;\n        if (__DEV__) {\n            invariant(\n                !this.getDocumentInfo(query).hasClientExports || this.localState,\n                95,\n                getOperationName(query, \"(anonymous)\")\n            );\n        }\n        const observable = (this.getDocumentInfo(query).hasClientExports ?\n            from(this.localState.getExportedVariables({\n                client: this.client,\n                document: query,\n                variables,\n                context,\n            }))\n            : of(variables)).pipe(mergeMap((variables) => {\n            const { observable, restart: res } = this.getObservableFromLink(query, context, variables, fetchPolicy, extensions);\n            const queryInfo = new QueryInfo(this);\n            restart = res;\n            return observable.pipe(map((rawResult) => {\n                queryInfo.markSubscriptionResult(rawResult, {\n                    document: query,\n                    variables,\n                    errorPolicy,\n                    cacheWriteBehavior: fetchPolicy === \"no-cache\" ?\n                        0 /* CacheWriteBehavior.FORBID */\n                        : 2 /* CacheWriteBehavior.MERGE */,\n                });\n                const result = {\n                    data: rawResult.data ?? undefined,\n                };\n                if (graphQLResultHasError(rawResult)) {\n                    result.error = new CombinedGraphQLErrors(rawResult);\n                }\n                else if (graphQLResultHasProtocolErrors(rawResult)) {\n                    result.error = rawResult.extensions[PROTOCOL_ERRORS_SYMBOL];\n                    // Don't emit protocol errors added by HttpLink\n                    delete rawResult.extensions[PROTOCOL_ERRORS_SYMBOL];\n                }\n                if (rawResult.extensions &&\n                    Object.keys(rawResult.extensions).length) {\n                    result.extensions = rawResult.extensions;\n                }\n                if (result.error && errorPolicy === \"none\") {\n                    result.data = undefined;\n                }\n                if (errorPolicy === \"ignore\") {\n                    delete result.error;\n                }\n                return result;\n            }), catchError((error) => {\n                if (errorPolicy === \"ignore\") {\n                    return of({\n                        data: undefined,\n                    });\n                }\n                return of({ data: undefined, error });\n            }), filter((result) => !!(result.data || result.error)));\n        }));\n        return Object.assign(observable, { restart: () => restart?.() });\n    }\n    broadcastQueries() {\n        if (this.onBroadcast)\n            this.onBroadcast();\n        this.obsQueries.forEach((observableQuery) => observableQuery.notify());\n    }\n    // Use protected instead of private field so\n    // @apollo/experimental-nextjs-app-support can access type info.\n    inFlightLinkObservables = new Trie(false);\n    getObservableFromLink(query, context, variables, fetchPolicy, extensions, \n    // Prefer context.queryDeduplication if specified.\n    deduplication = context?.queryDeduplication ??\n        this.queryDeduplication) {\n        let entry = {};\n        const { serverQuery, clientQuery, operationType, hasIncrementalDirective } = this.getDocumentInfo(query);\n        const operationName = getOperationName(query);\n        const executeContext = {\n            client: this.client,\n        };\n        if (serverQuery) {\n            const { inFlightLinkObservables, link } = this;\n            try {\n                const operation = this.incrementalHandler.prepareRequest({\n                    query: serverQuery,\n                    variables,\n                    context: {\n                        ...this.defaultContext,\n                        ...context,\n                        queryDeduplication: deduplication,\n                    },\n                    extensions,\n                });\n                context = operation.context;\n                function withRestart(source) {\n                    return new Observable((observer) => {\n                        function subscribe() {\n                            return source.subscribe({\n                                next: observer.next.bind(observer),\n                                complete: observer.complete.bind(observer),\n                                error: observer.error.bind(observer),\n                            });\n                        }\n                        let subscription = subscribe();\n                        entry.restart ||= () => {\n                            subscription.unsubscribe();\n                            subscription = subscribe();\n                        };\n                        return () => {\n                            subscription.unsubscribe();\n                            entry.restart = undefined;\n                        };\n                    });\n                }\n                if (deduplication) {\n                    const printedServerQuery = print(serverQuery);\n                    const varJson = canonicalStringify(variables);\n                    entry = inFlightLinkObservables.lookup(printedServerQuery, varJson);\n                    if (!entry.observable) {\n                        entry.observable = execute(link, operation, executeContext).pipe(withRestart, finalize(() => {\n                            if (inFlightLinkObservables.peek(printedServerQuery, varJson) ===\n                                entry) {\n                                inFlightLinkObservables.remove(printedServerQuery, varJson);\n                            }\n                        }), \n                        // We don't want to replay the last emitted value for\n                        // subscriptions and instead opt to wait to receive updates until\n                        // the subscription emits new values.\n                        operationType === OperationTypeNode.SUBSCRIPTION ?\n                            share()\n                            : shareReplay({ refCount: true }));\n                    }\n                }\n                else {\n                    entry.observable = execute(link, operation, executeContext).pipe(withRestart);\n                }\n            }\n            catch (error) {\n                entry.observable = throwError(() => error);\n            }\n        }\n        else {\n            entry.observable = of({ data: {} });\n        }\n        if (clientQuery) {\n            const { operation } = getOperationDefinition(query);\n            if (__DEV__) {\n                invariant(\n                    this.localState,\n                    96,\n                    operation[0].toUpperCase() + operation.slice(1),\n                    operationName ?? \"(anonymous)\"\n                );\n            }\n            invariant(\n                !hasIncrementalDirective,\n                97,\n                operation[0].toUpperCase() + operation.slice(1),\n                operationName ?? \"(anonymous)\"\n            );\n            entry.observable = entry.observable.pipe(mergeMap((result) => {\n                return from(this.localState.execute({\n                    client: this.client,\n                    document: clientQuery,\n                    remoteResult: result,\n                    context,\n                    variables,\n                    fetchPolicy,\n                }));\n            }));\n        }\n        return {\n            restart: () => entry.restart?.(),\n            observable: entry.observable.pipe(catchError((error) => {\n                error = toErrorLike(error);\n                registerLinkError(error);\n                throw error;\n            })),\n        };\n    }\n    getResultsFromLink(options, { queryInfo, cacheWriteBehavior, observableQuery, exposeExtensions, }) {\n        const { errorPolicy } = options;\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        const linkDocument = this.cache.transformForLink(options.query);\n        return this.getObservableFromLink(linkDocument, options.context, options.variables, options.fetchPolicy).observable.pipe(map((incoming) => {\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            const result = queryInfo.markQueryResult(incoming, {\n                ...options,\n                document: linkDocument,\n                cacheWriteBehavior,\n            });\n            const hasErrors = graphQLResultHasError(result);\n            if (hasErrors && errorPolicy === \"none\") {\n                queryInfo.resetLastWrite();\n                observableQuery?.[\"resetNotifications\"]();\n                throw new CombinedGraphQLErrors(removeStreamDetailsFromExtensions(result));\n            }\n            const aqr = {\n                data: result.data,\n                ...(queryInfo.hasNext ?\n                    {\n                        loading: true,\n                        networkStatus: NetworkStatus.streaming,\n                        dataState: \"streaming\",\n                        partial: true,\n                    }\n                    : {\n                        dataState: result.data ? \"complete\" : \"empty\",\n                        loading: false,\n                        networkStatus: NetworkStatus.ready,\n                        partial: !result.data,\n                    }),\n            };\n            if (exposeExtensions && \"extensions\" in result) {\n                aqr[extensionsSymbol] = result.extensions;\n            }\n            if (hasErrors) {\n                if (errorPolicy === \"none\") {\n                    aqr.data = void 0;\n                    aqr.dataState = \"empty\";\n                }\n                if (errorPolicy !== \"ignore\") {\n                    aqr.error = new CombinedGraphQLErrors(removeStreamDetailsFromExtensions(result));\n                    if (aqr.dataState !== \"streaming\") {\n                        aqr.networkStatus = NetworkStatus.error;\n                    }\n                }\n            }\n            return aqr;\n        }), catchError((error) => {\n            if (errorPolicy === \"none\") {\n                queryInfo.resetLastWrite();\n                observableQuery?.[\"resetNotifications\"]();\n                throw error;\n            }\n            const aqr = {\n                data: undefined,\n                dataState: \"empty\",\n                loading: false,\n                networkStatus: NetworkStatus.ready,\n                partial: true,\n            };\n            if (errorPolicy !== \"ignore\") {\n                aqr.error = error;\n                aqr.networkStatus = NetworkStatus.error;\n            }\n            return of(aqr);\n        }));\n    }\n    fetchObservableWithInfo(options, { \n    // The initial networkStatus for this fetch, most often\n    // NetworkStatus.loading, but also possibly fetchMore, poll, refetch,\n    // or setVariables.\n    networkStatus = NetworkStatus.loading, query = options.query, fetchQueryOperator = (x) => x, onCacheHit = () => { }, observableQuery, exposeExtensions, }) {\n        const variables = this.getVariables(query, options.variables);\n        let { fetchPolicy = \"cache-first\", errorPolicy = \"none\", returnPartialData = false, notifyOnNetworkStatusChange = true, context = {}, } = options;\n        if (this.prioritizeCacheValues &&\n            (fetchPolicy === \"network-only\" || fetchPolicy === \"cache-and-network\")) {\n            fetchPolicy = \"cache-first\";\n        }\n        const normalized = Object.assign({}, options, {\n            query,\n            variables,\n            fetchPolicy,\n            errorPolicy,\n            returnPartialData,\n            notifyOnNetworkStatusChange,\n            context,\n        });\n        const queryInfo = new QueryInfo(this, observableQuery);\n        const fromVariables = (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            const 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                    normalized.refetchWritePolicy !== \"merge\") ?\n                    1 /* CacheWriteBehavior.OVERWRITE */\n                    : 2 /* CacheWriteBehavior.MERGE */;\n            const observableWithInfo = this.fetchQueryByPolicy(normalized, {\n                queryInfo,\n                cacheWriteBehavior,\n                onCacheHit,\n                observableQuery,\n                exposeExtensions,\n            });\n            observableWithInfo.observable =\n                observableWithInfo.observable.pipe(fetchQueryOperator);\n            if (\n            // If we're in standby, postpone advancing options.fetchPolicy using\n            // applyNextFetchPolicy.\n            normalized.fetchPolicy !== \"standby\") {\n                observableQuery?.[\"applyNextFetchPolicy\"](\"after-fetch\", options);\n            }\n            return observableWithInfo;\n        };\n        // This cancel function needs to be set before the concast is created,\n        // in case concast creation synchronously cancels the request.\n        const cleanupCancelFn = () => {\n            this.fetchCancelFns.delete(queryInfo.id);\n        };\n        this.fetchCancelFns.set(queryInfo.id, (error) => {\n            fetchCancelSubject.next({\n                kind: \"E\",\n                error,\n                source: \"network\",\n            });\n        });\n        const fetchCancelSubject = new Subject();\n        let observable, 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            if (__DEV__) {\n                invariant(this.localState, 98, getOperationName(normalized.query, \"(anonymous)\"));\n            }\n            observable = from(this.localState.getExportedVariables({\n                client: this.client,\n                document: normalized.query,\n                variables: normalized.variables,\n                context: normalized.context,\n            })).pipe(mergeMap((variables) => fromVariables(variables).observable));\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            const sourcesWithInfo = fromVariables(normalized.variables);\n            containsDataFromLink = sourcesWithInfo.fromLink;\n            observable = sourcesWithInfo.observable;\n        }\n        return {\n            // Merge `observable` with `fetchCancelSubject`, in a way that completing or\n            // erroring either of them will complete the merged obserable.\n            observable: new Observable((observer) => {\n                observer.add(cleanupCancelFn);\n                observable.subscribe(observer);\n                fetchCancelSubject.subscribe(observer);\n            }).pipe(share()),\n            fromLink: containsDataFromLink,\n        };\n    }\n    refetchQueries({ updateCache, include, optimistic = false, removeOptimistic = optimistic ? makeUniqueId(\"refetchQueries\") : void 0, onQueryUpdated, }) {\n        const includedQueriesByOq = new Map();\n        if (include) {\n            this.getObservableQueries(include).forEach((oq) => {\n                if (oq.options.fetchPolicy === \"cache-only\" || oq[\"variablesUnknown\"]) {\n                    return;\n                }\n                const current = oq.getCurrentResult();\n                includedQueriesByOq.set(oq, {\n                    oq,\n                    lastDiff: {\n                        result: current?.data,\n                        complete: !current?.partial,\n                    },\n                });\n            });\n        }\n        const results = new Map();\n        if (updateCache) {\n            const handled = new Set();\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,\n                onWatchUpdated(watch, diff, lastDiff) {\n                    const oq = watch.watcher;\n                    if (oq instanceof ObservableQuery && !handled.has(oq)) {\n                        handled.add(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                            includedQueriesByOq.delete(oq);\n                            let 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\n                                    .refetch()\n                                    .retain( /* create a persistent subscription on the query */);\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                            oq.options.fetchPolicy !== \"cache-only\") {\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                            includedQueriesByOq.set(oq, { oq, lastDiff, diff });\n                        }\n                    }\n                },\n            });\n        }\n        if (includedQueriesByOq.size) {\n            includedQueriesByOq.forEach(({ oq, lastDiff, diff }) => {\n                let 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                        diff = oq.getCacheDiff();\n                    }\n                    result = onQueryUpdated(oq, diff, lastDiff);\n                }\n                // Otherwise, we fall back to refetching.\n                if (!onQueryUpdated || result === true) {\n                    result = oq\n                        .refetch()\n                        .retain( /* create a persistent subscription on the query */);\n                }\n                if (result !== false) {\n                    results.set(oq, result);\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    noCacheWarningsByCause = new WeakSet();\n    maskOperation(options) {\n        const { document, data } = options;\n        if (__DEV__) {\n            const { fetchPolicy, cause = {} } = options;\n            const operationType = getOperationDefinition(document)?.operation;\n            if (this.dataMasking &&\n                fetchPolicy === \"no-cache\" &&\n                !isFullyUnmaskedOperation(document) &&\n                !this.noCacheWarningsByCause.has(cause)) {\n                this.noCacheWarningsByCause.add(cause);\n                __DEV__ && invariant.warn(99, getOperationName(document, `Unnamed ${operationType ?? \"operation\"}`));\n            }\n        }\n        return (this.dataMasking ?\n            maskOperation(data, document, this.cache)\n            : data);\n    }\n    maskFragment(options) {\n        const { data, fragment, fragmentName } = options;\n        return this.dataMasking ?\n            maskFragment(data, fragment, this.cache, fragmentName)\n            : data;\n    }\n    fetchQueryByPolicy({ query, variables, fetchPolicy, errorPolicy, returnPartialData, context, }, { cacheWriteBehavior, onCacheHit, queryInfo, observableQuery, exposeExtensions, }) {\n        const readCache = () => this.cache.diff({\n            query,\n            variables,\n            returnPartialData: true,\n            optimistic: true,\n        });\n        const resultsFromCache = (diff, networkStatus) => {\n            const data = diff.result;\n            if (__DEV__ && !returnPartialData && data !== null) {\n                logMissingFieldErrors(diff.missing);\n            }\n            const toResult = (data) => {\n                // TODO: Eventually we should move this handling into\n                // queryInfo.getDiff() directly. Since getDiff is updated to return null\n                // on returnPartialData: false, we should take advantage of that instead\n                // of having to patch it elsewhere.\n                if (!diff.complete && !returnPartialData) {\n                    data = undefined;\n                }\n                return {\n                    // TODO: Handle partial data\n                    data: data,\n                    dataState: diff.complete ? \"complete\"\n                        : data ? \"partial\"\n                            : \"empty\",\n                    loading: isNetworkRequestInFlight(networkStatus),\n                    networkStatus,\n                    partial: !diff.complete,\n                };\n            };\n            const fromData = (data) => {\n                return of({\n                    kind: \"N\",\n                    value: toResult(data),\n                    // Always attach the variables used for this fetch so @export\n                    // resolution can update ObservableQuery.options.variables and\n                    // resubscribe the cache watch under the correct variable set.\n                    resolvedVariables: variables,\n                    source: \"cache\",\n                });\n            };\n            if (\n            // Don't attempt to run forced resolvers if we have incomplete cache\n            // data and partial isn't allowed since this result would get set to\n            // `undefined` anyways in `toResult`.\n            (diff.complete || returnPartialData) &&\n                this.getDocumentInfo(query).hasForcedResolvers) {\n                if (__DEV__) {\n                    invariant(this.localState, 100, getOperationName(query, \"(anonymous)\"));\n                }\n                onCacheHit();\n                return from(this.localState.execute({\n                    client: this.client,\n                    document: query,\n                    remoteResult: data ? { data } : undefined,\n                    context,\n                    variables,\n                    onlyRunForcedResolvers: true,\n                    returnPartialData: true,\n                    fetchPolicy,\n                }).then((resolved) => ({\n                    kind: \"N\",\n                    value: toResult(resolved.data || void 0),\n                    // Always attach the variables used for this fetch so @export\n                    // resolution can update ObservableQuery.options.variables and\n                    // resubscribe the cache watch under the correct variable set.\n                    resolvedVariables: variables,\n                    source: \"cache\",\n                })));\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                diff.missing) {\n                return fromData(void 0);\n            }\n            return fromData(data || undefined);\n        };\n        const resultsFromLink = () => this.getResultsFromLink({\n            query,\n            variables,\n            context,\n            fetchPolicy,\n            errorPolicy,\n        }, {\n            cacheWriteBehavior,\n            queryInfo,\n            observableQuery,\n            exposeExtensions,\n        }).pipe(validateDidEmitValue(), materialize(), map((result) => ({\n            ...result,\n            // Always attach the variables used for this fetch so @export\n            // resolution can update ObservableQuery.options.variables and\n            // resubscribe the cache watch under the correct variable set.\n            resolvedVariables: variables,\n            source: \"network\",\n        })));\n        switch (fetchPolicy) {\n            default:\n            case \"cache-first\": {\n                const diff = readCache();\n                if (diff.complete) {\n                    return {\n                        fromLink: false,\n                        observable: resultsFromCache(diff, NetworkStatus.ready),\n                    };\n                }\n                if (returnPartialData) {\n                    return {\n                        fromLink: true,\n                        observable: concat(resultsFromCache(diff, NetworkStatus.loading), resultsFromLink()),\n                    };\n                }\n                return { fromLink: true, observable: resultsFromLink() };\n            }\n            case \"cache-and-network\": {\n                const diff = readCache();\n                if (diff.complete || returnPartialData) {\n                    return {\n                        fromLink: true,\n                        observable: concat(resultsFromCache(diff, NetworkStatus.loading), resultsFromLink()),\n                    };\n                }\n                return { fromLink: true, observable: resultsFromLink() };\n            }\n            case \"cache-only\":\n                return {\n                    fromLink: false,\n                    observable: concat(resultsFromCache(readCache(), NetworkStatus.ready)),\n                };\n            case \"network-only\":\n                return { fromLink: true, observable: resultsFromLink() };\n            case \"no-cache\":\n                return { fromLink: true, observable: resultsFromLink() };\n            case \"standby\":\n                return { fromLink: false, observable: EMPTY };\n        }\n    }\n}\nfunction validateDidEmitValue() {\n    let didEmitValue = false;\n    return tap({\n        next() {\n            didEmitValue = true;\n        },\n        complete() {\n            invariant(didEmitValue, 101);\n        },\n    });\n}\nfunction isFullyUnmaskedOperation(document) {\n    let isUnmasked = true;\n    visit(document, {\n        FragmentSpread: (node) => {\n            isUnmasked =\n                !!node.directives &&\n                    node.directives.some((directive) => directive.name.value === \"unmask\");\n            if (!isUnmasked) {\n                return BREAK;\n            }\n        },\n    });\n    return isUnmasked;\n}\nfunction addNonReactiveToNamedFragments(document) {\n    return visit(document, {\n        FragmentSpread: (node) => {\n            // Do not add `@nonreactive` if the fragment is marked with `@unmask`\n            // since we want to react to changes in this fragment.\n            if (node.directives?.some((directive) => directive.name.value === \"unmask\")) {\n                return;\n            }\n            return {\n                ...node,\n                directives: [\n                    ...(node.directives || []),\n                    {\n                        kind: Kind.DIRECTIVE,\n                        name: { kind: Kind.NAME, value: \"nonreactive\" },\n                    },\n                ],\n            };\n        },\n    });\n}\nfunction removeStreamDetailsFromExtensions(original) {\n    if (original.extensions?.[streamInfoSymbol] == null) {\n        return original;\n    }\n    const { extensions: { [streamInfoSymbol]: _, ...extensions }, ...result } = original;\n    if (Object.keys(extensions).length > 0) {\n        result.extensions = extensions;\n    }\n    return result;\n}\n//# sourceMappingURL=QueryManager.js.map\n","import { EmptyError } from './util/EmptyError';\nexport function lastValueFrom(source, config) {\n    var hasConfig = typeof config === 'object';\n    return new Promise(function (resolve, reject) {\n        var _hasValue = false;\n        var _value;\n        source.subscribe({\n            next: function (value) {\n                _value = value;\n                _hasValue = true;\n            },\n            error: reject,\n            complete: function () {\n                if (_hasValue) {\n                    resolve(_value);\n                }\n                else if (hasConfig) {\n                    resolve(config.defaultValue);\n                }\n                else {\n                    reject(new EmptyError());\n                }\n            },\n        });\n    });\n}\n//# sourceMappingURL=lastValueFrom.js.map","import { BREAK, visit } from \"graphql\";\nexport function hasForcedResolvers(document) {\n    let forceResolvers = false;\n    visit(document, {\n        Directive: {\n            enter(node) {\n                if (node.name.value === \"client\" && node.arguments) {\n                    forceResolvers = node.arguments.some((arg) => arg.name.value === \"always\" &&\n                        arg.value.kind === \"BooleanValue\" &&\n                        arg.value.value === true);\n                    if (forceResolvers) {\n                        return BREAK;\n                    }\n                }\n            },\n        },\n    });\n    return forceResolvers;\n}\n//# sourceMappingURL=hasForcedResolvers.js.map","import { invariant } from \"@apollo/client/utilities/invariant\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function getFragmentDefinition(doc) {\n    invariant(doc.kind === \"Document\", 6);\n    invariant(doc.definitions.length <= 1, 7);\n    const fragmentDef = doc.definitions[0];\n    invariant(fragmentDef.kind === \"FragmentDefinition\", 8);\n    return fragmentDef;\n}\n//# sourceMappingURL=getFragmentDefinition.js.map\n","import { isNonNullObject } from \"./isNonNullObject.js\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function isDocumentNode(value) {\n    return (isNonNullObject(value) &&\n        value.kind === \"Document\" &&\n        Array.isArray(value.definitions));\n}\n//# sourceMappingURL=isDocumentNode.js.map\n","import { operate } from '../util/lift';\nexport function finalize(callback) {\n    return operate(function (source, subscriber) {\n        try {\n            source.subscribe(subscriber);\n        }\n        finally {\n            subscriber.add(callback);\n        }\n    });\n}\n//# sourceMappingURL=finalize.js.map","import { createFragmentMap, getFragmentDefinitions, getOperationDefinition, } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nimport { maskDefinition } from \"./maskDefinition.js\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function maskOperation(data, document, cache) {\n    const definition = getOperationDefinition(document);\n    invariant(definition, 43);\n    if (data == null) {\n        // Maintain the original `null` or `undefined` value\n        return data;\n    }\n    return maskDefinition(data, definition.selectionSet, {\n        operationType: definition.operation,\n        operationName: definition.name?.value,\n        fragmentMap: createFragmentMap(getFragmentDefinitions(document)),\n        cache,\n        mutableTargets: new WeakMap(),\n        knownChanged: new WeakSet(),\n    });\n}\n//# sourceMappingURL=maskOperation.js.map\n","import { equal } from \"@wry/equality\";\nimport { Kind } from \"graphql\";\nimport { createFragmentMap, getFragmentDefinitions, } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nimport { maskDefinition } from \"./maskDefinition.js\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function maskFragment(data, document, cache, fragmentName) {\n    const fragments = document.definitions.filter((node) => node.kind === Kind.FRAGMENT_DEFINITION);\n    if (typeof fragmentName === \"undefined\") {\n        invariant(fragments.length === 1, 41, fragments.length);\n        fragmentName = fragments[0].name.value;\n    }\n    const fragment = fragments.find((fragment) => fragment.name.value === fragmentName);\n    invariant(!!fragment, 42, fragmentName);\n    if (data == null) {\n        // Maintain the original `null` or `undefined` value\n        return data;\n    }\n    if (equal(data, {})) {\n        // Return early and skip the masking algorithm if we don't have any data\n        // yet. This can happen when cache.diff returns an empty object which is\n        // used from watchFragment.\n        return data;\n    }\n    return maskDefinition(data, fragment.selectionSet, {\n        operationType: \"fragment\",\n        operationName: fragment.name.value,\n        fragmentMap: createFragmentMap(getFragmentDefinitions(document)),\n        cache,\n        mutableTargets: new WeakMap(),\n        knownChanged: new WeakSet(),\n    });\n}\n//# sourceMappingURL=maskFragment.js.map\n","import { Notification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function materialize() {\n    return operate(function (source, subscriber) {\n        source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n            subscriber.next(Notification.createNext(value));\n        }, function () {\n            subscriber.next(Notification.createComplete());\n            subscriber.complete();\n        }, function (err) {\n            subscriber.next(Notification.createError(err));\n            subscriber.complete();\n        }));\n    });\n}\n//# sourceMappingURL=materialize.js.map","import { OperationTypeNode } from \"graphql\";\nimport { map } from \"rxjs\";\nimport { NotImplementedHandler } from \"@apollo/client/incremental\";\nimport { execute } from \"@apollo/client/link\";\nimport { DocumentTransform } from \"@apollo/client/utilities\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { checkDocument, compact, getApolloClientMemoryInternals, getOperationName, mapObservableFragmentMemoized, mergeOptions, removeMaskedFragmentSpreads, } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nimport { version } from \"../version.js\";\nimport { QueryManager } from \"./QueryManager.js\";\nlet hasSuggestedDevtools = false;\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 `ApolloLink` instance,\n * receive results from the server and cache the results in a store. It also delivers updates\n * to GraphQL queries through `Observable` instances.\n */\nexport class ApolloClient {\n    link;\n    cache;\n    /**\n     * @deprecated `disableNetworkFetches` has been renamed to `prioritizeCacheValues`.\n     */\n    disableNetworkFetches;\n    set prioritizeCacheValues(value) {\n        this.queryManager.prioritizeCacheValues = value;\n    }\n    /**\n     * Whether to prioritize cache values over network results when `query` or `watchQuery` is called.\n     * This will essentially turn a `\"network-only\"` or `\"cache-and-network\"` fetchPolicy into a `\"cache-first\"` fetchPolicy,\n     * but without influencing the `fetchPolicy` of the created `ObservableQuery` long-term.\n     *\n     * This can e.g. be used to prioritize the cache during the first render after SSR.\n     */\n    get prioritizeCacheValues() {\n        return this.queryManager.prioritizeCacheValues;\n    }\n    version;\n    queryDeduplication;\n    defaultOptions;\n    devtoolsConfig;\n    refetchEventManager;\n    queryManager;\n    devToolsHookCb;\n    resetStoreCallbacks = [];\n    clearStoreCallbacks = [];\n    /**\n     * Constructs an instance of `ApolloClient`.\n     *\n     * @example\n     *\n     * ```js\n     * import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\";\n     *\n     * const cache = new InMemoryCache();\n     * const link = new HttpLink({ uri: \"http://localhost:4000/\" });\n     *\n     * const client = new ApolloClient({\n     *   // Provide required constructor fields\n     *   cache: cache,\n     *   link: link,\n     *\n     *   // Provide some optional constructor fields\n     *   clientAwareness: {\n     *     name: \"react-web-client\",\n     *     version: \"1.3\",\n     *   },\n     *   queryDeduplication: false,\n     * });\n     * ```\n     */\n    constructor(options) {\n        if (__DEV__) {\n            invariant(options.cache, 68);\n            invariant(options.link, 69);\n        }\n        const { cache, documentTransform, ssrMode = false, ssrForceFetchDelay = 0, queryDeduplication = true, defaultOptions, defaultContext, assumeImmutableResults = cache.assumeImmutableResults, localState, devtools, dataMasking, link, incrementalHandler = new NotImplementedHandler(), experiments = [], refetchEventManager, } = options;\n        this.link = link;\n        this.cache = cache;\n        this.queryDeduplication = queryDeduplication;\n        // `DefaultOptions.Input` and `DefaultOptions` are inherently incompatible,\n        // as the `.Input` type restricts certain values from being passed in if not\n        // configured globally.\n        // Without those, it's compatible though so it is fine to cast.\n        this.defaultOptions = (defaultOptions || {});\n        this.devtoolsConfig = {\n            ...devtools,\n            enabled: devtools?.enabled ?? __DEV__,\n        };\n        this.watchQuery = this.watchQuery.bind(this);\n        this.query = this.query.bind(this);\n        this.mutate = this.mutate.bind(this);\n        this.watchFragment = this.watchFragment.bind(this);\n        this.resetStore = this.resetStore.bind(this);\n        this.reFetchObservableQueries = this.refetchObservableQueries =\n            this.refetchObservableQueries.bind(this);\n        this.version = version;\n        this.queryManager = new QueryManager({\n            client: this,\n            defaultOptions: this.defaultOptions,\n            defaultContext,\n            documentTransform,\n            queryDeduplication,\n            ssrMode,\n            dataMasking: !!dataMasking,\n            clientOptions: options,\n            incrementalHandler,\n            assumeImmutableResults,\n            onBroadcast: this.devtoolsConfig.enabled ?\n                () => {\n                    if (this.devToolsHookCb) {\n                        this.devToolsHookCb();\n                    }\n                }\n                : void 0,\n            localState,\n        });\n        this.prioritizeCacheValues = ssrMode || ssrForceFetchDelay > 0;\n        if (ssrForceFetchDelay) {\n            setTimeout(() => {\n                this.prioritizeCacheValues = false;\n            }, ssrForceFetchDelay);\n        }\n        if (this.devtoolsConfig.enabled)\n            this.connectToDevTools();\n        experiments.forEach((experiment) => experiment.call(this, options));\n        this.refetchEventManager = refetchEventManager;\n        this.refetchEventManager?.connect(this);\n    }\n    connectToDevTools() {\n        if (typeof window === \"undefined\") {\n            return;\n        }\n        const windowWithDevTools = window;\n        const devtoolsSymbol = Symbol.for(\"apollo.devtools\");\n        (windowWithDevTools[devtoolsSymbol] =\n            windowWithDevTools[devtoolsSymbol] || []).push(this);\n        windowWithDevTools.__APOLLO_CLIENT__ = this;\n        /**\n         * Suggest installing the devtools for developers who don't have them\n         */\n        if (!hasSuggestedDevtools && __DEV__) {\n            hasSuggestedDevtools = true;\n            const win = window;\n            const ua = win.navigator.userAgent;\n            let url;\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 (win.document &&\n                win.top === win.self &&\n                /^(https?|file):$/.test(win.location.protocol) &&\n                url) {\n                setTimeout(() => {\n                    if (!win.__APOLLO_DEVTOOLS_GLOBAL_HOOK__) {\n                        __DEV__ && invariant.log(\"Download the Apollo DevTools for a better development \" +\n                            \"experience: %s\", url);\n                    }\n                }, 10000);\n            }\n        }\n    }\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 documentTransform() {\n        return this.queryManager.documentTransform;\n    }\n    /**\n     * The configured `LocalState` instance used to enable the use of `@client`\n     * fields.\n     */\n    get localState() {\n        return this.queryManager.localState;\n    }\n    set localState(localState) {\n        this.queryManager.localState = localState;\n    }\n    /**\n     * Call this method to terminate any active client processes, making it safe\n     * to dispose of this `ApolloClient` instance.\n     *\n     * This method performs aggressive cleanup to prevent memory leaks:\n     *\n     * - Unsubscribes all active `ObservableQuery` instances by emitting a `completed` event\n     * - Rejects all currently running queries with \"QueryManager stopped while query was in flight\"\n     * - Removes all queryRefs from the suspense cache\n     * - Disconnects the `RefetchEventManager` if configured.\n     */\n    stop() {\n        this.queryManager.stop();\n        this.refetchEventManager?.disconnect(this);\n    }\n    /**\n     * This watches the cache store of the query according to the options specified and\n     * returns an `ObservableQuery`. We can subscribe to this `ObservableQuery` and\n     * receive updated results through an 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     * `cache.identify`. 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    watchQuery(options) {\n        const { refetchOn } = options;\n        if (this.defaultOptions.watchQuery) {\n            // Capture the default `refetchOn` at the time of the `watchQuery`\n            // call so that it is unaffected even if defaultOptions.refetchOn is\n            // mutated later.\n            const defaultRefetchOn = this.defaultOptions.watchQuery.refetchOn;\n            let mergedRefetchOn;\n            if (refetchOn && typeof refetchOn === \"object\") {\n                if (typeof defaultRefetchOn === \"object\") {\n                    mergedRefetchOn = { ...defaultRefetchOn, ...refetchOn };\n                }\n                else if (defaultRefetchOn != null) {\n                    // We set the merged `refetchOn` option to a callback function in case\n                    // the client hasn't connected to a RefetchEventManager yet, or\n                    // sources are added to the manager after watchQuery is called. This\n                    // ensures we can handle any registered source regardless of when it\n                    // was registered.\n                    mergedRefetchOn = (ctx) => {\n                        const value = refetchOn[ctx.source] ?? defaultRefetchOn;\n                        if (typeof value === \"function\") {\n                            return value(ctx);\n                        }\n                        return value;\n                    };\n                }\n            }\n            options = mergeOptions(this.defaultOptions.watchQuery, options);\n            if (mergedRefetchOn) {\n                options.refetchOn = mergedRefetchOn;\n            }\n        }\n        if (__DEV__) {\n            const { query } = options;\n            const { refetchEventManager } = this;\n            // Note: refetchOn evaluates the original refetchOn value, not the merged\n            // refetchOn value.\n            if (refetchOn) {\n                const operationName = getOperationName(query, \"(anonymous)\");\n                if (!refetchEventManager) {\n                    __DEV__ && invariant.warn(70, operationName);\n                }\n                else if (typeof refetchOn === \"object\") {\n                    Object.keys(refetchOn).forEach((source) => {\n                        if (!refetchEventManager.hasSource(source)) {\n                            __DEV__ && invariant.warn(71, source, operationName);\n                        }\n                    });\n                }\n            }\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 `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    query = (options) => {\n        if (this.defaultOptions.query) {\n            options = mergeOptions(this.defaultOptions.query, options);\n        }\n        if (__DEV__) {\n            invariant(options.fetchPolicy !== \"cache-and-network\", 72);\n            invariant(options.fetchPolicy !== \"standby\", 73);\n            invariant(options.query, 74);\n            invariant(options.query.kind === \"Document\", 75);\n            invariant(!options.returnPartialData, 76);\n            invariant(!options.pollInterval, 77);\n            invariant(!options.notifyOnNetworkStatusChange, 78);\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. In some cases both `data` and `errors` might be undefined, for example\n    * when `errorPolicy` is set to `'ignore'`.\n    * \n    * It takes options as an object with the following keys and values:\n    */\n    mutate = (options) => {\n        const optionsWithDefaults = mergeOptions(compact({\n            fetchPolicy: \"network-only\",\n            errorPolicy: \"none\",\n        }, this.defaultOptions.mutate), options);\n        if (__DEV__) {\n            invariant(optionsWithDefaults.mutation, 79);\n            invariant(optionsWithDefaults.fetchPolicy === \"network-only\" ||\n                optionsWithDefaults.fetchPolicy === \"no-cache\", 80);\n        }\n        checkDocument(optionsWithDefaults.mutation, OperationTypeNode.MUTATION);\n        return this.queryManager.mutate(optionsWithDefaults);\n    };\n    /**\n     * This subscribes to a graphql subscription according to the options specified and returns an\n     * `Observable` which either emits received data or an error.\n     */\n    subscribe(options) {\n        const cause = {};\n        const observable = this.queryManager.startGraphQLSubscription(options);\n        const mapped = observable.pipe(map((result) => ({\n            ...result,\n            data: this.queryManager.maskOperation({\n                document: options.query,\n                data: result.data,\n                fetchPolicy: options.fetchPolicy,\n                cause,\n            }),\n        })));\n        return Object.assign(mapped, { restart: observable.restart });\n    }\n    readQuery(options, optimistic = !!options.optimistic) {\n        return this.cache.readQuery({ ...options, query: this.transform(options.query) }, optimistic);\n    }\n    watchFragment(options) {\n        const dataMasking = this.queryManager.dataMasking;\n        const observable = this.cache.watchFragment({\n            ...options,\n            fragment: this.transform(options.fragment, dataMasking),\n        });\n        if (__DEV__) {\n            return mapObservableFragmentMemoized(observable, Symbol.for(\"apollo.transform.dev.mask\"), (result) => ({\n                ...result,\n                // The transform will remove fragment spreads from the fragment\n                // document when dataMasking is enabled. The `mask` function\n                // remains to apply warnings to fragments marked as\n                // `@unmask(mode: \"migrate\")`. Since these warnings are only applied\n                // in dev, we can skip the masking algorithm entirely for production.\n                data: this.queryManager.maskFragment({\n                    ...options,\n                    data: result.data,\n                }),\n            }));\n        }\n        return observable;\n    }\n    readFragment(options, optimistic = !!options.optimistic) {\n        return this.cache.readFragment({ ...options, fragment: this.transform(options.fragment) }, 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 `cache.identify` then use `writeFragment`.\n     */\n    writeQuery(options) {\n        const 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    writeFragment(options) {\n        const ref = this.cache.writeFragment(options);\n        if (options.broadcast !== false) {\n            this.queryManager.broadcastQueries();\n        }\n        return ref;\n    }\n    __actionHookForDevTools(cb) {\n        this.devToolsHookCb = cb;\n    }\n    __requestRaw(request) {\n        return execute(this.link, request, { client: this });\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    resetStore() {\n        return Promise.resolve()\n            .then(() => this.queryManager.clearStore({\n            discardWatches: false,\n        }))\n            .then(() => Promise.all(this.resetStoreCallbacks.map((fn) => fn())))\n            .then(() => this.refetchObservableQueries());\n    }\n    /**\n     * Remove all data from the store. Unlike `resetStore`, `clearStore` will\n     * not refetch any active queries.\n     */\n    clearStore() {\n        return Promise.resolve()\n            .then(() => this.queryManager.clearStore({\n            discardWatches: true,\n        }))\n            .then(() => Promise.all(this.clearStoreCallbacks.map((fn) => 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    onResetStore(cb) {\n        this.resetStoreCallbacks.push(cb);\n        return () => {\n            this.resetStoreCallbacks = this.resetStoreCallbacks.filter((c) => 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    onClearStore(cb) {\n        this.clearStoreCallbacks.push(cb);\n        return () => {\n            this.clearStoreCallbacks = this.clearStoreCallbacks.filter((c) => 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     * Note: `cache-only` queries are not refetched by this function.\n     *\n     * @deprecated Please use `refetchObservableQueries` instead.\n     */\n    reFetchObservableQueries;\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     * Note: `cache-only` queries are not refetched by this function.\n     */\n    refetchObservableQueries(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    refetchQueries(options) {\n        const map = this.queryManager.refetchQueries(options);\n        const queries = [];\n        const results = [];\n        map.forEach((result, obsQuery) => {\n            queries.push(obsQuery);\n            results.push(result);\n        });\n        const 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((error) => {\n            __DEV__ && invariant.debug(81, error);\n        });\n        return result;\n    }\n    /**\n     * Get all currently active `ObservableQuery` objects, in a `Set`.\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     * Note: This method only returns queries that have active subscribers. Queries\n     * without subscribers are not tracked by the client.\n     */\n    getObservableQueries(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     * @remarks\n     *\n     * This can be useful for debugging in order to inspect the full state of the\n     * cache.\n     *\n     * @param optimistic - Determines whether the result contains data from the\n     * optimistic layer\n     */\n    extract(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    restore(serializedState) {\n        return this.cache.restore(serializedState);\n    }\n    /**\n     * Define a new ApolloLink (or link chain) that Apollo Client will use.\n     */\n    setLink(newLink) {\n        this.link = newLink;\n    }\n    get defaultContext() {\n        return this.queryManager.defaultContext;\n    }\n    maskedFragmentTransform = new DocumentTransform(removeMaskedFragmentSpreads);\n    transform(document, dataMasking = false) {\n        const transformed = this.queryManager.transform(document);\n        return dataMasking ?\n            this.maskedFragmentTransform.transformDocument(transformed)\n            : transformed;\n    }\n}\nif (__DEV__) {\n    ApolloClient.prototype.getMemoryInternals = getApolloClientMemoryInternals;\n}\n//# sourceMappingURL=ApolloClient.js.map\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    /**\n     * Indicates that a `@defer` query has received at least the first chunk of\n     * the result but the full result has not yet been fully streamed to the\n     * client.\n     */\n    NetworkStatus[NetworkStatus[\"streaming\"] = 9] = \"streaming\";\n})(NetworkStatus || (NetworkStatus = {}));\n//# sourceMappingURL=networkStatus.js.map","import { brand, isBranded } from \"./utils.js\";\nfunction defaultFormatMessage(errors) {\n    return (errors\n        // Handle non-spec-compliant servers: See #1185\n        .filter((e) => e)\n        .map((e) => e.message || \"Error message not found.\")\n        .join(\"\\n\"));\n}\n/**\n * Represents the combined list of GraphQL errors returned from the server in a\n * GraphQL response. This error type is used when your GraphQL operation returns\n * errors in the `errors` field of the response.\n *\n * @remarks\n *\n * When your GraphQL operation encounters errors on the server side (such as\n * resolver errors, validation errors, or syntax errors), the server returns\n * these errors in the `errors` array of the GraphQL response. Apollo Client\n * wraps these errors in a `CombinedGraphQLErrors` object, which provides access\n * to the individual errors while maintaining additional context about the\n * response.\n *\n * @example\n *\n * ```ts\n * import { CombinedGraphQLErrors } from \"@apollo/client/errors\";\n *\n * // Check if an error is a CombinedGraphQLErrors object\n * if (CombinedGraphQLErrors.is(error)) {\n *   // Access individual GraphQL errors\n *   error.errors.forEach((graphQLError) => {\n *     console.log(graphQLError.message);\n *     console.log(graphQLError.path);\n *     console.log(graphQLError.locations);\n *   });\n *\n *   // Access the original GraphQL result\n *   console.log(error.result);\n * }\n * ```\n */\nexport class CombinedGraphQLErrors extends Error {\n    /**\n    * A method that determines whether an error is a `CombinedGraphQLErrors`\n    * object. This method enables TypeScript to narrow the error type.\n    * \n    * @example\n    * \n    * ```ts\n    * if (CombinedGraphQLErrors.is(error)) {\n    *   // TypeScript now knows `error` is a `CombinedGraphQLErrors` object\n    *   console.log(error.errors);\n    * }\n    * ```\n    */\n    static is(error) {\n        return isBranded(error, \"CombinedGraphQLErrors\");\n    }\n    /**\n    * A function that formats the error message used for the error's `message`\n    * property. Override this method to provide your own formatting.\n    * \n    * @remarks\n    * \n    * The `formatMessage` function is called by the `CombinedGraphQLErrors`\n    * constructor to provide a formatted message as the `message` property of the\n    * `CombinedGraphQLErrors` object. Follow the [\"Providing a custom message\n    * formatter\"](https://www.apollographql.com/docs/react/api/errors/CombinedGraphQLErrors#providing-a-custom-message-formatter) guide to learn how to modify the message format.\n    * \n    * @param errors - The array of GraphQL errors returned from the server in\n    * the `errors` field of the response.\n    * @param options - Additional context that could be useful when formatting\n    * the message.\n    */\n    static formatMessage = defaultFormatMessage;\n    /**\n    * The raw list of GraphQL errors returned by the `errors` field in the GraphQL response.\n    */\n    errors;\n    /**\n    * Partial data returned in the `data` field of the GraphQL response.\n    */\n    data;\n    /**\n    * Extensions returned by the `extensions` field in the GraphQL response.\n    */\n    extensions;\n    constructor(result, errors = result.errors || []) {\n        super(CombinedGraphQLErrors.formatMessage(errors, {\n            result,\n            defaultFormatMessage,\n        }));\n        this.errors = errors;\n        this.data = result.data;\n        this.extensions = result.extensions;\n        this.name = \"CombinedGraphQLErrors\";\n        brand(this);\n        Object.setPrototypeOf(this, CombinedGraphQLErrors.prototype);\n    }\n}\n//# sourceMappingURL=CombinedGraphQLErrors.js.map\n","import { brand, isBranded } from \"./utils.js\";\nfunction defaultFormatMessage(errors) {\n    return errors.map((e) => e.message || \"Error message not found.\").join(\"\\n\");\n}\n/**\n * Fatal transport-level errors returned when executing a subscription using the\n * multipart HTTP subscription protocol. See the documentation on the\n * [multipart HTTP protocol for GraphQL Subscriptions](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol) for more information on these errors.\n *\n * @remarks\n *\n * These errors indicate issues with the subscription transport itself, rather\n * than GraphQL-level errors. They typically occur when there are problems\n * communicating with subgraphs from the Apollo Router.\n *\n * @example\n *\n * ```ts\n * import { CombinedProtocolErrors } from \"@apollo/client/errors\";\n *\n * // Check if an error is a CombinedProtocolErrors instance\n * if (CombinedProtocolErrors.is(error)) {\n *   // Access individual protocol errors\n *   error.errors.forEach((protocolError) => {\n *     console.log(protocolError.message);\n *     console.log(protocolError.extensions);\n *   });\n * }\n * ```\n */\nexport class CombinedProtocolErrors extends Error {\n    /**\n     * A method that determines whether an error is a `CombinedProtocolErrors`\n     * object. This method enables TypeScript to narrow the error type.\n     *\n     * @example\n     *\n     * ```ts\n     * if (CombinedProtocolErrors.is(error)) {\n     *   // TypeScript now knows `error` is a CombinedProtocolErrors object\n     *   console.log(error.errors);\n     * }\n     * ```\n     */\n    static is(error) {\n        return isBranded(error, \"CombinedProtocolErrors\");\n    }\n    /**\n    * A function that formats the error message used for the error's `message`\n    * property. Override this method to provide your own formatting.\n    * \n    * @remarks\n    * \n    * The `formatMessage` function is called by the `CombinedProtocolErrors`\n    * constructor to provide a formatted message as the `message` property of the\n    * `CombinedProtocolErrors` object. Follow the [\"Providing a custom message\n    * formatter\"](https://www.apollographql.com/docs/react/api/errors/CombinedProtocolErrors#providing-a-custom-message-formatter) guide to learn how to modify the message format.\n    * \n    * @param errors - The array of GraphQL errors returned from the server in the\n    * `errors` field of the response.\n    * @param options - Additional context that could be useful when formatting\n    * the message.\n    */\n    static formatMessage = defaultFormatMessage;\n    /**\n    * The raw list of errors returned by the top-level `errors` field in the\n    * multipart HTTP subscription response.\n    */\n    errors;\n    constructor(protocolErrors) {\n        super(CombinedProtocolErrors.formatMessage(protocolErrors, {\n            defaultFormatMessage,\n        }));\n        this.name = \"CombinedProtocolErrors\";\n        this.errors = protocolErrors;\n        brand(this);\n        Object.setPrototypeOf(this, CombinedProtocolErrors.prototype);\n    }\n}\n//# sourceMappingURL=CombinedProtocolErrors.js.map\n","import { brand, isBranded } from \"./utils.js\";\n/**\n * Represents an error when a non-200 HTTP status code is returned from the\n * server according to the [GraphQL Over HTTP specification](https://graphql.github.io/graphql-over-http/draft/). This error\n * contains the full server response, including status code and body text.\n *\n * @remarks\n *\n * This error occurs when your GraphQL server responds with an HTTP status code\n * other than 200 (such as 4xx or 5xx status codes) with any media type other\n * than [`application/graphql-response+json`](https://graphql.github.io/graphql-over-http/draft/#sec-application-graphql-response-json).\n *\n * Servers that return non-200 status codes with other media types are not\n * guaranteed to contain a well-formed GraphQL response and may indicate issues\n * at the HTTP level, such as authentication failures, server unavailability,\n * or other HTTP-level problems.\n *\n * @example\n *\n * ```ts\n * import { ServerError } from \"@apollo/client/errors\";\n *\n * // Check if an error is a ServerError instance\n * if (ServerError.is(error)) {\n *   console.log(`Server returned status: ${error.statusCode}`);\n *   console.log(`Response body: ${error.bodyText}`);\n *\n *   // Handle specific status codes\n *   if (error.statusCode === 401) {\n *     // Handle unauthorized access\n *   }\n * }\n * ```\n */\nexport class ServerError extends Error {\n    /**\n     * A method that determines whether an error is a `ServerError` object. This\n     * method enables TypeScript to narrow the error type.\n     *\n     * @example\n     *\n     * ```ts\n     * if (ServerError.is(error)) {\n     *   // TypeScript now knows `error` is a ServerError object\n     *   console.log(error.errors);\n     * }\n     * ```\n     */\n    static is(error) {\n        return isBranded(error, \"ServerError\");\n    }\n    /**\n    * The raw [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object provided by the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).\n    */\n    response;\n    /**\n    * The status code returned by the server in the response. This is provided as\n    * a shortcut for `response.status`.\n    */\n    statusCode;\n    /**\n    * The raw response body text.\n    */\n    bodyText;\n    constructor(message, options) {\n        super(message);\n        this.name = \"ServerError\";\n        this.response = options.response;\n        this.statusCode = options.response.status;\n        this.bodyText = options.bodyText;\n        brand(this);\n        Object.setPrototypeOf(this, ServerError.prototype);\n    }\n}\n//# sourceMappingURL=ServerError.js.map\n","import { brand, isBranded } from \"./utils.js\";\n/**\n * A wrapper error type that represents a non-standard error thrown from a\n * A wrapper error type that represents a non-error value thrown from the\n * link chain, such as a symbol, primitive or plain object. Read the `cause` property to\n * determine the source of the error.\n *\n * @remarks\n *\n * This error is used to standardize error handling when non-Error values are\n * thrown in the Apollo Client link chain or other parts of the system.\n * JavaScript allows throwing any value (not just Error instances), and this\n * wrapper ensures that all thrown values can be handled consistently as\n * Error-like objects while preserving the original thrown value.\n *\n * > [!NOTE]\n * > Plain strings thrown as errors are wrapped in regular [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) objects instead of `UnconventionalError` objects since strings can be safely used as the error's `message`.\n *\n * @example\n *\n * ```ts\n * import { UnconventionalError } from \"@apollo/client/errors\";\n *\n * // Check if an error is an UnconventionalError instance\n * if (UnconventionalError.is(error)) {\n *   console.log(\"Non-standard error thrown:\", error.cause);\n *\n *   // Check the type of the original thrown value\n *   if (typeof error.cause === \"symbol\") {\n *     console.log(\"A symbol was thrown:\", error.cause.toString());\n *   } else if (typeof error.cause === \"object\") {\n *     console.log(\"An object was thrown:\", error.cause);\n *   } else {\n *     console.log(\"Unexpected value thrown:\", error.cause);\n *   }\n * }\n * ```\n */\nexport class UnconventionalError extends Error {\n    /**\n     * A method that determines whether an error is an `UnconventionalError`\n     * object. This method enables TypeScript to narrow the error type.\n     *\n     * @example\n     *\n     * ```ts\n     * if (UnconventionalError.is(error)) {\n     *   // TypeScript now knows `error` is a UnconventionalError object\n     *   console.log(\"What caused this?\", error.cause);\n     * }\n     * ```\n     */\n    static is(error) {\n        return isBranded(error, \"UnconventionalError\");\n    }\n    constructor(errorType) {\n        super(\"An error of unexpected shape occurred.\", { cause: errorType });\n        this.name = \"UnconventionalError\";\n        brand(this);\n        Object.setPrototypeOf(this, UnconventionalError.prototype);\n    }\n}\n//# sourceMappingURL=UnconventionalError.js.map","import { CombinedProtocolErrors } from \"./CombinedProtocolErrors.js\";\nimport { isErrorLike } from \"./isErrorLike.js\";\nimport { UnconventionalError } from \"./UnconventionalError.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 const PROTOCOL_ERRORS_SYMBOL = Symbol();\nexport function graphQLResultHasProtocolErrors(result) {\n    if (\"extensions\" in result) {\n        return CombinedProtocolErrors.is(result.extensions[PROTOCOL_ERRORS_SYMBOL]);\n    }\n    return false;\n}\nexport function toErrorLike(error) {\n    if (isErrorLike(error)) {\n        return error;\n    }\n    if (typeof error === \"string\") {\n        return new Error(error, { cause: error });\n    }\n    return new UnconventionalError(error);\n}\nexport { CombinedGraphQLErrors } from \"./CombinedGraphQLErrors.js\";\nexport { CombinedProtocolErrors } from \"./CombinedProtocolErrors.js\";\nexport { isErrorLike } from \"./isErrorLike.js\";\nexport { LinkError, registerLinkError } from \"./LinkError.js\";\nexport { LocalStateError } from \"./LocalStateError.js\";\nexport { ServerError } from \"./ServerError.js\";\nexport { ServerParseError } from \"./ServerParseError.js\";\nexport { UnconventionalError } from \"./UnconventionalError.js\";\n//# sourceMappingURL=index.js.map","export function isErrorLike(error) {\n    return (error !== null &&\n        typeof error === \"object\" &&\n        typeof error.message === \"string\" &&\n        typeof error.name === \"string\" &&\n        (typeof error.stack === \"string\" ||\n            typeof error.stack === \"undefined\"));\n}\n//# sourceMappingURL=isErrorLike.js.map","export function isBranded(error, name) {\n    return (typeof error === \"object\" &&\n        error !== null &&\n        error[Symbol.for(\"apollo.error\")] === name);\n}\nexport function brand(error) {\n    Object.defineProperty(error, Symbol.for(\"apollo.error\"), {\n        value: error.name,\n        enumerable: false,\n        writable: false,\n        configurable: false,\n    });\n}\n//# sourceMappingURL=utils.js.map","import { EMPTY } from \"rxjs\";\nimport { createOperation } from \"@apollo/client/link/utils\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { invariant, newInvariantError, } from \"@apollo/client/utilities/invariant\";\n/**\n * The base class for all links in Apollo Client. A link represents either a\n * self-contained modification to a GraphQL operation or a side effect (such as\n * logging).\n *\n * @remarks\n *\n * Links enable you to customize Apollo Client's request flow by composing\n * together different pieces of functionality into a chain of links. Each\n * link represents a specific capability, such as adding authentication headers,\n * retrying failed requests, batching operations, or sending requests to a\n * GraphQL server.\n *\n * Every link must define a request handler via its constructor or by extending\n * this class and implementing the `request` method.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink } from \"@apollo/client\";\n *\n * const link = new ApolloLink((operation, forward) => {\n *   console.log(\"Operation:\", operation.operationName);\n *   return forward(operation);\n * });\n * ```\n */\nexport class ApolloLink {\n    /**\n     * Creates a link that completes immediately and does not emit a result.\n     *\n     * @example\n     *\n     * ```ts\n     * const link = ApolloLink.empty();\n     * ```\n     */\n    static empty() {\n        return new ApolloLink(() => EMPTY);\n    }\n    /**\n     * Composes multiple links into a single composed link that executes each\n     * provided link in serial order.\n     *\n     * @example\n     *\n     * ```ts\n     * import { from, HttpLink, ApolloLink } from \"@apollo/client\";\n     * import { RetryLink } from \"@apollo/client/link/retry\";\n     * import MyAuthLink from \"../auth\";\n     *\n     * const link = ApolloLink.from([\n     *   new RetryLink(),\n     *   new MyAuthLink(),\n     *   new HttpLink({ uri: \"http://localhost:4000/graphql\" }),\n     * ]);\n     * ```\n     *\n     * @param links - An array of `ApolloLink` instances or request handlers that\n     * are executed in serial order.\n     */\n    static from(links) {\n        if (links.length === 0)\n            return ApolloLink.empty();\n        const [first, ...rest] = links;\n        return first.concat(...rest);\n    }\n    /**\n     * Creates a link that conditionally routes a request to different links.\n     *\n     * @example\n     *\n     * ```ts\n     * import { ApolloLink, HttpLink } from \"@apollo/client\";\n     *\n     * const link = ApolloLink.split(\n     *   (operation) => operation.getContext().version === 1,\n     *   new HttpLink({ uri: \"http://localhost:4000/v1/graphql\" }),\n     *   new HttpLink({ uri: \"http://localhost:4000/v2/graphql\" })\n     * );\n     * ```\n     *\n     * @param test - A predicate function that receives the current `operation`\n     * and returns a boolean indicating which link to execute. Returning `true`\n     * executes the `left` link. Returning `false` executes the `right` link.\n     *\n     * @param left - The link that executes when the `test` function returns\n     * `true`.\n     *\n     * @param right - The link that executes when the `test` function returns\n     * `false`. If the `right` link is not provided, the request is forwarded to\n     * the next link in the chain.\n     */\n    static split(test, left, right = new ApolloLink((op, forward) => forward(op))) {\n        const link = new ApolloLink((operation, forward) => {\n            const result = test(operation);\n            if (__DEV__) {\n                if (typeof result !== \"boolean\") {\n                    __DEV__ && invariant.warn(63, result);\n                }\n            }\n            return result ?\n                left.request(operation, forward)\n                : right.request(operation, forward);\n        });\n        return Object.assign(link, { left, right });\n    }\n    /**\n     * Executes a GraphQL request against a link. The `execute` function begins\n     * the request by calling the request handler of the link.\n     *\n     * @example\n     *\n     * ```ts\n     * const observable = ApolloLink.execute(link, { query, variables }, { client });\n     *\n     * observable.subscribe({\n     *   next(value) {\n     *     console.log(\"Received\", value);\n     *   },\n     *   error(error) {\n     *     console.error(\"Oops got error\", error);\n     *   },\n     *   complete() {\n     *     console.log(\"Request complete\");\n     *   },\n     * });\n     * ```\n     *\n     * @param link - The `ApolloLink` instance to execute the request.\n     *\n     * @param request - The GraphQL request details, such as the `query` and\n     * `variables`.\n     *\n     * @param context - The execution context for the request, such as the\n     * `client` making the request.\n     */\n    static execute(link, request, context) {\n        return link.request(createOperation(request, context), () => {\n            if (__DEV__) {\n                __DEV__ && invariant.warn(64);\n            }\n            return EMPTY;\n        });\n    }\n    /**\n     * Combines multiple links into a single composed link.\n     *\n     * @example\n     *\n     * ```ts\n     * const link = ApolloLink.concat(firstLink, secondLink, thirdLink);\n     * ```\n     *\n     * @param links - The links to concatenate into a single link. Each link will\n     * execute in serial order.\n     *\n     * @deprecated Use `ApolloLink.from` instead. `ApolloLink.concat` will be\n     * removed in a future major version.\n     */\n    static concat(...links) {\n        return ApolloLink.from(links);\n    }\n    constructor(request) {\n        if (request)\n            this.request = request;\n    }\n    /**\n     * Concatenates a link that conditionally routes a request to different links.\n     *\n     * @example\n     *\n     * ```ts\n     * import { ApolloLink, HttpLink } from \"@apollo/client\";\n     *\n     * const previousLink = new ApolloLink((operation, forward) => {\n     *   // Handle the request\n     *\n     *   return forward(operation);\n     * });\n     *\n     * const link = previousLink.split(\n     *   (operation) => operation.getContext().version === 1,\n     *   new HttpLink({ uri: \"http://localhost:4000/v1/graphql\" }),\n     *   new HttpLink({ uri: \"http://localhost:4000/v2/graphql\" })\n     * );\n     * ```\n     *\n     * @param test - A predicate function that receives the current `operation`\n     * and returns a boolean indicating which link to execute. Returning `true`\n     * executes the `left` link. Returning `false` executes the `right` link.\n     *\n     * @param left - The link that executes when the `test` function returns\n     * `true`.\n     *\n     * @param right - The link that executes when the `test` function returns\n     * `false`. If the `right` link is not provided, the request is forwarded to\n     * the next link in the chain.\n     */\n    split(test, left, right) {\n        return this.concat(ApolloLink.split(test, left, right));\n    }\n    /**\n     * Combines the link with other links into a single composed link.\n     *\n     * @example\n     *\n     * ```ts\n     * import { ApolloLink, HttpLink } from \"@apollo/client\";\n     *\n     * const previousLink = new ApolloLink((operation, forward) => {\n     *   // Handle the request\n     *\n     *   return forward(operation);\n     * });\n     *\n     * const link = previousLink.concat(\n     *   link1,\n     *   link2,\n     *   new HttpLink({ uri: \"http://localhost:4000/graphql\" })\n     * );\n     * ```\n     */\n    concat(...links) {\n        if (links.length === 0) {\n            return this;\n        }\n        return links.reduce(this.combine.bind(this), this);\n    }\n    combine(left, right) {\n        const link = new ApolloLink((operation, forward) => {\n            return left.request(operation, (op) => right.request(op, forward));\n        });\n        return Object.assign(link, { left, right });\n    }\n    /**\n     * Runs the request handler for the provided operation.\n     *\n     * > [!NOTE]\n     * > This is called by the `ApolloLink.execute` function for you and should\n     * > not be called directly. Prefer using `ApolloLink.execute` to make the\n     * > request instead.\n     */\n    request(operation, forward) {\n        throw newInvariantError(65);\n    }\n    /**\n    * @internal\n    * Used to iterate through all links that are concatenations or `split` links.\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    left;\n    /**\n    * @internal\n    * Used to iterate through all links that are concatenations or `split` links.\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    right;\n}\n//# sourceMappingURL=ApolloLink.js.map\n","import { getOperationDefinition, getOperationName, } from \"@apollo/client/utilities/internal\";\nexport function createOperation(request, { client }) {\n    const operation = {\n        query: request.query,\n        variables: request.variables || {},\n        extensions: request.extensions || {},\n        operationName: getOperationName(request.query),\n        operationType: getOperationDefinition(request.query).operation,\n    };\n    let context = { ...request.context };\n    const setContext = (next) => {\n        if (typeof next === \"function\") {\n            context = { ...context, ...next(getContext()) };\n        }\n        else {\n            context = { ...context, ...next };\n        }\n    };\n    const getContext = () => Object.freeze({ ...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    Object.defineProperty(operation, \"client\", {\n        enumerable: false,\n        value: client,\n    });\n    return operation;\n}\n//# sourceMappingURL=createOperation.js.map","import { ApolloLink } from \"@apollo/client/link\";\nimport { compact } from \"@apollo/client/utilities/internal\";\n/**\n * `ClientAwarenessLink` provides support for providing client awareness\n * features.\n *\n * @remarks\n *\n * Client awareness adds identifying information about the client to HTTP\n * requests for use with metrics reporting tools, such as [Apollo GraphOS](https://apollographql.com/docs/graphos/platform).\n * It is included in the functionality of [`HttpLink`](https://apollographql.com/docs/react/api/link/apollo-link-http) by default.\n *\n * Client awareness distinguishes between user-provided client awareness\n * (provided by the `clientAwareness` option) and enhanced client awareness\n * (provided by the `enhancedClientAwareness` option). User-provided client\n * awareness enables you to set a customized client name and version for\n * identification in metrics reporting tools. Enhanced client awareness enables\n * the identification of the Apollo Client package name and version.\n *\n * @example\n *\n * ```ts\n * import { ClientAwarenessLink } from \"@apollo/client/link/client-awareness\";\n *\n * const link = new ClientAwarenessLink({\n *   clientAwareness: {\n *     name: \"My Client\",\n *     version: \"1\",\n *   },\n *   enhancedClientAwareness: {\n *     transport: \"extensions\",\n *   },\n * });\n * ```\n */\nexport class ClientAwarenessLink extends ApolloLink {\n    constructor(options = {}) {\n        super((operation, forward) => {\n            const client = operation.client;\n            const clientOptions = client[\"queryManager\"].clientOptions;\n            const context = operation.getContext();\n            {\n                const { name, version, transport = \"headers\", } = compact({}, clientOptions.clientAwareness, options.clientAwareness, context.clientAwareness);\n                if (transport === \"headers\") {\n                    operation.setContext(({ headers }) => {\n                        return {\n                            headers: compact(\n                            // setting these first so that they can be overridden by user-provided headers\n                            {\n                                \"apollographql-client-name\": name,\n                                \"apollographql-client-version\": version,\n                            }, headers),\n                        };\n                    });\n                }\n            }\n            {\n                const { transport = \"extensions\" } = compact({}, clientOptions.enhancedClientAwareness, options.enhancedClientAwareness);\n                if (transport === \"extensions\") {\n                    operation.extensions = compact(\n                    // setting these first so that it can be overridden by user-provided extensions\n                    {\n                        clientLibrary: {\n                            name: \"@apollo/client\",\n                            version: client.version,\n                        },\n                    }, operation.extensions);\n                }\n                if (transport === \"headers\") {\n                    operation.setContext(({ headers }) => {\n                        return {\n                            headers: compact(\n                            // setting these first so that they can be overridden by user-provided headers\n                            {\n                                \"apollographql-library-name\": \"@apollo/client\",\n                                \"apollographql-library-version\": client.version,\n                            }, headers),\n                        };\n                    });\n                }\n            }\n            return forward(operation);\n        });\n    }\n}\n//# sourceMappingURL=ClientAwarenessLink.js.map","import { getOperationDefinition } from \"@apollo/client/utilities/internal\";\nfunction isOperation(document, operation) {\n    return getOperationDefinition(document)?.operation === operation;\n}\n/**\n * Determine if a document is a mutation document.\n *\n * @remarks\n * If you are authoring an Apollo link, you might not need this utility.\n * Prefer using the `operationType` property the `operation` object instead.\n *\n * @param document - The GraphQL document to check\n * @returns A boolean indicating if the document is a mutation operation\n *\n * @example\n *\n * ```ts\n * import { isMutationOperation } from \"@apollo/client/utilities\";\n *\n * const mutation = gql`\n *   mutation MyMutation {\n *     # ...\n *   }\n * `;\n *\n * isMutationOperation(mutation); // true\n * ```\n */\nexport function isMutationOperation(document) {\n    return isOperation(document, \"mutation\");\n}\n/**\n * Determine if a document is a query document.\n *\n * @remarks\n * If you are authoring an Apollo link, you might not need this utility.\n * Prefer using the `operationType` property the `operation` object instead.\n *\n * @param document - The GraphQL document to check\n * @returns A boolean indicating if the document is a query operation\n *\n * @example\n *\n * ```ts\n * import { isQueryOperation } from \"@apollo/client/utilities\";\n *\n * const query = gql`\n *   query MyQuery {\n *     # ...\n *   }\n * `;\n *\n * isQueryOperation(query); // true\n * ```\n */\nexport function isQueryOperation(document) {\n    return isOperation(document, \"query\");\n}\n/**\n * Determine if a document is a subscription document.\n *\n * @remarks\n * If you are authoring an Apollo link, you might not need this utility.\n * Prefer using the `operationType` property the `operation` object instead.\n *\n * @param document - The GraphQL document to check\n * @returns A boolean indicating if the document is a subscription operation\n *\n * @example\n *\n * ```ts\n * import { isSubscriptionOperation } from \"@apollo/client/utilities\";\n *\n * const subscription = gql`\n *   subscription MySubscription {\n *     # ...\n *   }\n * `;\n *\n * isSubscriptionOperation(subscription); // true\n * ```\n */\nexport function isSubscriptionOperation(document) {\n    return isOperation(document, \"subscription\");\n}\n//# sourceMappingURL=operations.js.map","import { brand, isBranded } from \"./utils.js\";\n/**\n * Represents a failure to parse the response as JSON from the server. This\n * error helps debug issues where the server returns malformed JSON or non-JSON\n * content.\n *\n * @remarks\n *\n * This error occurs when Apollo Client receives a response from the server but\n * cannot parse it as valid JSON. This typically happens when the server returns\n * HTML error pages, plain text responses, or malformed JSON instead of the\n * expected GraphQL JSON response format.\n *\n * @example\n *\n * ```ts\n * import { ServerParseError } from \"@apollo/client/errors\";\n *\n * // Check if an error is a ServerParseError instance\n * if (ServerParseError.is(error)) {\n *   console.log(`Failed to parse response from ${error.response.url}`);\n *   console.log(`Raw response: ${error.bodyText}`);\n *   console.log(`Status code: ${error.statusCode}`);\n *\n *   // Access the original parse error\n *   console.log(`Parse error: ${error.cause}`);\n * }\n * ```\n */\nexport class ServerParseError extends Error {\n    /**\n     * A method that determines whether an error is a `ServerParseError`\n     * object. This method enables TypeScript to narrow the error type.\n     *\n     * @example\n     *\n     * ```ts\n     * if (ServerParseError.is(error)) {\n     *   // TypeScript now knows `error` is a ServerParseError object\n     *   console.log(error.statusCode);\n     * }\n     * ```\n     */\n    static is(error) {\n        return isBranded(error, \"ServerParseError\");\n    }\n    /**\n    * The raw [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object provided by the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).\n    */\n    response;\n    /**\n    * The status code returned by the server in the response. This is provided\n    * as a shortcut for `response.status`.\n    */\n    statusCode;\n    /**\n    * The raw response body text.\n    */\n    bodyText;\n    constructor(originalParseError, options) {\n        super(originalParseError instanceof Error ?\n            originalParseError.message\n            : \"Could not parse server response\", { cause: originalParseError });\n        this.name = \"ServerParseError\";\n        this.response = options.response;\n        this.statusCode = options.response.status;\n        this.bodyText = options.bodyText;\n        brand(this);\n        Object.setPrototypeOf(this, ServerParseError.prototype);\n    }\n}\n//# sourceMappingURL=ServerParseError.js.map\n","import { CombinedProtocolErrors, PROTOCOL_ERRORS_SYMBOL, ServerError, ServerParseError, } from \"@apollo/client/errors\";\nimport { isNonNullObject } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nconst { hasOwnProperty } = Object.prototype;\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.\n */\nfunction isApolloPayloadResult(value) {\n    return isNonNullObject(value) && \"payload\" in value;\n}\nasync function* consumeMultipartBody(response) {\n    const decoder = new TextDecoder(\"utf-8\");\n    const contentType = response.headers?.get(\"content-type\");\n    // parse boundary value and ignore any subsequent name/value pairs after ;\n    // https://www.rfc-editor.org/rfc/rfc9110.html#name-parameters\n    // e.g. multipart/mixed;boundary=\"graphql\";deferSpec=20220824\n    // if no boundary is specified, default to -\n    const match = contentType?.match(\n    /*\n      ;\\s*boundary=                # Match the boundary parameter\n      (?:                          # either\n        '([^']*)'                  # a string starting with ' doesn't contain ', ends with '\n        |                          # or\n        \"([^\"]*)\"                  # a string starting with \" doesn't contain \", ends with \"\n        |                          # or\n        ([^\"'].*?)                 # a string that doesn't start with ' or \", parsed non-greedily\n        )                          # end of the group\n      \\s*                          # optional whitespace\n      (?:;|$)                        # match a semicolon or end of string\n    */\n    /;\\s*boundary=(?:'([^']+)'|\"([^\"]+)\"|([^\"'].+?))\\s*(?:;|$)/i);\n    const boundary = \"\\r\\n--\" + (match ? match[1] ?? match[2] ?? match[3] ?? \"-\" : \"-\");\n    let buffer = \"\";\n    invariant(response.body && typeof response.body.getReader === \"function\", 62);\n    const stream = response.body;\n    const reader = stream.getReader();\n    let done = false;\n    let encounteredBoundary = false;\n    let value;\n    // check to see if we received the final boundary, which is a normal boundary followed by \"--\"\n    // as described in https://www.rfc-editor.org/rfc/rfc2046#section-5.1.1\n    const passedFinalBoundary = () => encounteredBoundary && buffer[0] == \"-\" && buffer[1] == \"-\";\n    try {\n        while (!done) {\n            ({ value, done } = await reader.read());\n            const chunk = typeof value === \"string\" ? value : (decoder.decode(value, { stream: !done }));\n            const searchFrom = buffer.length - boundary.length + 1;\n            buffer += chunk;\n            let bi = buffer.indexOf(boundary, searchFrom);\n            while (bi > -1 && !passedFinalBoundary()) {\n                encounteredBoundary = true;\n                let message;\n                [message, buffer] = [\n                    buffer.slice(0, bi),\n                    buffer.slice(bi + boundary.length),\n                ];\n                const i = message.indexOf(\"\\r\\n\\r\\n\");\n                const headers = parseHeaders(message.slice(0, i));\n                const contentType = headers[\"content-type\"];\n                if (contentType &&\n                    contentType.toLowerCase().indexOf(\"application/json\") === -1) {\n                    throw new Error(\"Unsupported patch content type: application/json is required.\");\n                }\n                // nb: Technically you'd want to slice off the beginning \"\\r\\n\" but since\n                // this is going to be `JSON.parse`d there is no need.\n                const body = message.slice(i);\n                if (body) {\n                    yield body;\n                }\n                bi = buffer.indexOf(boundary);\n            }\n            if (passedFinalBoundary()) {\n                return;\n            }\n        }\n        throw new Error(\"premature end of multipart body\");\n    }\n    finally {\n        reader.cancel();\n    }\n}\nexport async function readMultipartBody(response, nextValue) {\n    for await (const body of consumeMultipartBody(response)) {\n        const result = parseJsonEncoding(response, body);\n        if (Object.keys(result).length == 0)\n            continue;\n        if (isApolloPayloadResult(result)) {\n            if (Object.keys(result).length === 1 && result.payload === null) {\n                return;\n            }\n            let next = { ...result.payload };\n            if (\"errors\" in result) {\n                next.extensions = {\n                    ...next.extensions,\n                    [PROTOCOL_ERRORS_SYMBOL]: new CombinedProtocolErrors(result.errors ?? []),\n                };\n            }\n            nextValue(next);\n        }\n        else {\n            nextValue(result);\n        }\n    }\n}\nfunction parseHeaders(headerText) {\n    const headersInit = {};\n    headerText.split(\"\\n\").forEach((line) => {\n        const i = line.indexOf(\":\");\n        if (i > -1) {\n            // normalize headers to lowercase\n            const name = line.slice(0, i).trim().toLowerCase();\n            const value = line.slice(i + 1).trim();\n            headersInit[name] = value;\n        }\n    });\n    return headersInit;\n}\nfunction parseJsonEncoding(response, bodyText) {\n    if (response.status >= 300) {\n        throw new ServerError(`Response not successful: Received status code ${response.status}`, { response, bodyText });\n    }\n    try {\n        return JSON.parse(bodyText);\n    }\n    catch (err) {\n        throw new ServerParseError(err, { response, bodyText });\n    }\n}\nfunction parseGraphQLResponseJsonEncoding(response, bodyText) {\n    try {\n        return JSON.parse(bodyText);\n    }\n    catch (err) {\n        throw new ServerParseError(err, { response, bodyText });\n    }\n}\nfunction parseResponse(response, bodyText) {\n    const contentType = response.headers.get(\"content-type\");\n    if (contentType?.includes(\"application/graphql-response+json\")) {\n        return parseGraphQLResponseJsonEncoding(response, bodyText);\n    }\n    return parseJsonEncoding(response, bodyText);\n}\nexport function parseAndCheckHttpResponse(operations) {\n    return (response) => response.text().then((bodyText) => {\n        const result = parseResponse(response, bodyText);\n        if (!Array.isArray(result) &&\n            !hasOwnProperty.call(result, \"data\") &&\n            !hasOwnProperty.call(result, \"errors\")) {\n            throw new ServerError(`Server response was malformed for query '${Array.isArray(operations) ?\n                operations.map((op) => op.operationName)\n                : operations.operationName}'.`, { response, bodyText });\n        }\n        return result;\n    });\n}\n//# sourceMappingURL=parseAndCheckHttpResponse.js.map\n","import { print } from \"@apollo/client/utilities\";\nconst defaultHttpOptions = {\n    includeQuery: true,\n    includeExtensions: true,\n    preserveHeaderCase: false,\n};\nconst defaultHeaders = {\n    // headers are case insensitive (https://stackoverflow.com/a/5259004)\n    accept: \"application/graphql-response+json,application/json;q=0.9\",\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};\nconst defaultOptions = {\n    method: \"POST\",\n};\nexport const fallbackHttpConfig = {\n    http: defaultHttpOptions,\n    headers: defaultHeaders,\n    options: defaultOptions,\n};\nexport const defaultPrinter = (ast, printer) => printer(ast);\nexport function selectHttpOptionsAndBody(operation, fallbackConfig, ...configs) {\n    configs.unshift(fallbackConfig);\n    return selectHttpOptionsAndBodyInternal(operation, defaultPrinter, ...configs);\n}\nexport function selectHttpOptionsAndBodyInternal(operation, printer, ...configs) {\n    let options = {};\n    let http = {};\n    configs.forEach((config) => {\n        options = {\n            ...options,\n            ...config.options,\n            headers: {\n                ...options.headers,\n                ...config.headers,\n            },\n        };\n        if (config.credentials) {\n            options.credentials = config.credentials;\n        }\n        options.headers.accept = (config.http?.accept || [])\n            .concat(options.headers.accept)\n            .join(\",\");\n        http = {\n            ...http,\n            ...config.http,\n        };\n    });\n    options.headers = removeDuplicateHeaders(options.headers, http.preserveHeaderCase);\n    //The body depends on the http options\n    const { operationName, extensions, variables, query } = operation;\n    const body = { operationName, variables };\n    if (http.includeExtensions && Object.keys(extensions || {}).length)\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,\n        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        const normalizedHeaders = {};\n        Object.keys(Object(headers)).forEach((name) => {\n            normalizedHeaders[name.toLowerCase()] = headers[name];\n        });\n        return normalizedHeaders;\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    const headerData = {};\n    Object.keys(Object(headers)).forEach((name) => {\n        headerData[name.toLowerCase()] = {\n            originalName: name,\n            value: headers[name],\n        };\n    });\n    const normalizedHeaders = {};\n    Object.keys(headerData).forEach((name) => {\n        normalizedHeaders[headerData[name].originalName] = headerData[name].value;\n    });\n    return normalizedHeaders;\n}\n//# sourceMappingURL=selectHttpOptionsAndBody.js.map","import { Observable } from \"rxjs\";\nimport { ApolloLink } from \"@apollo/client/link\";\nimport { filterOperationVariables } from \"@apollo/client/link/utils\";\nimport { isMutationOperation, isSubscriptionOperation, } from \"@apollo/client/utilities\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { compact } from \"@apollo/client/utilities/internal\";\nimport { maybe } from \"@apollo/client/utilities/internal/globals\";\nimport { checkFetcher } from \"./checkFetcher.js\";\nimport { parseAndCheckHttpResponse, readMultipartBody, } from \"./parseAndCheckHttpResponse.js\";\nimport { rewriteURIForGET } from \"./rewriteURIForGET.js\";\nimport { defaultPrinter, fallbackHttpConfig, selectHttpOptionsAndBodyInternal, } from \"./selectHttpOptionsAndBody.js\";\nimport { selectURI } from \"./selectURI.js\";\nconst backupFetch = maybe(() => fetch);\nfunction noop() { }\n/**\n * `BaseHttpLink` is a terminating link that sends a GraphQL operation to a\n * remote endpoint over HTTP. It serves as a base link to `HttpLink`.\n *\n * @remarks\n *\n * `BaseHttpLink` supports both POST and GET requests, and you can configure\n * HTTP options on a per-operation basis. You can use these options for\n * authentication, persisted queries, dynamic URIs, and other granular updates.\n *\n * > [!NOTE]\n * > Prefer using `HttpLink` over `BaseHttpLink`. Use `BaseHttpLink` when you\n * > need to disable client awareness features and would like to tree-shake\n * > the implementation of `ClientAwarenessLink` out of your app bundle.\n *\n * @example\n *\n * ```ts\n * import { BaseHttpLink } from \"@apollo/client/link/http\";\n *\n * const link = new BaseHttpLink({\n *   uri: \"http://localhost:4000/graphql\",\n *   headers: {\n *     authorization: `Bearer ${token}`,\n *   },\n * });\n * ```\n */\nexport class BaseHttpLink extends ApolloLink {\n    constructor(options = {}) {\n        let { uri = \"/graphql\", \n        // use default global fetch if nothing passed in\n        fetch: preferredFetch, print = defaultPrinter, includeExtensions, preserveHeaderCase, useGETForQueries, includeUnusedVariables = false, ...requestOptions } = options;\n        if (__DEV__) {\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        const linkConfig = {\n            http: compact({ includeExtensions, preserveHeaderCase }),\n            options: requestOptions.fetchOptions,\n            credentials: requestOptions.credentials,\n            headers: requestOptions.headers,\n        };\n        super((operation) => {\n            let chosenURI = selectURI(operation, uri);\n            const context = operation.getContext();\n            const http = { ...context.http };\n            if (isSubscriptionOperation(operation.query)) {\n                http.accept = [\n                    \"multipart/mixed;boundary=graphql;subscriptionSpec=1.0\",\n                    ...(http.accept || []),\n                ];\n            }\n            const contextConfig = {\n                http,\n                options: context.fetchOptions,\n                credentials: context.credentials,\n                headers: context.headers,\n            };\n            //uses fallback, link, and then context to build options\n            const { options, body } = selectHttpOptionsAndBodyInternal(operation, print, fallbackHttpConfig, linkConfig, contextConfig);\n            if (body.variables && !includeUnusedVariables) {\n                body.variables = filterOperationVariables(body.variables, operation.query);\n            }\n            let controller = new AbortController();\n            let cleanupController = () => {\n                controller = undefined;\n            };\n            if (options.signal) {\n                const externalSignal = options.signal;\n                // in an ideal world we could use `AbortSignal.any` here, but\n                // React Native uses https://github.com/mysticatea/abort-controller as\n                // a polyfill for `AbortController`, and it does not support `AbortSignal.any`.\n                const listener = () => {\n                    controller?.abort(externalSignal.reason);\n                };\n                externalSignal.addEventListener(\"abort\", listener, { once: true });\n                cleanupController = () => {\n                    controller?.signal.removeEventListener(\"abort\", cleanupController);\n                    controller = undefined;\n                    // on cleanup, we need to stop listening to `options.signal` to avoid memory leaks\n                    externalSignal.removeEventListener(\"abort\", listener);\n                    cleanupController = noop;\n                };\n                // react native also does not support the addEventListener `signal` option\n                // so we have to simulate that ourself\n                controller.signal.addEventListener(\"abort\", cleanupController, {\n                    once: true,\n                });\n            }\n            options.signal = controller.signal;\n            if (useGETForQueries && !isMutationOperation(operation.query)) {\n                options.method = \"GET\";\n            }\n            return new Observable((observer) => {\n                if (options.method === \"GET\") {\n                    const { newURI, parseError } = rewriteURIForGET(chosenURI, body);\n                    if (parseError) {\n                        throw parseError;\n                    }\n                    chosenURI = newURI;\n                }\n                else {\n                    options.body = JSON.stringify(body);\n                }\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                const currentFetch = preferredFetch || maybe(() => fetch) || backupFetch;\n                const observerNext = observer.next.bind(observer);\n                currentFetch(chosenURI, options)\n                    .then((response) => {\n                    operation.setContext({ response });\n                    const ctype = response.headers?.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(() => {\n                    cleanupController();\n                    observer.complete();\n                })\n                    .catch((err) => {\n                    cleanupController();\n                    observer.error(err);\n                });\n                return () => {\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}\n//# sourceMappingURL=BaseHttpLink.js.map","import { visit } from \"graphql\";\nexport function filterOperationVariables(variables, query) {\n    const result = { ...variables };\n    const unusedNames = new Set(Object.keys(variables));\n    visit(query, {\n        Variable(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((name) => {\n        delete result[name];\n    });\n    return result;\n}\n//# sourceMappingURL=filterOperationVariables.js.map","export const selectURI = (operation, fallbackURI) => {\n    const context = operation.getContext();\n    const 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//# sourceMappingURL=selectURI.js.map","// 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    const queryParams = [];\n    const addQueryParam = (key, value) => {\n        queryParams.push(`${key}=${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        let serializedVariables;\n        try {\n            serializedVariables = JSON.stringify(body.variables);\n        }\n        catch (parseError) {\n            return { parseError };\n        }\n        addQueryParam(\"variables\", serializedVariables);\n    }\n    if (body.extensions) {\n        let serializedExtensions;\n        try {\n            serializedExtensions = JSON.stringify(body.extensions);\n        }\n        catch (parseError) {\n            return { 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    let fragment = \"\", preFragment = chosenURI;\n    const fragmentStart = chosenURI.indexOf(\"#\");\n    if (fragmentStart !== -1) {\n        fragment = chosenURI.substr(fragmentStart);\n        preFragment = chosenURI.substr(0, fragmentStart);\n    }\n    const queryParamsPrefix = preFragment.indexOf(\"?\") === -1 ? \"?\" : \"&\";\n    const newURI = preFragment + queryParamsPrefix + queryParams.join(\"&\") + fragment;\n    return { newURI };\n}\n//# sourceMappingURL=rewriteURIForGET.js.map","import { ApolloLink } from \"@apollo/client/link\";\nimport { ClientAwarenessLink } from \"@apollo/client/link/client-awareness\";\nimport { BaseHttpLink } from \"./BaseHttpLink.js\";\n/**\n * `HttpLink` is a terminating link that sends a GraphQL operation to a remote\n * endpoint over HTTP. It combines the functionality of `BaseHttpLink` and\n * `ClientAwarenessLink` into a single link.\n *\n * @remarks\n *\n * `HttpLink` supports both POST and GET requests, and you can configure HTTP\n * options on a per-operation basis. You can use these options for\n * authentication, persisted queries, dynamic URIs, and other granular updates.\n *\n * @example\n *\n * ```ts\n * import { HttpLink } from \"@apollo/client\";\n *\n * const link = new HttpLink({\n *   uri: \"http://localhost:4000/graphql\",\n *   // Additional options\n * });\n * ```\n */\nexport class HttpLink extends ApolloLink {\n    constructor(options = {}) {\n        const { left, right, request } = ApolloLink.from([\n            new ClientAwarenessLink(options),\n            new BaseHttpLink(options),\n        ]);\n        super(request);\n        Object.assign(this, { left, right });\n    }\n}\n/**\n * @deprecated\n * Use `HttpLink` from `@apollo/client/link/http` instead.\n */\nexport const createHttpLink = (options = {}) => new HttpLink(options);\n//# sourceMappingURL=HttpLink.js.map","import { Kind } from \"graphql\";\nimport { Slot } from \"optimism\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n// Contextual slot that allows us to disable accessor warnings on fields when in\n// migrate mode.\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport const disableWarningsSlot = new Slot();\nexport function getFragmentMaskMode(fragment) {\n    const directive = fragment.directives?.find(({ name }) => name.value === \"unmask\");\n    if (!directive) {\n        return \"mask\";\n    }\n    const modeArg = directive.arguments?.find(({ name }) => name.value === \"mode\");\n    if (__DEV__) {\n        if (modeArg) {\n            if (modeArg.value.kind === Kind.VARIABLE) {\n                __DEV__ && invariant.warn(44);\n            }\n            else if (modeArg.value.kind !== Kind.STRING) {\n                __DEV__ && invariant.warn(45);\n            }\n            else if (modeArg.value.value !== \"migrate\") {\n                __DEV__ && invariant.warn(46, modeArg.value.value);\n            }\n        }\n    }\n    if (modeArg &&\n        \"value\" in modeArg.value &&\n        modeArg.value.value === \"migrate\") {\n        return \"migrate\";\n    }\n    return \"unmask\";\n}\n//# sourceMappingURL=utils.js.map\n","import { global } from \"@apollo/client/utilities/internal/globals\";\nconst cacheSizeSymbol = Symbol.for(\"apollo.cacheSize\");\n/**\n * The global cache size configuration for Apollo Client.\n *\n * @remarks\n *\n * You can directly modify this object, but any modification will\n * only have an effect on caches that are created after the modification.\n *\n * So for global caches, such as `canonicalStringify` and `print`,\n * you might need to call `.reset` on them, which will essentially re-create them.\n *\n * Alternatively, you can set `globalThis[Symbol.for(\"apollo.cacheSize\")]` before\n * you load the Apollo Client package:\n *\n * @example\n *\n * ```ts\n * globalThis[Symbol.for(\"apollo.cacheSize\")] = {\n *   print: 100,\n * } satisfies Partial<CacheSizes>; // the `satisfies` is optional if using TypeScript\n * ```\n */\nexport const cacheSizes = { ...global[cacheSizeSymbol] };\n//# sourceMappingURL=sizes.js.map","import { WeakCache } from \"@wry/caches\";\nimport { Trie } from \"@wry/trie\";\nimport { wrap } from \"optimism\";\nimport { checkDocument } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nimport { cacheSizes } from \"../caching/sizes.js\";\nfunction identity(document) {\n    return document;\n}\n/**\n * A class for transforming GraphQL documents. See the [Document transforms\n * documentation](https://www.apollographql.com/docs/react/data/document-transforms) for more details on using them.\n *\n * @example\n *\n * ```ts\n * import { DocumentTransform } from \"@apollo/client/utilities\";\n * import { visit } from \"graphql\";\n *\n * const documentTransform = new DocumentTransform((doc) => {\n *   return visit(doc, {\n *     // ...\n *   });\n * });\n *\n * const transformedDoc = documentTransform.transformDocument(myDocument);\n * ```\n */\nexport class DocumentTransform {\n    transform;\n    cached;\n    resultCache = new WeakSet();\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    getCacheKey(document) {\n        return [document];\n    }\n    /**\n     * Creates a DocumentTransform that returns the input document unchanged.\n     *\n     * @returns The input document\n     */\n    static identity() {\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    /**\n     * Creates a DocumentTransform that conditionally applies one of two transforms.\n     *\n     * @param predicate - Function that determines which transform to apply\n     * @param left - Transform to apply when `predicate` returns `true`\n     * @param right - Transform to apply when `predicate` returns `false`. If not provided, it defaults to `DocumentTransform.identity()`.\n     * @returns A DocumentTransform that conditionally applies a document transform based on the predicate\n     *\n     * @example\n     *\n     * ```ts\n     * import { isQueryOperation } from \"@apollo/client/utilities\";\n     *\n     * const conditionalTransform = DocumentTransform.split(\n     *   (document) => isQueryOperation(document),\n     *   queryTransform,\n     *   mutationTransform\n     * );\n     * ```\n     */\n    static split(predicate, left, right = DocumentTransform.identity()) {\n        return Object.assign(new DocumentTransform((document) => {\n            const 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 }), { left, right });\n    }\n    constructor(transform, options = {}) {\n        this.transform = transform;\n        if (options.getCacheKey) {\n            // Override default `getCacheKey` function, which returns [document].\n            this.getCacheKey = options.getCacheKey;\n        }\n        this.cached = options.cache !== false;\n        this.resetCache();\n    }\n    /**\n     * Resets the internal cache of this transform, if it is cached.\n     */\n    resetCache() {\n        if (this.cached) {\n            const stableCacheKeys = new Trie();\n            this.performWork = wrap(DocumentTransform.prototype.performWork.bind(this), {\n                makeCacheKey: (document) => {\n                    const cacheKeys = this.getCacheKey(document);\n                    if (cacheKeys) {\n                        invariant(Array.isArray(cacheKeys), 20);\n                        return stableCacheKeys.lookupArray(cacheKeys);\n                    }\n                },\n                max: cacheSizes[\"documentTransform.cache\"],\n                cache: (WeakCache),\n            });\n        }\n    }\n    performWork(document) {\n        checkDocument(document);\n        return this.transform(document);\n    }\n    /**\n     * Transforms a GraphQL document using the configured transform function.\n     *\n     * @remarks\n     *\n     * Note that `transformDocument` caches the transformed document. Calling\n     * `transformDocument` again with the already-transformed document will\n     * immediately return it.\n     *\n     * @param document - The GraphQL document to transform\n     * @returns The transformed document\n     *\n     * @example\n     *\n     * ```ts\n     * const document = gql`\n     *   # ...\n     * `;\n     *\n     * const documentTransform = new DocumentTransform(transformFn);\n     * const transformedDocument = documentTransform.transformDocument(document);\n     * ```\n     */\n    transformDocument(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        const transformedDocument = this.performWork(document);\n        this.resultCache.add(transformedDocument);\n        return transformedDocument;\n    }\n    /**\n     * Combines this document transform with another document transform. The\n     * returned document transform first applies the current document transform,\n     * then applies the other document transform.\n     *\n     * @param otherTransform - The transform to apply after this one\n     * @returns A new DocumentTransform that applies both transforms in sequence\n     *\n     * @example\n     *\n     * ```ts\n     * const combinedTransform = addTypenameTransform.concat(\n     *   removeDirectivesTransform\n     * );\n     * ```\n     */\n    concat(otherTransform) {\n        return Object.assign(new DocumentTransform((document) => {\n            return otherTransform.transformDocument(this.transformDocument(document));\n        }, \n        // Reasonably assume both transforms handle their own caching\n        { cache: false }), {\n            left: this,\n            right: otherTransform,\n        });\n    }\n    /**\n    * @internal\n    * Used to iterate through all transforms that are concatenations or `split` links.\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    left;\n    /**\n    * @internal\n    * Used to iterate through all transforms that are concatenations or `split` links.\n    * \n    * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n    */\n    right;\n}\n//# sourceMappingURL=DocumentTransform.js.map\n","import { print as origPrint } from \"graphql\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { AutoCleanedWeakCache, registerGlobalCache, } from \"@apollo/client/utilities/internal\";\nimport { cacheSizes } from \"../caching/index.js\";\nlet printCache;\n/**\n * Converts an AST into a string, using one set of reasonable\n * formatting rules.\n *\n * @remarks This is the same function as the GraphQL.js `print` function but\n * with an added cache to avoid recomputation when encountering the same\n * `ASTNode` more than once.\n */\nexport const print = Object.assign((ast) => {\n    let result = printCache.get(ast);\n    if (!result) {\n        result = origPrint(ast);\n        printCache.set(ast, result);\n    }\n    return result;\n}, {\n    reset() {\n        printCache = new AutoCleanedWeakCache(cacheSizes.print || 2000 /* defaultCacheSizes.print */);\n    },\n});\nprint.reset();\nif (__DEV__) {\n    registerGlobalCache(\"print\", () => (printCache ? printCache.size : 0));\n}\n//# sourceMappingURL=print.js.map","export function isWhiteSpace(code) {\n    return code === 0x0009 || code === 0x0020;\n}\nexport function isDigit(code) {\n    return code >= 0x0030 && code <= 0x0039;\n}\nexport function isLetter(code) {\n    return ((code >= 0x0061 && code <= 0x007a) ||\n        (code >= 0x0041 && code <= 0x005a));\n}\nexport function isNameStart(code) {\n    return isLetter(code) || code === 0x005f;\n}\nexport function isNameContinue(code) {\n    return isLetter(code) || isDigit(code) || code === 0x005f;\n}\n//# sourceMappingURL=characterClasses.js.map","export function printString(str) {\n    return `\"${str.replace(escapedRegExp, escapedReplacer)}\"`;\n}\nconst escapedRegExp = /[\\x00-\\x1f\\x22\\x5c\\x7f-\\x9f]/g;\nfunction escapedReplacer(str) {\n    return escapeSequences[str.charCodeAt(0)];\n}\nconst escapeSequences = [\n    '\\\\u0000', '\\\\u0001', '\\\\u0002', '\\\\u0003', '\\\\u0004', '\\\\u0005', '\\\\u0006', '\\\\u0007',\n    '\\\\b', '\\\\t', '\\\\n', '\\\\u000B', '\\\\f', '\\\\r', '\\\\u000E', '\\\\u000F',\n    '\\\\u0010', '\\\\u0011', '\\\\u0012', '\\\\u0013', '\\\\u0014', '\\\\u0015', '\\\\u0016', '\\\\u0017',\n    '\\\\u0018', '\\\\u0019', '\\\\u001A', '\\\\u001B', '\\\\u001C', '\\\\u001D', '\\\\u001E', '\\\\u001F',\n    '', '', '\\\\\"', '', '', '', '', '',\n    '', '', '', '', '', '', '', '',\n    '', '', '', '', '', '', '', '',\n    '', '', '', '', '', '', '', '',\n    '', '', '', '', '', '', '', '',\n    '', '', '', '', '', '', '', '',\n    '', '', '', '', '', '', '', '',\n    '', '', '', '', '\\\\\\\\', '', '', '',\n    '', '', '', '', '', '', '', '',\n    '', '', '', '', '', '', '', '',\n    '', '', '', '', '', '', '', '',\n    '', '', '', '', '', '', '', '\\\\u007F',\n    '\\\\u0080', '\\\\u0081', '\\\\u0082', '\\\\u0083', '\\\\u0084', '\\\\u0085', '\\\\u0086', '\\\\u0087',\n    '\\\\u0088', '\\\\u0089', '\\\\u008A', '\\\\u008B', '\\\\u008C', '\\\\u008D', '\\\\u008E', '\\\\u008F',\n    '\\\\u0090', '\\\\u0091', '\\\\u0092', '\\\\u0093', '\\\\u0094', '\\\\u0095', '\\\\u0096', '\\\\u0097',\n    '\\\\u0098', '\\\\u0099', '\\\\u009A', '\\\\u009B', '\\\\u009C', '\\\\u009D', '\\\\u009E', '\\\\u009F',\n];\n//# sourceMappingURL=printString.js.map","import { printBlockString } from \"./blockString.mjs\";\nimport { printString } from \"./printString.mjs\";\nimport { visit } from \"./visitor.mjs\";\nexport function print(ast) {\n    return visit(ast, printDocASTReducer);\n}\nconst MAX_LINE_LENGTH = 80;\nconst printDocASTReducer = {\n    Name: { leave: (node) => node.value },\n    Variable: { leave: (node) => '$' + node.name },\n    Document: {\n        leave: (node) => join(node.definitions, '\\n\\n'),\n    },\n    OperationDefinition: {\n        leave(node) {\n            const varDefs = hasMultilineItems(node.variableDefinitions)\n                ? wrap('(\\n', join(node.variableDefinitions, '\\n'), '\\n)')\n                : wrap('(', join(node.variableDefinitions, ', '), ')');\n            const prefix = wrap('', node.description, '\\n') +\n                join([\n                    node.operation,\n                    join([node.name, varDefs]),\n                    join(node.directives, ' '),\n                ], ' ');\n            return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet;\n        },\n    },\n    VariableDefinition: {\n        leave: ({ variable, type, defaultValue, directives, description }) => wrap('', description, '\\n') +\n            variable +\n            ': ' +\n            type +\n            wrap(' = ', defaultValue) +\n            wrap(' ', join(directives, ' ')),\n    },\n    SelectionSet: { leave: ({ selections }) => block(selections) },\n    Field: {\n        leave({ alias, name, arguments: args, directives, selectionSet }) {\n            const prefix = join([wrap('', alias, ': '), name], '');\n            return join([\n                wrappedLineAndArgs(prefix, args),\n                wrap(' ', join(directives, ' ')),\n                wrap(' ', selectionSet),\n            ]);\n        },\n    },\n    Argument: { leave: ({ name, value }) => name + ': ' + value },\n    FragmentArgument: { leave: ({ name, value }) => name + ': ' + value },\n    FragmentSpread: {\n        leave: ({ name, arguments: args, directives }) => {\n            const prefix = '...' + name;\n            return (wrappedLineAndArgs(prefix, args) + wrap(' ', join(directives, ' ')));\n        },\n    },\n    InlineFragment: {\n        leave: ({ typeCondition, directives, selectionSet }) => join([\n            '...',\n            wrap('on ', typeCondition),\n            join(directives, ' '),\n            selectionSet,\n        ], ' '),\n    },\n    FragmentDefinition: {\n        leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet, description, }) => wrap('', description, '\\n') +\n            `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` +\n            `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` +\n            selectionSet,\n    },\n    IntValue: { leave: ({ value }) => value },\n    FloatValue: { leave: ({ value }) => value },\n    StringValue: {\n        leave: ({ value, block: isBlockString }) => isBlockString === true ? printBlockString(value) : printString(value),\n    },\n    BooleanValue: { leave: ({ value }) => (value ? 'true' : 'false') },\n    NullValue: { leave: () => 'null' },\n    EnumValue: { leave: ({ value }) => value },\n    ListValue: {\n        leave: ({ values }) => {\n            const valuesLine = '[' + join(values, ', ') + ']';\n            if (valuesLine.length > MAX_LINE_LENGTH) {\n                return '[\\n' + indent(join(values, '\\n')) + '\\n]';\n            }\n            return valuesLine;\n        },\n    },\n    ObjectValue: {\n        leave: ({ fields }) => {\n            const fieldsLine = '{ ' + join(fields, ', ') + ' }';\n            return fieldsLine.length > MAX_LINE_LENGTH ? block(fields) : fieldsLine;\n        },\n    },\n    ObjectField: { leave: ({ name, value }) => name + ': ' + value },\n    Directive: {\n        leave: ({ name, arguments: args }) => '@' + name + wrap('(', join(args, ', '), ')'),\n    },\n    NamedType: { leave: ({ name }) => name },\n    ListType: { leave: ({ type }) => '[' + type + ']' },\n    NonNullType: { leave: ({ type }) => type + '!' },\n    SchemaDefinition: {\n        leave: ({ description, directives, operationTypes }) => 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 }) => wrap('', description, '\\n') +\n            join(['scalar', name, join(directives, ' ')], ' '),\n    },\n    ObjectTypeDefinition: {\n        leave: ({ description, name, interfaces, directives, fields }) => wrap('', description, '\\n') +\n            join([\n                'type',\n                name,\n                wrap('implements ', join(interfaces, ' & ')),\n                join(directives, ' '),\n                block(fields),\n            ], ' '),\n    },\n    FieldDefinition: {\n        leave: ({ description, name, arguments: args, type, directives }) => 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 }) => wrap('', description, '\\n') +\n            join([name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')], ' '),\n    },\n    InterfaceTypeDefinition: {\n        leave: ({ description, name, interfaces, directives, fields }) => wrap('', description, '\\n') +\n            join([\n                'interface',\n                name,\n                wrap('implements ', join(interfaces, ' & ')),\n                join(directives, ' '),\n                block(fields),\n            ], ' '),\n    },\n    UnionTypeDefinition: {\n        leave: ({ description, name, directives, types }) => wrap('', description, '\\n') +\n            join(['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))], ' '),\n    },\n    EnumTypeDefinition: {\n        leave: ({ description, name, directives, values }) => wrap('', description, '\\n') +\n            join(['enum', name, join(directives, ' '), block(values)], ' '),\n    },\n    EnumValueDefinition: {\n        leave: ({ description, name, directives }) => wrap('', description, '\\n') + join([name, join(directives, ' ')], ' '),\n    },\n    InputObjectTypeDefinition: {\n        leave: ({ description, name, directives, fields }) => wrap('', description, '\\n') +\n            join(['input', name, join(directives, ' '), block(fields)], ' '),\n    },\n    DirectiveDefinition: {\n        leave: ({ description, name, arguments: args, directives, repeatable, locations, }) => wrap('', description, '\\n') +\n            'directive @' +\n            name +\n            (hasMultilineItems(args)\n                ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n                : wrap('(', join(args, ', '), ')')) +\n            wrap(' ', join(directives, ' ')) +\n            (repeatable ? ' repeatable' : '') +\n            ' on ' +\n            join(locations, ' | '),\n    },\n    SchemaExtension: {\n        leave: ({ directives, operationTypes }) => join(['extend schema', join(directives, ' '), block(operationTypes)], ' '),\n    },\n    ScalarTypeExtension: {\n        leave: ({ name, directives }) => join(['extend scalar', name, join(directives, ' ')], ' '),\n    },\n    ObjectTypeExtension: {\n        leave: ({ name, interfaces, directives, fields }) => join([\n            'extend type',\n            name,\n            wrap('implements ', join(interfaces, ' & ')),\n            join(directives, ' '),\n            block(fields),\n        ], ' '),\n    },\n    InterfaceTypeExtension: {\n        leave: ({ name, interfaces, directives, fields }) => join([\n            'extend interface',\n            name,\n            wrap('implements ', join(interfaces, ' & ')),\n            join(directives, ' '),\n            block(fields),\n        ], ' '),\n    },\n    UnionTypeExtension: {\n        leave: ({ name, directives, types }) => join([\n            'extend union',\n            name,\n            join(directives, ' '),\n            wrap('= ', join(types, ' | ')),\n        ], ' '),\n    },\n    EnumTypeExtension: {\n        leave: ({ name, directives, values }) => join(['extend enum', name, join(directives, ' '), block(values)], ' '),\n    },\n    InputObjectTypeExtension: {\n        leave: ({ name, directives, fields }) => join(['extend input', name, join(directives, ' '), block(fields)], ' '),\n    },\n    DirectiveExtension: {\n        leave: ({ name, directives }) => join(['extend directive @' + name, join(directives, ' ')], ' '),\n    },\n    TypeCoordinate: { leave: ({ name }) => name },\n    MemberCoordinate: {\n        leave: ({ name, memberName }) => join([name, wrap('.', memberName)]),\n    },\n    ArgumentCoordinate: {\n        leave: ({ name, fieldName, argumentName }) => join([name, wrap('.', fieldName), wrap('(', argumentName, ':)')]),\n    },\n    DirectiveCoordinate: { leave: ({ name }) => join(['@', name]) },\n    DirectiveArgumentCoordinate: {\n        leave: ({ name, argumentName }) => join(['@', name, wrap('(', argumentName, ':)')]),\n    },\n};\nfunction join(maybeArray, separator = '') {\n    return (maybeArray?.filter((x) => x !== undefined && x !== '').join(separator) ?? '');\n}\nfunction block(array) {\n    return wrap('{\\n', indent(join(array, '\\n')), '\\n}');\n}\nfunction wrap(start, maybeString, end = '') {\n    return maybeString != null && maybeString !== ''\n        ? start + maybeString + end\n        : '';\n}\nfunction indent(str) {\n    return wrap('  ', str.replaceAll('\\n', '\\n  '));\n}\nfunction hasMultilineItems(maybeArray) {\n    return maybeArray?.some((str) => str.includes('\\n')) ?? false;\n}\nfunction wrappedLineAndArgs(prefix, args) {\n    let argsLine = prefix + wrap('(', join(args, ', '), ')');\n    if (argsLine.length > MAX_LINE_LENGTH) {\n        argsLine = prefix + wrap('(\\n', indent(join(args, '\\n')), '\\n)');\n    }\n    return argsLine;\n}\n//# sourceMappingURL=printer.js.map","import { isWhiteSpace } from \"./characterClasses.mjs\";\nexport function dedentBlockStringLines(lines) {\n    let commonIndent = Number.MAX_SAFE_INTEGER;\n    let firstNonEmptyLine = null;\n    let lastNonEmptyLine = -1;\n    for (let i = 0; i < lines.length; ++i) {\n        const line = lines[i];\n        const indent = leadingWhitespace(line);\n        if (indent === line.length) {\n            continue;\n        }\n        firstNonEmptyLine ??= i;\n        lastNonEmptyLine = i;\n        if (i !== 0 && indent < commonIndent) {\n            commonIndent = indent;\n        }\n    }\n    return (lines\n        .map((line, i) => (i === 0 ? line : line.slice(commonIndent)))\n        .slice(firstNonEmptyLine ?? 0, lastNonEmptyLine + 1));\n}\nfunction leadingWhitespace(str) {\n    let i = 0;\n    while (i < str.length && isWhiteSpace(str.charCodeAt(i))) {\n        ++i;\n    }\n    return i;\n}\nexport function isPrintableAsBlockString(value) {\n    if (value === '') {\n        return true;\n    }\n    let isEmptyLine = true;\n    let hasIndent = false;\n    let hasCommonIndent = true;\n    let seenNonEmptyLine = false;\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            case 0x000d:\n                return false;\n            case 10:\n                if (isEmptyLine && !seenNonEmptyLine) {\n                    return false;\n                }\n                seenNonEmptyLine = true;\n                isEmptyLine = true;\n                hasIndent = false;\n                break;\n            case 9:\n            case 32:\n                hasIndent ||= isEmptyLine;\n                break;\n            default:\n                hasCommonIndent &&= hasIndent;\n                isEmptyLine = false;\n        }\n    }\n    if (isEmptyLine) {\n        return false;\n    }\n    if (hasCommonIndent && seenNonEmptyLine) {\n        return false;\n    }\n    return true;\n}\nexport function printBlockString(value, options) {\n    const escapedValue = value.replaceAll('\"\"\"', '\\\\\"\"\"');\n    const lines = escapedValue.split(/\\r\\n|[\\n\\r]/g);\n    const isSingleLine = lines.length === 1;\n    const forceLeadingNewLine = lines.length > 1 &&\n        lines\n            .slice(1)\n            .every((line) => line.length === 0 || isWhiteSpace(line.charCodeAt(0)));\n    const hasTrailingTripleQuotes = escapedValue.endsWith('\\\\\"\"\"');\n    const hasTrailingQuote = value.endsWith('\"') && !hasTrailingTripleQuotes;\n    const hasTrailingSlash = value.endsWith('\\\\');\n    const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;\n    const printAsMultipleLines = !options?.minimize &&\n        (!isSingleLine ||\n            value.length > 70 ||\n            forceTrailingNewline ||\n            forceLeadingNewLine ||\n            hasTrailingTripleQuotes);\n    let result = '';\n    const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0));\n    if ((printAsMultipleLines && !skipLeadingNewLine) || forceLeadingNewLine) {\n        result += '\\n';\n    }\n    result += escapedValue;\n    if (printAsMultipleLines || forceTrailingNewline) {\n        result += '\\n';\n    }\n    return '\"\"\"' + result + '\"\"\"';\n}\n//# sourceMappingURL=blockString.js.map","import { StrongCache, WeakCache } from \"@wry/caches\";\nconst scheduledCleanup = new WeakSet();\nfunction schedule(cache) {\n    if (cache.size <= (cache.max || -1)) {\n        return;\n    }\n    if (!scheduledCleanup.has(cache)) {\n        scheduledCleanup.add(cache);\n        setTimeout(() => {\n            cache.clean();\n            scheduledCleanup.delete(cache);\n        }, 100);\n    }\n}\n/**\n* @internal\n* A version of WeakCache that will auto-schedule a cleanup of the cache when\n* a new item is added and the cache reached maximum size.\n* Throttled to once per 100ms.\n*\n* @privateRemarks\n* Should be used throughout the rest of the codebase instead of WeakCache,\n* with the notable exception of usage in `wrap` from `optimism` - that one\n* already handles cleanup and should remain a `WeakCache`.\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport const AutoCleanedWeakCache = function (max, dispose) {\n    /*\n    Some builds of `WeakCache` are function prototypes, some are classes.\n    This library still builds with an ES5 target, so we can't extend the\n    real classes.\n    Instead, we have to use this workaround until we switch to a newer build\n    target.\n    */\n    const cache = new WeakCache(max, dispose);\n    cache.set = function (key, value) {\n        const ret = WeakCache.prototype.set.call(this, key, value);\n        schedule(this);\n        return ret;\n    };\n    return cache;\n};\n/**\n* @internal\n* A version of StrongCache that will auto-schedule a cleanup of the cache when\n* a new item is added and the cache reached maximum size.\n* Throttled to once per 100ms.\n*\n* @privateRemarks\n* Should be used throughout the rest of the codebase instead of StrongCache,\n* with the notable exception of usage in `wrap` from `optimism` - that one\n* already handles cleanup and should remain a `StrongCache`.\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport const AutoCleanedStrongCache = function (max, dispose) {\n    /*\n    Some builds of `StrongCache` are function prototypes, some are classes.\n    This library still builds with an ES5 target, so we can't extend the\n    real classes.\n    Instead, we have to use this workaround until we switch to a newer build\n    target.\n    */\n    const cache = new StrongCache(max, dispose);\n    cache.set = function (key, value) {\n        const ret = StrongCache.prototype.set.call(this, key, value);\n        schedule(this);\n        return ret;\n    };\n    return cache;\n};\n//# sourceMappingURL=caches.js.map\n","import { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { cacheSizes } from \"../caching/sizes.js\";\nimport { AutoCleanedStrongCache } from \"./caches.js\";\nimport { registerGlobalCache } from \"./getMemoryInternals.js\";\n/**\n * Serializes a value to JSON with object keys in a consistent, sorted order.\n *\n * @remarks\n *\n * Unlike `JSON.stringify()`, this function ensures that object keys are always\n * serialized in the same alphabetical order, regardless of their original order.\n * This makes it suitable for creating consistent cache keys from objects,\n * comparing objects by their serialized representation, or generating\n * deterministic hashes of objects.\n *\n * To achieve performant sorting, this function uses a `Map` from JSON-serialized\n * arrays of keys (in any order) to sorted arrays of the same keys, with a\n * single sorted array reference shared by all permutations of the keys.\n *\n * As a drawback, this function will add a little more memory for every object\n * encountered that has different (more, less, a different order of) keys than\n * in the past.\n *\n * In a typical application, this extra memory usage should not play a\n * significant role, as `canonicalStringify` will be called for only a limited\n * number of object shapes, and the cache will not grow beyond a certain point.\n * But in some edge cases, this could be a problem. Use canonicalStringify.reset()\n * as a way to clear the memoization cache.\n *\n * @param value - The value to stringify\n * @returns JSON string with consistently ordered object keys\n *\n * @example\n *\n * ```ts\n * import { canonicalStringify } from \"@apollo/client/utilities\";\n *\n * const obj1 = { b: 2, a: 1 };\n * const obj2 = { a: 1, b: 2 };\n *\n * console.log(canonicalStringify(obj1)); // '{\"a\":1,\"b\":2}'\n * console.log(canonicalStringify(obj2)); // '{\"a\":1,\"b\":2}'\n * ```\n */\nexport const canonicalStringify = Object.assign(function canonicalStringify(value) {\n    return JSON.stringify(value, stableObjectReplacer);\n}, {\n    reset() {\n        // Clearing the sortingMap will reclaim all cached memory, without\n        // affecting the logical results of canonicalStringify, but potentially\n        // sacrificing performance until the cache is refilled.\n        sortingMap = new AutoCleanedStrongCache(cacheSizes.canonicalStringify || 1000 /* defaultCacheSizes.canonicalStringify */);\n    },\n});\nif (__DEV__) {\n    registerGlobalCache(\"canonicalStringify\", () => sortingMap.size);\n}\n// Values are JSON-serialized arrays of object keys (in any order), and values\n// are sorted arrays of the same keys.\nlet sortingMap;\ncanonicalStringify.reset();\n// The JSON.stringify function takes an optional second argument called a\n// replacer function. This function is called for each key-value pair in the\n// object being stringified, and its return value is used instead of the\n// original value. If the replacer function returns a new value, that value is\n// stringified as JSON instead of the original value of the property.\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#the_replacer_parameter\nfunction stableObjectReplacer(key, value) {\n    if (value && typeof value === \"object\") {\n        const proto = Object.getPrototypeOf(value);\n        // We don't want to mess with objects that are not \"plain\" objects, which\n        // means their prototype is either Object.prototype or null. This check also\n        // prevents needlessly rearranging the indices of arrays.\n        if (proto === Object.prototype || proto === null) {\n            const keys = Object.keys(value);\n            // If keys is already sorted, let JSON.stringify serialize the original\n            // value instead of creating a new object with keys in the same order.\n            if (keys.every(everyKeyInOrder))\n                return value;\n            const unsortedKey = JSON.stringify(keys);\n            let sortedKeys = sortingMap.get(unsortedKey);\n            if (!sortedKeys) {\n                keys.sort();\n                const sortedKey = JSON.stringify(keys);\n                // Checking for sortedKey in the sortingMap allows us to share the same\n                // sorted array reference for all permutations of the same set of keys.\n                sortedKeys = sortingMap.get(sortedKey) || keys;\n                sortingMap.set(unsortedKey, sortedKeys);\n                sortingMap.set(sortedKey, sortedKeys);\n            }\n            const sortedObject = Object.create(proto);\n            // Reassigning the keys in sorted order will cause JSON.stringify to\n            // serialize them in sorted order.\n            sortedKeys.forEach((key) => {\n                sortedObject[key] = value[key];\n            });\n            return sortedObject;\n        }\n    }\n    return value;\n}\n// Since everything that happens in stableObjectReplacer benefits from being as\n// efficient as possible, we use a static function as the callback for\n// keys.every in order to test if the provided keys are already sorted without\n// allocating extra memory for a callback.\nfunction everyKeyInOrder(key, i, keys) {\n    return i === 0 || keys[i - 1] <= key;\n}\n//# sourceMappingURL=canonicalStringify.js.map","// Checks the document for errors and throws an exception if there is an error.\nimport { Kind, visit } from \"graphql\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { invariant, newInvariantError, } from \"@apollo/client/utilities/invariant\";\nimport { cacheSizes } from \"../caching/sizes.js\";\nimport { getOperationName } from \"./getOperationName.js\";\nimport { memoize } from \"./memoize.js\";\n/**\n* Checks the document for errors and throws an exception if there is an error.\n*\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport const checkDocument = memoize((doc, expectedType) => {\n    invariant(doc && doc.kind === \"Document\", 1);\n    const operations = doc.definitions.filter((d) => d.kind === \"OperationDefinition\");\n    if (__DEV__) {\n        doc.definitions.forEach((definition) => {\n            if (definition.kind !== \"OperationDefinition\" &&\n                definition.kind !== \"FragmentDefinition\") {\n                throw newInvariantError(2, definition.kind);\n            }\n        });\n        invariant(operations.length <= 1, 3, operations.length);\n    }\n    if (expectedType) {\n        invariant(\n            operations.length == 1 && operations[0].operation === expectedType,\n            4,\n            expectedType,\n            expectedType,\n            operations[0].operation\n        );\n    }\n    visit(doc, {\n        Field(field, _, __, path) {\n            if (field.alias &&\n                (field.alias.value === \"__typename\" ||\n                    field.alias.value.startsWith(\"__ac_\")) &&\n                field.alias.value !== field.name.value) {\n                // not using `invariant` so path calculation only happens in error case\n                let current = doc, fieldPath = [];\n                for (const key of path) {\n                    current = current[key];\n                    if (current.kind === Kind.FIELD) {\n                        fieldPath.push(current.alias?.value || current.name.value);\n                    }\n                }\n                fieldPath.splice(-1, 1, field.name.value);\n                throw newInvariantError(\n                    5,\n                    field.alias.value,\n                    fieldPath.join(\".\"),\n                    operations[0].operation,\n                    getOperationName(doc, \"(anonymous)\")\n                );\n            }\n        },\n    });\n}, {\n    max: cacheSizes[\"checkDocument\"] || 2000 /* defaultCacheSizes[\"checkDocument\"] */,\n});\n//# sourceMappingURL=checkDocument.js.map\n","/**\n* Merges the provided objects shallowly and removes\n* all properties with an `undefined` value\n*\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function compact(...objects) {\n    const result = {};\n    objects.forEach((obj) => {\n        if (!obj)\n            return;\n        Reflect.ownKeys(obj).forEach((key) => {\n            const value = obj[key];\n            if (value !== void 0) {\n                result[key] = value;\n            }\n        });\n    });\n    return result;\n}\n//# sourceMappingURL=compact.js.map\n","/**\n* @internal\n* Used to set `extensions` on the GraphQL result without exposing it\n* unnecessarily. Only use internally!\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport const extensionsSymbol = Symbol.for(\"apollo.result.extensions\");\n/**\n * For use in Cache implementations only.\n * This should not be used in userland code.\n */\nexport const streamInfoSymbol = Symbol.for(\"apollo.result.streamInfo\");\n/**\n* @internal\n* Used as key for `ApolloClient.WatchQueryOptions`.\n*\n* Meant for framework integrators only!\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport const variablesUnknownSymbol = Symbol.for(\"apollo.observableQuery.variablesUnknown\");\n//# sourceMappingURL=constants.js.map\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.\n*\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function createFragmentMap(fragments = []) {\n    const symTable = {};\n    fragments.forEach((fragment) => {\n        symTable[fragment.name.value] = fragment;\n    });\n    return symTable;\n}\n//# sourceMappingURL=createFragmentMap.js.map\n","import { equal } from \"@wry/equality\";\nimport { createFragmentMap } from \"./createFragmentMap.js\";\nimport { getFragmentDefinitions } from \"./getFragmentDefinitions.js\";\nimport { getFragmentFromSelection } from \"./getFragmentFromSelection.js\";\nimport { getMainDefinition } from \"./getMainDefinition.js\";\nimport { isField } from \"./isField.js\";\nimport { resultKeyNameFromField } from \"./resultKeyNameFromField.js\";\nimport { shouldInclude } from \"./shouldInclude.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, { data: aData, ...aRest }, { data: bData, ...bRest }, variables) {\n    return (equal(aRest, bRest) &&\n        equalBySelectionSet(getMainDefinition(query).selectionSet, aData, bData, {\n            fragmentMap: createFragmentMap(getFragmentDefinitions(query)),\n            variables,\n        }));\n}\nfunction equalBySelectionSet(selectionSet, aResult, bResult, context) {\n    if (aResult === bResult) {\n        return true;\n    }\n    const 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((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            const resultKey = resultKeyNameFromField(selection);\n            const aResultChild = aResult && aResult[resultKey];\n            const bResultChild = bResult && bResult[resultKey];\n            const 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            const aChildIsArray = Array.isArray(aResultChild);\n            const bChildIsArray = Array.isArray(bResultChild);\n            if (aChildIsArray !== bChildIsArray)\n                return false;\n            if (aChildIsArray && bChildIsArray) {\n                const length = aResultChild.length;\n                if (bResultChild.length !== length) {\n                    return false;\n                }\n                for (let i = 0; i < length; ++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            const 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//# sourceMappingURL=equalByQuery.js.map","import { valueToObjectRepresentation } from \"./valueToObjectRepresentation.js\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function getDefaultValues(definition) {\n    const defaultValues = {};\n    const defs = definition && definition.variableDefinitions;\n    if (defs && defs.length) {\n        defs.forEach((def) => {\n            if (def.defaultValue) {\n                valueToObjectRepresentation(defaultValues, def.variable.name, def.defaultValue);\n            }\n        });\n    }\n    return defaultValues;\n}\n//# sourceMappingURL=getDefaultValues.js.map\n","/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function getFragmentDefinitions(doc) {\n    return doc.definitions.filter((definition) => definition.kind === \"FragmentDefinition\");\n}\n//# sourceMappingURL=getFragmentDefinitions.js.map\n","import { invariant } from \"@apollo/client/utilities/invariant\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function getFragmentFromSelection(selection, fragmentMap) {\n    switch (selection.kind) {\n        case \"InlineFragment\":\n            return selection;\n        case \"FragmentSpread\": {\n            const fragmentName = selection.name.value;\n            if (typeof fragmentMap === \"function\") {\n                return fragmentMap(fragmentName);\n            }\n            const fragment = fragmentMap && fragmentMap[fragmentName];\n            invariant(fragment, 9, fragmentName);\n            return fragment || null;\n        }\n        default:\n            return null;\n    }\n}\n//# sourceMappingURL=getFragmentFromSelection.js.map\n","import { newInvariantError } from \"@apollo/client/utilities/invariant\";\nimport { checkDocument } from \"./checkDocument.js\";\n/**\n * Returns the first operation definition from a GraphQL document. The function\n * prioritizes operation definitions over fragment definitions, which makes it\n * suitable for documents that may contain both. If no operation definition is\n * found, the first fragment definition will be returned. If no definitions are\n * found, an error is thrown.\n *\n * @remarks\n *\n * Use this function when you need to perform more advanced tasks with the main\n * definition AST node. If you want to determine when a document is a specific\n * operation type, prefer the `isQueryOperation`, `isMutationOperation`, and\n * `isSubscriptionOperation` utility functions instead.\n *\n * @param queryDoc - The GraphQL document to extract the definition from\n * @returns The main operation or fragment definition AST node\n *\n * @example\n *\n * ```ts\n * import { gql } from \"@apollo/client\";\n * import { getMainDefinition } from \"@apollo/client/utilities\";\n *\n * const query = gql`\n *   query GetUser($id: ID!) {\n *     user(id: $id) {\n *       name\n *       email\n *     }\n *   }\n * `;\n *\n * const definition = getMainDefinition(query);\n * ```\n *\n * @throws When the document contains no operation or fragment definitions\n */\nexport function getMainDefinition(queryDoc) {\n    checkDocument(queryDoc);\n    let fragmentDefinition;\n    for (let definition of queryDoc.definitions) {\n        if (definition.kind === \"OperationDefinition\") {\n            return definition;\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(12);\n}\n//# sourceMappingURL=getMainDefinition.js.map\n","import { checkDocument } from \"./checkDocument.js\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function getOperationDefinition(doc) {\n    checkDocument(doc);\n    return doc.definitions.filter((definition) => definition.kind === \"OperationDefinition\")[0];\n}\n//# sourceMappingURL=getOperationDefinition.js.map\n","/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function getOperationName(doc, fallback) {\n    return (doc.definitions.find((definition) => definition.kind === \"OperationDefinition\" && !!definition.name)?.name.value ?? fallback);\n}\n//# sourceMappingURL=getOperationName.js.map\n","import { invariant } from \"@apollo/client/utilities/invariant\";\nimport { getOperationDefinition } from \"./getOperationDefinition.js\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function getQueryDefinition(doc) {\n    const queryDef = getOperationDefinition(doc);\n    invariant(queryDef && queryDef.operation === \"query\", 13);\n    return queryDef;\n}\n//# sourceMappingURL=getQueryDefinition.js.map\n","import { maybe } from \"./maybe.js\";\nexport default (// 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\nmaybe(() => globalThis) ||\n    maybe(() => window) ||\n    maybe(() => self) ||\n    maybe(() => global) || // 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//# sourceMappingURL=global.js.map\n","export function maybe(thunk) {\n    try {\n        return thunk();\n    }\n    catch { }\n}\n//# sourceMappingURL=maybe.js.map","/**\n* A version of Array.isArray that works better with readonly arrays.\n*\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport const isArray = Array.isArray;\n//# sourceMappingURL=isArray.js.map\n","/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function isField(selection) {\n    return selection.kind === \"Field\";\n}\n//# sourceMappingURL=isField.js.map\n","/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function isNonEmptyArray(value) {\n    return Array.isArray(value) && value.length > 0;\n}\n//# sourceMappingURL=isNonEmptyArray.js.map\n","/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function isNonNullObject(obj) {\n    return obj !== null && typeof obj === \"object\";\n}\n//# sourceMappingURL=isNonNullObject.js.map\n","const prefixCounts = new Map();\n/**\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.\n*\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function makeUniqueId(prefix) {\n    const count = prefixCounts.get(prefix) || 1;\n    prefixCounts.set(prefix, count + 1);\n    return `${prefix}:${count}:${Math.random().toString(36).slice(2)}`;\n}\n//# sourceMappingURL=makeUniqueId.js.map\n","import { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { deepFreeze } from \"./deepFreeze.js\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function maybeDeepFreeze(obj) {\n    if (__DEV__) {\n        deepFreeze(obj);\n    }\n    return obj;\n}\n//# sourceMappingURL=maybeDeepFreeze.js.map\n","import { Trie } from \"@wry/trie\";\nimport { AutoCleanedWeakCache } from \"./caches.js\";\n/**\n * Naive alternative to `wrap` without any dependency tracking, potentially avoiding resulting memory leaks.\n */\nexport function memoize(fn, { max, makeCacheKey = (args) => args, }) {\n    const keys = new Trie(true);\n    const cache = new AutoCleanedWeakCache(max);\n    return (...args) => {\n        const cacheKey = keys.lookupArray(makeCacheKey(args));\n        const cached = cache.get(cacheKey);\n        if (cached) {\n            if (cached.error) {\n                throw cached.error;\n            }\n            return cached.result;\n        }\n        const entry = cache.set(cacheKey, {});\n        try {\n            return (entry.result = fn(...args));\n        }\n        catch (error) {\n            entry.error = error;\n            throw error;\n        }\n    };\n}\n//# sourceMappingURL=memoize.js.map","import { compact } from \"./compact.js\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function mergeOptions(defaults, options) {\n    return compact(defaults, options, options.variables && {\n        variables: compact({\n            ...(defaults && defaults.variables),\n            ...options.variables,\n        }),\n    });\n}\n//# sourceMappingURL=mergeOptions.js.map\n","export function preventUnhandledRejection(promise) {\n    promise.catch(() => { });\n    return promise;\n}\n//# sourceMappingURL=preventUnhandledRejection.js.map","/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function resultKeyNameFromField(field) {\n    return field.alias ? field.alias.value : field.name.value;\n}\n//# sourceMappingURL=resultKeyNameFromField.js.map\n","import { invariant } from \"@apollo/client/utilities/invariant\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function shouldInclude({ directives }, variables) {\n    if (!directives || !directives.length) {\n        return true;\n    }\n    return getInclusionDirectives(directives).every(({ directive, ifArgument }) => {\n        let evaledValue = false;\n        if (ifArgument.value.kind === \"Variable\") {\n            evaledValue =\n                variables && variables[ifArgument.value.name.value];\n            invariant(evaledValue !== void 0, 15, directive.name.value);\n        }\n        else {\n            evaledValue = ifArgument.value.value;\n        }\n        return directive.name.value === \"skip\" ? !evaledValue : evaledValue;\n    });\n}\nfunction isInclusionDirective({ name: { value } }) {\n    return value === \"skip\" || value === \"include\";\n}\nfunction getInclusionDirectives(directives) {\n    const result = [];\n    if (directives && directives.length) {\n        directives.forEach((directive) => {\n            if (!isInclusionDirective(directive))\n                return;\n            const directiveArguments = directive.arguments;\n            const directiveName = directive.name.value;\n            invariant(directiveArguments && directiveArguments.length === 1, 16, directiveName);\n            const ifArgument = directiveArguments[0];\n            invariant(ifArgument.name && ifArgument.name.value === \"if\", 17, directiveName);\n            const 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\"), 18, directiveName);\n            result.push({ directive, ifArgument });\n        });\n    }\n    return result;\n}\n//# sourceMappingURL=shouldInclude.js.map\n","import { makeUniqueId } from \"./makeUniqueId.js\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function stringifyForDisplay(value, space = 0) {\n    const undefId = makeUniqueId(\"stringifyForDisplay\");\n    return JSON.stringify(value, (_, value) => {\n        return value === void 0 ? undefId : value;\n    }, space)\n        .split(JSON.stringify(undefId))\n        .join(\"<undefined>\");\n}\n//# sourceMappingURL=stringifyForDisplay.js.map\n","import { Kind } from \"graphql\";\nimport { newInvariantError } from \"@apollo/client/utilities/invariant\";\n/**\n* @internal\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function valueToObjectRepresentation(argObj, name, value, variables) {\n    if (value.kind === Kind.INT || value.kind === Kind.FLOAT) {\n        argObj[name.value] = Number(value.value);\n    }\n    else if (value.kind === Kind.BOOLEAN || value.kind === Kind.STRING) {\n        argObj[name.value] = value.value;\n    }\n    else if (value.kind === Kind.OBJECT) {\n        const nestedArgObj = {};\n        value.fields.map((obj) => valueToObjectRepresentation(nestedArgObj, obj.name, obj.value, variables));\n        argObj[name.value] = nestedArgObj;\n    }\n    else if (value.kind === Kind.VARIABLE) {\n        const variableValue = (variables || {})[value.name.value];\n        argObj[name.value] = variableValue;\n    }\n    else if (value.kind === Kind.LIST) {\n        argObj[name.value] = value.values.map((listValue) => {\n            const nestedArgArrayObj = {};\n            valueToObjectRepresentation(nestedArgArrayObj, name, listValue, variables);\n            return nestedArgArrayObj[name.value];\n        });\n    }\n    else if (value.kind === Kind.ENUM) {\n        argObj[name.value] = value.value;\n    }\n    else if (value.kind === Kind.NULL) {\n        argObj[name.value] = null;\n    }\n    else {\n        throw newInvariantError(19, name.value, value.kind);\n    }\n}\n//# sourceMappingURL=valueToObjectRepresentation.js.map\n","import { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { global } from \"@apollo/client/utilities/internal/globals\";\nimport { version } from \"../../version.js\";\n// eslint-disable-next-line local-rules/import-from-inside-other-export\nimport { stringifyForDisplay } from \"../internal/stringifyForDisplay.js\";\nconst genericMessage = \"Invariant Violation\";\nexport class InvariantError extends Error {\n    constructor(message = genericMessage) {\n        super(message);\n        this.name = genericMessage;\n        Object.setPrototypeOf(this, InvariantError.prototype);\n    }\n}\nconst verbosityLevels = [\"debug\", \"log\", \"warn\", \"error\", \"silent\"];\nlet verbosityLevel = verbosityLevels.indexOf(__DEV__ ? \"log\" : \"silent\");\nexport function invariant(condition, ...args) {\n    if (!condition) {\n        throw newInvariantError(...args);\n    }\n}\nfunction wrapConsoleMethod(name) {\n    return function (message, ...args) {\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            const method = console[name] || console.log;\n            if (typeof message === \"number\") {\n                const arg0 = message;\n                message = getHandledErrorMsg(arg0);\n                if (!message) {\n                    message = getFallbackErrorMsg(arg0, args);\n                    args = [];\n                }\n            }\n            method(message, ...args);\n        }\n    };\n}\ninvariant.debug = wrapConsoleMethod(\"debug\");\ninvariant.log = wrapConsoleMethod(\"log\");\ninvariant.warn = wrapConsoleMethod(\"warn\");\ninvariant.error = wrapConsoleMethod(\"error\");\nexport function setVerbosity(level) {\n    const old = verbosityLevels[verbosityLevel];\n    verbosityLevel = Math.max(0, verbosityLevels.indexOf(level));\n    return old;\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 */\nexport function newInvariantError(message, ...optionalParams) {\n    return new InvariantError(getHandledErrorMsg(message, optionalParams) ||\n        getFallbackErrorMsg(message, optionalParams));\n}\n// This is duplicated between `@apollo/client/dev` and `@apollo/client/utilities/invariant` to prevent circular references.\nexport const ApolloErrorMessageHandler = Symbol.for(\"ApolloErrorMessageHandler_\" + version);\nfunction stringify(arg) {\n    if (typeof arg == \"string\") {\n        return arg;\n    }\n    try {\n        return stringifyForDisplay(arg, 2).slice(0, 1000);\n    }\n    catch {\n        return \"<non-serializable>\";\n    }\n}\nfunction getHandledErrorMsg(message, messageArgs = []) {\n    if (!message)\n        return;\n    return (global[ApolloErrorMessageHandler] &&\n        global[ApolloErrorMessageHandler](message, messageArgs.map(stringify)));\n}\nfunction getFallbackErrorMsg(message, messageArgs = []) {\n    if (!message)\n        return;\n    if (typeof message === \"string\") {\n        return messageArgs.reduce((msg, arg) => msg.replace(/%[sdfo]/, stringify(arg)), message);\n    }\n    return `An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({\n        version,\n        message,\n        args: messageArgs.map(stringify),\n    }))}`;\n}\n//# sourceMappingURL=index.js.map","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//# sourceMappingURL=strong.js.map","function noop() { }\nconst defaultDispose = noop;\nconst _WeakRef = typeof WeakRef !== \"undefined\"\n    ? WeakRef\n    : function (value) {\n        return { deref: () => value };\n    };\nconst _WeakMap = typeof WeakMap !== \"undefined\" ? WeakMap : Map;\nconst _FinalizationRegistry = typeof FinalizationRegistry !== \"undefined\"\n    ? FinalizationRegistry\n    : function () {\n        return {\n            register: noop,\n            unregister: noop,\n        };\n    };\nconst finalizationBatchSize = 10024;\nexport class WeakCache {\n    constructor(max = Infinity, dispose = defaultDispose) {\n        this.max = max;\n        this.dispose = dispose;\n        this.map = new _WeakMap();\n        this.newest = null;\n        this.oldest = null;\n        this.unfinalizedNodes = new Set();\n        this.finalizationScheduled = false;\n        this.size = 0;\n        this.finalize = () => {\n            const iterator = this.unfinalizedNodes.values();\n            for (let i = 0; i < finalizationBatchSize; i++) {\n                const node = iterator.next().value;\n                if (!node)\n                    break;\n                this.unfinalizedNodes.delete(node);\n                const key = node.key;\n                delete node.key;\n                node.keyRef = new _WeakRef(key);\n                this.registry.register(key, node, node);\n            }\n            if (this.unfinalizedNodes.size > 0) {\n                queueMicrotask(this.finalize);\n            }\n            else {\n                this.finalizationScheduled = false;\n            }\n        };\n        this.registry = new _FinalizationRegistry(this.deleteNode.bind(this));\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    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.scheduleFinalization(node);\n        this.map.set(key, node);\n        this.size++;\n        return node.value;\n    }\n    clean() {\n        while (this.oldest && this.size > this.max) {\n            this.deleteNode(this.oldest);\n        }\n    }\n    deleteNode(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.size--;\n        const key = node.key || (node.keyRef && node.keyRef.deref());\n        this.dispose(node.value, key);\n        if (!node.keyRef) {\n            this.unfinalizedNodes.delete(node);\n        }\n        else {\n            this.registry.unregister(node);\n        }\n        if (key)\n            this.map.delete(key);\n    }\n    delete(key) {\n        const node = this.map.get(key);\n        if (node) {\n            this.deleteNode(node);\n            return true;\n        }\n        return false;\n    }\n    scheduleFinalization(node) {\n        this.unfinalizedNodes.add(node);\n        if (!this.finalizationScheduled) {\n            this.finalizationScheduled = true;\n            queueMicrotask(this.finalize);\n        }\n    }\n}\n//# sourceMappingURL=weak.js.map","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//# sourceMappingURL=index.js.map","// 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//# sourceMappingURL=index.js.map","// src/create-anatomy.ts\nvar createAnatomy = (name, parts = []) => ({\n  parts: (...values) => {\n    if (isEmpty(parts)) {\n      return createAnatomy(name, values);\n    }\n    throw new Error(\"createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?\");\n  },\n  extendWith: (...values) => createAnatomy(name, [...parts, ...values]),\n  omit: (...values) => createAnatomy(name, parts.filter((part) => !values.includes(part))),\n  rename: (newName) => createAnatomy(newName, parts),\n  keys: () => parts,\n  build: () => [...new Set(parts)].reduce(\n    (prev, part) => Object.assign(prev, {\n      [part]: {\n        selector: [\n          `&[data-scope=\"${toKebabCase(name)}\"][data-part=\"${toKebabCase(part)}\"]`,\n          `& [data-scope=\"${toKebabCase(name)}\"][data-part=\"${toKebabCase(part)}\"]`\n        ].join(\", \"),\n        attrs: { \"data-scope\": toKebabCase(name), \"data-part\": toKebabCase(part) }\n      }\n    }),\n    {}\n  )\n});\nvar toKebabCase = (value) => value.replace(/([A-Z])([A-Z])/g, \"$1-$2\").replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\nvar isEmpty = (v) => v.length === 0;\nexport {\n  createAnatomy\n};\n","// src/state.ts\nimport { ensure, invariant } from \"@zag-js/utils\";\nvar STATE_DELIMITER = \".\";\nvar ABSOLUTE_PREFIX = \"#\";\nvar stateIndexCache = /* @__PURE__ */ new WeakMap();\nvar stateIdIndexCache = /* @__PURE__ */ new WeakMap();\nfunction joinStatePath(parts) {\n  return parts.join(STATE_DELIMITER);\n}\nfunction isAbsoluteStatePath(value) {\n  return value.includes(STATE_DELIMITER);\n}\nfunction isExplicitAbsoluteStatePath(value) {\n  return value.startsWith(ABSOLUTE_PREFIX);\n}\nfunction isChildTarget(value) {\n  return value.startsWith(STATE_DELIMITER);\n}\nfunction stripAbsolutePrefix(value) {\n  return isExplicitAbsoluteStatePath(value) ? value.slice(ABSOLUTE_PREFIX.length) : value;\n}\nfunction appendStatePath(base, segment) {\n  return base ? `${base}${STATE_DELIMITER}${segment}` : segment;\n}\nfunction buildStateIndex(machine) {\n  const index = /* @__PURE__ */ new Map();\n  const idIndex = /* @__PURE__ */ new Map();\n  const visit = (basePath, state) => {\n    index.set(basePath, state);\n    const stateId = state.id;\n    if (stateId) {\n      if (idIndex.has(stateId)) {\n        invariant(`[zag-js] Duplicate state id: \"${stateId}\"`);\n      }\n      idIndex.set(stateId, basePath);\n    }\n    const childStates = state.states;\n    if (!childStates) return;\n    ensure(state.initial, () => `[zag-js] Compound state \"${basePath}\" has child states but no \"initial\" property`);\n    if (!(state.initial in childStates)) {\n      invariant(\n        `[zag-js] Compound state \"${basePath}\" has initial \"${String(state.initial)}\" which is not a child state`\n      );\n    }\n    for (const [childKey, childState] of Object.entries(childStates)) {\n      if (!childState) continue;\n      const childPath = appendStatePath(basePath, childKey);\n      visit(childPath, childState);\n    }\n  };\n  for (const [topKey, topState] of Object.entries(machine.states)) {\n    if (!topState) continue;\n    visit(topKey, topState);\n  }\n  return { index, idIndex };\n}\nfunction ensureStateIndex(machine) {\n  const cached = stateIndexCache.get(machine);\n  if (cached) return cached;\n  const { index, idIndex } = buildStateIndex(machine);\n  stateIndexCache.set(machine, index);\n  stateIdIndexCache.set(machine, idIndex);\n  return index;\n}\nfunction getStatePathById(machine, stateId) {\n  ensureStateIndex(machine);\n  return stateIdIndexCache.get(machine)?.get(stateId);\n}\nfunction toSegments(value) {\n  if (!value) return [];\n  return String(value).split(STATE_DELIMITER).filter(Boolean);\n}\nfunction getStateChain(machine, state) {\n  if (!state) return [];\n  const stateIndex = ensureStateIndex(machine);\n  const segments = toSegments(state);\n  const chain = [];\n  const statePath = [];\n  for (const segment of segments) {\n    statePath.push(segment);\n    const path = joinStatePath(statePath);\n    const current = stateIndex.get(path);\n    if (!current) break;\n    chain.push({ path, state: current });\n  }\n  return chain;\n}\nfunction resolveAbsoluteStateValue(machine, value) {\n  const stateIndex = ensureStateIndex(machine);\n  const segments = toSegments(value);\n  if (!segments.length) return value;\n  const resolved = [];\n  for (const segment of segments) {\n    resolved.push(segment);\n    const path = joinStatePath(resolved);\n    if (!stateIndex.has(path)) return value;\n  }\n  let resolvedPath = joinStatePath(resolved);\n  let current = stateIndex.get(resolvedPath);\n  while (current?.initial) {\n    const nextPath = `${resolvedPath}${STATE_DELIMITER}${current.initial}`;\n    const nextState = stateIndex.get(nextPath);\n    if (!nextState) break;\n    resolvedPath = nextPath;\n    current = nextState;\n  }\n  return resolvedPath;\n}\nfunction hasStatePath(machine, value) {\n  const stateIndex = ensureStateIndex(machine);\n  return stateIndex.has(value);\n}\nfunction resolveStateValue(machine, value, source) {\n  const stateValue = String(value);\n  if (isExplicitAbsoluteStatePath(stateValue)) {\n    const stateId = stripAbsolutePrefix(stateValue);\n    const statePath = getStatePathById(machine, stateId);\n    ensure(statePath, () => `[zag-js] Unknown state id: \"${stateId}\"`);\n    return resolveAbsoluteStateValue(machine, statePath);\n  }\n  if (isChildTarget(stateValue) && source) {\n    const childPath = appendStatePath(source, stateValue.slice(1));\n    return resolveAbsoluteStateValue(machine, childPath);\n  }\n  if (!isAbsoluteStatePath(stateValue) && source) {\n    const sourceSegments = toSegments(source);\n    for (let index = sourceSegments.length - 1; index >= 1; index--) {\n      const base = sourceSegments.slice(0, index).join(STATE_DELIMITER);\n      const candidate = appendStatePath(base, stateValue);\n      if (hasStatePath(machine, candidate)) return resolveAbsoluteStateValue(machine, candidate);\n    }\n    if (hasStatePath(machine, stateValue)) return resolveAbsoluteStateValue(machine, stateValue);\n  }\n  return resolveAbsoluteStateValue(machine, stateValue);\n}\nfunction getStateDefinition(machine, state) {\n  const chain = getStateChain(machine, state);\n  return chain[chain.length - 1]?.state;\n}\nfunction findTransition(machine, state, eventType) {\n  const chain = getStateChain(machine, state);\n  for (let index = chain.length - 1; index >= 0; index--) {\n    const transitionMap = chain[index]?.state.on;\n    const transition = transitionMap?.[eventType];\n    if (transition) return { transitions: transition, source: chain[index]?.path };\n  }\n  const rootTransitionMap = machine.on;\n  return { transitions: rootTransitionMap?.[eventType], source: void 0 };\n}\nfunction getExitEnterStates(machine, prevState, nextState, reenter) {\n  const prevChain = prevState ? getStateChain(machine, prevState) : [];\n  const nextChain = getStateChain(machine, nextState);\n  let commonIndex = 0;\n  while (commonIndex < prevChain.length && commonIndex < nextChain.length && prevChain[commonIndex]?.path === nextChain[commonIndex]?.path) {\n    commonIndex += 1;\n  }\n  let exiting = prevChain.slice(commonIndex).reverse();\n  let entering = nextChain.slice(commonIndex);\n  const sameLeaf = prevChain[prevChain.length - 1]?.path === nextChain[nextChain.length - 1]?.path;\n  if (reenter && sameLeaf) {\n    exiting = prevChain.slice().reverse();\n    entering = nextChain;\n  }\n  return { exiting, entering };\n}\nfunction matchesState(current, value) {\n  if (!current) return false;\n  return current === value || current.startsWith(`${value}${STATE_DELIMITER}`);\n}\nfunction hasTag(machine, state, tag) {\n  return getStateChain(machine, state).some((item) => item.state.tags?.includes(tag));\n}\nexport {\n  ensureStateIndex,\n  findTransition,\n  getExitEnterStates,\n  getStateChain,\n  getStateDefinition,\n  hasTag,\n  matchesState,\n  resolveStateValue\n};\n","// src/layer-stack.ts\nimport { contains, nextTick, getComputedStyle } from \"@zag-js/dom-query\";\nvar LAYER_REQUEST_DISMISS_EVENT = \"layer:request-dismiss\";\nvar layerStack = {\n  layers: [],\n  branches: [],\n  recentlyRemoved: /* @__PURE__ */ new Set(),\n  count() {\n    return this.layers.length;\n  },\n  pointerBlockingLayers() {\n    return this.layers.filter((layer) => layer.pointerBlocking);\n  },\n  topMostPointerBlockingLayer() {\n    return [...this.pointerBlockingLayers()].slice(-1)[0];\n  },\n  hasPointerBlockingLayer() {\n    return this.pointerBlockingLayers().length > 0;\n  },\n  isBelowPointerBlockingLayer(node) {\n    const index = this.indexOf(node);\n    const highestBlockingIndex = this.topMostPointerBlockingLayer() ? this.indexOf(this.topMostPointerBlockingLayer()?.node) : -1;\n    return index < highestBlockingIndex;\n  },\n  isTopMost(node) {\n    const layer = this.layers[this.count() - 1];\n    return layer?.node === node;\n  },\n  getNestedLayers(node) {\n    return Array.from(this.layers).slice(this.indexOf(node) + 1);\n  },\n  getLayersByType(type) {\n    return this.layers.filter((layer) => layer.type === type);\n  },\n  getNestedLayersByType(node, type) {\n    const index = this.indexOf(node);\n    if (index === -1) return [];\n    return this.layers.slice(index + 1).filter((layer) => layer.type === type);\n  },\n  getParentLayerOfType(node, type) {\n    const index = this.indexOf(node);\n    if (index <= 0) return void 0;\n    return this.layers.slice(0, index).reverse().find((layer) => layer.type === type);\n  },\n  countNestedLayersOfType(node, type) {\n    return this.getNestedLayersByType(node, type).length;\n  },\n  isInNestedLayer(node, target) {\n    const inNested = this.getNestedLayers(node).some((layer) => contains(layer.node, target));\n    if (inNested) return true;\n    if (this.recentlyRemoved.size > 0) return true;\n    return false;\n  },\n  isInBranch(target) {\n    return Array.from(this.branches).some((branch) => contains(branch, target));\n  },\n  add(layer) {\n    const existingIndex = this.indexOf(layer.node);\n    if (existingIndex !== -1) {\n      this.layers.splice(existingIndex, 1);\n    }\n    this.layers.push(layer);\n    this.syncLayers();\n  },\n  addBranch(node) {\n    this.branches.push(node);\n  },\n  remove(node) {\n    const index = this.indexOf(node);\n    if (index < 0) return;\n    const layer = this.layers[index];\n    layer.styleTargets?.forEach((getTarget) => {\n      const target = getTarget();\n      if (target) {\n        clearLayerStyleMirror(target);\n      }\n    });\n    this.recentlyRemoved.add(node);\n    nextTick(() => this.recentlyRemoved.delete(node));\n    if (index < this.count() - 1) {\n      const _layers = this.getNestedLayers(node);\n      _layers.forEach((layer2) => layerStack.dismiss(layer2.node, node));\n    }\n    this.layers.splice(index, 1);\n    this.syncLayers();\n  },\n  removeBranch(node) {\n    const index = this.branches.indexOf(node);\n    if (index >= 0) this.branches.splice(index, 1);\n  },\n  syncLayers() {\n    this.layers.forEach((layer, index) => {\n      applyLayerStackMetadata(layer, index, layer.node);\n      layer.styleTargets?.forEach((getTarget) => {\n        const target = getTarget();\n        if (!target || target === layer.node) return;\n        applyLayerStackMetadata(layer, index, target);\n        const { zIndex } = getComputedStyle(layer.node);\n        target.style.setProperty(\"--z-index\", zIndex);\n      });\n    });\n  },\n  indexOf(node) {\n    return this.layers.findIndex((layer) => layer.node === node);\n  },\n  dismiss(node, parent) {\n    const index = this.indexOf(node);\n    if (index === -1) return;\n    const layer = this.layers[index];\n    addListenerOnce(node, LAYER_REQUEST_DISMISS_EVENT, (event) => {\n      layer.requestDismiss?.(event);\n      if (!event.defaultPrevented) {\n        layer?.dismiss();\n      }\n    });\n    fireCustomEvent(node, LAYER_REQUEST_DISMISS_EVENT, {\n      originalLayer: node,\n      targetLayer: parent,\n      originalIndex: index,\n      targetIndex: parent ? this.indexOf(parent) : -1\n    });\n    this.syncLayers();\n  },\n  clear() {\n    this.remove(this.layers[0].node);\n  }\n};\nfunction applyLayerStackMetadata(layer, index, el) {\n  el.style.setProperty(\"--layer-index\", `${index}`);\n  el.removeAttribute(\"data-nested\");\n  el.removeAttribute(\"data-has-nested\");\n  const parentOfSameType = layerStack.getParentLayerOfType(layer.node, layer.type);\n  if (parentOfSameType) {\n    el.setAttribute(\"data-nested\", layer.type);\n  }\n  const nestedCount = layerStack.countNestedLayersOfType(layer.node, layer.type);\n  if (nestedCount > 0) {\n    el.setAttribute(\"data-has-nested\", layer.type);\n  }\n  el.style.setProperty(\"--nested-layer-count\", `${nestedCount}`);\n}\nfunction clearLayerStyleMirror(el) {\n  el.style.removeProperty(\"--layer-index\");\n  el.style.removeProperty(\"--nested-layer-count\");\n  el.style.removeProperty(\"--z-index\");\n  el.removeAttribute(\"data-nested\");\n  el.removeAttribute(\"data-has-nested\");\n}\nfunction fireCustomEvent(el, type, detail) {\n  const win = el.ownerDocument.defaultView || window;\n  const event = new win.CustomEvent(type, { cancelable: true, bubbles: true, detail });\n  return el.dispatchEvent(event);\n}\nfunction addListenerOnce(el, type, callback) {\n  el.addEventListener(type, callback, { once: true });\n}\nexport {\n  layerStack\n};\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n\nexport {\n  __publicField\n};\n","import \"./chunk-QZ7TP4HQ.mjs\";\n\n// src/computed-style.ts\nimport { getWindow } from \"./node.mjs\";\nvar styleCache = /* @__PURE__ */ new WeakMap();\nfunction getComputedStyle(el) {\n  if (!styleCache.has(el)) {\n    styleCache.set(el, getWindow(el).getComputedStyle(el));\n  }\n  return styleCache.get(el);\n}\nexport {\n  getComputedStyle\n};\n","import \"./chunk-QZ7TP4HQ.mjs\";\n\n// src/when-node.ts\nimport { raf } from \"./raf.mjs\";\nfunction whenNode(nodeOrFn, fn, options = {}) {\n  const { defer, onMissing } = options;\n  const getNode = () => typeof nodeOrFn === \"function\" ? nodeOrFn() : nodeOrFn;\n  const cleanups = [];\n  const setup = (node) => {\n    if (!node) return onMissing?.();\n    cleanups.push(fn(node));\n  };\n  if (!defer) {\n    setup(getNode());\n  } else {\n    let cancelled = false;\n    cleanups.push(() => {\n      cancelled = true;\n    });\n    queueMicrotask(() => {\n      if (cancelled) return;\n      const committed = getNode();\n      if (committed) {\n        setup(committed);\n        return;\n      }\n      cleanups.push(\n        raf(() => {\n          if (cancelled) return;\n          setup(getNode());\n        })\n      );\n    });\n  }\n  return () => {\n    cleanups.forEach((fn2) => fn2?.());\n  };\n}\nexport {\n  whenNode\n};\n","// src/types.ts\nvar MachineStatus = /* @__PURE__ */ ((MachineStatus2) => {\n  MachineStatus2[\"NotStarted\"] = \"Not Started\";\n  MachineStatus2[\"Started\"] = \"Started\";\n  MachineStatus2[\"Stopped\"] = \"Stopped\";\n  return MachineStatus2;\n})(MachineStatus || {});\nvar INIT_STATE = \"__init__\";\nexport {\n  INIT_STATE,\n  MachineStatus\n};\n","// src/replace-tracker.ts\nfunction createReplaceTracker() {\n  const newest = /* @__PURE__ */ new Map();\n  return {\n    claim(key) {\n      const token = Symbol(key);\n      newest.set(key, token);\n      return token;\n    },\n    isReplaced(key, token) {\n      return newest.get(key) !== token;\n    }\n  };\n}\nexport {\n  createReplaceTracker\n};\n","\"use client\";\n\n// src/use-layout-effect.ts\nimport { useEffect, useLayoutEffect } from \"react\";\nvar useSafeLayoutEffect = typeof globalThis.document !== \"undefined\" ? useLayoutEffect : useEffect;\nexport {\n  useSafeLayoutEffect\n};\n","\"use client\";\n\n// src/bindable.ts\nimport { identity, isFunction } from \"@zag-js/utils\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { flushSync } from \"react-dom\";\nimport { useSafeLayoutEffect } from \"./use-layout-effect.mjs\";\nfunction useBindable(props) {\n  const initial = props().value ?? props().defaultValue;\n  const eq = props().isEqual ?? Object.is;\n  const [initialValue] = useState(initial);\n  const [value, setValue] = useState(initialValue);\n  const controlled = props().value !== void 0;\n  const valueRef = useRef(value);\n  valueRef.current = controlled ? props().value : value;\n  const prevValue = useRef(valueRef.current);\n  useSafeLayoutEffect(() => {\n    prevValue.current = valueRef.current;\n  }, [value, props().value]);\n  const setFn = (value2) => {\n    const prev = prevValue.current;\n    const next = isFunction(value2) ? value2(prev) : value2;\n    if (props().debug) {\n      console.log(`[bindable > ${props().debug}] setValue`, { next, prev });\n    }\n    if (!controlled) setValue(next);\n    if (!eq(next, prev)) {\n      props().onChange?.(next, prev);\n    }\n  };\n  function get() {\n    return controlled ? props().value : value;\n  }\n  return {\n    initial: initialValue,\n    ref: valueRef,\n    get,\n    set(value2) {\n      const exec = props().sync ? flushSync : identity;\n      exec(() => setFn(value2));\n    },\n    invoke(nextValue, prevValue2) {\n      props().onChange?.(nextValue, prevValue2);\n    },\n    hash(value2) {\n      return props().hash?.(value2) ?? String(value2);\n    }\n  };\n}\nuseBindable.cleanup = (fn) => {\n  useEffect(() => fn, []);\n};\nuseBindable.ref = (defaultValue) => {\n  const value = useRef(defaultValue);\n  return {\n    get: () => value.current,\n    set: (next) => {\n      value.current = next;\n    }\n  };\n};\nexport {\n  useBindable\n};\n","\"use client\";\n\n// src/stable.ts\nimport { useMemo, useRef } from \"react\";\nfunction useConst(factory) {\n  const ref = useRef(void 0);\n  if (ref.current === void 0) {\n    ref.current = factory();\n  }\n  return ref.current;\n}\nfunction useStableFn(fn) {\n  const ref = useRef(fn);\n  ref.current = fn;\n  return useMemo(() => {\n    return ((...args) => ref.current(...args));\n  }, []);\n}\nexport {\n  useConst,\n  useStableFn\n};\n","\"use client\";\n\n// src/track.ts\nimport { useEffect, useRef } from \"react\";\nvar useTrack = (deps, effect) => {\n  const render = useRef(false);\n  const called = useRef(false);\n  useEffect(() => {\n    const mounted = render.current;\n    const run = mounted && called.current;\n    if (run) return effect();\n    called.current = true;\n  }, [...(deps ?? []).map((d) => typeof d === \"function\" ? d() : d)]);\n  useEffect(() => {\n    render.current = true;\n    return () => {\n      render.current = false;\n    };\n  }, []);\n};\nexport {\n  useTrack\n};\n","\"use client\";\n\n// src/machine.ts\nimport {\n  createReplaceTracker,\n  createScope,\n  findTransition,\n  getExitEnterStates,\n  hasTag,\n  INIT_STATE,\n  MachineStatus,\n  matchesState,\n  resolveStateValue\n} from \"@zag-js/core\";\nimport { callAll, compact, ensure, isFunction, isString, toArray, warn } from \"@zag-js/utils\";\nimport { useMemo, useRef } from \"react\";\nimport { flushSync } from \"react-dom\";\nimport { useBindable } from \"./bindable.mjs\";\nimport { useRefs } from \"./refs.mjs\";\nimport { useConst, useStableFn } from \"./stable.mjs\";\nimport { useTrack } from \"./track.mjs\";\nimport { useSafeLayoutEffect } from \"./use-layout-effect.mjs\";\nfunction useMachine(machine, userProps = {}) {\n  const scope = useMemo(() => {\n    const { id, ids, getRootNode } = userProps;\n    return createScope({ id, ids, getRootNode });\n  }, [userProps]);\n  const debug = (...args) => {\n    if (machine.debug) console.log(...args);\n  };\n  const props = machine.props?.({ props: compact(userProps), scope }) ?? userProps;\n  const prop = useProp(props);\n  const context = machine.context?.({\n    prop,\n    bindable: useBindable,\n    scope,\n    flush,\n    getContext() {\n      return ctx;\n    },\n    getComputed() {\n      return computed;\n    },\n    getRefs() {\n      return refs;\n    },\n    getEvent() {\n      return getEvent();\n    }\n  });\n  const contextRef = useLiveRef(context);\n  const ctx = useConst(() => ({\n    get(key) {\n      return contextRef.current?.[key].ref.current;\n    },\n    set(key, value) {\n      contextRef.current?.[key].set(value);\n    },\n    initial(key) {\n      return contextRef.current?.[key].initial;\n    },\n    hash(key) {\n      const current = contextRef.current?.[key].get();\n      return contextRef.current?.[key].hash(current);\n    }\n  }));\n  const effects = useRef(/* @__PURE__ */ new Map());\n  const transitionRef = useRef(null);\n  const previousEventRef = useRef(null);\n  const eventRef = useRef({ type: \"\" });\n  const getEvent = () => ({\n    ...eventRef.current,\n    current() {\n      return eventRef.current;\n    },\n    previous() {\n      return previousEventRef.current;\n    }\n  });\n  const getState = () => ({\n    ...state,\n    matches(...values) {\n      return values.some((value) => matchesState(state.ref.current, value));\n    },\n    hasTag(tag) {\n      return hasTag(machine, state.ref.current, tag);\n    }\n  });\n  const refs = useRefs(machine.refs?.({ prop, context: ctx }) ?? {});\n  const transition = useStableFn((event) => {\n    if (statusRef.current !== MachineStatus.Started) return;\n    previousEventRef.current = eventRef.current;\n    eventRef.current = event;\n    const currentState = getCurrentState();\n    const { transitions, source } = findTransition(machine, currentState, event.type);\n    const selectedTransition = choose(transitions);\n    if (!selectedTransition) return;\n    transitionRef.current = selectedTransition;\n    const target = resolveStateValue(machine, selectedTransition.target ?? currentState, source);\n    debug(\"transition\", event.type, selectedTransition.target || currentState, `(${selectedTransition.actions})`);\n    const changed = target !== currentState;\n    if (changed) {\n      flushSync(() => state.set(target));\n    } else if (selectedTransition.reenter) {\n      state.invoke(currentState, currentState);\n    } else {\n      action(selectedTransition.actions ?? []);\n    }\n  });\n  const replaceTracker = useConst(createReplaceTracker);\n  const send = useStableFn((event) => {\n    const key = event.replaces;\n    const token = key ? replaceTracker.claim(key) : void 0;\n    queueMicrotask(() => {\n      if (key && token && replaceTracker.isReplaced(key, token)) return;\n      transition(event);\n    });\n  });\n  const computed = useStableFn((key) => {\n    ensure(machine.computed, () => `[zag-js] No computed object found on machine`);\n    const fn = machine.computed[key];\n    return fn({\n      context: ctx,\n      event: getEvent(),\n      prop,\n      refs,\n      scope,\n      computed\n    });\n  });\n  const getParams = () => ({\n    state: getState(),\n    context: ctx,\n    event: getEvent(),\n    prop,\n    send,\n    action,\n    guard,\n    track: useTrack,\n    refs,\n    computed,\n    flush,\n    scope,\n    choose\n  });\n  const action = (keys) => {\n    const strs = isFunction(keys) ? keys(getParams()) : keys;\n    if (!strs) return;\n    const fns = strs.map((s) => {\n      const fn = machine.implementations?.actions?.[s];\n      if (!fn) warn(`[zag-js] No implementation found for action \"${JSON.stringify(s)}\"`);\n      return fn;\n    });\n    for (const fn of fns) {\n      fn?.(getParams());\n    }\n  };\n  const guard = (str) => {\n    if (isFunction(str)) return str(getParams());\n    const fn = machine.implementations?.guards?.[str];\n    if (!fn) warn(`[zag-js] No implementation found for guard \"${JSON.stringify(str)}\"`);\n    return fn?.(getParams());\n  };\n  const effect = (keys) => {\n    const strs = isFunction(keys) ? keys(getParams()) : keys;\n    if (!strs) return;\n    const fns = strs.map((s) => {\n      const fn = machine.implementations?.effects?.[s];\n      if (!fn) warn(`[zag-js] No implementation found for effect \"${JSON.stringify(s)}\"`);\n      return fn;\n    });\n    const cleanups = [];\n    for (const fn of fns) {\n      const cleanup = fn?.(getParams());\n      if (cleanup) cleanups.push(cleanup);\n    }\n    return () => cleanups.forEach((fn) => fn?.());\n  };\n  const choose = (transitions) => {\n    return toArray(transitions).find((t) => {\n      let result = !t.guard;\n      if (isString(t.guard)) result = !!guard(t.guard);\n      else if (isFunction(t.guard)) result = t.guard(getParams());\n      return result;\n    });\n  };\n  const state = useBindable(() => ({\n    defaultValue: resolveStateValue(machine, machine.initialState({ prop })),\n    onChange(nextState, prevState) {\n      const { exiting, entering } = getExitEnterStates(machine, prevState, nextState, transitionRef.current?.reenter);\n      exiting.forEach((item) => {\n        const exitEffects = effects.current.get(item.path);\n        exitEffects?.();\n        effects.current.delete(item.path);\n      });\n      exiting.forEach((item) => {\n        action(item.state?.exit);\n      });\n      action(transitionRef.current?.actions);\n      entering.forEach((item) => {\n        const cleanup = effect(item.state?.effects);\n        if (cleanup) {\n          const existing = effects.current.get(item.path);\n          effects.current.set(item.path, existing ? callAll(existing, cleanup) : cleanup);\n        }\n      });\n      if (prevState === INIT_STATE) {\n        action(machine.entry);\n        const cleanup = effect(machine.effects);\n        if (cleanup) {\n          const existing = effects.current.get(INIT_STATE);\n          effects.current.set(INIT_STATE, existing ? callAll(existing, cleanup) : cleanup);\n        }\n      }\n      entering.forEach((item) => {\n        action(item.state?.entry);\n      });\n    }\n  }));\n  const hydratedStateRef = useRef(void 0);\n  const statusRef = useRef(MachineStatus.NotStarted);\n  const getStatus = useStableFn(() => statusRef.current);\n  useSafeLayoutEffect(() => {\n    queueMicrotask(() => {\n      const started = statusRef.current === MachineStatus.Started;\n      statusRef.current = MachineStatus.Started;\n      debug(started ? \"rehydrating...\" : \"initializing...\");\n      const initialState = hydratedStateRef.current ?? state.initial;\n      state.invoke(initialState, started ? state.get() : INIT_STATE);\n    });\n    const fns = effects.current;\n    return () => {\n      const currentState = getCurrentState();\n      debug(\"unmounting...\");\n      hydratedStateRef.current = currentState;\n      statusRef.current = MachineStatus.Stopped;\n      fns.forEach((fn) => fn?.());\n      effects.current = /* @__PURE__ */ new Map();\n      transitionRef.current = null;\n      queueMicrotask(() => {\n        action(machine.exit);\n        statusRef.current = MachineStatus.Stopped;\n      });\n    };\n  }, []);\n  const getCurrentState = () => {\n    if (\"ref\" in state) return state.ref.current;\n    return state.get();\n  };\n  machine.watch?.(getParams());\n  return {\n    state: getState(),\n    send,\n    context: ctx,\n    prop,\n    scope,\n    refs,\n    computed,\n    event: getEvent(),\n    getStatus\n  };\n}\nfunction useLiveRef(value) {\n  const ref = useRef(value);\n  ref.current = value;\n  return ref;\n}\nfunction useProp(value) {\n  const ref = useLiveRef(value);\n  return useStableFn(function get(key) {\n    return ref.current[key];\n  });\n}\nfunction flush(fn) {\n  queueMicrotask(() => {\n    flushSync(() => fn());\n  });\n}\nexport {\n  useMachine\n};\n","\"use client\";\n\n// src/refs.ts\nimport { useRef } from \"react\";\nimport { useConst } from \"./stable.mjs\";\nfunction useRefs(refs) {\n  const ref = useRef(refs);\n  return useConst(() => ({\n    get(key) {\n      return ref.current[key];\n    },\n    set(key, value) {\n      ref.current[key] = value;\n    }\n  }));\n}\nexport {\n  useRefs\n};\n","// src/scope.ts\nimport { getActiveElement, getDocument, isActiveElement } from \"@zag-js/dom-query\";\nfunction createScope(props) {\n  const getRootNode = () => props.getRootNode?.() ?? document;\n  const getDoc = () => getDocument(getRootNode());\n  const getWin = () => getDoc().defaultView ?? window;\n  const getActiveElementFn = () => getActiveElement(getRootNode());\n  const getById = (id) => getRootNode().getElementById(id);\n  return {\n    ...props,\n    getRootNode,\n    getDoc,\n    getWin,\n    getActiveElement: getActiveElementFn,\n    isActiveElement,\n    getById\n  };\n}\nexport {\n  createScope\n};\n","// src/normalize-props.ts\nimport { createNormalizer } from \"@zag-js/types\";\nvar normalizeProps = createNormalizer((v) => v);\nexport {\n  normalizeProps\n};\n","// src/prop-types.ts\nfunction createNormalizer(fn) {\n  return new Proxy({}, {\n    get(_target, key) {\n      if (key === \"style\")\n        return (props) => {\n          return fn({ style: props }).style;\n        };\n      return fn;\n    }\n  });\n}\nexport {\n  createNormalizer\n};\n","// src/toast.store.ts\nimport { compact, runIfFn, uuid, warn } from \"@zag-js/utils\";\nvar withDefaults = (options, defaults) => {\n  return { ...defaults, ...compact(options) };\n};\nvar priorities = {\n  error: [1, 2],\n  warning: [3, 6],\n  loading: [4, 5],\n  success: [5, 7],\n  info: [6, 8]\n};\nvar DEFAULT_TYPE = \"info\";\nvar getPriorityForType = (type, hasAction) => {\n  const [actionable, nonActionable] = priorities[type ?? DEFAULT_TYPE];\n  return hasAction ? actionable : nonActionable;\n};\nvar sortToastsByPriority = (toastArray) => {\n  return toastArray.sort((a, b) => {\n    const priorityA = a.priority ?? getPriorityForType(a.type, !!a.action);\n    const priorityB = b.priority ?? getPriorityForType(b.type, !!b.action);\n    return priorityA - priorityB;\n  });\n};\nfunction createToastStore(props = {}) {\n  const attrs = withDefaults(props, {\n    placement: \"bottom\",\n    overlap: false,\n    max: 24,\n    gap: 16,\n    offsets: \"1rem\",\n    hotkey: [\"altKey\", \"KeyT\"],\n    removeDelay: 200,\n    pauseOnPageIdle: true\n  });\n  let subscribers = [];\n  let toasts = [];\n  let dismissedToasts = /* @__PURE__ */ new Set();\n  let toastQueue = [];\n  const subscribe = (subscriber) => {\n    subscribers.push(subscriber);\n    return () => {\n      const index = subscribers.indexOf(subscriber);\n      subscribers.splice(index, 1);\n    };\n  };\n  const publish = (data) => {\n    subscribers.forEach((subscriber) => subscriber(data));\n    return data;\n  };\n  const addToast = (data) => {\n    if (toasts.length >= attrs.max) {\n      toastQueue.push(data);\n      return;\n    }\n    publish(data);\n    toasts.unshift(data);\n  };\n  const processQueue = () => {\n    toastQueue = sortToastsByPriority(toastQueue);\n    while (toastQueue.length > 0 && toasts.length < attrs.max) {\n      const nextToast = toastQueue.shift();\n      if (nextToast) {\n        publish(nextToast);\n        toasts.unshift(nextToast);\n      }\n    }\n  };\n  const create = (data) => {\n    const id = data.id ?? `toast:${uuid()}`;\n    const exists = toasts.find((toast) => toast.id === id);\n    if (dismissedToasts.has(id)) dismissedToasts.delete(id);\n    if (exists) {\n      toasts = toasts.map((toast) => {\n        if (toast.id === id) {\n          return publish({ ...toast, ...data, id });\n        }\n        return toast;\n      });\n    } else {\n      const newToast = {\n        id,\n        duration: attrs.duration,\n        removeDelay: attrs.removeDelay,\n        type: DEFAULT_TYPE,\n        ...data,\n        stacked: !attrs.overlap,\n        gap: attrs.gap\n      };\n      const priority = newToast.priority ?? getPriorityForType(newToast.type, !!newToast.action);\n      addToast({ ...newToast, priority });\n    }\n    return id;\n  };\n  const remove = (id) => {\n    dismissedToasts.add(id);\n    if (!id) {\n      toasts.forEach((toast) => {\n        subscribers.forEach((subscriber) => subscriber({ id: toast.id, dismiss: true }));\n      });\n      toasts = [];\n      toastQueue = [];\n    } else {\n      subscribers.forEach((subscriber) => subscriber({ id, dismiss: true }));\n      toasts = toasts.filter((toast) => toast.id !== id);\n      processQueue();\n    }\n    return id;\n  };\n  const error = (data) => {\n    return create({ ...data, type: \"error\" });\n  };\n  const success = (data) => {\n    return create({ ...data, type: \"success\" });\n  };\n  const info = (data) => {\n    return create({ ...data, type: \"info\" });\n  };\n  const warning = (data) => {\n    return create({ ...data, type: \"warning\" });\n  };\n  const loading = (data) => {\n    return create({ ...data, type: \"loading\" });\n  };\n  const getVisibleToasts = () => {\n    return toasts.filter((toast) => !dismissedToasts.has(toast.id));\n  };\n  const getCount = () => {\n    return toasts.length;\n  };\n  const promise = (promise2, options, shared = {}) => {\n    if (!options || !options.loading) {\n      warn(\"[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified\");\n      return;\n    }\n    const id = create({\n      ...shared,\n      ...options.loading,\n      promise: promise2,\n      type: \"loading\"\n    });\n    let removable = true;\n    let result;\n    const prom = runIfFn(promise2).then(async (response) => {\n      result = [\"resolve\", response];\n      if (isHttpResponse(response) && !response.ok) {\n        removable = false;\n        const errorOptions = runIfFn(options.error, `HTTP Error! status: ${response.status}`);\n        create({ ...shared, ...errorOptions, id, type: \"error\" });\n      } else if (options.success !== void 0) {\n        removable = false;\n        const successOptions = runIfFn(options.success, response);\n        create({ ...shared, ...successOptions, id, type: successOptions.type ?? \"success\" });\n      }\n    }).catch(async (error2) => {\n      result = [\"reject\", error2];\n      if (options.error !== void 0) {\n        removable = false;\n        const errorOptions = runIfFn(options.error, error2);\n        create({ ...shared, ...errorOptions, id, type: \"error\" });\n      }\n    }).finally(() => {\n      if (removable) {\n        remove(id);\n      }\n      options.finally?.();\n    });\n    const unwrap = () => new Promise(\n      (resolve, reject) => prom.then(() => result[0] === \"reject\" ? reject(result[1]) : resolve(result[1])).catch(reject)\n    );\n    return { id, unwrap };\n  };\n  const update = (id, data) => {\n    return create({ id, ...data });\n  };\n  const pause = (id) => {\n    if (id != null) {\n      toasts = toasts.map((toast) => {\n        if (toast.id === id) return publish({ ...toast, message: \"PAUSE\" });\n        return toast;\n      });\n    } else {\n      toasts = toasts.map((toast) => publish({ ...toast, message: \"PAUSE\" }));\n    }\n  };\n  const resume = (id) => {\n    if (id != null) {\n      toasts = toasts.map((toast) => {\n        if (toast.id === id) return publish({ ...toast, message: \"RESUME\" });\n        return toast;\n      });\n    } else {\n      toasts = toasts.map((toast) => publish({ ...toast, message: \"RESUME\" }));\n    }\n  };\n  const dismiss = (id) => {\n    if (id != null) {\n      toasts = toasts.map((toast) => {\n        if (toast.id === id) return publish({ ...toast, message: \"DISMISS\" });\n        return toast;\n      });\n    } else {\n      toasts = toasts.map((toast) => publish({ ...toast, message: \"DISMISS\" }));\n    }\n  };\n  const isVisible = (id) => {\n    return !dismissedToasts.has(id) && !!toasts.find((toast) => toast.id === id);\n  };\n  const isDismissed = (id) => {\n    return dismissedToasts.has(id);\n  };\n  const expand = () => {\n    toasts = toasts.map((toast) => publish({ ...toast, stacked: true }));\n  };\n  const collapse = () => {\n    toasts = toasts.map((toast) => publish({ ...toast, stacked: false }));\n  };\n  return {\n    attrs,\n    subscribe,\n    create,\n    update,\n    remove,\n    dismiss,\n    error,\n    success,\n    info,\n    warning,\n    loading,\n    getVisibleToasts,\n    getCount,\n    promise,\n    pause,\n    resume,\n    isVisible,\n    isDismissed,\n    expand,\n    collapse\n  };\n}\nvar isHttpResponse = (data) => {\n  return data && typeof data === \"object\" && \"ok\" in data && typeof data.ok === \"boolean\" && \"status\" in data && typeof data.status === \"number\";\n};\nexport {\n  createToastStore\n};\n","import \"./chunk-MXGZDBDQ.mjs\";\n\n// src/object.ts\nimport { isPlainObject } from \"./guard.mjs\";\nfunction compact(obj) {\n  if (!isPlainObject(obj) || obj === void 0) return obj;\n  const keys2 = Reflect.ownKeys(obj).filter((key) => typeof key === \"string\");\n  const filtered = {};\n  for (const key of keys2) {\n    const value = obj[key];\n    if (value !== void 0) {\n      filtered[key] = compact(value);\n    }\n  }\n  return filtered;\n}\nvar json = (v) => JSON.parse(JSON.stringify(v));\nvar keys = (obj) => Object.keys(obj);\nfunction pick(obj, keys2) {\n  const filtered = {};\n  for (const key of keys2) {\n    const value = obj[key];\n    if (value !== void 0) {\n      filtered[key] = value;\n    }\n  }\n  return filtered;\n}\nfunction splitProps(props, keys2) {\n  const rest = {};\n  const result = {};\n  const keySet = new Set(keys2);\n  const ownKeys = Reflect.ownKeys(props);\n  for (const key of ownKeys) {\n    if (keySet.has(key)) {\n      result[key] = props[key];\n    } else {\n      rest[key] = props[key];\n    }\n  }\n  return [result, rest];\n}\nvar createSplitProps = (keys2) => {\n  return function split(props) {\n    return splitProps(props, keys2);\n  };\n};\nfunction omit(obj, keys2) {\n  return createSplitProps(keys2)(obj)[1];\n}\nfunction mergeWithDefault(defaults, overrides) {\n  if (!overrides) return defaults;\n  const result = { ...defaults };\n  const source = overrides;\n  for (const key in source) {\n    const value = source[key];\n    if (value !== void 0) result[key] = value;\n  }\n  return result;\n}\nexport {\n  compact,\n  createSplitProps,\n  json,\n  keys,\n  mergeWithDefault,\n  omit,\n  pick,\n  splitProps\n};\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst { toString } = Object.prototype;\nconst { getPrototypeOf } = Object;\nconst { iterator, toStringTag } = Symbol;\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (\n  ({ hasOwnProperty }) =>\n  (obj, prop) =>\n    hasOwnProperty.call(obj, prop)\n)(Object.prototype);\n\nconst isUnsafeObjectKey = (prop) =>\n  typeof prop === 'string' &&\n  (prop === '__proto__' || prop === 'constructor' || prop === 'prototype');\n\n/**\n * Determine whether an inherited object must be treated as a shared-prototype\n * boundary. Cross-realm Object.prototype objects cannot be distinguished\n * reliably from application-created null-prototype objects because their\n * properties are mutable, so all inherited terminal prototypes are excluded\n * as a fail-closed boundary. A null-prototype source still keeps its own\n * properties, as produced by mergeConfig and other safe materialization paths.\n *\n * @param {*} obj The object to inspect\n * @param {*} prototype The object's prototype\n * @param {boolean} source Whether obj is the original traversal source\n *\n * @returns {boolean} True when obj is a safe prototype traversal boundary\n */\nconst isPrototypeBoundary = (obj, prototype, source) =>\n  obj === Object.prototype || (!source && prototype === null);\n\n/**\n * Determine whether an object can retain its identity through code paths that\n * add, replace, and remove config properties without bypassing unsafe-key\n * filtering. Immutable objects, unsafe-key-bearing objects, and objects with\n * accessor or restricted data properties must be materialized instead.\n *\n * @param {*} obj The object to inspect\n *\n * @returns {boolean} True when every own property is safe and fully mutable\n */\nconst isSafeAndFullyMutable = (obj) => {\n  if (!Object.isExtensible(obj)) {\n    return false;\n  }\n\n  const props = Object.getOwnPropertyNames(obj);\n\n  if (Object.getOwnPropertySymbols) {\n    props.push(...Object.getOwnPropertySymbols(obj));\n  }\n\n  return props.every((prop) => {\n    if (isUnsafeObjectKey(prop)) {\n      return false;\n    }\n\n    const descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n\n    return !!descriptor && descriptor.configurable && descriptor.writable === true;\n  });\n};\n\n/**\n * Walk the prototype chain (excluding the source realm's Object.prototype)\n * looking for an own `prop`. This distinguishes genuine own/inherited members\n * — including class accessors and template prototypes — from members injected\n * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`),\n * which live on Object.prototype itself and are therefore never matched.\n *\n * @param {*} thing The value whose chain to inspect\n * @param {string|symbol} prop The property key to look for\n *\n * @returns {boolean} True when `prop` is owned below Object.prototype\n */\nconst hasOwnInPrototypeChain = (thing, prop) => {\n  let obj = thing;\n  const seen = [];\n\n  while (obj != null) {\n    if (seen.indexOf(obj) !== -1) {\n      return false;\n    }\n    seen.push(obj);\n\n    const prototype = getPrototypeOf(obj);\n\n    if (isPrototypeBoundary(obj, prototype, obj === thing)) {\n      return false;\n    }\n\n    if (hasOwnProperty(obj, prop)) {\n      return true;\n    }\n    obj = prototype;\n  }\n  return false;\n};\n\n/**\n * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own\n * properties and members inherited from a non-Object.prototype source (a class\n * instance or template object) are honored; a value reachable only through a\n * polluted Object.prototype is ignored and `undefined` is returned.\n *\n * @param {*} obj The source object\n * @param {string|symbol} prop The property key to read\n *\n * @returns {*} The resolved value, or undefined when unsafe/absent\n */\nconst getSafeProp = (obj, prop) =>\n  obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;\n\n/**\n * Flatten an object and its application-defined prototype chain into a\n * null-prototype object. Members inherited only from the source realm's\n * Object.prototype are deliberately excluded, while class/template members\n * below that boundary are preserved.\n *\n * @param {*} thing The value to flatten\n *\n * @returns {*} A null-prototype copy, or the original value when it is already\n * structurally safe or is not an object\n */\nconst toSafeFlatObject = (thing) => {\n  if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) {\n    return thing;\n  }\n\n  const sourcePrototype = getPrototypeOf(thing);\n\n  if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {\n    return thing;\n  }\n\n  const result = Object.create(null);\n  const merged = Object.create(null);\n  const seen = [];\n  let current = thing;\n\n  while (current != null) {\n    if (seen.indexOf(current) !== -1) {\n      break;\n    }\n\n    seen.push(current);\n\n    const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);\n\n    if (isPrototypeBoundary(current, prototype, current === thing)) {\n      break;\n    }\n\n    const props = Object.getOwnPropertyNames(current);\n\n    if (Object.getOwnPropertySymbols) {\n      props.push(...Object.getOwnPropertySymbols(current));\n    }\n\n    for (const prop of props) {\n      if (isUnsafeObjectKey(prop)) {\n        continue;\n      }\n\n      if (!hasOwnProperty(merged, prop)) {\n        result[prop] = thing[prop];\n        merged[prop] = true;\n      }\n    }\n\n    current = prototype;\n  }\n\n  return result;\n};\n\nconst kindOf = ((cache) => (thing) => {\n  const str = toString.call(thing);\n  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n  type = type.toLowerCase();\n  return (thing) => kindOf(thing) === type;\n};\n\nconst typeOfTest = (type) => (thing) => typeof thing === type;\n\n/**\n * Determine if a value is a non-null object\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst { isArray } = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n  return (\n    val !== null &&\n    !isUndefined(val) &&\n    val.constructor !== null &&\n    !isUndefined(val.constructor) &&\n    isFunction(val.constructor.isBuffer) &&\n    val.constructor.isBuffer(val)\n  );\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n  let result;\n  if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n    result = ArrayBuffer.isView(val);\n  } else {\n    result = val && val.buffer && isArrayBuffer(val.buffer);\n  }\n  return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = (thing) => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n  if (!isObject(val)) {\n    return false;\n  }\n\n  const prototype = getPrototypeOf(val);\n  return (\n    (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&\n    // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as\n    // evidence the value is tagged/iterable, while ignoring members reachable\n    // only through shared or terminal prototype boundaries.\n    !hasOwnInPrototypeChain(val, toStringTag) &&\n    !hasOwnInPrototypeChain(val, iterator)\n  );\n};\n\n/**\n * Determine if a value is an empty object (safely handles Buffers)\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an empty object, otherwise false\n */\nconst isEmptyObject = (val) => {\n  // Early return for non-objects or Buffers to prevent RangeError\n  if (!isObject(val) || isBuffer(val)) {\n    return false;\n  }\n\n  try {\n    return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;\n  } catch (e) {\n    // Fallback for any other objects that might cause RangeError with Object.keys()\n    return false;\n  }\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a React Native Blob\n * React Native \"blob\": an object with a `uri` attribute. Optionally, it can\n * also have a `name` and `type` attribute to specify filename and content type\n *\n * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71\n *\n * @param {*} value The value to test\n *\n * @returns {boolean} True if value is a React Native Blob, otherwise false\n */\nconst isReactNativeBlob = (value) => {\n  return !!(value && typeof value.uri !== 'undefined');\n};\n\n/**\n * Determine if environment is React Native\n * ReactNative `FormData` has a non-standard `getParts()` method\n *\n * @param {*} formData The formData to test\n *\n * @returns {boolean} True if environment is React Native, otherwise false\n */\nconst isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a FileList, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\nconst isSet = kindOfTest('Set');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction getGlobal() {\n  if (typeof globalThis !== 'undefined') return globalThis;\n  if (typeof self !== 'undefined') return self;\n  if (typeof window !== 'undefined') return window;\n  if (typeof global !== 'undefined') return global;\n  return {};\n}\n\nconst G = getGlobal();\nconst FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;\n\nconst isFormData = (thing) => {\n  if (!thing) return false;\n  if (FormDataCtor && thing instanceof FormDataCtor) return true;\n  // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.\n  const proto = getPrototypeOf(thing);\n  if (!proto || proto === Object.prototype) return false;\n  if (!isFunction(thing.append)) return false;\n  const kind = kindOf(thing);\n  return (\n    kind === 'formdata' ||\n    // detect form-data instance\n    (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n  );\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = [\n  'ReadableStream',\n  'Request',\n  'Response',\n  'Headers',\n].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => {\n  return str.trim ? str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n};\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array<unknown>} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, { allOwnKeys = false } = {}) {\n  // Don't bother if no value provided\n  if (obj === null || typeof obj === 'undefined') {\n    return;\n  }\n\n  let i;\n  let l;\n\n  // Force an array if not already something iterable\n  if (typeof obj !== 'object') {\n    /*eslint no-param-reassign:0*/\n    obj = [obj];\n  }\n\n  if (isArray(obj)) {\n    // Iterate over array values\n    for (i = 0, l = obj.length; i < l; i++) {\n      fn.call(null, obj[i], i, obj);\n    }\n  } else {\n    // Buffer check\n    if (isBuffer(obj)) {\n      return;\n    }\n\n    // Iterate over object keys\n    const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n    const len = keys.length;\n    let key;\n\n    for (i = 0; i < len; i++) {\n      key = keys[i];\n      fn.call(null, obj[key], key, obj);\n    }\n  }\n}\n\n/**\n * Finds a key in an object, case-insensitive, returning the actual key name.\n * Returns null if the object is a Buffer or if no match is found.\n *\n * @param {Object} obj - The object to search.\n * @param {string} key - The key to find (case-insensitive).\n * @returns {?string} The actual key name if found, otherwise null.\n */\nfunction findKey(obj, key) {\n  if (isBuffer(obj)) {\n    return null;\n  }\n\n  key = key.toLowerCase();\n  const keys = Object.keys(obj);\n  let i = keys.length;\n  let _key;\n  while (i-- > 0) {\n    _key = keys[i];\n    if (key === _key.toLowerCase()) {\n      return _key;\n    }\n  }\n  return null;\n}\n\nconst _global = (() => {\n  /*eslint no-undef:0*/\n  if (typeof globalThis !== 'undefined') return globalThis;\n  return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * const result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(...objs) {\n  const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};\n  const result = {};\n  const assignValue = (val, key) => {\n    // Skip dangerous property names to prevent prototype pollution\n    if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n      return;\n    }\n\n    // findKey lowercases the key, so caseless lookup only applies to strings —\n    // symbol keys are identity-matched.\n    const targetKey = (caseless && typeof key === 'string' && findKey(result, key)) || key;\n    // Read via own-prop only — a bare `result[targetKey]` walks the prototype\n    // chain, so a polluted Object.prototype value could surface here and get\n    // copied into the merged result.\n    const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;\n    if (isPlainObject(existing) && isPlainObject(val)) {\n      result[targetKey] = merge(existing, val);\n    } else if (isPlainObject(val)) {\n      result[targetKey] = merge({}, val);\n    } else if (isArray(val)) {\n      result[targetKey] = val.slice();\n    } else if (!skipUndefined || !isUndefined(val)) {\n      result[targetKey] = val;\n    }\n  };\n\n  for (let i = 0, l = objs.length; i < l; i++) {\n    const source = objs[i];\n    if (!source || isBuffer(source)) {\n      continue;\n    }\n\n    forEach(source, assignValue);\n\n    if (typeof source !== 'object' || isArray(source)) {\n      continue;\n    }\n\n    const symbols = Object.getOwnPropertySymbols(source);\n    for (let j = 0; j < symbols.length; j++) {\n      const symbol = symbols[j];\n      if (propertyIsEnumerable.call(source, symbol)) {\n        assignValue(source[symbol], symbol);\n      }\n    }\n  }\n  return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, { allOwnKeys } = {}) => {\n  forEach(\n    b,\n    (val, key) => {\n      if (thisArg && isFunction(val)) {\n        Object.defineProperty(a, key, {\n          // Null-proto descriptor so a polluted Object.prototype.get cannot\n          // hijack defineProperty's accessor-vs-data resolution.\n          __proto__: null,\n          value: bind(val, thisArg),\n          writable: true,\n          enumerable: true,\n          configurable: true,\n        });\n      } else {\n        Object.defineProperty(a, key, {\n          __proto__: null,\n          value: val,\n          writable: true,\n          enumerable: true,\n          configurable: true,\n        });\n      }\n    },\n    { allOwnKeys }\n  );\n  return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n  if (content.charCodeAt(0) === 0xfeff) {\n    content = content.slice(1);\n  }\n  return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n  constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n  Object.defineProperty(constructor.prototype, 'constructor', {\n    __proto__: null,\n    value: constructor,\n    writable: true,\n    enumerable: false,\n    configurable: true,\n  });\n  Object.defineProperty(constructor, 'super', {\n    __proto__: null,\n    value: superConstructor.prototype,\n  });\n  props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n  let props;\n  let i;\n  let prop;\n  const merged = {};\n\n  destObj = destObj || {};\n  // eslint-disable-next-line no-eq-null,eqeqeq\n  if (sourceObj == null) return destObj;\n\n  do {\n    props = Object.getOwnPropertyNames(sourceObj);\n    i = props.length;\n    while (i-- > 0) {\n      prop = props[i];\n      if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n        destObj[prop] = sourceObj[prop];\n        merged[prop] = true;\n      }\n    }\n    sourceObj = filter !== false && getPrototypeOf(sourceObj);\n  } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n  return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n  str = String(str);\n  if (position === undefined || position > str.length) {\n    position = str.length;\n  }\n  position -= searchString.length;\n  const lastIndex = str.indexOf(searchString, position);\n  return lastIndex !== -1 && lastIndex === position;\n};\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n  if (!thing) return null;\n  if (isArray(thing)) return thing;\n  let i = thing.length;\n  if (!isNumber(i)) return null;\n  const arr = new Array(i);\n  while (i-- > 0) {\n    arr[i] = thing[i];\n  }\n  return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = ((TypedArray) => {\n  // eslint-disable-next-line func-names\n  return (thing) => {\n    return TypedArray && thing instanceof TypedArray;\n  };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n  const generator = obj && obj[iterator];\n\n  const _iterator = generator.call(obj);\n\n  let result;\n\n  while ((result = _iterator.next()) && !result.done) {\n    const pair = result.value;\n    fn.call(obj, pair[0], pair[1]);\n  }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n  let matches;\n  const arr = [];\n\n  while ((matches = regExp.exec(str)) !== null) {\n    arr.push(matches);\n  }\n\n  return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = (str) => {\n  return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g, function replacer(m, p1, p2) {\n    return p1.toUpperCase() + p2;\n  });\n};\n\nconst { propertyIsEnumerable } = Object.prototype;\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n  const descriptors = Object.getOwnPropertyDescriptors(obj);\n  const reducedDescriptors = {};\n\n  forEach(descriptors, (descriptor, name) => {\n    let ret;\n    if ((ret = reducer(descriptor, name, obj)) !== false) {\n      reducedDescriptors[name] = ret || descriptor;\n    }\n  });\n\n  Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n  reduceDescriptors(obj, (descriptor, name) => {\n    // skip restricted props in strict mode\n    if (isFunction(obj) && ['arguments', 'caller', 'callee'].includes(name)) {\n      return false;\n    }\n\n    const value = obj[name];\n\n    if (!isFunction(value)) return;\n\n    descriptor.enumerable = false;\n\n    if ('writable' in descriptor) {\n      descriptor.writable = false;\n      return;\n    }\n\n    if (!descriptor.set) {\n      descriptor.set = () => {\n        throw Error(\"Can not rewrite read-only method '\" + name + \"'\");\n      };\n    }\n  });\n};\n\n/**\n * Converts an array or a delimited string into an object set with values as keys and true as values.\n * Useful for fast membership checks.\n *\n * @param {Array|string} arrayOrString - The array or string to convert.\n * @param {string} delimiter - The delimiter to use if input is a string.\n * @returns {Object} An object with keys from the array or string, values set to true.\n */\nconst toObjectSet = (arrayOrString, delimiter) => {\n  const obj = {};\n\n  const define = (arr) => {\n    arr.forEach((value) => {\n      obj[value] = true;\n    });\n  };\n\n  isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n  return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n  return value != null && Number.isFinite((value = +value)) ? value : defaultValue;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n  return !!(\n    thing &&\n    isFunction(thing.append) &&\n    thing[toStringTag] === 'FormData' &&\n    thing[iterator]\n  );\n}\n\n/**\n * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.\n *\n * @param {Object} obj - The object to convert.\n * @returns {Object} The JSON-compatible object.\n */\nconst toJSONObject = (obj) => {\n  const visited = new WeakSet();\n\n  const visit = (source) => {\n    if (isObject(source)) {\n      if (visited.has(source)) {\n        return;\n      }\n\n      //Buffer check\n      if (isBuffer(source)) {\n        return source;\n      }\n\n      if (!('toJSON' in source)) {\n        // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).\n        visited.add(source);\n\n        let target;\n\n        if (isSet(source)) {\n          target = [];\n          for (const value of source) {\n            const reducedValue = visit(value);\n            !isUndefined(reducedValue) && target.push(reducedValue);\n          }\n        } else {\n          target = isArray(source) ? [] : {};\n\n          forEach(source, (value, key) => {\n            const reducedValue = visit(value);\n            !isUndefined(reducedValue) && (target[key] = reducedValue);\n          });\n        }\n\n        visited.delete(source);\n\n        return target;\n      }\n    }\n\n    return source;\n  };\n\n  return visit(obj);\n};\n\n/**\n * Determines if a value is an async function.\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is an async function, otherwise false.\n */\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\n/**\n * Determines if a value is thenable (has then and catch methods).\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is thenable, otherwise false.\n */\nconst isThenable = (thing) =>\n  thing &&\n  (isObject(thing) || isFunction(thing)) &&\n  isFunction(thing.then) &&\n  isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\n/**\n * Provides a cross-platform setImmediate implementation.\n * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.\n *\n * @param {boolean} setImmediateSupported - Whether setImmediate is supported.\n * @param {boolean} postMessageSupported - Whether postMessage is supported.\n * @returns {Function} A function to schedule a callback asynchronously.\n */\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n  if (setImmediateSupported) {\n    return setImmediate;\n  }\n\n  return postMessageSupported\n    ? ((token, callbacks) => {\n        _global.addEventListener(\n          'message',\n          ({ source, data }) => {\n            if (source === _global && data === token) {\n              callbacks.length && callbacks.shift()();\n            }\n          },\n          false\n        );\n\n        return (cb) => {\n          callbacks.push(cb);\n          _global.postMessage(token, '*');\n        };\n      })(`axios@${Math.random()}`, [])\n    : (cb) => setTimeout(cb);\n})(typeof setImmediate === 'function', isFunction(_global.postMessage));\n\n/**\n * Schedules a microtask or asynchronous callback as soon as possible.\n * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.\n *\n * @type {Function}\n */\nconst asap =\n  typeof queueMicrotask !== 'undefined'\n    ? queueMicrotask.bind(_global)\n    : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;\n\n// *********************\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\n/**\n * Determine if a value is iterable via an iterator that is NOT sourced solely\n * from a polluted Object.prototype. Use this instead of `isIterable` whenever\n * the iterable comes from untrusted input (e.g. user-supplied header sources),\n * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object\n * into an attacker-controlled entries iterator.\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value has a non-polluted iterator\n */\nconst isSafeIterable = (thing) =>\n  thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);\n\nexport default {\n  isArray,\n  isArrayBuffer,\n  isBuffer,\n  isFormData,\n  isArrayBufferView,\n  isString,\n  isNumber,\n  isBoolean,\n  isObject,\n  isPlainObject,\n  isEmptyObject,\n  isReadableStream,\n  isRequest,\n  isResponse,\n  isHeaders,\n  isUndefined,\n  isDate,\n  isFile,\n  isReactNativeBlob,\n  isReactNative,\n  isBlob,\n  isRegExp,\n  isFunction,\n  isStream,\n  isURLSearchParams,\n  isTypedArray,\n  isFileList,\n  forEach,\n  merge,\n  extend,\n  trim,\n  stripBOM,\n  inherits,\n  toFlatObject,\n  kindOf,\n  kindOfTest,\n  endsWith,\n  toArray,\n  forEachEntry,\n  matchAll,\n  isHTMLForm,\n  hasOwnProperty,\n  hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n  hasOwnInPrototypeChain,\n  getSafeProp,\n  toSafeFlatObject,\n  reduceDescriptors,\n  freezeMethods,\n  toObjectSet,\n  toCamelCase,\n  noop,\n  toFiniteNumber,\n  findKey,\n  global: _global,\n  isContextDefined,\n  isSpecCompliantForm,\n  toJSONObject,\n  isAsyncFn,\n  isThenable,\n  setImmediate: _setImmediate,\n  asap,\n  isIterable,\n  isSafeIterable,\n};\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n  ? ((origin, isMSIE) => (url) => {\n      url = new URL(url, platform.origin);\n\n      return (\n        origin.protocol === url.protocol &&\n        origin.host === url.host &&\n        (isMSIE || origin.port === url.port)\n      );\n    })(\n      new URL(platform.origin),\n      platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n    )\n  : () => true;\n","'use strict';\n\n/**\n * Create a bound version of a function with a specified `this` context\n *\n * @param {Function} fn - The function to bind\n * @param {*} thisArg - The value to be passed as the `this` parameter\n * @returns {Function} A new function that will call the original function with the specified `this` context\n */\nexport default function bind(fn, thisArg) {\n  return function wrap() {\n    return fn.apply(thisArg, arguments);\n  };\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n  'age',\n  'authorization',\n  'content-length',\n  'content-type',\n  'etag',\n  'expires',\n  'from',\n  'host',\n  'if-modified-since',\n  'if-unmodified-since',\n  'last-modified',\n  'location',\n  'max-forwards',\n  'proxy-authorization',\n  'referer',\n  'retry-after',\n  'user-agent',\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default (rawHeaders) => {\n  const parsed = {};\n  let key;\n  let val;\n  let i;\n\n  rawHeaders &&\n    rawHeaders.split('\\n').forEach(function parser(line) {\n      i = line.indexOf(':');\n      key = line.substring(0, i).trim().toLowerCase();\n      val = line.substring(i + 1).trim();\n\n      const hasKey = utils.hasOwnProp(parsed, key);\n\n      if (!key || (hasKey && utils.hasOwnProp(ignoreDuplicateOf, key))) {\n        return;\n      }\n\n      if (key === 'set-cookie') {\n        if (hasKey) {\n          parsed[key].push(val);\n        } else {\n          parsed[key] = [val];\n        }\n      } else {\n        parsed[key] = hasKey ? parsed[key] + ', ' + val : val;\n      }\n    });\n\n  return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\nfunction trimSPorHTAB(str) {\n  let start = 0;\n  let end = str.length;\n\n  while (start < end) {\n    const code = str.charCodeAt(start);\n\n    if (code !== 0x09 && code !== 0x20) {\n      break;\n    }\n\n    start += 1;\n  }\n\n  while (end > start) {\n    const code = str.charCodeAt(end - 1);\n\n    if (code !== 0x09 && code !== 0x20) {\n      break;\n    }\n\n    end -= 1;\n  }\n\n  return start === 0 && end === str.length ? str : str.slice(start, end);\n}\n\n// The control-code ranges are intentional: header sanitization strips C0/DEL bytes.\n// eslint-disable-next-line no-control-regex\nconst INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\\\u0000-\\\\u0008\\\\u000a-\\\\u001f\\\\u007f]+', 'g');\n// eslint-disable-next-line no-control-regex\nconst INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\\\u0009\\\\u0020-\\\\u007e\\\\u0080-\\\\u00ff]+', 'g');\n\nfunction sanitizeValue(value, invalidChars) {\n  if (utils.isArray(value)) {\n    return value.map((item) => sanitizeValue(item, invalidChars));\n  }\n\n  return trimSPorHTAB(String(value).replace(invalidChars, ''));\n}\n\nexport const sanitizeHeaderValue = (value) =>\n  sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);\n\nexport const sanitizeByteStringHeaderValue = (value) =>\n  sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);\n\nexport function toByteStringHeaderObject(headers) {\n  const byteStringHeaders = Object.create(null);\n\n  utils.forEach(headers.toJSON(), (value, header) => {\n    byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);\n  });\n\n  return byteStringHeaders;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\nimport { sanitizeHeaderValue } from '../helpers/sanitizeHeaderValue.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n  return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n  if (value === false || value == null) {\n    return value;\n  }\n\n  return utils.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));\n}\n\nfunction parseTokens(str) {\n  const tokens = Object.create(null);\n  const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n  let match;\n\n  while ((match = tokensRE.exec(str))) {\n    tokens[match[1]] = match[2];\n  }\n\n  return tokens;\n}\n\nconst parameterNameRE = /^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$/;\n\nfunction trimOWS(value) {\n  let start = 0;\n  let end = value.length;\n\n  while (start < end) {\n    const code = value.charCodeAt(start);\n\n    if (code !== 0x09 && code !== 0x20) {\n      break;\n    }\n\n    start += 1;\n  }\n\n  while (end > start) {\n    const code = value.charCodeAt(end - 1);\n\n    if (code !== 0x09 && code !== 0x20) {\n      break;\n    }\n\n    end -= 1;\n  }\n\n  return start === 0 && end === value.length ? value : value.slice(start, end);\n}\n\nfunction decodeQuotedString(value) {\n  const last = value.length - 1;\n\n  if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) {\n    return value;\n  }\n\n  let decoded = '';\n\n  for (let i = 1; i < last; i++) {\n    const code = value.charCodeAt(i);\n\n    if (code === 0x22) {\n      return value;\n    }\n\n    if (code === 0x5c) {\n      i += 1;\n\n      if (i >= last) {\n        return value;\n      }\n    }\n\n    decoded += value[i];\n  }\n\n  return decoded;\n}\n\nfunction parseParameters(value) {\n  const parameters = Object.create(null);\n  const str = String(value);\n  let start = 0;\n  let quoted = false;\n  let escaped = false;\n\n  function parseParameter(end) {\n    const part = trimOWS(str.slice(start, end));\n    const equals = part.indexOf('=');\n\n    if (equals < 1) {\n      return;\n    }\n\n    const name = trimOWS(part.slice(0, equals));\n\n    if (!parameterNameRE.test(name)) {\n      return;\n    }\n\n    const normalizedName = name.toLowerCase();\n\n    if (\n      normalizedName === '__proto__' ||\n      normalizedName === 'constructor' ||\n      normalizedName === 'prototype'\n    ) {\n      return;\n    }\n\n    const parameterValue = trimOWS(part.slice(equals + 1));\n    parameters[normalizedName] = decodeQuotedString(parameterValue);\n  }\n\n  for (let i = 0; i < str.length; i++) {\n    const code = str.charCodeAt(i);\n\n    if (quoted) {\n      if (escaped) {\n        escaped = false;\n      } else if (code === 0x5c) {\n        escaped = true;\n      } else if (code === 0x22) {\n        quoted = false;\n      }\n    } else if (code === 0x22) {\n      quoted = true;\n    } else if (code === 0x2c || code === 0x3b) {\n      parseParameter(i);\n      start = i + 1;\n    }\n  }\n\n  parseParameter(str.length);\n\n  return parameters;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n  if (utils.isFunction(filter)) {\n    return filter.call(this, value, header);\n  }\n\n  if (isHeaderNameFilter) {\n    value = header;\n  }\n\n  if (!utils.isString(value)) return;\n\n  if (utils.isString(filter)) {\n    return value.indexOf(filter) !== -1;\n  }\n\n  if (utils.isRegExp(filter)) {\n    return filter.test(value);\n  }\n}\n\nfunction formatHeader(header) {\n  return header\n    .trim()\n    .toLowerCase()\n    .replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n      return char.toUpperCase() + str;\n    });\n}\n\nfunction buildAccessors(obj, header) {\n  const accessorName = utils.toCamelCase(' ' + header);\n\n  ['get', 'set', 'has'].forEach((methodName) => {\n    Object.defineProperty(obj, methodName + accessorName, {\n      // Null-proto descriptor so a polluted Object.prototype.get cannot turn\n      // this data descriptor into an accessor descriptor on the way in.\n      __proto__: null,\n      value: function (arg1, arg2, arg3) {\n        return this[methodName].call(this, header, arg1, arg2, arg3);\n      },\n      configurable: true,\n    });\n  });\n}\n\nclass AxiosHeaders {\n  constructor(headers) {\n    headers && this.set(headers);\n  }\n\n  set(header, valueOrRewrite, rewrite) {\n    const self = this;\n\n    function setHeader(_value, _header, _rewrite) {\n      const lHeader = normalizeHeader(_header);\n\n      if (!lHeader) {\n        return;\n      }\n\n      const key = utils.findKey(self, lHeader);\n\n      if (\n        !key ||\n        self[key] === undefined ||\n        _rewrite === true ||\n        (_rewrite === undefined && self[key] !== false)\n      ) {\n        self[key || _header] = normalizeValue(_value);\n      }\n    }\n\n    const setHeaders = (headers, _rewrite) =>\n      utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n    if (utils.isPlainObject(header) || header instanceof this.constructor) {\n      setHeaders(header, valueOrRewrite);\n    } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n      setHeaders(parseHeaders(header), valueOrRewrite);\n    } else if (utils.isObject(header) && utils.isSafeIterable(header)) {\n      let obj = Object.create(null),\n        dest,\n        key;\n      for (const entry of header) {\n        if (!utils.isArray(entry)) {\n          throw new TypeError('Object iterator must return a key-value pair');\n        }\n\n        key = entry[0];\n\n        if (utils.hasOwnProp(obj, key)) {\n          dest = obj[key];\n          obj[key] = utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];\n        } else {\n          obj[key] = entry[1];\n        }\n      }\n\n      setHeaders(obj, valueOrRewrite);\n    } else {\n      header != null && setHeader(valueOrRewrite, header, rewrite);\n    }\n\n    return this;\n  }\n\n  get(header, parser) {\n    header = normalizeHeader(header);\n\n    if (header) {\n      const key = utils.findKey(this, header);\n\n      if (key) {\n        const value = this[key];\n\n        if (!parser) {\n          return value;\n        }\n\n        if (parser === true) {\n          return parseTokens(value);\n        }\n\n        if (utils.isFunction(parser)) {\n          return parser.call(this, value, key);\n        }\n\n        if (utils.isRegExp(parser)) {\n          return parser.exec(value);\n        }\n\n        throw new TypeError('parser must be boolean|regexp|function');\n      }\n    }\n  }\n\n  has(header, matcher) {\n    header = normalizeHeader(header);\n\n    if (header) {\n      const key = utils.findKey(this, header);\n\n      return !!(\n        key &&\n        this[key] !== undefined &&\n        (!matcher || matchHeaderValue(this, this[key], key, matcher))\n      );\n    }\n\n    return false;\n  }\n\n  delete(header, matcher) {\n    const self = this;\n    let deleted = false;\n\n    function deleteHeader(_header) {\n      _header = normalizeHeader(_header);\n\n      if (_header) {\n        const key = utils.findKey(self, _header);\n\n        if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n          delete self[key];\n\n          deleted = true;\n        }\n      }\n    }\n\n    if (utils.isArray(header)) {\n      header.forEach(deleteHeader);\n    } else {\n      deleteHeader(header);\n    }\n\n    return deleted;\n  }\n\n  clear(matcher) {\n    const keys = Object.keys(this);\n    let i = keys.length;\n    let deleted = false;\n\n    while (i--) {\n      const key = keys[i];\n      if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n        delete this[key];\n        deleted = true;\n      }\n    }\n\n    return deleted;\n  }\n\n  normalize(format) {\n    const self = this;\n    const headers = {};\n\n    utils.forEach(this, (value, header) => {\n      const key = utils.findKey(headers, header);\n\n      if (key) {\n        self[key] = normalizeValue(value);\n        delete self[header];\n        return;\n      }\n\n      const normalized = format ? formatHeader(header) : String(header).trim();\n\n      if (normalized !== header) {\n        delete self[header];\n      }\n\n      self[normalized] = normalizeValue(value);\n\n      headers[normalized] = true;\n    });\n\n    return this;\n  }\n\n  concat(...targets) {\n    return this.constructor.concat(this, ...targets);\n  }\n\n  toJSON(asStrings) {\n    const obj = Object.create(null);\n\n    utils.forEach(this, (value, header) => {\n      value != null &&\n        value !== false &&\n        (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n    });\n\n    return obj;\n  }\n\n  [Symbol.iterator]() {\n    return Object.entries(this.toJSON())[Symbol.iterator]();\n  }\n\n  toString() {\n    return Object.entries(this.toJSON())\n      .map(([header, value]) => header + ': ' + value)\n      .join('\\n');\n  }\n\n  getSetCookie() {\n    const value = this.get('set-cookie');\n    return utils.isArray(value) ? value : value == null || value === false ? [] : [value];\n  }\n\n  get [Symbol.toStringTag]() {\n    return 'AxiosHeaders';\n  }\n\n  static from(thing) {\n    return thing instanceof this ? thing : new this(thing);\n  }\n\n  static parseParameters(value) {\n    return parseParameters(value);\n  }\n\n  static concat(first, ...targets) {\n    const computed = new this(first);\n\n    targets.forEach((target) => computed.set(target));\n\n    return computed;\n  }\n\n  static accessor(header) {\n    const internals =\n      (this[$internals] =\n      this[$internals] =\n        {\n          accessors: {},\n        });\n\n    const accessors = internals.accessors;\n    const prototype = this.prototype;\n\n    function defineAccessor(_header) {\n      const lHeader = normalizeHeader(_header);\n\n      if (!accessors[lHeader]) {\n        buildAccessors(prototype, _header);\n        accessors[lHeader] = true;\n      }\n    }\n\n    utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n    return this;\n  }\n}\n\nAxiosHeaders.accessor([\n  'Content-Type',\n  'Content-Length',\n  'Accept',\n  'Accept-Encoding',\n  'User-Agent',\n  'Authorization',\n]);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {\n  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n  return {\n    get: () => value,\n    set(headerValue) {\n      this[mapped] = headerValue;\n    },\n  };\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nexport const REDACTED = '[REDACTED ****]';\n\nfunction hasOwnOrPrototypeToJSON(source) {\n  if (utils.hasOwnProp(source, 'toJSON')) {\n    return true;\n  }\n\n  let prototype = Object.getPrototypeOf(source);\n\n  while (prototype && prototype !== Object.prototype) {\n    if (utils.hasOwnProp(prototype, 'toJSON')) {\n      return true;\n    }\n\n    prototype = Object.getPrototypeOf(prototype);\n  }\n\n  return false;\n}\n\n// Build a plain-object snapshot of `config` and replace the value of any key\n// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays\n// and AxiosHeaders, and short-circuits on circular references.\nfunction redactConfig(config, redactKeys) {\n  const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));\n  const seen = [];\n\n  const visit = (source) => {\n    if (source === null || typeof source !== 'object') return source;\n    if (utils.isBuffer(source)) return source;\n    if (seen.indexOf(source) !== -1) return undefined;\n\n    if (source instanceof AxiosHeaders) {\n      source = source.toJSON();\n    }\n\n    seen.push(source);\n\n    let result;\n    if (utils.isArray(source)) {\n      result = [];\n      source.forEach((v, i) => {\n        const reducedValue = visit(v);\n        if (!utils.isUndefined(reducedValue)) {\n          result[i] = reducedValue;\n        }\n      });\n    } else {\n      if (!utils.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {\n        seen.pop();\n        return source;\n      }\n\n      result = Object.create(null);\n      for (const [key, value] of Object.entries(source)) {\n        const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);\n        if (!utils.isUndefined(reducedValue)) {\n          result[key] = reducedValue;\n        }\n      }\n    }\n\n    seen.pop();\n    return result;\n  };\n\n  return visit(config);\n}\n\nfunction stringifySafely(value) {\n  try {\n    return String(value);\n  } catch (err) {\n    return '';\n  }\n}\n\nfunction aggregateErrorMessage(error) {\n  const message = error.errors\n    .map((entry) => {\n      try {\n        return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);\n      } catch (err) {\n        return '';\n      }\n    })\n    .filter(Boolean)\n    .join('; ');\n\n  return message || error.name || 'AggregateError';\n}\n\nclass AxiosError extends Error {\n  static from(error, code, config, request, response, customProps) {\n    // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection\n    // failures) has an empty `message`; its detail lives in `errors[]`. Without\n    // this, the wrapped error surfaces with a blank message (see #6721).\n    let message = error.message;\n    if (!message && utils.isArray(error.errors) && error.errors.length) {\n      message = aggregateErrorMessage(error);\n    }\n\n    const axiosError = new AxiosError(message, code || error.code, config, request, response);\n    // Match native `Error` `cause` semantics: non-enumerable. The wrapped\n    // error often carries circular internals (sockets, requests, agents), so\n    // an enumerable `cause` makes structured loggers (pino/winston) and any\n    // own-property walk throw \"Converting circular structure to JSON\".\n    // Regression from #6982; see #7205. `__proto__: null` mirrors the\n    // `message` descriptor below (prototype-pollution-safe descriptor).\n    Object.defineProperty(axiosError, 'cause', {\n      __proto__: null,\n      value: error,\n      writable: true,\n      enumerable: false,\n      configurable: true,\n    });\n    axiosError.name = error.name;\n\n    // Preserve status from the original error if not already set from response\n    if (error.status != null && axiosError.status == null) {\n      axiosError.status = error.status;\n    }\n\n    customProps && Object.assign(axiosError, customProps);\n    return axiosError;\n  }\n\n  /**\n   * Create an Error with the specified message, config, error code, request and response.\n   *\n   * @param {string} message The error message.\n   * @param {string} [code] The error code (for example, 'ECONNABORTED').\n   * @param {Object} [config] The config.\n   * @param {Object} [request] The request.\n   * @param {Object} [response] The response.\n   *\n   * @returns {Error} The created error.\n   */\n  constructor(message, code, config, request, response) {\n    super(message);\n\n    // Make message enumerable to maintain backward compatibility\n    // The native Error constructor sets message as non-enumerable,\n    // but axios < v1.13.3 had it as enumerable\n    Object.defineProperty(this, 'message', {\n      // Null-proto descriptor so a polluted Object.prototype.get cannot turn\n      // this data descriptor into an accessor descriptor on the way in.\n      __proto__: null,\n      value: message,\n      enumerable: true,\n      writable: true,\n      configurable: true,\n    });\n\n    this.name = 'AxiosError';\n    this.isAxiosError = true;\n    code && (this.code = code);\n    config && (this.config = config);\n    request && (this.request = request);\n    if (response) {\n      this.response = response;\n      this.status = response.status;\n    }\n  }\n\n  toJSON() {\n    // Opt-in redaction: when the request config carries a `redact` array, the\n    // value of any matching key (case-insensitive, at any depth) is replaced\n    // with REDACTED in the serialized snapshot. Undefined or empty leaves the\n    // existing serialization behavior unchanged.\n    const config = this.config;\n    const redactKeys = config && utils.hasOwnProp(config, 'redact') ? config.redact : undefined;\n    const serializedConfig =\n      utils.isArray(redactKeys) && redactKeys.length > 0\n        ? redactConfig(config, redactKeys)\n        : utils.toJSONObject(config);\n\n    return {\n      // Standard\n      message: this.message,\n      name: this.name,\n      // Microsoft\n      description: this.description,\n      number: this.number,\n      // Mozilla\n      fileName: this.fileName,\n      lineNumber: this.lineNumber,\n      columnNumber: this.columnNumber,\n      stack: this.stack,\n      // Axios\n      config: serializedConfig,\n      code: this.code,\n      status: this.status,\n    };\n  }\n}\n\n// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.\nAxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';\nAxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';\nAxiosError.ECONNABORTED = 'ECONNABORTED';\nAxiosError.ETIMEDOUT = 'ETIMEDOUT';\nAxiosError.ECONNREFUSED = 'ECONNREFUSED';\nAxiosError.ERR_NETWORK = 'ERR_NETWORK';\nAxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';\nAxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';\nAxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';\nAxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';\nAxiosError.ERR_CANCELED = 'ERR_CANCELED';\nAxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';\nAxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';\nAxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\nimport PlatformBuffer from '../platform/node/classes/Buffer.js';\n\n// Default nesting limit shared with the inverse transform (formDataToJSON) so\n// the FormData <-> JSON round-trip stays symmetric.\nexport const DEFAULT_FORM_DATA_MAX_DEPTH = 100;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n  return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n  return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n  if (!path) return key;\n  return path\n    .concat(key)\n    .map(function each(token, i) {\n      // eslint-disable-next-line no-param-reassign\n      token = removeBrackets(token);\n      return !dots && i ? '[' + token + ']' : token;\n    })\n    .join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n  return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n  return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n  if (!utils.isObject(obj)) {\n    throw new TypeError('target must be an object');\n  }\n\n  // eslint-disable-next-line no-param-reassign\n  formData = formData || new (PlatformFormData || FormData)();\n\n  const option = (name, fallback) => {\n    const value = utils.getSafeProp(options, name);\n    return utils.isUndefined(value) ? fallback : value;\n  };\n\n  const metaTokens = option('metaTokens', true);\n  // eslint-disable-next-line no-use-before-define\n  const visitor = option('visitor') || defaultVisitor;\n  const dots = option('dots', false);\n  const indexes = option('indexes', false);\n  const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob);\n  const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH);\n  const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n  const stack = [];\n\n  if (!utils.isFunction(visitor)) {\n    throw new TypeError('visitor must be a function');\n  }\n\n  function convertValue(value) {\n    if (value === null) return '';\n\n    if (utils.isDate(value)) {\n      return value.toISOString();\n    }\n\n    if (utils.isBoolean(value)) {\n      return value.toString();\n    }\n\n    if (!useBlob && utils.isBlob(value)) {\n      throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n    }\n\n    if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n      if (useBlob && typeof _Blob === 'function') {\n        return new _Blob([value]);\n      }\n      if (PlatformBuffer && PlatformBuffer.isBufferAvailable()) {\n        return PlatformBuffer.from(value);\n      }\n      throw new AxiosError(\n        'Blob is not supported. Use a Buffer instead.',\n        AxiosError.ERR_NOT_SUPPORT\n      );\n    }\n\n    return value;\n  }\n\n  function throwIfMaxDepthExceeded(depth) {\n    if (depth > maxDepth) {\n      throw new AxiosError(\n        'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,\n        AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED\n      );\n    }\n  }\n\n  function stringifyWithDepthLimit(value, depth) {\n    if (maxDepth === Infinity) {\n      return JSON.stringify(value);\n    }\n\n    const ancestors = [];\n\n    return JSON.stringify(value, function limitDepth(_key, currentValue) {\n      if (!utils.isObject(currentValue)) {\n        return currentValue;\n      }\n\n      while (ancestors.length && ancestors[ancestors.length - 1] !== this) {\n        ancestors.pop();\n      }\n\n      ancestors.push(currentValue);\n      throwIfMaxDepthExceeded(depth + ancestors.length - 1);\n\n      return currentValue;\n    });\n  }\n\n  /**\n   * Default visitor.\n   *\n   * @param {*} value\n   * @param {String|Number} key\n   * @param {Array<String|Number>} path\n   * @this {FormData}\n   *\n   * @returns {boolean} return true to visit the each prop of the value recursively\n   */\n  function defaultVisitor(value, key, path) {\n    let arr = value;\n\n    if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {\n      formData.append(renderKey(path, key, dots), convertValue(value));\n      return false;\n    }\n\n    if (value && !path && typeof value === 'object') {\n      if (utils.endsWith(key, '{}')) {\n        // eslint-disable-next-line no-param-reassign\n        key = metaTokens ? key : key.slice(0, -2);\n        // eslint-disable-next-line no-param-reassign\n        value = stringifyWithDepthLimit(value, 1);\n      } else if (\n        (utils.isArray(value) && isFlatArray(value)) ||\n        ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))\n      ) {\n        // eslint-disable-next-line no-param-reassign\n        key = removeBrackets(key);\n\n        arr.forEach(function each(el, index) {\n          !(utils.isUndefined(el) || el === null) &&\n            formData.append(\n              // eslint-disable-next-line no-nested-ternary\n              indexes === true\n                ? renderKey([key], index, dots)\n                : indexes === null\n                  ? key\n                  : key + '[]',\n              convertValue(el)\n            );\n        });\n        return false;\n      }\n    }\n\n    if (isVisitable(value)) {\n      return true;\n    }\n\n    formData.append(renderKey(path, key, dots), convertValue(value));\n\n    return false;\n  }\n\n  const exposedHelpers = Object.assign(predicates, {\n    defaultVisitor,\n    convertValue,\n    isVisitable,\n  });\n\n  function build(value, path, depth = 0) {\n    if (utils.isUndefined(value)) return;\n\n    throwIfMaxDepthExceeded(depth);\n\n    if (stack.indexOf(value) !== -1) {\n      throw new Error('Circular reference detected in ' + path.join('.'));\n    }\n\n    stack.push(value);\n\n    utils.forEach(value, function each(el, key) {\n      const result =\n        !(utils.isUndefined(el) || el === null) &&\n        visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);\n\n      if (result === true) {\n        build(el, path ? path.concat(key) : [key], depth + 1);\n      }\n    });\n\n    stack.pop();\n  }\n\n  if (!utils.isObject(obj)) {\n    throw new TypeError('data must be an object');\n  }\n\n  build(obj);\n\n  return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n  const charMap = {\n    '!': '%21',\n    \"'\": '%27',\n    '(': '%28',\n    ')': '%29',\n    '~': '%7E',\n    '%20': '+',\n  };\n  return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {\n    return charMap[match];\n  });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n  this._pairs = [];\n\n  params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n  this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n  const _encode = encoder\n    ? (value) => encoder.call(this, value, encode)\n    : encode;\n\n  return this._pairs\n    .map(function each(pair) {\n      return _encode(pair[0]) + '=' + _encode(pair[1]);\n    }, '')\n    .join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from './AxiosURLSearchParams.js';\n\n/**\n * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with\n * their plain counterparts (`:`, `$`, `,`, `+`).\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nexport function encode(val) {\n  return encodeURIComponent(val)\n    .replace(/%3A/gi, ':')\n    .replace(/%24/g, '$')\n    .replace(/%2C/gi, ',')\n    .replace(/%20/g, '+');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n  if (!params) {\n    return url;\n  }\n  url = url || '';\n\n  const _options = utils.isFunction(options)\n    ? {\n        serialize: options,\n      }\n    : options;\n\n  // Read serializer options pollution-safely: own properties and methods on a\n  // class/template prototype are honored, but values injected onto a polluted\n  // Object.prototype are ignored.\n  const _encode = utils.getSafeProp(_options, 'encode') || encode;\n  const serializeFn = utils.getSafeProp(_options, 'serialize');\n\n  let serializedParams;\n\n  if (serializeFn) {\n    serializedParams = serializeFn(params, _options);\n  } else {\n    serializedParams = utils.isURLSearchParams(params)\n      ? params.toString()\n      : new AxiosURLSearchParams(params, _options).toString(_encode);\n  }\n\n  if (serializedParams) {\n    const hashmarkIndex = url.indexOf('#');\n\n    if (hashmarkIndex !== -1) {\n      url = url.slice(0, hashmarkIndex);\n    }\n    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n  }\n\n  return url;\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\nconst $internals = Symbol('internals');\n\n// `handlers` is public and may be replaced with a nullish value by user code;\n// `clear()` has always tolerated that. Treat it as an empty stack rather than\n// dereferencing it.\nfunction countHandlers(handlers) {\n  return handlers ? handlers.length : 0;\n}\n\nfunction trimHandlers(handlers) {\n  if (!handlers) {\n    return;\n  }\n\n  while (handlers.length && handlers[handlers.length - 1] === null) {\n    handlers.pop();\n  }\n}\n\nfunction syncHandlerEntries(manager, internals) {\n  const handlers = manager.handlers;\n  const length = countHandlers(handlers);\n\n  if (handlers !== internals.handlersRef) {\n    internals.handlersRef = handlers;\n    internals.handlerEntries.clear();\n  } else if (length !== internals.handlersLength) {\n    if (!length) {\n      internals.handlerEntries.clear();\n    } else {\n      internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {\n        if (handlers[entry.index] !== entry.handler) {\n          internals.handlerEntries.delete(id);\n        }\n      });\n    }\n  }\n\n  internals.handlersLength = length;\n}\n\nclass InterceptorManager {\n  constructor() {\n    this.handlers = [];\n    this[$internals] = {\n      handlersRef: this.handlers,\n      handlersLength: this.handlers.length,\n      handlerEntries: new Map(),\n      iterationDepth: 0,\n      nextId: 0,\n    };\n  }\n\n  /**\n   * Add a new interceptor to the stack\n   *\n   * @param {Function} fulfilled The function to handle `then` for a `Promise`\n   * @param {Function} rejected The function to handle `reject` for a `Promise`\n   * @param {Object} options The options for the interceptor, synchronous and runWhen\n   *\n   * @return {Number} An ID used to remove interceptor later\n   */\n  use(fulfilled, rejected, options) {\n    const handler = {\n      fulfilled,\n      rejected,\n      synchronous: options ? options.synchronous : false,\n      runWhen: options ? options.runWhen : null,\n    };\n    const internals = this[$internals];\n\n    if (this.handlers == null) {\n      this.handlers = [];\n    }\n\n    syncHandlerEntries(this, internals);\n\n    const id = internals.nextId++;\n\n    this.handlers.push(handler);\n    internals.handlerEntries.set(id, {\n      handler,\n      index: this.handlers.length - 1,\n    });\n    internals.handlersLength = this.handlers.length;\n\n    return id;\n  }\n\n  /**\n   * Remove an interceptor from the stack\n   *\n   * @param {Number} id The ID that was returned by `use`\n   *\n   * @returns {void}\n   */\n  eject(id) {\n    const internals = this[$internals];\n\n    syncHandlerEntries(this, internals);\n\n    const entry = internals.handlerEntries.get(id);\n\n    if (entry) {\n      internals.handlerEntries.delete(id);\n\n      // Ignore IDs invalidated by clear or direct replacement of handlers.\n      if (this.handlers[entry.index] !== entry.handler) {\n        return;\n      }\n\n      this.handlers[entry.index] = null;\n\n      // Do not reuse an index while forEach is walking its length snapshot.\n      if (!internals.iterationDepth) {\n        trimHandlers(this.handlers);\n        internals.handlersLength = this.handlers.length;\n      }\n    }\n  }\n\n  /**\n   * Clear all interceptors from the stack\n   *\n   * @returns {void}\n   */\n  clear() {\n    if (this.handlers) {\n      this.handlers = [];\n      syncHandlerEntries(this, this[$internals]);\n    }\n  }\n\n  /**\n   * Iterate over all the registered interceptors\n   *\n   * This method is particularly useful for skipping over any\n   * interceptors that may have become `null` calling `eject`.\n   *\n   * @param {Function} fn The function to call for each interceptor\n   *\n   * @returns {void}\n   */\n  forEach(fn) {\n    const internals = this[$internals];\n\n    syncHandlerEntries(this, internals);\n\n    internals.iterationDepth++;\n\n    try {\n      utils.forEach(this.handlers, function forEachHandler(h) {\n        if (h !== null) {\n          fn(h);\n        }\n      });\n    } finally {\n      if (!--internals.iterationDepth) {\n        syncHandlerEntries(this, internals);\n        trimHandlers(this.handlers);\n        internals.handlersLength = countHandlers(this.handlers);\n      }\n    }\n  }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n  silentJSONParsing: true,\n  forcedJSONParsing: true,\n  clarifyTimeoutError: false,\n  legacyInterceptorReqResOrdering: true,\n  advertiseZstdAcceptEncoding: false,\n  validateStatusUndefinedResolves: true,\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict';\n\nexport default typeof Blob !== 'undefined' ? Blob : null;\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = (typeof navigator === 'object' && navigator) || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n *  typeof window -> undefined\n *  typeof document -> undefined\n *\n * react-native:\n *  navigator.product -> 'ReactNative'\n * nativescript\n *  navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv =\n  hasBrowserEnv &&\n  (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n  return (\n    typeof WorkerGlobalScope !== 'undefined' &&\n    // eslint-disable-next-line no-undef\n    self instanceof WorkerGlobalScope &&\n    typeof self.importScripts === 'function'\n  );\n})();\n\nconst origin = (hasBrowserEnv && window.location.href) || 'http://localhost';\n\nexport {\n  hasBrowserEnv,\n  hasStandardBrowserWebWorkerEnv,\n  hasStandardBrowserEnv,\n  _navigator as navigator,\n  origin,\n};\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n  ...utils,\n  ...platform,\n};\n","import URLSearchParams from './classes/URLSearchParams.js';\nimport FormData from './classes/FormData.js';\nimport Blob from './classes/Blob.js';\n\nexport default {\n  isBrowser: true,\n  classes: {\n    URLSearchParams,\n    FormData,\n    Blob,\n  },\n  protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport { DEFAULT_FORM_DATA_MAX_DEPTH } from './toFormData.js';\n\nconst MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;\n\nfunction throwIfDepthExceeded(index) {\n  if (index > MAX_DEPTH) {\n    throw new AxiosError(\n      'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH,\n      AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED\n    );\n  }\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n  // foo[x][y][z] -> ['foo', 'x', 'y', 'z']\n  // foo.x.y.z    -> ['foo', 'x', 'y', 'z']\n  // A path is split on `.` and on `[...]` groups. A segment — whether written\n  // in dot notation or captured inside brackets — may contain any character\n  // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept\n  // literal instead of being split (#5402). `.`, `[` and `]` keep their existing\n  // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push.\n  // Excluding `[` from the bracket group also makes the match fail fast at the\n  // next `[`, so a malformed name cannot rescan to the end of the string from\n  // every unmatched `[` — parsing stays linear in the length of the name.\n  const path = [];\n  const pattern = /[^.[\\]]+|\\[([^.[\\]]*)]/g;\n  let match;\n\n  while ((match = pattern.exec(name)) !== null) {\n    throwIfDepthExceeded(path.length);\n    path.push(match[0] === '[]' ? '' : match[1] || match[0]);\n  }\n\n  return path;\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n  const obj = {};\n  const keys = Object.keys(arr);\n  let i;\n  const len = keys.length;\n  let key;\n  for (i = 0; i < len; i++) {\n    key = keys[i];\n    obj[key] = arr[key];\n  }\n  return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n  function buildPath(path, value, target, index) {\n    throwIfDepthExceeded(index);\n\n    let name = path[index++];\n\n    if (name === '__proto__') return true;\n\n    const isNumericKey = Number.isFinite(+name);\n    const isLast = index >= path.length;\n    name = !name && utils.isArray(target) ? target.length : name;\n\n    if (isLast) {\n      if (utils.hasOwnProp(target, name)) {\n        target[name] = utils.isArray(target[name])\n          ? target[name].concat(value)\n          : [target[name], value];\n      } else {\n        target[name] = value;\n      }\n\n      return !isNumericKey;\n    }\n\n    if (!utils.hasOwnProp(target, name) || !utils.isObject(target[name])) {\n      target[name] = [];\n    }\n\n    const result = buildPath(path, value, target[name], index);\n\n    if (result && utils.isArray(target[name])) {\n      target[name] = arrayToObject(target[name]);\n    }\n\n    return !isNumericKey;\n  }\n\n  if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n    const obj = {};\n\n    utils.forEachEntry(formData, (name, value) => {\n      buildPath(parsePropPath(name), value, obj, 0);\n    });\n\n    return obj;\n  }\n\n  return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nconst methodList = Object.freeze([\n  'get',\n  'delete',\n  'head',\n  'options',\n  'post',\n  'put',\n  'patch',\n  'purge',\n  'link',\n  'unlink',\n  'query',\n]);\n\nexport default methodList;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\nimport methodList from '../core/methodList.js';\n\nconst own = (obj, key) => (obj != null && utils.hasOwnProp(obj, key) ? obj[key] : undefined);\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n  if (utils.isString(rawValue)) {\n    try {\n      (parser || JSON.parse)(rawValue);\n      return utils.trim(rawValue);\n    } catch (e) {\n      if (e.name !== 'SyntaxError') {\n        throw e;\n      }\n    }\n  }\n\n  return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n  transitional: transitionalDefaults,\n\n  adapter: ['xhr', 'http', 'fetch'],\n\n  transformRequest: [\n    function transformRequest(data, headers) {\n      const contentType = headers.getContentType() || '';\n      const hasJSONContentType = contentType.indexOf('application/json') > -1;\n      const isObjectPayload = utils.isObject(data);\n\n      if (isObjectPayload && utils.isHTMLForm(data)) {\n        data = new FormData(data);\n      }\n\n      const isFormData = utils.isFormData(data);\n\n      if (isFormData) {\n        return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n      }\n\n      if (\n        utils.isArrayBuffer(data) ||\n        utils.isBuffer(data) ||\n        utils.isStream(data) ||\n        utils.isFile(data) ||\n        utils.isBlob(data) ||\n        utils.isReadableStream(data)\n      ) {\n        return data;\n      }\n      if (utils.isArrayBufferView(data)) {\n        return data.buffer;\n      }\n      if (utils.isURLSearchParams(data)) {\n        headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n        return data.toString();\n      }\n\n      let isFileList;\n\n      if (isObjectPayload) {\n        const formSerializer = own(this, 'formSerializer');\n        if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n          return toURLEncodedForm(data, formSerializer).toString();\n        }\n\n        if (\n          (isFileList = utils.isFileList(data)) ||\n          contentType.indexOf('multipart/form-data') > -1\n        ) {\n          const env = own(this, 'env');\n          const _FormData = env && env.FormData;\n\n          return toFormData(\n            isFileList ? { 'files[]': data } : data,\n            _FormData && new _FormData(),\n            formSerializer\n          );\n        }\n      }\n\n      if (isObjectPayload || hasJSONContentType) {\n        headers.setContentType('application/json', false);\n        return stringifySafely(data);\n      }\n\n      return data;\n    },\n  ],\n\n  transformResponse: [\n    function transformResponse(data) {\n      const transitional = own(this, 'transitional') || defaults.transitional;\n      const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n      const responseType = own(this, 'responseType');\n      const JSONRequested = responseType === 'json';\n\n      if (utils.isResponse(data) || utils.isReadableStream(data)) {\n        return data;\n      }\n\n      if (\n        data &&\n        utils.isString(data) &&\n        ((forcedJSONParsing && !responseType) || JSONRequested)\n      ) {\n        const silentJSONParsing = transitional && transitional.silentJSONParsing;\n        const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n        try {\n          return JSON.parse(data, own(this, 'parseReviver'));\n        } catch (e) {\n          if (strictJSONParsing) {\n            if (e.name === 'SyntaxError') {\n              throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response'));\n            }\n            throw e;\n          }\n        }\n      }\n\n      return data;\n    },\n  ],\n\n  /**\n   * A timeout in milliseconds to abort a request. If set to 0 (default) a\n   * timeout is not created.\n   */\n  timeout: 0,\n\n  xsrfCookieName: 'XSRF-TOKEN',\n  xsrfHeaderName: 'X-XSRF-TOKEN',\n\n  maxContentLength: -1,\n  maxBodyLength: -1,\n\n  env: {\n    FormData: platform.classes.FormData,\n    Blob: platform.classes.Blob,\n  },\n\n  validateStatus: function validateStatus(status) {\n    return status >= 200 && status < 300;\n  },\n\n  headers: {\n    common: {\n      Accept: 'application/json, text/plain, */*',\n      'Content-Type': undefined,\n    },\n  },\n};\n\nutils.forEach(methodList, (method) => {\n  defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n  return toFormData(data, new platform.classes.URLSearchParams(), {\n    visitor: function (value, key, path, helpers) {\n      if (platform.isNode && utils.isBuffer(value)) {\n        this.append(key, value.toString('base64'));\n        return false;\n      }\n\n      return helpers.defaultVisitor.apply(this, arguments);\n    },\n    ...options,\n  });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n  const config = this || defaults;\n  const context = response || config;\n  const headers = AxiosHeaders.from(context.headers);\n  let data = context.data;\n\n  utils.forEach(fns, function transform(fn) {\n    data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n  });\n\n  headers.normalize();\n\n  return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n  return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\n\nclass CanceledError extends AxiosError {\n  /**\n   * A `CanceledError` is an object that is thrown when an operation is canceled.\n   *\n   * @param {string=} message The message.\n   * @param {Object=} config The config.\n   * @param {Object=} request The request.\n   *\n   * @returns {CanceledError} The created error.\n   */\n  constructor(message, config, request) {\n    super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n    this.name = 'CanceledError';\n    this.__CANCEL__ = true;\n  }\n}\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n  const validateStatus = response.config.validateStatus;\n  if (!response.status || !validateStatus || validateStatus(response.status)) {\n    resolve(response);\n  } else {\n    reject(new AxiosError(\n      'Request failed with status code ' + response.status,\n      response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE,\n      response.config,\n      response.request,\n      response\n    ));\n  }\n}\n","'use strict';\n\nconst urlParserControlCharacters = /[\\t\\n\\r]/g;\n\n/**\n * Match WHATWG URL preprocessing before checking a URL's protocol.\n *\n * @param {string} url\n *\n * @returns {string}\n */\nexport default function normalizeURLForProtocolCheck(url) {\n  if (typeof url !== 'string') {\n    return url;\n  }\n\n  let start = 0;\n\n  while (start < url.length && url.charCodeAt(start) <= 0x20) {\n    start++;\n  }\n\n  return url.slice(start).replace(urlParserControlCharacters, '');\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n  const match = /^([-+\\w]{1,25}):(?:\\/\\/)?/.exec(url);\n  return (match && match[1]) || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n  samplesCount = samplesCount || 10;\n  const bytes = new Array(samplesCount);\n  const timestamps = new Array(samplesCount);\n  let head = 0;\n  let tail = 0;\n  let firstSampleTS;\n\n  min = min !== undefined ? min : 1000;\n\n  return function push(chunkLength) {\n    const now = Date.now();\n\n    const startedAt = timestamps[tail];\n\n    if (!firstSampleTS) {\n      firstSampleTS = now;\n    }\n\n    bytes[head] = chunkLength;\n    timestamps[head] = now;\n\n    let i = tail;\n    let bytesCount = 0;\n\n    while (i !== head) {\n      bytesCount += bytes[i++];\n      i = i % samplesCount;\n    }\n\n    head = (head + 1) % samplesCount;\n\n    if (head === tail) {\n      tail = (tail + 1) % samplesCount;\n    }\n\n    if (now - firstSampleTS < min) {\n      return;\n    }\n\n    const passed = startedAt && now - startedAt;\n\n    return passed ? Math.round((bytesCount * 1000) / passed) : undefined;\n  };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Array<Function>}\n */\nfunction throttle(fn, freq) {\n  let timestamp = 0;\n  let threshold = 1000 / freq;\n  let lastArgs;\n  let timer;\n\n  const invoke = (args, now = Date.now()) => {\n    timestamp = now;\n    lastArgs = null;\n    if (timer) {\n      clearTimeout(timer);\n      timer = null;\n    }\n    fn(...args);\n  };\n\n  const throttled = (...args) => {\n    const now = Date.now();\n    const passed = now - timestamp;\n    if (passed >= threshold) {\n      invoke(args, now);\n    } else {\n      lastArgs = args;\n      if (!timer) {\n        timer = setTimeout(() => {\n          timer = null;\n          invoke(lastArgs);\n        }, threshold - passed);\n      }\n    }\n  };\n\n  const flush = () => lastArgs && invoke(lastArgs);\n  const flushWith = (...args) => invoke(args);\n\n  return [throttled, flush, flushWith];\n}\n\nexport default throttle;\n","import speedometer from './speedometer.js';\nimport throttle from './throttle.js';\nimport utils from '../utils.js';\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n  let bytesNotified = 0;\n  const _speedometer = speedometer(50, 250);\n\n  return throttle((e) => {\n    if (!e || !utils.isNumber(e.loaded)) {\n      return;\n    }\n    const rawLoaded = e.loaded;\n    const total = e.lengthComputable ? e.total : undefined;\n    const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);\n    const progressBytes = Math.max(0, loaded - bytesNotified);\n    const rate = _speedometer(progressBytes);\n\n    bytesNotified = Math.max(bytesNotified, loaded);\n\n    const data = {\n      loaded,\n      total,\n      progress: total ? loaded / total : undefined,\n      bytes: progressBytes,\n      rate: rate ? rate : undefined,\n      estimated: rate && total ? (total - loaded) / rate : undefined,\n      event: e,\n      lengthComputable: total != null,\n      [isDownloadStream ? 'download' : 'upload']: true,\n    };\n\n    listener(data);\n  }, freq);\n};\n\nexport const progressEventDecorator = (total, throttled) => {\n  const lengthComputable = total != null;\n\n  return [\n    (loaded) =>\n      throttled[0]({\n        lengthComputable,\n        total,\n        loaded,\n      }),\n    throttled[1],\n  ];\n};\n\nexport const asyncDecorator =\n  (fn, scheduler = utils.asap) =>\n  (...args) =>\n    scheduler(() => fn(...args));\n","import utils from '../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n  ? // Standard browser envs support document.cookie\n    {\n      write(name, value, expires, path, domain, secure, sameSite) {\n        if (typeof document === 'undefined') return;\n\n        const cookie = [`${name}=${encodeURIComponent(value)}`];\n\n        if (utils.isNumber(expires)) {\n          cookie.push(`expires=${new Date(expires).toUTCString()}`);\n        }\n        if (utils.isString(path)) {\n          cookie.push(`path=${path}`);\n        }\n        if (utils.isString(domain)) {\n          cookie.push(`domain=${domain}`);\n        }\n        if (secure === true) {\n          cookie.push('secure');\n        }\n        if (utils.isString(sameSite)) {\n          cookie.push(`SameSite=${sameSite}`);\n        }\n\n        document.cookie = cookie.join('; ');\n      },\n\n      read(name) {\n        if (typeof document === 'undefined') return null;\n        // Match name=value by splitting on the semicolon separator instead of building a\n        // RegExp from `name` — interpolating an unescaped string into a RegExp would let\n        // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or\n        // match the wrong cookie. Browsers may serialize cookie pairs as either \";\" or\n        // \"; \", so ignore optional whitespace before each cookie name.\n        const cookies = document.cookie.split(';');\n        for (let i = 0; i < cookies.length; i++) {\n          const cookie = cookies[i].replace(/^\\s+/, '');\n          const eq = cookie.indexOf('=');\n          if (eq !== -1 && cookie.slice(0, eq) === name) {\n            try {\n              return decodeURIComponent(cookie.slice(eq + 1));\n            } catch (e) {\n              return cookie.slice(eq + 1);\n            }\n          }\n        }\n        return null;\n      },\n\n      remove(name) {\n        this.write(name, '', Date.now() - 86400000, '/');\n      },\n    }\n  : // Non-standard browser env (web workers, react-native) lack needed support.\n    {\n      write() {},\n      read() {\n        return null;\n      },\n      remove() {},\n    };\n","'use strict';\n\nimport AxiosError, { REDACTED } from './AxiosError.js';\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\nimport normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js';\n\nconst malformedHttpProtocol = /^https?:(?!\\/\\/)/i;\n\n// Redact the parts of a URL that can carry secrets before it is embedded in an\n// error message. AxiosError.toJSON() serializes `message` verbatim and errors\n// are commonly logged, while the opt-in `config.redact` model only cleans\n// config keys — it cannot reach the message. Redact only the genuinely\n// sensitive substrings — userinfo (credentials), query parameter values and\n// fragment contents — with the same REDACTED marker the config redaction uses,\n// while keeping the scheme, host, path and parameter names so the offending\n// request stays accurately identifiable.\nfunction redactFragment(fragment) {\n  if (!fragment) {\n    return fragment;\n  }\n\n  return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => {\n    return `${separator}${parameterName}${REDACTED}`;\n  });\n}\n\nfunction redactSensitiveURLParts(url) {\n  const redactedURL = url.replace(/^(https?:\\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);\n  const fragmentIndex = redactedURL.indexOf('#');\n  const urlWithoutFragment =\n    fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);\n  const redactedURLWithoutFragment = urlWithoutFragment.replace(\n    /([?&][^=&#]*=)[^&#]*/g,\n    `$1${REDACTED}`\n  );\n\n  if (fragmentIndex === -1) {\n    return redactedURLWithoutFragment;\n  }\n\n  return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;\n}\n\nfunction assertValidHttpProtocolURL(url, config) {\n  if (typeof url === 'string') {\n    const normalizedURL = normalizeURLForProtocolCheck(url);\n    if (malformedHttpProtocol.test(normalizedURL)) {\n      throw new AxiosError(\n        `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing \"//\" after protocol`,\n        AxiosError.ERR_INVALID_URL,\n        config\n      );\n    }\n  }\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {\n  assertValidHttpProtocolURL(requestedURL, config);\n  let isRelativeUrl = !isAbsoluteURL(requestedURL);\n  if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {\n    assertValidHttpProtocolURL(baseURL, config);\n    return combineURLs(baseURL, requestedURL);\n  }\n  return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n  // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n  // by any combination of letters, digits, plus, period, or hyphen.\n  if (typeof url !== 'string') {\n    return false;\n  }\n\n  return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n  if (!relativeURL) {\n    return baseURL;\n  }\n\n  let end = baseURL.length;\n\n  while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {\n    end--;\n  }\n\n  return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\\/+/, '');\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);\n\nconst ownEnumerableKeys = (thing) => {\n  if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {\n    return Object.keys(thing).concat(\n      Object.getOwnPropertySymbols(thing).filter(\n        (symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable\n      )\n    );\n  }\n  return Object.keys(thing);\n};\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n  // eslint-disable-next-line no-param-reassign\n  config1 = config1 || {};\n  config2 = config2 || {};\n\n  // Use a null-prototype object so that downstream reads such as `config.auth`\n  // or `config.baseURL` cannot inherit polluted values from Object.prototype.\n  // `hasOwnProperty` is restored as a non-enumerable own slot to preserve\n  // ergonomics for user code that relies on it.\n  const config = Object.create(null);\n  Object.defineProperty(config, 'hasOwnProperty', {\n    // Null-proto descriptor so a polluted Object.prototype.get cannot turn\n    // this data descriptor into an accessor descriptor on the way in.\n    __proto__: null,\n    value: Object.prototype.hasOwnProperty,\n    enumerable: false,\n    writable: true,\n    configurable: true,\n  });\n\n  function getMergedValue(target, source, prop, caseless) {\n    if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n      return utils.merge.call({ caseless }, target, source);\n    } else if (utils.isPlainObject(source)) {\n      return utils.merge({}, source);\n    } else if (utils.isArray(source)) {\n      return source.slice();\n    }\n    return source;\n  }\n\n  function mergeDeepProperties(a, b, prop, caseless) {\n    if (!utils.isUndefined(b)) {\n      return getMergedValue(a, b, prop, caseless);\n    } else if (!utils.isUndefined(a)) {\n      return getMergedValue(undefined, a, prop, caseless);\n    }\n  }\n\n  // eslint-disable-next-line consistent-return\n  function valueFromConfig2(a, b) {\n    if (!utils.isUndefined(b)) {\n      return getMergedValue(undefined, b);\n    }\n  }\n\n  // eslint-disable-next-line consistent-return\n  function defaultToConfig2(a, b) {\n    if (!utils.isUndefined(b)) {\n      return getMergedValue(undefined, b);\n    } else if (!utils.isUndefined(a)) {\n      return getMergedValue(undefined, a);\n    }\n  }\n\n  function getMergedTransitionalOption(prop) {\n    const transitional2 = utils.hasOwnProp(config2, 'transitional')\n      ? config2.transitional\n      : undefined;\n\n    if (!utils.isUndefined(transitional2)) {\n      if (utils.isPlainObject(transitional2)) {\n        if (utils.hasOwnProp(transitional2, prop)) {\n          return transitional2[prop];\n        }\n      } else {\n        return undefined;\n      }\n    }\n\n    const transitional1 = utils.hasOwnProp(config1, 'transitional')\n      ? config1.transitional\n      : undefined;\n\n    if (utils.isPlainObject(transitional1) && utils.hasOwnProp(transitional1, prop)) {\n      return transitional1[prop];\n    }\n\n    return undefined;\n  }\n\n  // eslint-disable-next-line consistent-return\n  function mergeDirectKeys(a, b, prop) {\n    if (utils.hasOwnProp(config2, prop)) {\n      return getMergedValue(a, b);\n    } else if (utils.hasOwnProp(config1, prop)) {\n      return getMergedValue(undefined, a);\n    }\n  }\n\n  const mergeMap = {\n    url: valueFromConfig2,\n    method: valueFromConfig2,\n    data: valueFromConfig2,\n    baseURL: defaultToConfig2,\n    transformRequest: defaultToConfig2,\n    transformResponse: defaultToConfig2,\n    paramsSerializer: defaultToConfig2,\n    timeout: defaultToConfig2,\n    timeoutErrorMessage: defaultToConfig2,\n    withCredentials: defaultToConfig2,\n    withXSRFToken: defaultToConfig2,\n    adapter: defaultToConfig2,\n    responseType: defaultToConfig2,\n    xsrfCookieName: defaultToConfig2,\n    xsrfHeaderName: defaultToConfig2,\n    onUploadProgress: defaultToConfig2,\n    onDownloadProgress: defaultToConfig2,\n    decompress: defaultToConfig2,\n    maxContentLength: defaultToConfig2,\n    maxBodyLength: defaultToConfig2,\n    beforeRedirect: defaultToConfig2,\n    transport: defaultToConfig2,\n    httpAgent: defaultToConfig2,\n    httpsAgent: defaultToConfig2,\n    cancelToken: defaultToConfig2,\n    socketPath: defaultToConfig2,\n    allowedSocketPaths: defaultToConfig2,\n    responseEncoding: defaultToConfig2,\n    validateStatus: mergeDirectKeys,\n    headers: (a, b, prop) =>\n      mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),\n  };\n\n  utils.forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {\n    if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;\n    const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;\n    const a = utils.hasOwnProp(config1, prop) ? config1[prop] : undefined;\n    const b = utils.hasOwnProp(config2, prop) ? config2[prop] : undefined;\n    const configValue = merge(a, b, prop);\n    (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n  });\n\n  if (\n    utils.hasOwnProp(config2, 'validateStatus') &&\n    utils.isUndefined(config2.validateStatus) &&\n    getMergedTransitionalOption('validateStatusUndefinedResolves') === false\n  ) {\n    if (utils.hasOwnProp(config1, 'validateStatus')) {\n      config.validateStatus = getMergedValue(undefined, config1.validateStatus);\n    } else {\n      delete config.validateStatus;\n    }\n  }\n\n  return config;\n}\n","'use strict';\n\nconst FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];\n\n/**\n * Apply the headers generated by a FormData implementation to the request headers,\n * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the\n * content-* headers; otherwise merge all of them.\n *\n * @param {AxiosHeaders} headers - the request headers to mutate\n * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation\n * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value\n *\n * @returns {void}\n */\nexport default function setFormDataHeaders(headers, formHeaders, policy) {\n  if (policy !== 'content-only') {\n    headers.set(formHeaders);\n    return;\n  }\n\n  Object.entries(formHeaders || {}).forEach(([key, val]) => {\n    if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {\n      headers.set(key, val);\n    }\n  });\n}\n","import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport isURLSameOrigin from './isURLSameOrigin.js';\nimport cookies from './cookies.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport mergeConfig from '../core/mergeConfig.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport setFormDataHeaders from '../core/setFormDataHeaders.js';\nimport buildURL from './buildURL.js';\n\n/**\n * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().\n * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.\n *\n * @param {string} str The string to encode\n *\n * @returns {string} UTF-8 bytes as a Latin-1 string\n */\nconst encodeUTF8 = (str) =>\n  encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>\n    String.fromCharCode(parseInt(hex, 16))\n  );\n\nfunction resolveConfig(config) {\n  const newConfig = mergeConfig({}, config);\n\n  // Read only own properties to prevent prototype pollution gadgets\n  // (e.g. Object.prototype.baseURL = 'https://evil.com').\n  const own = (key) => (utils.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);\n\n  const data = own('data');\n  let withXSRFToken = own('withXSRFToken');\n  const xsrfHeaderName = own('xsrfHeaderName');\n  const xsrfCookieName = own('xsrfCookieName');\n  let headers = own('headers');\n  const auth = own('auth');\n  const baseURL = own('baseURL');\n  const allowAbsoluteUrls = own('allowAbsoluteUrls');\n  const url = own('url');\n\n  newConfig.headers = headers = AxiosHeaders.from(headers);\n\n  newConfig.url = buildURL(\n    buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig),\n    own('params'),\n    own('paramsSerializer')\n  );\n\n  // HTTP basic authentication\n  if (auth) {\n    const username = utils.getSafeProp(auth, 'username') || '';\n    const password = utils.getSafeProp(auth, 'password') || '';\n\n    try {\n      headers.set(\n        'Authorization',\n        'Basic ' + btoa(username + ':' + (password ? encodeUTF8(password) : ''))\n      );\n    } catch (e) {\n      throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);\n    }\n  }\n\n  if (utils.isFormData(data)) {\n    const getHeaders = utils.getSafeProp(data, 'getHeaders');\n\n    if (\n      platform.hasStandardBrowserEnv ||\n      platform.hasStandardBrowserWebWorkerEnv ||\n      utils.isReactNative(data)\n    ) {\n      headers.setContentType(undefined); // browser/web worker/RN handles it\n    } else if (utils.isFunction(getHeaders)) {\n      // Node.js FormData (like form-data package)\n      setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy'));\n    }\n  }\n\n  // Add xsrf header\n  // This is only done if running in a standard browser environment.\n  // Specifically not if we're in a web worker, or react-native.\n\n  if (platform.hasStandardBrowserEnv) {\n    if (utils.isFunction(withXSRFToken)) {\n      withXSRFToken = withXSRFToken(newConfig);\n    }\n\n    // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)\n    // and misconfigurations (e.g. \"false\") from short-circuiting the same-origin check and leaking\n    // the XSRF token cross-origin.\n    const shouldSendXSRF =\n      withXSRFToken === true || (withXSRFToken == null && isURLSameOrigin(newConfig.url));\n\n    if (shouldSendXSRF) {\n      const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n      if (xsrfValue) {\n        headers.set(xsrfHeaderName, xsrfValue);\n      }\n    }\n  }\n\n  return newConfig;\n}\n\nexport default resolveConfig;\n","import utils from '../utils.js';\nimport settle from '../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport { progressEventReducer } from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js';\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported &&\n  function (config) {\n    return new Promise(function dispatchXhrRequest(resolve, reject) {\n      const _config = resolveConfig(config);\n      let requestData = _config.data;\n      const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n      let { responseType, onUploadProgress, onDownloadProgress } = _config;\n      let onCanceled;\n      let uploadThrottled, downloadThrottled;\n      let flushUpload, flushDownload, flushDownloadWithEvent;\n\n      function done() {\n        flushUpload && flushUpload(); // flush events\n        flushDownload && flushDownload(); // flush events\n\n        _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n        _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n      }\n\n      let request = new XMLHttpRequest();\n\n      request.open(_config.method.toUpperCase(), _config.url, true);\n\n      // Set the request timeout in MS\n      request.timeout = _config.timeout;\n\n      function onloadend(event) {\n        if (!request) {\n          return;\n        }\n\n        // Status 0 means no response was received, which onerror and onabort normally\n        // reject before this runs. Firefox 152 fires only readystatechange and loadend for\n        // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389),\n        // leaving settle() to resolve them as an empty success. ECONNABORTED is the error\n        // onabort raised on Firefox 151. Reads over file:, which some environments report as\n        // status 0 on success, are excluded by the request URL's scheme after browser-style\n        // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or\n        // by responseURL where implemented.\n        if (\n          request.status === 0 &&\n          (parseProtocol(normalizeURLForProtocolCheck(_config.url)) ||\n            parseProtocol(platform.origin)) !== 'file' &&\n          !(request.responseURL && request.responseURL.startsWith('file:'))\n        ) {\n          reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n          done();\n\n          // Clean up request\n          request = null;\n          return;\n        }\n\n        // When loadend is still dispatching, flushing with it gives progress\n        // listeners a final delivery whose event has a live target. The legacy\n        // ready-state fallback has no event, so replay its pending progress.\n        // A throwing listener must not block settlement; rethrow asynchronously,\n        // matching how listener errors surface on the throttle timer path.\n        try {\n          if (event) {\n            flushDownloadWithEvent && flushDownloadWithEvent(event);\n          } else {\n            flushDownload && flushDownload();\n          }\n        } catch (err) {\n          setTimeout(() => {\n            throw err;\n          });\n        }\n\n        // A final progress callback can cancel the request synchronously.\n        if (!request) {\n          return;\n        }\n\n        // Prepare the response\n        const responseHeaders = AxiosHeaders.from(\n          'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n        );\n        const responseData =\n          !responseType || responseType === 'text' || responseType === 'json'\n            ? request.responseText\n            : request.response;\n        const response = {\n          data: responseData,\n          status: request.status,\n          statusText: request.statusText,\n          headers: responseHeaders,\n          config,\n          request,\n        };\n\n        settle(\n          function _resolve(value) {\n            resolve(value);\n            done();\n          },\n          function _reject(err) {\n            reject(err);\n            done();\n          },\n          response\n        );\n\n        // Clean up request\n        request = null;\n      }\n\n      if ('onloadend' in request) {\n        // Use onloadend if available\n        request.onloadend = onloadend;\n      } else {\n        // Listen for ready state to emulate onloadend\n        request.onreadystatechange = function handleLoad() {\n          if (!request || request.readyState !== 4) {\n            return;\n          }\n\n          // The request errored out and we didn't get a response, this will be\n          // handled by onerror instead\n          // With one exception: request that using file: protocol, most browsers\n          // will return status as 0 even though it's a successful request\n          if (\n            request.status === 0 &&\n            !(request.responseURL && request.responseURL.startsWith('file:'))\n          ) {\n            return;\n          }\n          // readystate handler is calling before onerror or ontimeout handlers,\n          // so we should call onloadend on the next 'tick'\n          setTimeout(onloadend);\n        };\n      }\n\n      // Handle browser request cancellation (as opposed to a manual cancellation)\n      request.onabort = function handleAbort() {\n        if (!request) {\n          return;\n        }\n\n        reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n        done();\n\n        // Clean up request\n        request = null;\n      };\n\n      // Handle low level network errors\n      request.onerror = function handleError(event) {\n        // Browsers deliver a ProgressEvent in XHR onerror\n        // (message may be empty; when present, surface it)\n        // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event\n        const msg = event && event.message ? event.message : 'Network Error';\n        const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);\n        // attach the underlying event for consumers who want details\n        err.event = event || null;\n        reject(err);\n        done();\n        request = null;\n      };\n\n      // Handle timeout\n      request.ontimeout = function handleTimeout() {\n        let timeoutErrorMessage = _config.timeout\n          ? 'timeout of ' + _config.timeout + 'ms exceeded'\n          : 'timeout exceeded';\n        const transitional = _config.transitional || transitionalDefaults;\n        if (_config.timeoutErrorMessage) {\n          timeoutErrorMessage = _config.timeoutErrorMessage;\n        }\n        reject(\n          new AxiosError(\n            timeoutErrorMessage,\n            transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n            config,\n            request\n          )\n        );\n        done();\n\n        // Clean up request\n        request = null;\n      };\n\n      // Remove Content-Type if data is undefined\n      requestData === undefined && requestHeaders.setContentType(null);\n\n      // Add headers to the request\n      if ('setRequestHeader' in request) {\n        utils.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {\n          request.setRequestHeader(key, val);\n        });\n      }\n\n      // Add withCredentials to request if needed\n      if (!utils.isUndefined(_config.withCredentials)) {\n        request.withCredentials = !!_config.withCredentials;\n      }\n\n      // Add responseType to request if needed\n      if (responseType && responseType !== 'json') {\n        request.responseType = _config.responseType;\n      }\n\n      // Handle progress if needed\n      if (onDownloadProgress) {\n        [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(\n          onDownloadProgress,\n          true\n        );\n        request.addEventListener('progress', downloadThrottled);\n      }\n\n      // Not all browsers support upload events\n      if (onUploadProgress && request.upload) {\n        [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);\n\n        request.upload.addEventListener('progress', uploadThrottled);\n\n        request.upload.addEventListener('loadend', flushUpload);\n      }\n\n      if (_config.cancelToken || _config.signal) {\n        // Handle cancellation\n        // eslint-disable-next-line func-names\n        onCanceled = (cancel) => {\n          if (!request) {\n            return;\n          }\n          reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n          request.abort();\n          done();\n          request = null;\n        };\n\n        _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n        if (_config.signal) {\n          _config.signal.aborted\n            ? onCanceled()\n            : _config.signal.addEventListener('abort', onCanceled);\n        }\n      }\n\n      const protocol = parseProtocol(_config.url);\n\n      if (protocol && !platform.protocols.includes(protocol)) {\n        reject(\n          new AxiosError(\n            'Unsupported protocol ' + protocol + ':',\n            AxiosError.ERR_BAD_REQUEST,\n            config\n          )\n        );\n        done();\n        return;\n      }\n\n      // Send the request\n      request.send(requestData || null);\n    });\n  };\n","export const streamChunk = function* (chunk, chunkSize) {\n  let len = chunk.byteLength;\n\n  if (!chunkSize || len < chunkSize) {\n    yield chunk;\n    return;\n  }\n\n  let pos = 0;\n  let end;\n\n  while (pos < len) {\n    end = pos + chunkSize;\n    yield chunk.slice(pos, end);\n    pos = end;\n  }\n};\n\nexport const readBytes = async function* (iterable, chunkSize) {\n  for await (const chunk of readStream(iterable)) {\n    yield* streamChunk(chunk, chunkSize);\n  }\n};\n\nconst readStream = async function* (stream) {\n  if (stream[Symbol.asyncIterator]) {\n    yield* stream;\n    return;\n  }\n\n  const reader = stream.getReader();\n  try {\n    for (;;) {\n      const { done, value } = await reader.read();\n      if (done) {\n        break;\n      }\n      yield value;\n    }\n  } finally {\n    await reader.cancel();\n  }\n};\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n  const iterator = readBytes(stream, chunkSize);\n\n  let bytes = 0;\n  let done;\n  let _onFinish = (e) => {\n    if (!done) {\n      done = true;\n      onFinish && onFinish(e);\n    }\n  };\n\n  return new ReadableStream(\n    {\n      async pull(controller) {\n        try {\n          const { done, value } = await iterator.next();\n\n          if (done) {\n            _onFinish();\n            controller.close();\n            return;\n          }\n\n          let len = value.byteLength;\n          if (onProgress) {\n            let loadedBytes = (bytes += len);\n            onProgress(loadedBytes);\n          }\n          controller.enqueue(new Uint8Array(value));\n        } catch (err) {\n          _onFinish(err);\n          throw err;\n        }\n      },\n      cancel(reason) {\n        _onFinish(reason);\n        return iterator.return();\n      },\n    },\n    {\n      highWaterMark: 2,\n    }\n  );\n};\n","/**\n * Estimate data: URL byte lengths *without* allocating large buffers.\n * - Fetch percent-decodes a base64 body before decoding it.\n * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the\n *   raw body, including ignored characters and content after padding.\n * - Non-base64 data is percent-decoded and then encoded as UTF-8.\n */\nconst isHexDigit = (charCode) =>\n  (charCode >= 48 && charCode <= 57) ||\n  (charCode >= 65 && charCode <= 70) ||\n  (charCode >= 97 && charCode <= 102);\n\nconst isPercentEncodedByte = (str, i, len) =>\n  i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));\n\nconst hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55);\n\nconst isBase64Char = (charCode) =>\n  (charCode >= 65 && charCode <= 90) || // A-Z\n  (charCode >= 97 && charCode <= 122) || // a-z\n  (charCode >= 48 && charCode <= 57) || // 0-9\n  charCode === 43 || // +\n  charCode === 47 || // /\n  charCode === 45 || // - (base64url)\n  charCode === 95; // _ (base64url)\n\nconst isBase64Whitespace = (charCode) =>\n  charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;\n\nconst base64Bytes = (significant) => {\n  const groups = Math.floor(significant / 4);\n  const remainder = significant % 4;\n  return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);\n};\n\n// Buffer.byteLength(body, 'base64') uses the raw string length as an allocation\n// upper bound even when Buffer.from later ignores characters or stops at '='.\nconst estimateBase64BufferAllocation = (body) => {\n  const len = body.length;\n  let padding = 0;\n\n  if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) {\n    padding++;\n\n    if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) {\n      padding++;\n    }\n  }\n\n  return Math.floor(((len - padding) * 3) / 4);\n};\n\nconst estimatePercentDecodedBase64Bytes = (body) => {\n  const len = body.length;\n  let significant = 0;\n  let padding = 0;\n  let invalid = false;\n\n  for (let i = 0; i < len; i++) {\n    let code = body.charCodeAt(i);\n\n    if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n      code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));\n      i += 2;\n    }\n\n    if (isBase64Whitespace(code)) {\n      continue;\n    }\n\n    if (code === 61 /* '=' */) {\n      padding++;\n      continue;\n    }\n\n    if (!isBase64Char(code) || padding > 0) {\n      invalid = true;\n      continue;\n    }\n\n    significant++;\n  }\n\n  // Fetch rejects malformed forgiving-base64 input. Returning the raw-size\n  // allocation bound keeps that invalid input from becoming a pre-check bypass.\n  if (\n    invalid ||\n    padding > 2 ||\n    (padding > 0 && (significant + padding) % 4 !== 0) ||\n    significant % 4 === 1\n  ) {\n    return estimateBase64BufferAllocation(body);\n  }\n\n  return base64Bytes(significant);\n};\n\nconst estimateDataURLBytes = (url, estimateBase64) => {\n  if (!url || typeof url !== 'string') return 0;\n  if (!url.startsWith('data:')) return 0;\n\n  const comma = url.indexOf(',');\n  if (comma < 0) return 0;\n\n  const meta = url.slice(5, comma);\n  const body = url.slice(comma + 1);\n  const isBase64 = /;base64/i.test(meta);\n\n  if (isBase64) {\n    return estimateBase64(body);\n  }\n\n  // Compute UTF-8 byte length directly from UTF-16 code units without allocating\n  // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).\n  // Valid %XX triplets count as one decoded byte; this matches the bytes that\n  // decodeURIComponent(body) would produce before Buffer re-encodes the string.\n  let bytes = 0;\n  for (let i = 0, len = body.length; i < len; i++) {\n    const c = body.charCodeAt(i);\n    if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n      bytes += 1;\n      i += 2;\n    } else if (c < 0x80) {\n      bytes += 1;\n    } else if (c < 0x800) {\n      bytes += 2;\n    } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) {\n      const next = body.charCodeAt(i + 1);\n      if (next >= 0xdc00 && next <= 0xdfff) {\n        bytes += 4;\n        i++;\n      } else {\n        bytes += 3;\n      }\n    } else {\n      bytes += 3;\n    }\n  }\n  return bytes;\n};\n\n/**\n * Estimate the percent-decoded payload size used by Fetch data: URLs.\n *\n * @param {string} url\n * @returns {number}\n */\nexport default function estimateDataURLDecodedBytes(url) {\n  // Fetch removes URL fragments before processing a data: URL.\n  const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1;\n\n  return estimateDataURLBytes(\n    fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),\n    estimatePercentDecodedBase64Bytes\n  );\n}\n\n/**\n * Estimate the Buffer backing allocation used by Node's raw base64 decoder.\n *\n * @param {string} url\n * @returns {number}\n */\nexport function estimateDataURLBufferAllocation(url) {\n  return estimateDataURLBytes(url, estimateBase64BufferAllocation);\n}\n","import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport composeSignals from '../helpers/composeSignals.js';\nimport { trackStream } from '../helpers/trackStream.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {\n  progressEventReducer,\n  progressEventDecorator,\n  asyncDecorator,\n} from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport settle from '../core/settle.js';\nimport estimateDataURLDecodedBytes from '../helpers/estimateDataURLDecodedBytes.js';\nimport { VERSION } from '../env/data.js';\nimport { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js';\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst DEFAULT_REQUEST_OPTIONS = {\n  cache: 'default',\n  redirect: 'follow',\n  referrer: 'about:client',\n  referrerPolicy: '',\n  mode: 'cors',\n  integrity: '',\n  keepalive: false,\n  priority: 'auto',\n  window: null,\n};\n\nconst { isFunction } = utils;\n\n/**\n * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().\n * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.\n *\n * @param {string} str The string to encode\n *\n * @returns {string} UTF-8 bytes as a Latin-1 string\n */\nconst encodeUTF8 = (str) =>\n  encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>\n    String.fromCharCode(parseInt(hex, 16))\n  );\n\n// Node's WHATWG URL parser returns `username` and `password` percent-encoded.\n// Decode before composing the `auth` option so credentials such as\n// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the\n// original value for malformed input so a bad encoding never throws.\nconst decodeURIComponentSafe = (value) => {\n  if (!utils.isString(value)) {\n    return value;\n  }\n\n  try {\n    return decodeURIComponent(value);\n  } catch (error) {\n    return value;\n  }\n};\n\nconst test = (fn, ...args) => {\n  try {\n    return !!fn(...args);\n  } catch (e) {\n    return false;\n  }\n};\n\nconst maybeWithAuthCredentials = (url) => {\n  const protocolIndex = url.indexOf('://');\n  let urlToCheck = url;\n  if (protocolIndex !== -1) {\n    urlToCheck = urlToCheck.slice(protocolIndex + 3);\n  }\n  return urlToCheck.includes('@') || urlToCheck.includes(':');\n};\n\nconst factory = (env) => {\n  const globalObject =\n    utils.global !== undefined && utils.global !== null ? utils.global : globalThis;\n  const { ReadableStream, TextEncoder } = globalObject;\n\n  env = utils.merge.call(\n    {\n      skipUndefined: true,\n    },\n    {\n      Request: globalObject.Request,\n      Response: globalObject.Response,\n    },\n    env\n  );\n\n  const { fetch: envFetch, Request, Response } = env;\n  const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';\n  const isRequestSupported = isFunction(Request);\n  const isResponseSupported = isFunction(Response);\n\n  if (!isFetchSupported) {\n    return false;\n  }\n\n  const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);\n\n  const encodeText =\n    isFetchSupported &&\n    (typeof TextEncoder === 'function'\n      ? (\n          (encoder) => (str) =>\n            encoder.encode(str)\n        )(new TextEncoder())\n      : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));\n\n  const supportsRequestStream =\n    isRequestSupported &&\n    isReadableStreamSupported &&\n    test(() => {\n      let duplexAccessed = false;\n\n      const request = new Request(platform.origin, {\n        body: new ReadableStream(),\n        method: 'POST',\n        get duplex() {\n          duplexAccessed = true;\n          return 'half';\n        },\n      });\n\n      const hasContentType = request.headers.has('Content-Type');\n\n      if (request.body != null) {\n        request.body.cancel();\n      }\n\n      return duplexAccessed && !hasContentType;\n    });\n\n  const supportsResponseStream =\n    isResponseSupported &&\n    isReadableStreamSupported &&\n    test(() => utils.isReadableStream(new Response('').body));\n\n  const resolvers = {\n    stream: supportsResponseStream && ((res) => res.body),\n  };\n\n  isFetchSupported &&\n    (() => {\n      ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {\n        !resolvers[type] &&\n          (resolvers[type] = (res, config) => {\n            let method = res && res[type];\n\n            if (method) {\n              return method.call(res);\n            }\n\n            throw new AxiosError(\n              `Response type '${type}' is not supported`,\n              AxiosError.ERR_NOT_SUPPORT,\n              config\n            );\n          });\n      });\n    })();\n\n  const getBodyLength = async (body) => {\n    if (body == null) {\n      return 0;\n    }\n\n    if (utils.isBlob(body)) {\n      return body.size;\n    }\n\n    if (utils.isSpecCompliantForm(body)) {\n      const _request = new Request(platform.origin, {\n        method: 'POST',\n        body,\n      });\n      return (await _request.arrayBuffer()).byteLength;\n    }\n\n    if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n      return body.byteLength;\n    }\n\n    if (utils.isURLSearchParams(body)) {\n      body = body + '';\n    }\n\n    if (utils.isString(body)) {\n      return (await encodeText(body)).byteLength;\n    }\n  };\n\n  const resolveBodyLength = async (headers, body) => {\n    const length = utils.toFiniteNumber(headers.getContentLength());\n\n    return length == null ? getBodyLength(body) : length;\n  };\n\n  return async (config) => {\n    let {\n      url,\n      method,\n      data,\n      signal,\n      cancelToken,\n      timeout,\n      onDownloadProgress,\n      onUploadProgress,\n      responseType,\n      headers,\n      withCredentials = 'same-origin',\n      fetchOptions,\n      maxContentLength,\n      maxBodyLength,\n      maxRedirects,\n    } = resolveConfig(config);\n\n    const hasMaxContentLength = utils.isNumber(maxContentLength) && maxContentLength > -1;\n    const hasMaxBodyLength = utils.isNumber(maxBodyLength) && maxBodyLength > -1;\n    const own = (key) => (utils.hasOwnProp(config, key) ? config[key] : undefined);\n\n    let _fetch = envFetch || fetch;\n\n    responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n    let composedSignal = composeSignals(\n      [signal, cancelToken && cancelToken.toAbortSignal()],\n      timeout\n    );\n\n    let request = null;\n\n    const unsubscribe =\n      composedSignal &&\n      composedSignal.unsubscribe &&\n      (() => {\n        composedSignal.unsubscribe();\n      });\n\n    let requestContentLength;\n\n    // AxiosError we raise while the request body is being streamed. Captured\n    // by identity so the catch block can surface it directly, regardless of\n    // how the runtime wraps the resulting fetch rejection (undici exposes it\n    // as `err.cause`; some browsers drop the original error entirely).\n    let pendingBodyError = null;\n\n    const maxBodyLengthError = () =>\n      new AxiosError(\n        'Request body larger than maxBodyLength limit',\n        AxiosError.ERR_BAD_REQUEST,\n        config,\n        request\n      );\n\n    try {\n      // HTTP basic authentication\n      let auth = undefined;\n      const configAuth = own('auth');\n\n      if (configAuth) {\n        const username = utils.getSafeProp(configAuth, 'username') || '';\n        const password = utils.getSafeProp(configAuth, 'password') || '';\n        auth = {\n          username,\n          password,\n        };\n      }\n\n      if (maybeWithAuthCredentials(url)) {\n        const parsedURL = new URL(url, platform.origin);\n\n        if (!auth && (parsedURL.username || parsedURL.password)) {\n          const urlUsername = decodeURIComponentSafe(parsedURL.username);\n          const urlPassword = decodeURIComponentSafe(parsedURL.password);\n          auth = {\n            username: urlUsername,\n            password: urlPassword,\n          };\n        }\n\n        if (parsedURL.username || parsedURL.password) {\n          parsedURL.username = '';\n          parsedURL.password = '';\n          url = parsedURL.href;\n        }\n      }\n\n      if (auth) {\n        headers.delete('authorization');\n        headers.set(\n          'Authorization',\n          'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || '')))\n        );\n      }\n\n      // Enforce maxContentLength for data: URLs up-front so we never materialize\n      // an oversized payload. The HTTP adapter applies the same check (see http.js\n      // \"if (protocol === 'data:')\" branch).\n      if (hasMaxContentLength && typeof url === 'string' && url.startsWith('data:')) {\n        const estimated = estimateDataURLDecodedBytes(url);\n        if (estimated > maxContentLength) {\n          throw new AxiosError(\n            'maxContentLength size of ' + maxContentLength + ' exceeded',\n            AxiosError.ERR_BAD_RESPONSE,\n            config,\n            request\n          );\n        }\n      }\n\n      // Enforce maxBodyLength against known-size bodies before dispatch using\n      // the body's *actual* size — never a caller-declared Content-Length,\n      // which could under-report to slip an oversized body past the check.\n      // Unknown-size streams return undefined here and are counted per-chunk\n      // below as fetch consumes them.\n      if (hasMaxBodyLength && method !== 'get' && method !== 'head') {\n        const outboundLength = await getBodyLength(data);\n        if (typeof outboundLength === 'number' && isFinite(outboundLength)) {\n          requestContentLength = outboundLength;\n          if (outboundLength > maxBodyLength) {\n            throw maxBodyLengthError();\n          }\n        }\n      }\n\n      // A streamed body under maxBodyLength must be counted as fetch consumes\n      // it; its size is never trusted from a caller-declared Content-Length.\n      const mustEnforceStreamBody =\n        hasMaxBodyLength && (utils.isReadableStream(data) || utils.isStream(data));\n\n      const trackRequestStream = (stream, onProgress, flush) =>\n        trackStream(\n          stream,\n          DEFAULT_CHUNK_SIZE,\n          (loadedBytes) => {\n            if (hasMaxBodyLength && loadedBytes > maxBodyLength) {\n              throw (pendingBodyError = maxBodyLengthError());\n            }\n            onProgress && onProgress(loadedBytes);\n          },\n          flush\n        );\n\n      if (\n        supportsRequestStream &&\n        method !== 'get' &&\n        method !== 'head' &&\n        (onUploadProgress || mustEnforceStreamBody)\n      ) {\n        requestContentLength =\n          requestContentLength == null\n            ? await resolveBodyLength(headers, data)\n            : requestContentLength;\n\n        // A declared length of 0 is only trusted to skip the wrap when we are\n        // not enforcing a stream limit (which must not rely on that header).\n        if (requestContentLength !== 0 || mustEnforceStreamBody) {\n          let _request = new Request(url, {\n            method: 'POST',\n            body: data,\n            duplex: 'half',\n          });\n\n          let contentTypeHeader;\n\n          if (\n            utils.isFormData(data) &&\n            (contentTypeHeader = _request.headers.get('content-type'))\n          ) {\n            headers.setContentType(contentTypeHeader);\n          }\n\n          if (_request.body) {\n            const [onProgress, flush] =\n              (onUploadProgress &&\n                progressEventDecorator(\n                  requestContentLength,\n                  progressEventReducer(asyncDecorator(onUploadProgress))\n                )) ||\n              [];\n\n            data = trackRequestStream(_request.body, onProgress, flush);\n          }\n        }\n      } else if (\n        mustEnforceStreamBody &&\n        !isRequestSupported &&\n        isReadableStreamSupported &&\n        method !== 'get' &&\n        method !== 'head'\n      ) {\n        data = trackRequestStream(data);\n      } else if (\n        mustEnforceStreamBody &&\n        isRequestSupported &&\n        !supportsRequestStream &&\n        method !== 'get' &&\n        method !== 'head'\n      ) {\n        throw new AxiosError(\n          'Stream request bodies are not supported by the current fetch implementation',\n          AxiosError.ERR_NOT_SUPPORT,\n          config,\n          request\n        );\n      }\n\n      if (!utils.isString(withCredentials)) {\n        withCredentials = withCredentials ? 'include' : 'omit';\n      }\n\n      // Cloudflare Workers throws when credentials are defined\n      // see https://github.com/cloudflare/workerd/issues/902\n      const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;\n\n      // If data is FormData and Content-Type is multipart/form-data without boundary,\n      // delete it so fetch can set it correctly with the boundary\n      if (utils.isFormData(data)) {\n        const contentType = headers.getContentType();\n        if (\n          contentType &&\n          /^multipart\\/form-data/i.test(contentType) &&\n          !/boundary=/i.test(contentType)\n        ) {\n          headers.delete('content-type');\n        }\n      }\n\n      // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)\n      headers.set('User-Agent', 'axios/' + VERSION, false);\n\n      const safeFetchOptions =\n        fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);\n\n      if (safeFetchOptions) {\n        // These options are owned by Axios and are already reflected in the\n        // resolved Request passed to fetch.\n        delete safeFetchOptions.body;\n        delete safeFetchOptions.headers;\n        delete safeFetchOptions.method;\n        delete safeFetchOptions.signal;\n        delete safeFetchOptions.duplex;\n        delete safeFetchOptions.credentials;\n      }\n\n      const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {\n        signal: composedSignal,\n        method: method.toUpperCase(),\n        headers: toByteStringHeaderObject(headers.normalize()),\n        body: data,\n        duplex: 'half',\n        credentials: isCredentialsSupported ? withCredentials : undefined,\n      });\n\n      if (isRequestSupported) {\n        utils.forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {\n          if (resolvedOptions[key] === undefined) {\n            resolvedOptions[key] = value;\n          }\n        });\n\n        if (resolvedOptions.signal === undefined) {\n          resolvedOptions.signal = null;\n        }\n\n        if (resolvedOptions.body === undefined) {\n          resolvedOptions.body = null;\n        }\n      }\n\n      if (maxRedirects === 0) {\n        resolvedOptions.redirect = 'manual';\n\n        if (safeFetchOptions) {\n          safeFetchOptions.redirect = 'manual';\n        }\n      }\n\n      request = isRequestSupported && new Request(url, resolvedOptions);\n\n      let response = await (isRequestSupported\n        ? _fetch(request, safeFetchOptions)\n        : _fetch(url, resolvedOptions));\n\n      const responseHeaders = AxiosHeaders.from(response.headers);\n\n      // Cheap pre-check: if the server honestly declares a content-length that\n      // already exceeds the cap, reject before we start streaming.\n      if (hasMaxContentLength) {\n        const declaredLength = utils.toFiniteNumber(responseHeaders.getContentLength());\n        if (declaredLength != null && declaredLength > maxContentLength) {\n          throw new AxiosError(\n            'maxContentLength size of ' + maxContentLength + ' exceeded',\n            AxiosError.ERR_BAD_RESPONSE,\n            config,\n            request\n          );\n        }\n      }\n\n      const isStreamResponse =\n        supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n      if (\n        supportsResponseStream &&\n        response.body &&\n        (onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe))\n      ) {\n        const options = {};\n\n        ['status', 'statusText', 'headers'].forEach((prop) => {\n          options[prop] = response[prop];\n        });\n\n        const responseContentLength = utils.toFiniteNumber(responseHeaders.getContentLength());\n\n        const [onProgress, flush] =\n          (onDownloadProgress &&\n            progressEventDecorator(\n              responseContentLength,\n              progressEventReducer(asyncDecorator(onDownloadProgress), true)\n            )) ||\n          [];\n\n        let bytesRead = 0;\n        const onChunkProgress = (loadedBytes) => {\n          if (hasMaxContentLength) {\n            bytesRead = loadedBytes;\n            if (bytesRead > maxContentLength) {\n              throw new AxiosError(\n                'maxContentLength size of ' + maxContentLength + ' exceeded',\n                AxiosError.ERR_BAD_RESPONSE,\n                config,\n                request\n              );\n            }\n          }\n          onProgress && onProgress(loadedBytes);\n        };\n\n        response = new Response(\n          trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {\n            flush && flush();\n            unsubscribe && unsubscribe();\n          }),\n          options\n        );\n      }\n\n      responseType = responseType || 'text';\n\n      let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](\n        response,\n        config\n      );\n\n      // Fallback enforcement for environments without ReadableStream support\n      // (legacy runtimes). Detect materialized size from typed output; skip\n      // streams/Response passthrough since the user will read those themselves.\n      if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {\n        let materializedSize;\n        if (responseData != null) {\n          if (typeof responseData.byteLength === 'number') {\n            materializedSize = responseData.byteLength;\n          } else if (typeof responseData.size === 'number') {\n            materializedSize = responseData.size;\n          } else if (typeof responseData === 'string') {\n            materializedSize =\n              typeof TextEncoder === 'function'\n                ? new TextEncoder().encode(responseData).byteLength\n                : responseData.length;\n          }\n        }\n        if (typeof materializedSize === 'number' && materializedSize > maxContentLength) {\n          throw new AxiosError(\n            'maxContentLength size of ' + maxContentLength + ' exceeded',\n            AxiosError.ERR_BAD_RESPONSE,\n            config,\n            request\n          );\n        }\n      }\n\n      !isStreamResponse && unsubscribe && unsubscribe();\n\n      return await new Promise((resolve, reject) => {\n        settle(resolve, reject, {\n          data: responseData,\n          headers: AxiosHeaders.from(response.headers),\n          status: response.status,\n          statusText: response.statusText,\n          config,\n          request,\n        });\n      });\n    } catch (err) {\n      unsubscribe && unsubscribe();\n\n      // Safari can surface fetch aborts as a DOMException-like object whose\n      // branded getters throw. Prefer our composed signal reason before reading\n      // the caught error, preserving timeout vs cancellation semantics.\n      if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {\n        const canceledError = composedSignal.reason;\n        canceledError.config = config;\n        request && (canceledError.request = request);\n        if (err !== canceledError) {\n          // Non-enumerable to match native Error `cause` semantics so loggers\n          // don't recurse into circular fetch internals (see #7205).\n          Object.defineProperty(canceledError, 'cause', {\n            __proto__: null,\n            value: err,\n            writable: true,\n            enumerable: false,\n            configurable: true,\n          });\n        }\n        throw canceledError;\n      }\n\n      // Surface a maxBodyLength violation we raised while the request body was\n      // being streamed. Matching by identity (rather than reading\n      // `err.cause.isAxiosError`) keeps the error deterministic across runtimes\n      // and avoids both prototype-pollution reads and mis-attributing a foreign\n      // AxiosError that merely happened to land in `err.cause`.\n      if (pendingBodyError) {\n        request && !pendingBodyError.request && (pendingBodyError.request = request);\n        throw pendingBodyError;\n      }\n\n      // Re-throw AxiosErrors we raised synchronously (data: URL / content-length\n      // pre-checks, response size enforcement) without re-wrapping them.\n      if (err instanceof AxiosError) {\n        request && !err.request && (err.request = request);\n        throw err;\n      }\n\n      if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n        const networkError = new AxiosError(\n          'Network Error',\n          AxiosError.ERR_NETWORK,\n          config,\n          request,\n          err && err.response\n        );\n        // Non-enumerable to match native Error `cause` semantics so loggers\n        // don't recurse into circular fetch internals (see #7205).\n        Object.defineProperty(networkError, 'cause', {\n          __proto__: null,\n          value: err.cause || err,\n          writable: true,\n          enumerable: false,\n          configurable: true,\n        });\n        throw networkError;\n      }\n\n      throw AxiosError.from(err, err && err.code, config, request, err && err.response);\n    }\n  };\n};\n\nconst seedCache = new Map();\n\nexport const getFetch = (config) => {\n  let env = (config && config.env) || {};\n  const { fetch, Request, Response } = env;\n  const seeds = [Request, Response, fetch];\n\n  let len = seeds.length,\n    i = len,\n    seed,\n    target,\n    map = seedCache;\n\n  while (i--) {\n    seed = seeds[i];\n    target = map.get(seed);\n\n    target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));\n\n    map = target;\n  }\n\n  return target;\n};\n\nconst adapter = getFetch();\n\nexport default adapter;\n","import CanceledError from '../cancel/CanceledError.js';\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n  signals = signals ? signals.filter(Boolean) : [];\n\n  if (!timeout && !signals.length) {\n    return;\n  }\n\n  const controller = new AbortController();\n\n  let aborted = false;\n\n  const onabort = function (reason) {\n    if (!aborted) {\n      aborted = true;\n      unsubscribe();\n      const err = reason instanceof Error ? reason : this.reason;\n      controller.abort(\n        err instanceof AxiosError\n          ? err\n          : new CanceledError(err instanceof Error ? err.message : err)\n      );\n    }\n  };\n\n  let timer =\n    timeout &&\n    setTimeout(() => {\n      timer = null;\n      onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));\n    }, timeout);\n\n  const unsubscribe = () => {\n    if (!signals) { return; }\n    timer && clearTimeout(timer);\n    timer = null;\n    signals.forEach((signal) => {\n      signal.unsubscribe\n        ? signal.unsubscribe(onabort)\n        : signal.removeEventListener('abort', onabort);\n    });\n    signals = null;\n  };\n\n  signals.forEach((signal) => {\n    if (aborted) {\n      return;\n    }\n\n    if (signal.aborted) {\n      onabort.call(signal);\n      return;\n    }\n\n    signal.addEventListener('abort', onabort, { once: true });\n  });\n\n  const { signal } = controller;\n\n  signal.unsubscribe = () => utils.asap(unsubscribe);\n\n  return signal;\n};\n\nexport default composeSignals;\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport * as fetchAdapter from './fetch.js';\nimport AxiosError from '../core/AxiosError.js';\n\n/**\n * Known adapters mapping.\n * Provides environment-specific adapters for Axios:\n * - `http` for Node.js\n * - `xhr` for browsers\n * - `fetch` for fetch API-based requests\n *\n * @type {Object<string, Function|Object>}\n */\nconst knownAdapters = {\n  http: httpAdapter,\n  xhr: xhrAdapter,\n  fetch: {\n    get: fetchAdapter.getFetch,\n  },\n};\n\n// Assign adapter names for easier debugging and identification\nutils.forEach(knownAdapters, (fn, value) => {\n  if (fn) {\n    try {\n      // Null-proto descriptors so a polluted Object.prototype.get cannot turn\n      // these data descriptors into accessor descriptors on the way in.\n      Object.defineProperty(fn, 'name', { __proto__: null, value });\n    } catch (e) {\n      // eslint-disable-next-line no-empty\n    }\n    Object.defineProperty(fn, 'adapterName', { __proto__: null, value });\n  }\n});\n\n/**\n * Render a rejection reason string for unknown or unsupported adapters\n *\n * @param {string} reason\n * @returns {string}\n */\nconst renderReason = (reason) => `- ${reason}`;\n\n/**\n * Check if the adapter is resolved (function, null, or false)\n *\n * @param {Function|null|false} adapter\n * @returns {boolean}\n */\nconst isResolvedHandle = (adapter) =>\n  utils.isFunction(adapter) || adapter === null || adapter === false;\n\n/**\n * Get the first suitable adapter from the provided list.\n * Tries each adapter in order until a supported one is found.\n * Throws an AxiosError if no adapter is suitable.\n *\n * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.\n * @param {Object} config - Axios request configuration\n * @throws {AxiosError} If no suitable adapter is available\n * @returns {Function} The resolved adapter function\n */\nfunction getAdapter(adapters, config) {\n  adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n  const { length } = adapters;\n  let nameOrAdapter;\n  let adapter;\n\n  const rejectedReasons = {};\n\n  for (let i = 0; i < length; i++) {\n    nameOrAdapter = adapters[i];\n    let id;\n\n    adapter = nameOrAdapter;\n\n    if (!isResolvedHandle(nameOrAdapter)) {\n      adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n      if (adapter === undefined) {\n        throw new AxiosError(`Unknown adapter '${id}'`);\n      }\n    }\n\n    if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {\n      break;\n    }\n\n    rejectedReasons[id || '#' + i] = adapter;\n  }\n\n  if (!adapter) {\n    const reasons = Object.entries(rejectedReasons).map(\n      ([id, state]) =>\n        `adapter ${id} ` +\n        (state === false ? 'is not supported by the environment' : 'is not available in the build')\n    );\n\n    let s = length\n      ? reasons.length > 1\n        ? 'since :\\n' + reasons.map(renderReason).join('\\n')\n        : ' ' + renderReason(reasons[0])\n      : 'as no adapter specified';\n\n    throw new AxiosError(\n      `There is no suitable adapter to dispatch the request ` + s,\n      AxiosError.ERR_NOT_SUPPORT\n    );\n  }\n\n  return adapter;\n}\n\n/**\n * Exports Axios adapters and utility to resolve an adapter\n */\nexport default {\n  /**\n   * Resolve an adapter from a list of adapter names or functions.\n   * @type {Function}\n   */\n  getAdapter,\n\n  /**\n   * Exposes all known adapters\n   * @type {Object<string, Function|Object>}\n   */\n  adapters: knownAdapters,\n};\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from '../adapters/adapters.js';\nimport utils from '../utils.js';\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n  if (config.cancelToken) {\n    config.cancelToken.throwIfRequested();\n  }\n\n  if (config.signal && config.signal.aborted) {\n    throw new CanceledError(null, config);\n  }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(_config) {\n  // Interceptors may replace the merged config with an ordinary object. Flatten\n  // it at the dispatch boundary so shared prototype members cannot become\n  // request behavior, while preserving intentional template/class members.\n  const config = utils.toSafeFlatObject(_config);\n\n  throwIfCancellationRequested(config);\n\n  config.headers = AxiosHeaders.from(utils.getSafeProp(config, 'headers'));\n\n  // Transform request data\n  config.data = transformData.call(config, config.transformRequest);\n\n  if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n    config.headers.setContentType('application/x-www-form-urlencoded', false);\n  }\n\n  const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);\n\n  return adapter(config).then(\n    function onAdapterResolution(response) {\n      throwIfCancellationRequested(config);\n\n      // Expose the current response on config so that transformResponse can\n      // attach it to any AxiosError it throws (e.g. on JSON parse failure).\n      // We clean it up afterwards to avoid polluting the config object.\n      config.response = response;\n      try {\n        response.data = transformData.call(config, config.transformResponse, response);\n      } finally {\n        delete config.response;\n      }\n\n      response.headers = AxiosHeaders.from(response.headers);\n\n      return response;\n    },\n    function onAdapterRejection(reason) {\n      if (!isCancel(reason)) {\n        throwIfCancellationRequested(config);\n\n        // Transform response data\n        if (reason && reason.response) {\n          config.response = reason.response;\n          try {\n            reason.response.data = transformData.call(\n              config,\n              config.transformResponse,\n              reason.response\n            );\n          } finally {\n            delete config.response;\n          }\n          reason.response.headers = AxiosHeaders.from(reason.response.headers);\n        }\n      }\n\n      return Promise.reject(reason);\n    }\n  );\n}\n","'use strict';\n\nimport { VERSION } from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n  validators[type] = function validator(thing) {\n    return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n  };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n  function formatMessage(opt, desc) {\n    return (\n      '[Axios v' +\n      VERSION +\n      \"] Transitional option '\" +\n      opt +\n      \"'\" +\n      desc +\n      (message ? '. ' + message : '')\n    );\n  }\n\n  // eslint-disable-next-line func-names\n  return (value, opt, opts) => {\n    if (validator === false) {\n      throw new AxiosError(\n        formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n        AxiosError.ERR_DEPRECATED\n      );\n    }\n\n    if (version && !deprecatedWarnings[opt]) {\n      deprecatedWarnings[opt] = true;\n      // eslint-disable-next-line no-console\n      console.warn(\n        formatMessage(\n          opt,\n          ' has been deprecated since v' + version + ' and will be removed in the near future'\n        )\n      );\n    }\n\n    return validator ? validator(value, opt, opts) : true;\n  };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n  return (value, opt) => {\n    // eslint-disable-next-line no-console\n    console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n    return true;\n  };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n  if (typeof options !== 'object' || options === null) {\n    throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n  }\n  const keys = Object.keys(options);\n  let i = keys.length;\n  while (i-- > 0) {\n    const opt = keys[i];\n    // Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply\n    // a non-function validator and cause a TypeError.\n    const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;\n    if (validator) {\n      const value = options[opt];\n      const result = value === undefined || validator(value, opt, options);\n      if (result !== true) {\n        throw new AxiosError(\n          'option ' + opt + ' must be ' + result,\n          AxiosError.ERR_BAD_OPTION_VALUE\n        );\n      }\n      continue;\n    }\n    if (allowUnknown !== true) {\n      throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n    }\n  }\n}\n\nexport default {\n  assertOptions,\n  validators,\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport methodList from './methodList.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\nimport transitionalDefaults from '../defaults/transitional.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n  constructor(instanceConfig) {\n    this.defaults = instanceConfig || {};\n    this.interceptors = {\n      request: new InterceptorManager(),\n      response: new InterceptorManager(),\n    };\n  }\n\n  /**\n   * Dispatch a request\n   *\n   * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n   * @param {?Object} config\n   *\n   * @returns {Promise} The Promise to be fulfilled\n   */\n  async request(configOrUrl, config) {\n    try {\n      return await this._request(configOrUrl, config);\n    } catch (err) {\n      if (err instanceof Error) {\n        try {\n          let dummy = {};\n\n          Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n          const dummyStack = dummy.stack;\n          let stack = '';\n\n          // slice off the Error: ... line\n          if (typeof dummyStack === 'string') {\n            const firstNewlineIndex = dummyStack.indexOf('\\n');\n\n            stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1);\n          }\n\n          if (!err.stack) {\n            err.stack = stack;\n            // match without the 2 top stack lines\n          } else if (stack) {\n            const firstNewlineIndex = stack.indexOf('\\n');\n            const secondNewlineIndex =\n              firstNewlineIndex === -1 ? -1 : stack.indexOf('\\n', firstNewlineIndex + 1);\n            const stackWithoutTwoTopLines =\n              secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);\n\n            if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {\n              err.stack += '\\n' + stack;\n            }\n          }\n        } catch (e) {\n          // Ignore failures from custom stack hooks or un-writable stack properties.\n        }\n      }\n\n      throw err;\n    }\n  }\n\n  _request(configOrUrl, config) {\n    /*eslint no-param-reassign:0*/\n    // Allow for axios('example/url'[, config]) a la fetch API\n    if (typeof configOrUrl === 'string') {\n      config = config || {};\n      config.url = configOrUrl;\n    } else {\n      config = configOrUrl || {};\n    }\n\n    config = mergeConfig(this.defaults, config);\n\n    const { transitional, paramsSerializer, headers } = config;\n\n    if (transitional !== undefined) {\n      validator.assertOptions(\n        transitional,\n        {\n          silentJSONParsing: validators.transitional(validators.boolean),\n          forcedJSONParsing: validators.transitional(validators.boolean),\n          clarifyTimeoutError: validators.transitional(validators.boolean),\n          legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),\n          advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),\n          validateStatusUndefinedResolves: validators.transitional(validators.boolean),\n        },\n        false\n      );\n    }\n\n    if (paramsSerializer != null) {\n      if (utils.isFunction(paramsSerializer)) {\n        config.paramsSerializer = {\n          serialize: paramsSerializer,\n        };\n      } else {\n        validator.assertOptions(\n          paramsSerializer,\n          {\n            encode: validators.function,\n            serialize: validators.function,\n          },\n          true\n        );\n      }\n    }\n\n    // Set config.allowAbsoluteUrls\n    if (config.allowAbsoluteUrls !== undefined) {\n      // do nothing\n    } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n      config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n    } else {\n      config.allowAbsoluteUrls = true;\n    }\n\n    validator.assertOptions(\n      config,\n      {\n        baseUrl: validators.spelling('baseURL'),\n        withXsrfToken: validators.spelling('withXSRFToken'),\n      },\n      true\n    );\n\n    // Set config.method\n    config.method = (\n      utils.getSafeProp(config, 'method') ||\n      utils.getSafeProp(this.defaults, 'method') ||\n      'get'\n    ).toLowerCase();\n\n    // Flatten headers\n    let contextHeaders = headers && utils.merge(headers.common, headers[config.method]);\n\n    headers &&\n      utils.forEach(methodList.concat('common'), (method) => {\n        delete headers[method];\n      });\n\n    config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n    // filter out skipped interceptors\n    const requestInterceptorChain = [];\n    let synchronousRequestInterceptors = true;\n    this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n      if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n        return;\n      }\n\n      synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n      const transitional = config.transitional || transitionalDefaults;\n      const legacyInterceptorReqResOrdering =\n        transitional && transitional.legacyInterceptorReqResOrdering;\n\n      if (legacyInterceptorReqResOrdering) {\n        requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n      } else {\n        requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n      }\n    });\n\n    const responseInterceptorChain = [];\n    this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n      responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n    });\n\n    let promise;\n    let i = 0;\n    let len;\n\n    if (!synchronousRequestInterceptors) {\n      const chain = [dispatchRequest.bind(this), undefined];\n      chain.unshift(...requestInterceptorChain);\n      chain.push(...responseInterceptorChain);\n      len = chain.length;\n\n      promise = Promise.resolve(config);\n\n      while (i < len) {\n        promise = promise.then(chain[i++], chain[i++]);\n      }\n\n      return promise;\n    }\n\n    len = requestInterceptorChain.length;\n\n    let newConfig = config;\n\n    while (i < len) {\n      const onFulfilled = requestInterceptorChain[i++];\n      const onRejected = requestInterceptorChain[i++];\n      try {\n        newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;\n      } catch (error) {\n        if (!onRejected) {\n          promise = Promise.reject(error);\n          break;\n        }\n\n        try {\n          const rejectedResult = onRejected.call(this, error);\n\n          if (utils.isThenable(rejectedResult)) {\n            promise = Promise.resolve(rejectedResult).then(() =>\n              dispatchRequest.call(this, newConfig)\n            );\n          }\n        } catch (rejectedError) {\n          promise = Promise.reject(rejectedError);\n        }\n\n        break;\n      }\n    }\n\n    if (!promise) {\n      try {\n        promise = dispatchRequest.call(this, newConfig);\n      } catch (error) {\n        promise = Promise.reject(error);\n      }\n    }\n\n    i = 0;\n    len = responseInterceptorChain.length;\n\n    while (i < len) {\n      promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n    }\n\n    return promise;\n  }\n\n  getUri(config) {\n    config = mergeConfig(this.defaults, config);\n    const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);\n    return buildURL(fullPath, config.params, config.paramsSerializer);\n  }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function (url, config) {\n    return this.request(\n      mergeConfig(config || {}, {\n        method,\n        url,\n        data: config && utils.hasOwnProp(config, 'data') ? config.data : undefined,\n      })\n    );\n  };\n});\n\nutils.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {\n  function generateHTTPMethod(isForm) {\n    return function httpMethod(url, data, config) {\n      return this.request(\n        mergeConfig(config || {}, {\n          method,\n          headers: isForm\n            ? {\n                'Content-Type': 'multipart/form-data',\n              }\n            : {},\n          url,\n          data,\n        })\n      );\n    };\n  }\n\n  Axios.prototype[method] = generateHTTPMethod();\n\n  // QUERY is a safe/idempotent read method; multipart form bodies don't fit\n  // its semantics, so no queryForm shorthand is generated.\n  if (method !== 'query') {\n    Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n  }\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n  constructor(executor) {\n    if (typeof executor !== 'function') {\n      throw new TypeError('executor must be a function.');\n    }\n\n    let resolvePromise;\n\n    this.promise = new Promise(function promiseExecutor(resolve) {\n      resolvePromise = resolve;\n    });\n\n    const token = this;\n\n    // eslint-disable-next-line func-names\n    this.promise.then((cancel) => {\n      if (!token._listeners) return;\n\n      let i = token._listeners.length;\n\n      while (i-- > 0) {\n        token._listeners[i](cancel);\n      }\n      token._listeners = null;\n    });\n\n    // eslint-disable-next-line func-names\n    this.promise.then = (onfulfilled) => {\n      let _resolve;\n      // eslint-disable-next-line func-names\n      const promise = new Promise((resolve) => {\n        token.subscribe(resolve);\n        _resolve = resolve;\n      }).then(onfulfilled);\n\n      promise.cancel = function reject() {\n        token.unsubscribe(_resolve);\n      };\n\n      return promise;\n    };\n\n    executor(function cancel(message, config, request) {\n      if (token.reason) {\n        // Cancellation has already been requested\n        return;\n      }\n\n      token.reason = new CanceledError(message, config, request);\n      resolvePromise(token.reason);\n    });\n  }\n\n  /**\n   * Throws a `CanceledError` if cancellation has been requested.\n   */\n  throwIfRequested() {\n    if (this.reason) {\n      throw this.reason;\n    }\n  }\n\n  /**\n   * Subscribe to the cancel signal\n   */\n\n  subscribe(listener) {\n    if (this.reason) {\n      listener(this.reason);\n      return;\n    }\n\n    if (this._listeners) {\n      this._listeners.push(listener);\n    } else {\n      this._listeners = [listener];\n    }\n  }\n\n  /**\n   * Unsubscribe from the cancel signal\n   */\n\n  unsubscribe(listener) {\n    if (!this._listeners) {\n      return;\n    }\n    const index = this._listeners.indexOf(listener);\n    if (index !== -1) {\n      this._listeners.splice(index, 1);\n    }\n  }\n\n  toAbortSignal() {\n    const controller = new AbortController();\n\n    const abort = (err) => {\n      controller.abort(err);\n    };\n\n    this.subscribe(abort);\n\n    controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n    return controller.signal;\n  }\n\n  /**\n   * Returns an object that contains a new `CancelToken` and a function that, when called,\n   * cancels the `CancelToken`.\n   */\n  static source() {\n    let cancel;\n    const token = new CancelToken(function executor(c) {\n      cancel = c;\n    });\n    return {\n      token,\n      cancel,\n    };\n  }\n}\n\nexport default CancelToken;\n","const HttpStatusCode = {\n  Continue: 100,\n  SwitchingProtocols: 101,\n  Processing: 102,\n  EarlyHints: 103,\n  Ok: 200,\n  Created: 201,\n  Accepted: 202,\n  NonAuthoritativeInformation: 203,\n  NoContent: 204,\n  ResetContent: 205,\n  PartialContent: 206,\n  MultiStatus: 207,\n  AlreadyReported: 208,\n  ImUsed: 226,\n  MultipleChoices: 300,\n  MovedPermanently: 301,\n  Found: 302,\n  SeeOther: 303,\n  NotModified: 304,\n  UseProxy: 305,\n  Unused: 306,\n  TemporaryRedirect: 307,\n  PermanentRedirect: 308,\n  BadRequest: 400,\n  Unauthorized: 401,\n  PaymentRequired: 402,\n  Forbidden: 403,\n  NotFound: 404,\n  MethodNotAllowed: 405,\n  NotAcceptable: 406,\n  ProxyAuthenticationRequired: 407,\n  RequestTimeout: 408,\n  Conflict: 409,\n  Gone: 410,\n  LengthRequired: 411,\n  PreconditionFailed: 412,\n  /**\n   * @deprecated Use `ContentTooLarge` instead.\n   */\n  PayloadTooLarge: 413,\n  ContentTooLarge: 413,\n  UriTooLong: 414,\n  UnsupportedMediaType: 415,\n  RangeNotSatisfiable: 416,\n  ExpectationFailed: 417,\n  ImATeapot: 418,\n  MisdirectedRequest: 421,\n  /**\n   * @deprecated Use `UnprocessableContent` instead.\n   */\n  UnprocessableEntity: 422,\n  UnprocessableContent: 422,\n  Locked: 423,\n  FailedDependency: 424,\n  TooEarly: 425,\n  UpgradeRequired: 426,\n  PreconditionRequired: 428,\n  TooManyRequests: 429,\n  RequestHeaderFieldsTooLarge: 431,\n  UnavailableForLegalReasons: 451,\n  InternalServerError: 500,\n  NotImplemented: 501,\n  BadGateway: 502,\n  ServiceUnavailable: 503,\n  GatewayTimeout: 504,\n  HttpVersionNotSupported: 505,\n  VariantAlsoNegotiates: 506,\n  InsufficientStorage: 507,\n  LoopDetected: 508,\n  NotExtended: 510,\n  NetworkAuthenticationRequired: 511,\n  WebServerReturnsAnUnknownError: 520,\n  WebServerIsDown: 521,\n  ConnectionTimedOut: 522,\n  OriginIsUnreachable: 523,\n  TimeoutOccurred: 524,\n  SslHandshakeFailed: 525,\n  InvalidSslCertificate: 526,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n  if (HttpStatusCode[value] === undefined) {\n    HttpStatusCode[value] = key;\n  }\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport { VERSION } from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from './core/AxiosHeaders.js';\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n  const context = new Axios(defaultConfig);\n  const instance = bind(Axios.prototype.request, context);\n\n  // Copy axios.prototype to instance\n  utils.extend(instance, Axios.prototype, context, { allOwnKeys: true });\n\n  // Copy context to instance\n  utils.extend(instance, context, null, { allOwnKeys: true });\n\n  // Factory for creating new instances\n  instance.create = function create(instanceConfig) {\n    return createInstance(mergeConfig(defaultConfig, instanceConfig));\n  };\n\n  return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n  return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n *  ```js\n *  function f(x, y, z) {}\n *  const args = [1, 2, 3];\n *  f.apply(null, args);\n *  ```\n *\n * With `spread` this example can be re-written.\n *\n *  ```js\n *  spread(function(x, y, z) {})([1, 2, 3]);\n *  ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n  return function wrap(arr) {\n    return callback.apply(null, arr);\n  };\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n  return utils.isObject(payload) && payload.isAxiosError === true;\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","export class Location {\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    get [Symbol.toStringTag]() {\n        return 'Location';\n    }\n    toJSON() {\n        return { start: this.start, end: this.end };\n    }\n}\nexport class Token {\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;\n        this.value = value;\n        this.prev = null;\n        this.next = null;\n    }\n    get [Symbol.toStringTag]() {\n        return 'Token';\n    }\n    toJSON() {\n        return {\n            kind: this.kind,\n            value: this.value,\n            line: this.line,\n            column: this.column,\n        };\n    }\n}\nexport const QueryDocumentKeys = {\n    Name: [],\n    Document: ['definitions'],\n    OperationDefinition: [\n        'description',\n        'name',\n        'variableDefinitions',\n        'directives',\n        'selectionSet',\n    ],\n    VariableDefinition: [\n        'description',\n        'variable',\n        'type',\n        'defaultValue',\n        'directives',\n    ],\n    Variable: ['name'],\n    SelectionSet: ['selections'],\n    Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n    Argument: ['name', 'value'],\n    FragmentArgument: ['name', 'value'],\n    FragmentSpread: [\n        'name',\n        'arguments',\n        'directives',\n    ],\n    InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n    FragmentDefinition: [\n        'description',\n        'name',\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: [\n        'description',\n        'name',\n        'arguments',\n        'directives',\n        'locations',\n    ],\n    SchemaExtension: ['directives', 'operationTypes'],\n    DirectiveExtension: ['name', 'directives'],\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    TypeCoordinate: ['name'],\n    MemberCoordinate: ['name', 'memberName'],\n    ArgumentCoordinate: ['name', 'fieldName', 'argumentName'],\n    DirectiveCoordinate: ['name'],\n    DirectiveArgumentCoordinate: ['name', 'argumentName'],\n};\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\nexport function isNode(maybeNode) {\n    const maybeKind = maybeNode?.kind;\n    return typeof maybeKind === 'string' && kindValues.has(maybeKind);\n}\nexport const OperationTypeNode = {\n    QUERY: 'query',\n    MUTATION: 'mutation',\n    SUBSCRIPTION: 'subscription',\n};\n//# sourceMappingURL=ast.js.map","export const NAME = 'Name';\nexport const DOCUMENT = 'Document';\nexport const OPERATION_DEFINITION = 'OperationDefinition';\nexport const VARIABLE_DEFINITION = 'VariableDefinition';\nexport const SELECTION_SET = 'SelectionSet';\nexport const FIELD = 'Field';\nexport const ARGUMENT = 'Argument';\nexport const FRAGMENT_ARGUMENT = 'FragmentArgument';\nexport const FRAGMENT_SPREAD = 'FragmentSpread';\nexport const INLINE_FRAGMENT = 'InlineFragment';\nexport const FRAGMENT_DEFINITION = 'FragmentDefinition';\nexport const VARIABLE = 'Variable';\nexport const INT = 'IntValue';\nexport const FLOAT = 'FloatValue';\nexport const STRING = 'StringValue';\nexport const BOOLEAN = 'BooleanValue';\nexport const NULL = 'NullValue';\nexport const ENUM = 'EnumValue';\nexport const LIST = 'ListValue';\nexport const OBJECT = 'ObjectValue';\nexport const OBJECT_FIELD = 'ObjectField';\nexport const DIRECTIVE = 'Directive';\nexport const NAMED_TYPE = 'NamedType';\nexport const LIST_TYPE = 'ListType';\nexport const NON_NULL_TYPE = 'NonNullType';\nexport const SCHEMA_DEFINITION = 'SchemaDefinition';\nexport const OPERATION_TYPE_DEFINITION = 'OperationTypeDefinition';\nexport const SCALAR_TYPE_DEFINITION = 'ScalarTypeDefinition';\nexport const OBJECT_TYPE_DEFINITION = 'ObjectTypeDefinition';\nexport const FIELD_DEFINITION = 'FieldDefinition';\nexport const INPUT_VALUE_DEFINITION = 'InputValueDefinition';\nexport const INTERFACE_TYPE_DEFINITION = 'InterfaceTypeDefinition';\nexport const UNION_TYPE_DEFINITION = 'UnionTypeDefinition';\nexport const ENUM_TYPE_DEFINITION = 'EnumTypeDefinition';\nexport const ENUM_VALUE_DEFINITION = 'EnumValueDefinition';\nexport const INPUT_OBJECT_TYPE_DEFINITION = 'InputObjectTypeDefinition';\nexport const DIRECTIVE_DEFINITION = 'DirectiveDefinition';\nexport const SCHEMA_EXTENSION = 'SchemaExtension';\nexport const DIRECTIVE_EXTENSION = 'DirectiveExtension';\nexport const SCALAR_TYPE_EXTENSION = 'ScalarTypeExtension';\nexport const OBJECT_TYPE_EXTENSION = 'ObjectTypeExtension';\nexport const INTERFACE_TYPE_EXTENSION = 'InterfaceTypeExtension';\nexport const UNION_TYPE_EXTENSION = 'UnionTypeExtension';\nexport const ENUM_TYPE_EXTENSION = 'EnumTypeExtension';\nexport const INPUT_OBJECT_TYPE_EXTENSION = 'InputObjectTypeExtension';\nexport const TYPE_COORDINATE = 'TypeCoordinate';\nexport const MEMBER_COORDINATE = 'MemberCoordinate';\nexport const ARGUMENT_COORDINATE = 'ArgumentCoordinate';\nexport const DIRECTIVE_COORDINATE = 'DirectiveCoordinate';\nexport const DIRECTIVE_ARGUMENT_COORDINATE = 'DirectiveArgumentCoordinate';\n//# sourceMappingURL=kinds_.js.map","import { devAssert } from \"../jsutils/devAssert.mjs\";\nimport { inspect } from \"../jsutils/inspect.mjs\";\nimport { isNode, QueryDocumentKeys } from \"./ast.mjs\";\nimport { Kind } from \"./kinds.mjs\";\nexport const BREAK = Object.freeze({});\nexport function visit(root, visitor, visitorKeys = QueryDocumentKeys) {\n    const enterLeaveMap = new Map();\n    for (const kind of Object.values(Kind)) {\n        enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));\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    do {\n        index++;\n        const isLeaving = index === keys.length;\n        const isEdited = isLeaving && edits.length !== 0;\n        if (isLeaving) {\n            key = ancestors.length === 0 ? undefined : path[path.length - 1];\n            node = parent;\n            parent = ancestors.pop();\n            if (isEdited) {\n                if (inArray) {\n                    node = node.slice();\n                    let editOffset = 0;\n                    for (const [editKey, editValue] of edits) {\n                        const arrayKey = editKey - editOffset;\n                        if (editValue === null) {\n                            node.splice(arrayKey, 1);\n                            editOffset++;\n                        }\n                        else {\n                            node[arrayKey] = editValue;\n                        }\n                    }\n                }\n                else {\n                    node = { ...node };\n                    for (const [editKey, editValue] of edits) {\n                        node[editKey] = editValue;\n                    }\n                }\n            }\n            index = stack.index;\n            keys = stack.keys;\n            edits = stack.edits;\n            inArray = stack.inArray;\n            stack = stack.prev;\n        }\n        else if (parent != null) {\n            key = inArray ? index : keys[index];\n            node = parent[key];\n            if (node === null || node === undefined) {\n                continue;\n            }\n            path.push(key);\n        }\n        let result;\n        if (!Array.isArray(node)) {\n            if (!(isNode(node)))\n                devAssert(false, `Invalid AST Node: ${inspect(node)}.`);\n            const visitFn = isLeaving\n                ? enterLeaveMap.get(node.kind)?.leave\n                : enterLeaveMap.get(node.kind)?.enter;\n            result = visitFn?.call(visitor, node, key, parent, path, ancestors);\n            if (result === BREAK) {\n                break;\n            }\n            if (result === false) {\n                if (!isLeaving) {\n                    path.pop();\n                    continue;\n                }\n            }\n            else if (result !== undefined) {\n                edits.push([key, result]);\n                if (!isLeaving) {\n                    if (isNode(result)) {\n                        node = result;\n                    }\n                    else {\n                        path.pop();\n                        continue;\n                    }\n                }\n            }\n        }\n        if (result === undefined && isEdited) {\n            edits.push([key, node]);\n        }\n        if (isLeaving) {\n            path.pop();\n        }\n        else {\n            stack = { inArray, index, keys, edits, prev: stack };\n            inArray = Array.isArray(node);\n            keys = inArray ? node : (visitorKeys[node.kind] ?? []);\n            index = -1;\n            edits = [];\n            if (parent != null) {\n                ancestors.push(parent);\n            }\n            parent = node;\n        }\n    } while (stack !== undefined);\n    if (edits.length !== 0) {\n        return edits.at(-1)[1];\n    }\n    return root;\n}\nexport function visitInParallel(visitors) {\n    const skipping = new Array(visitors.length).fill(null);\n    const mergedVisitor = Object.create(null);\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        for (let i = 0; i < visitors.length; ++i) {\n            const { enter, leave } = getEnterLeaveForKind(visitors[i], kind);\n            hasVisitor ||= enter != null || leave != null;\n            enterList[i] = enter;\n            leaveList[i] = leave;\n        }\n        if (!hasVisitor) {\n            continue;\n        }\n        const mergedEnterLeave = {\n            enter(...args) {\n                const node = args[0];\n                for (let i = 0; i < visitors.length; i++) {\n                    if (skipping[i] === null) {\n                        const result = enterList[i]?.apply(visitors[i], args);\n                        if (result === false) {\n                            skipping[i] = node;\n                        }\n                        else if (result === BREAK) {\n                            skipping[i] = BREAK;\n                        }\n                        else if (result !== undefined) {\n                            return result;\n                        }\n                    }\n                }\n            },\n            leave(...args) {\n                const node = args[0];\n                for (let i = 0; i < visitors.length; i++) {\n                    if (skipping[i] === null) {\n                        const result = leaveList[i]?.apply(visitors[i], args);\n                        if (result === BREAK) {\n                            skipping[i] = BREAK;\n                        }\n                        else if (result !== undefined && result !== false) {\n                            return result;\n                        }\n                    }\n                    else if (skipping[i] === node) {\n                        skipping[i] = null;\n                    }\n                }\n            },\n        };\n        mergedVisitor[kind] = mergedEnterLeave;\n    }\n    return mergedVisitor;\n}\nexport function getEnterLeaveForKind(visitor, kind) {\n    const kindVisitor = visitor[kind];\n    if (typeof kindVisitor === 'object') {\n        return kindVisitor;\n    }\n    else if (typeof kindVisitor === 'function') {\n        return { enter: kindVisitor, leave: undefined };\n    }\n    return { enter: visitor.enter, leave: visitor.leave };\n}\n//# sourceMappingURL=visitor.js.map","export function devAssert(condition, message) {\n    if (!condition) {\n        throw new Error(message);\n    }\n}\n//# sourceMappingURL=devAssert.js.map","const MAX_ARRAY_LENGTH = 10;\nconst MAX_RECURSIVE_DEPTH = 2;\nexport function inspect(value) {\n    return formatValue(value, []);\n}\nfunction formatValue(value, seenValues) {\n    switch (typeof value) {\n        case 'string':\n            return JSON.stringify(value);\n        case 'function':\n            return value.name ? `[function ${value.name}]` : '[function]';\n        case 'object':\n            return formatObjectValue(value, seenValues);\n        default:\n            return String(value);\n    }\n}\nfunction formatObjectValue(value, previouslySeenValues) {\n    if (value === null) {\n        return 'null';\n    }\n    if (previouslySeenValues.includes(value)) {\n        return '[Circular]';\n    }\n    const seenValues = [...previouslySeenValues, value];\n    if (isJSONable(value)) {\n        const jsonValue = value.toJSON();\n        if (jsonValue !== value) {\n            return typeof jsonValue === 'string'\n                ? jsonValue\n                : formatValue(jsonValue, seenValues);\n        }\n    }\n    else if (Array.isArray(value)) {\n        return formatArray(value, seenValues);\n    }\n    return formatObject(value, seenValues);\n}\nfunction isJSONable(value) {\n    return typeof value.toJSON === 'function';\n}\nfunction formatObject(object, seenValues) {\n    const entries = Object.entries(object);\n    if (entries.length === 0) {\n        return '{}';\n    }\n    if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n        return '[' + getObjectTag(object) + ']';\n    }\n    const properties = entries.map(([key, value]) => key + ': ' + formatValue(value, seenValues));\n    return '{ ' + properties.join(', ') + ' }';\n}\nfunction formatArray(array, seenValues) {\n    if (array.length === 0) {\n        return '[]';\n    }\n    if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n        return '[Array]';\n    }\n    const len = Math.min(MAX_ARRAY_LENGTH, array.length);\n    const remaining = array.length - len;\n    const items = [];\n    for (let i = 0; i < len; ++i) {\n        items.push(formatValue(array[i], seenValues));\n    }\n    if (remaining === 1) {\n        items.push('... 1 more item');\n    }\n    else if (remaining > 1) {\n        items.push(`... ${remaining} more items`);\n    }\n    return '[' + items.join(', ') + ']';\n}\nfunction getObjectTag(object) {\n    const tag = Object.prototype.toString\n        .call(object)\n        .replace(/^\\[object /, '')\n        .replace(/]$/, '');\n    if (tag === 'Object' && typeof object.constructor === 'function') {\n        const name = object.constructor.name;\n        if (typeof name === 'string' && name !== '') {\n            return name;\n        }\n    }\n    return tag;\n}\n//# sourceMappingURL=inspect.js.map","const isString = obj => typeof obj === 'string';\nconst defer = () => {\n  let res;\n  let rej;\n  const promise = new Promise((resolve, reject) => {\n    res = resolve;\n    rej = reject;\n  });\n  promise.resolve = res;\n  promise.reject = rej;\n  return promise;\n};\nconst makeString = object => {\n  if (object == null) return '';\n  return String(object);\n};\nconst copy = (a, s, t) => {\n  a.forEach(m => {\n    if (s[m]) t[m] = s[m];\n  });\n};\nconst lastOfPathSeparatorRegExp = /###/g;\nconst cleanKey = key => key && key.includes('###') ? key.replace(lastOfPathSeparatorRegExp, '.') : key;\nconst canNotTraverseDeeper = object => !object || isString(object);\nconst getLastOfPath = (object, path, Empty) => {\n  const stack = !isString(path) ? path : path.split('.');\n  let stackIndex = 0;\n  while (stackIndex < stack.length - 1) {\n    if (canNotTraverseDeeper(object)) return {};\n    const key = cleanKey(stack[stackIndex]);\n    if (!object[key] && Empty) object[key] = new Empty();\n    if (Object.prototype.hasOwnProperty.call(object, key)) {\n      object = object[key];\n    } else {\n      object = {};\n    }\n    ++stackIndex;\n  }\n  if (canNotTraverseDeeper(object)) return {};\n  return {\n    obj: object,\n    k: cleanKey(stack[stackIndex])\n  };\n};\nconst setPath = (object, path, newValue) => {\n  const {\n    obj,\n    k\n  } = getLastOfPath(object, path, Object);\n  if (obj !== undefined || path.length === 1) {\n    obj[k] = newValue;\n    return;\n  }\n  let e = path[path.length - 1];\n  let p = path.slice(0, path.length - 1);\n  let last = getLastOfPath(object, p, Object);\n  while (last.obj === undefined && p.length) {\n    e = `${p[p.length - 1]}.${e}`;\n    p = p.slice(0, p.length - 1);\n    last = getLastOfPath(object, p, Object);\n    if (last?.obj && typeof last.obj[`${last.k}.${e}`] !== 'undefined') {\n      last.obj = undefined;\n    }\n  }\n  last.obj[`${last.k}.${e}`] = newValue;\n};\nconst pushPath = (object, path, newValue, concat) => {\n  const {\n    obj,\n    k\n  } = getLastOfPath(object, path, Object);\n  obj[k] = obj[k] || [];\n  obj[k].push(newValue);\n};\nconst getPath = (object, path) => {\n  const {\n    obj,\n    k\n  } = getLastOfPath(object, path);\n  if (!obj) return undefined;\n  if (!Object.prototype.hasOwnProperty.call(obj, k)) return undefined;\n  return obj[k];\n};\nconst getPathWithDefaults = (data, defaultData, key) => {\n  const value = getPath(data, key);\n  if (value !== undefined) {\n    return value;\n  }\n  return getPath(defaultData, key);\n};\nconst deepExtend = (target, source, overwrite) => {\n  for (const prop in source) {\n    if (prop !== '__proto__' && prop !== 'constructor') {\n      if (Object.prototype.hasOwnProperty.call(target, prop)) {\n        if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {\n          if (overwrite) target[prop] = source[prop];\n        } else {\n          deepExtend(target[prop], source[prop], overwrite);\n        }\n      } else {\n        target[prop] = source[prop];\n      }\n    }\n  }\n  return target;\n};\nconst regexEscape = str => str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\nconst _entityMap = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;',\n  \"'\": '&#39;',\n  '/': '&#x2F;'\n};\nconst escape = data => {\n  if (isString(data)) {\n    return data.replace(/[&<>\"'\\/]/g, s => _entityMap[s]);\n  }\n  return data;\n};\nclass RegExpCache {\n  constructor(capacity) {\n    this.capacity = capacity;\n    this.regExpMap = new Map();\n    this.regExpQueue = [];\n  }\n  getRegExp(pattern) {\n    const regExpFromCache = this.regExpMap.get(pattern);\n    if (regExpFromCache !== undefined) {\n      return regExpFromCache;\n    }\n    const regExpNew = new RegExp(pattern);\n    if (this.regExpQueue.length === this.capacity) {\n      this.regExpMap.delete(this.regExpQueue.shift());\n    }\n    this.regExpMap.set(pattern, regExpNew);\n    this.regExpQueue.push(pattern);\n    return regExpNew;\n  }\n}\nconst chars = [' ', ',', '?', '!', ';'];\nconst looksLikeObjectPathRegExpCache = new RegExpCache(20);\nconst looksLikeObjectPath = (key, nsSeparator, keySeparator) => {\n  nsSeparator = nsSeparator || '';\n  keySeparator = keySeparator || '';\n  const possibleChars = chars.filter(c => !nsSeparator.includes(c) && !keySeparator.includes(c));\n  if (possibleChars.length === 0) return true;\n  const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\\\?' : c).join('|')})`);\n  let matched = !r.test(key);\n  if (!matched) {\n    const ki = key.indexOf(keySeparator);\n    if (ki > 0 && !r.test(key.substring(0, ki))) {\n      matched = true;\n    }\n  }\n  return matched;\n};\nconst deepFind = (obj, path, keySeparator = '.') => {\n  if (!obj) return undefined;\n  if (obj[path]) {\n    if (!Object.prototype.hasOwnProperty.call(obj, path)) return undefined;\n    return obj[path];\n  }\n  const tokens = path.split(keySeparator);\n  let current = obj;\n  for (let i = 0; i < tokens.length;) {\n    if (!current || typeof current !== 'object') {\n      return undefined;\n    }\n    let next;\n    let nextPath = '';\n    for (let j = i; j < tokens.length; ++j) {\n      if (j !== i) {\n        nextPath += keySeparator;\n      }\n      nextPath += tokens[j];\n      next = current[nextPath];\n      if (next !== undefined) {\n        if (['string', 'number', 'boolean'].includes(typeof next) && j < tokens.length - 1) {\n          continue;\n        }\n        i += j - i + 1;\n        break;\n      }\n    }\n    current = next;\n  }\n  return current;\n};\nconst getCleanedCode = code => code?.replace(/_/g, '-');\n\nconst consoleLogger = {\n  type: 'logger',\n  log(args) {\n    this.output('log', args);\n  },\n  warn(args) {\n    this.output('warn', args);\n  },\n  error(args) {\n    this.output('error', args);\n  },\n  output(type, args) {\n    console?.[type]?.apply?.(console, args);\n  }\n};\nclass Logger {\n  constructor(concreteLogger, options = {}) {\n    this.init(concreteLogger, options);\n  }\n  init(concreteLogger, options = {}) {\n    this.prefix = options.prefix || 'i18next:';\n    this.logger = concreteLogger || consoleLogger;\n    this.options = options;\n    this.debug = options.debug;\n  }\n  log(...args) {\n    return this.forward(args, 'log', '', true);\n  }\n  warn(...args) {\n    return this.forward(args, 'warn', '', true);\n  }\n  error(...args) {\n    return this.forward(args, 'error', '');\n  }\n  deprecate(...args) {\n    return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n  }\n  forward(args, lvl, prefix, debugOnly) {\n    if (debugOnly && !this.debug) return null;\n    args = args.map(a => isString(a) ? a.replace(/[\\r\\n\\x00-\\x1F\\x7F]/g, ' ') : a);\n    if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;\n    return this.logger[lvl](args);\n  }\n  create(moduleName) {\n    return new Logger(this.logger, {\n      ...{\n        prefix: `${this.prefix}:${moduleName}:`\n      },\n      ...this.options\n    });\n  }\n  clone(options) {\n    options = options || this.options;\n    options.prefix = options.prefix || this.prefix;\n    return new Logger(this.logger, options);\n  }\n}\nvar baseLogger = new Logger();\n\nclass EventEmitter {\n  constructor() {\n    this.observers = {};\n  }\n  on(events, listener) {\n    events.split(' ').forEach(event => {\n      if (!this.observers[event]) this.observers[event] = new Map();\n      const numListeners = this.observers[event].get(listener) || 0;\n      this.observers[event].set(listener, numListeners + 1);\n    });\n    return this;\n  }\n  off(event, listener) {\n    if (!this.observers[event]) return;\n    if (!listener) {\n      delete this.observers[event];\n      return;\n    }\n    this.observers[event].delete(listener);\n  }\n  once(event, listener) {\n    const wrapper = (...args) => {\n      listener(...args);\n      this.off(event, wrapper);\n    };\n    this.on(event, wrapper);\n    return this;\n  }\n  emit(event, ...args) {\n    if (this.observers[event]) {\n      const cloned = Array.from(this.observers[event].entries());\n      cloned.forEach(([observer, numTimesAdded]) => {\n        for (let i = 0; i < numTimesAdded; i++) {\n          observer(...args);\n        }\n      });\n    }\n    if (this.observers['*']) {\n      const cloned = Array.from(this.observers['*'].entries());\n      cloned.forEach(([observer, numTimesAdded]) => {\n        for (let i = 0; i < numTimesAdded; i++) {\n          observer(event, ...args);\n        }\n      });\n    }\n  }\n}\n\nclass ResourceStore extends EventEmitter {\n  constructor(data, options = {\n    ns: ['translation'],\n    defaultNS: 'translation'\n  }) {\n    super();\n    this.data = data || {};\n    this.options = options;\n    if (this.options.keySeparator === undefined) {\n      this.options.keySeparator = '.';\n    }\n    if (this.options.ignoreJSONStructure === undefined) {\n      this.options.ignoreJSONStructure = true;\n    }\n  }\n  addNamespaces(ns) {\n    if (!this.options.ns.includes(ns)) {\n      this.options.ns.push(ns);\n    }\n  }\n  removeNamespaces(ns) {\n    const index = this.options.ns.indexOf(ns);\n    if (index > -1) {\n      this.options.ns.splice(index, 1);\n    }\n  }\n  getResource(lng, ns, key, options = {}) {\n    const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n    const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n    let path;\n    if (lng.includes('.')) {\n      path = lng.split('.');\n    } else {\n      path = [lng, ns];\n      if (key) {\n        if (Array.isArray(key)) {\n          path.push(...key);\n        } else if (isString(key) && keySeparator) {\n          path.push(...key.split(keySeparator));\n        } else {\n          path.push(key);\n        }\n      }\n    }\n    const result = getPath(this.data, path);\n    if (!result && !ns && !key && lng.includes('.')) {\n      lng = path[0];\n      ns = path[1];\n      key = path.slice(2).join('.');\n    }\n    if (result || !ignoreJSONStructure || !isString(key)) return result;\n    return deepFind(this.data?.[lng]?.[ns], key, keySeparator);\n  }\n  addResource(lng, ns, key, value, options = {\n    silent: false\n  }) {\n    const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n    let path = [lng, ns];\n    if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n    if (lng.includes('.')) {\n      path = lng.split('.');\n      value = ns;\n      ns = path[1];\n    }\n    this.addNamespaces(ns);\n    setPath(this.data, path, value);\n    if (!options.silent) this.emit('added', lng, ns, key, value);\n  }\n  addResources(lng, ns, resources, options = {\n    silent: false\n  }) {\n    for (const m in resources) {\n      if (isString(resources[m]) || Array.isArray(resources[m])) this.addResource(lng, ns, m, resources[m], {\n        silent: true\n      });\n    }\n    if (!options.silent) this.emit('added', lng, ns, resources);\n  }\n  addResourceBundle(lng, ns, resources, deep, overwrite, options = {\n    silent: false,\n    skipCopy: false\n  }) {\n    let path = [lng, ns];\n    if (lng.includes('.')) {\n      path = lng.split('.');\n      deep = resources;\n      resources = ns;\n      ns = path[1];\n    }\n    this.addNamespaces(ns);\n    let pack = getPath(this.data, path) || {};\n    if (!options.skipCopy) resources = JSON.parse(JSON.stringify(resources));\n    if (deep) {\n      deepExtend(pack, resources, overwrite);\n    } else {\n      pack = {\n        ...pack,\n        ...resources\n      };\n    }\n    setPath(this.data, path, pack);\n    if (!options.silent) this.emit('added', lng, ns, resources);\n  }\n  removeResourceBundle(lng, ns) {\n    if (this.hasResourceBundle(lng, ns)) {\n      delete this.data[lng][ns];\n    }\n    this.removeNamespaces(ns);\n    this.emit('removed', lng, ns);\n  }\n  hasResourceBundle(lng, ns) {\n    return this.getResource(lng, ns) !== undefined;\n  }\n  getResourceBundle(lng, ns) {\n    if (!ns) ns = this.options.defaultNS;\n    return this.getResource(lng, ns);\n  }\n  getDataByLanguage(lng) {\n    return this.data[lng];\n  }\n  hasLanguageSomeTranslations(lng) {\n    const data = this.getDataByLanguage(lng);\n    const n = data && Object.keys(data) || [];\n    return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);\n  }\n  toJSON() {\n    return this.data;\n  }\n}\n\nvar postProcessor = {\n  processors: {},\n  addPostProcessor(module) {\n    this.processors[module.name] = module;\n  },\n  handle(processors, value, key, options, translator) {\n    processors.forEach(processor => {\n      value = this.processors[processor]?.process(value, key, options, translator) ?? value;\n    });\n    return value;\n  }\n};\n\nconst PATH_KEY = Symbol('i18next/PATH_KEY');\nfunction createProxy() {\n  const state = [];\n  const handler = Object.create(null);\n  let proxy;\n  handler.get = (target, key) => {\n    proxy?.revoke?.();\n    if (key === PATH_KEY) return state;\n    state.push(key);\n    proxy = Proxy.revocable(target, handler);\n    return proxy.proxy;\n  };\n  return Proxy.revocable(Object.create(null), handler).proxy;\n}\nfunction keysFromSelector(selector, opts) {\n  const {\n    [PATH_KEY]: path\n  } = selector(createProxy());\n  const keySeparator = opts?.keySeparator ?? '.';\n  const nsSeparator = opts?.nsSeparator ?? ':';\n  const strict = opts?.enableSelector === 'strict';\n  if (path.length > 1 && nsSeparator) {\n    const ns = opts?.ns;\n    const nsList = strict ? Array.isArray(ns) ? ns : ns ? [ns] : null : Array.isArray(ns) ? ns : null;\n    if (nsList) {\n      const candidates = strict ? nsList : nsList.length > 1 ? nsList.slice(1) : [];\n      if (candidates.includes(path[0])) {\n        return `${path[0]}${nsSeparator}${path.slice(1).join(keySeparator)}`;\n      }\n    }\n  }\n  return path.join(keySeparator);\n}\n\nconst shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';\nclass Translator extends EventEmitter {\n  constructor(services, options = {}) {\n    super();\n    copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);\n    this.options = options;\n    if (this.options.keySeparator === undefined) {\n      this.options.keySeparator = '.';\n    }\n    this.logger = baseLogger.create('translator');\n    this.checkedLoadedFor = {};\n  }\n  changeLanguage(lng) {\n    if (lng) this.language = lng;\n  }\n  exists(key, o = {\n    interpolation: {}\n  }) {\n    const opt = {\n      ...o\n    };\n    if (key == null) return false;\n    const resolved = this.resolve(key, opt);\n    if (resolved?.res === undefined) return false;\n    const isObject = shouldHandleAsObject(resolved.res);\n    if (opt.returnObjects === false && isObject) {\n      return false;\n    }\n    return true;\n  }\n  extractFromKey(key, opt) {\n    let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n    if (nsSeparator === undefined) nsSeparator = ':';\n    const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n    let namespaces = opt.ns || this.options.defaultNS || [];\n    const wouldCheckForNsInKey = nsSeparator && key.includes(nsSeparator);\n    const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);\n    if (wouldCheckForNsInKey && !seemsNaturalLanguage) {\n      const m = key.match(this.interpolator.nestingRegexp);\n      if (m && m.length > 0) {\n        return {\n          key,\n          namespaces: isString(namespaces) ? [namespaces] : namespaces\n        };\n      }\n      const parts = key.split(nsSeparator);\n      if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.includes(parts[0])) namespaces = parts.shift();\n      key = parts.join(keySeparator);\n    }\n    return {\n      key,\n      namespaces: isString(namespaces) ? [namespaces] : namespaces\n    };\n  }\n  translate(keys, o, lastKey) {\n    let opt = typeof o === 'object' ? {\n      ...o\n    } : o;\n    if (typeof opt !== 'object' && this.options.overloadTranslationOptionHandler) {\n      opt = this.options.overloadTranslationOptionHandler(arguments);\n    }\n    if (typeof opt === 'object') opt = {\n      ...opt\n    };\n    if (!opt) opt = {};\n    if (keys == null) return '';\n    if (typeof keys === 'function') keys = keysFromSelector(keys, {\n      ...this.options,\n      ...opt\n    });\n    if (!Array.isArray(keys)) keys = [String(keys)];\n    keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n      ...this.options,\n      ...opt\n    }) : String(k));\n    const returnDetails = opt.returnDetails !== undefined ? opt.returnDetails : this.options.returnDetails;\n    const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n    const {\n      key,\n      namespaces\n    } = this.extractFromKey(keys[keys.length - 1], opt);\n    const namespace = namespaces[namespaces.length - 1];\n    let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n    if (nsSeparator === undefined) nsSeparator = ':';\n    const lng = opt.lng || this.language;\n    const appendNamespaceToCIMode = opt.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n    if (lng?.toLowerCase() === 'cimode') {\n      if (appendNamespaceToCIMode) {\n        if (returnDetails) {\n          return {\n            res: `${namespace}${nsSeparator}${key}`,\n            usedKey: key,\n            exactUsedKey: key,\n            usedLng: lng,\n            usedNS: namespace,\n            usedParams: this.getUsedParamsDetails(opt)\n          };\n        }\n        return `${namespace}${nsSeparator}${key}`;\n      }\n      if (returnDetails) {\n        return {\n          res: key,\n          usedKey: key,\n          exactUsedKey: key,\n          usedLng: lng,\n          usedNS: namespace,\n          usedParams: this.getUsedParamsDetails(opt)\n        };\n      }\n      return key;\n    }\n    const resolved = this.resolve(keys, opt);\n    let res = resolved?.res;\n    const resUsedKey = resolved?.usedKey || key;\n    const resExactUsedKey = resolved?.exactUsedKey || key;\n    const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n    const joinArrays = opt.joinArrays !== undefined ? opt.joinArrays : this.options.joinArrays;\n    const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n    const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n    const hasDefaultValue = Translator.hasDefaultValue(opt);\n    const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, opt) : '';\n    const defaultValueSuffixOrdinalFallback = opt.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, {\n      ordinal: false\n    }) : '';\n    const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n    const defaultValue = needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] || opt[`defaultValue${defaultValueSuffix}`] || opt[`defaultValue${defaultValueSuffixOrdinalFallback}`] || opt.defaultValue;\n    let resForObjHndl = res;\n    if (handleAsObjectInI18nFormat && !res && hasDefaultValue) {\n      resForObjHndl = defaultValue;\n    }\n    const handleAsObject = shouldHandleAsObject(resForObjHndl);\n    const resType = Object.prototype.toString.apply(resForObjHndl);\n    if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && !noObject.includes(resType) && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {\n      if (!opt.returnObjects && !this.options.returnObjects) {\n        if (!this.options.returnedObjectHandler) {\n          this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n        }\n        const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, resForObjHndl, {\n          ...opt,\n          ns: namespaces\n        }) : `key '${key} (${this.language})' returned an object instead of string.`;\n        if (returnDetails) {\n          resolved.res = r;\n          resolved.usedParams = this.getUsedParamsDetails(opt);\n          return resolved;\n        }\n        return r;\n      }\n      if (keySeparator) {\n        const resTypeIsArray = Array.isArray(resForObjHndl);\n        const copy = resTypeIsArray ? [] : {};\n        const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n        for (const m in resForObjHndl) {\n          if (Object.prototype.hasOwnProperty.call(resForObjHndl, m)) {\n            const deepKey = `${newKeyToUse}${keySeparator}${m}`;\n            if (hasDefaultValue && !res) {\n              copy[m] = this.translate(deepKey, {\n                ...opt,\n                defaultValue: shouldHandleAsObject(defaultValue) ? defaultValue[m] : undefined,\n                ...{\n                  joinArrays: false,\n                  ns: namespaces\n                }\n              });\n            } else {\n              copy[m] = this.translate(deepKey, {\n                ...opt,\n                ...{\n                  joinArrays: false,\n                  ns: namespaces\n                }\n              });\n            }\n            if (copy[m] === deepKey) copy[m] = resForObjHndl[m];\n          }\n        }\n        res = copy;\n      }\n    } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {\n      res = res.join(joinArrays);\n      if (res) res = this.extendTranslation(res, keys, opt, lastKey);\n    } else {\n      let usedDefault = false;\n      let usedKey = false;\n      if (!this.isValidLookup(res) && hasDefaultValue) {\n        usedDefault = true;\n        res = defaultValue;\n      }\n      if (!this.isValidLookup(res)) {\n        usedKey = true;\n        res = key;\n      }\n      const missingKeyNoValueFallbackToKey = opt.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;\n      const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;\n      const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n      if (usedKey || usedDefault || updateMissing) {\n        this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, needsPluralHandling && !updateMissing ? `${key}${this.pluralResolver.getSuffix(lng, opt.count, opt)}` : key, updateMissing ? defaultValue : res);\n        if (keySeparator) {\n          const fk = this.resolve(key, {\n            ...opt,\n            keySeparator: false\n          });\n          if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n        }\n        let lngs = [];\n        const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, opt.lng || this.language);\n        if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n          for (let i = 0; i < fallbackLngs.length; i++) {\n            lngs.push(fallbackLngs[i]);\n          }\n        } else if (this.options.saveMissingTo === 'all') {\n          lngs = this.languageUtils.toResolveHierarchy(opt.lng || this.language);\n        } else {\n          lngs.push(opt.lng || this.language);\n        }\n        const send = (l, k, specificDefaultValue) => {\n          const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;\n          if (this.options.missingKeyHandler) {\n            this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, opt);\n          } else if (this.backendConnector?.saveMissing) {\n            this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, opt);\n          }\n          this.emit('missingKey', l, namespace, k, res);\n        };\n        if (this.options.saveMissing) {\n          if (this.options.saveMissingPlurals && needsPluralHandling) {\n            lngs.forEach(language => {\n              const suffixes = this.pluralResolver.getSuffixes(language, opt);\n              if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && !suffixes.includes(`${this.options.pluralSeparator}zero`)) {\n                suffixes.push(`${this.options.pluralSeparator}zero`);\n              }\n              suffixes.forEach(suffix => {\n                send([language], key + suffix, opt[`defaultValue${suffix}`] || defaultValue);\n              });\n            });\n          } else {\n            send(lngs, key, defaultValue);\n          }\n        }\n      }\n      res = this.extendTranslation(res, keys, opt, resolved, lastKey);\n      if (usedKey && res === key && this.options.appendNamespaceToMissingKey) {\n        res = `${namespace}${nsSeparator}${key}`;\n      }\n      if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {\n        res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}${nsSeparator}${key}` : key, usedDefault ? res : undefined, opt);\n      }\n    }\n    if (returnDetails) {\n      resolved.res = res;\n      resolved.usedParams = this.getUsedParamsDetails(opt);\n      return resolved;\n    }\n    return res;\n  }\n  extendTranslation(res, key, opt, resolved, lastKey) {\n    if (this.i18nFormat?.parse) {\n      res = this.i18nFormat.parse(res, {\n        ...this.options.interpolation.defaultVariables,\n        ...opt\n      }, opt.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n        resolved\n      });\n    } else if (!opt.skipInterpolation) {\n      if (opt.interpolation) this.interpolator.init({\n        ...opt,\n        ...{\n          interpolation: {\n            ...this.options.interpolation,\n            ...opt.interpolation\n          }\n        }\n      });\n      const skipOnVariables = isString(res) && (opt?.interpolation?.skipOnVariables !== undefined ? opt.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);\n      let nestBef;\n      if (skipOnVariables) {\n        const nb = res.match(this.interpolator.nestingRegexp);\n        nestBef = nb && nb.length;\n      }\n      let data = opt.replace && !isString(opt.replace) ? opt.replace : opt;\n      if (this.options.interpolation.defaultVariables) data = {\n        ...this.options.interpolation.defaultVariables,\n        ...data\n      };\n      res = this.interpolator.interpolate(res, data, opt.lng || this.language || resolved.usedLng, opt);\n      if (skipOnVariables) {\n        const na = res.match(this.interpolator.nestingRegexp);\n        const nestAft = na && na.length;\n        if (nestBef < nestAft) opt.nest = false;\n      }\n      if (!opt.lng && resolved && resolved.res) opt.lng = this.language || resolved.usedLng;\n      if (opt.nest !== false) res = this.interpolator.nest(res, (...args) => {\n        if (lastKey?.[0] === args[0] && !opt.context) {\n          this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);\n          return null;\n        }\n        return this.translate(...args, key);\n      }, opt);\n      if (opt.interpolation) this.interpolator.reset();\n    }\n    const postProcess = opt.postProcess || this.options.postProcess;\n    const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;\n    if (res != null && postProcessorNames?.length && opt.applyPostProcessor !== false) {\n      res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {\n        i18nResolved: {\n          ...resolved,\n          usedParams: this.getUsedParamsDetails(opt)\n        },\n        ...opt\n      } : opt, this);\n    }\n    return res;\n  }\n  resolve(keys, opt = {}) {\n    let found;\n    let usedKey;\n    let exactUsedKey;\n    let usedLng;\n    let usedNS;\n    if (isString(keys)) keys = [keys];\n    if (Array.isArray(keys)) keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n      ...this.options,\n      ...opt\n    }) : k);\n    keys.forEach(k => {\n      if (this.isValidLookup(found)) return;\n      const extracted = this.extractFromKey(k, opt);\n      const key = extracted.key;\n      usedKey = key;\n      let namespaces = extracted.namespaces;\n      if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);\n      const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n      const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n      const needsContextHandling = opt.context !== undefined && (isString(opt.context) || typeof opt.context === 'number') && opt.context !== '';\n      const codes = opt.lngs ? opt.lngs : this.languageUtils.toResolveHierarchy(opt.lng || this.language, opt.fallbackLng);\n      namespaces.forEach(ns => {\n        if (this.isValidLookup(found)) return;\n        usedNS = ns;\n        if (!this.checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {\n          this.checkedLoadedFor[`${codes[0]}-${ns}`] = true;\n          this.logger.warn(`key \"${usedKey}\" for languages \"${codes.join(', ')}\" won't get resolved as namespace \"${usedNS}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n        }\n        codes.forEach(code => {\n          if (this.isValidLookup(found)) return;\n          usedLng = code;\n          const finalKeys = [key];\n          if (this.i18nFormat?.addLookupKeys) {\n            this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, opt);\n          } else {\n            let pluralSuffix;\n            if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, opt.count, opt);\n            const zeroSuffix = `${this.options.pluralSeparator}zero`;\n            const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;\n            if (needsPluralHandling) {\n              if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {\n                finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n              }\n              finalKeys.push(key + pluralSuffix);\n              if (needsZeroSuffixLookup) {\n                finalKeys.push(key + zeroSuffix);\n              }\n            }\n            if (needsContextHandling) {\n              const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;\n              finalKeys.push(contextKey);\n              if (needsPluralHandling) {\n                if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {\n                  finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n                }\n                finalKeys.push(contextKey + pluralSuffix);\n                if (needsZeroSuffixLookup) {\n                  finalKeys.push(contextKey + zeroSuffix);\n                }\n              }\n            }\n          }\n          let possibleKey;\n          while (possibleKey = finalKeys.pop()) {\n            if (!this.isValidLookup(found)) {\n              exactUsedKey = possibleKey;\n              found = this.getResource(code, ns, possibleKey, opt);\n            }\n          }\n        });\n      });\n    });\n    return {\n      res: found,\n      usedKey,\n      exactUsedKey,\n      usedLng,\n      usedNS\n    };\n  }\n  isValidLookup(res) {\n    return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n  }\n  getResource(code, ns, key, options = {}) {\n    if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n    return this.resourceStore.getResource(code, ns, key, options);\n  }\n  getUsedParamsDetails(options = {}) {\n    const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];\n    const useOptionsReplaceForData = options.replace && !isString(options.replace);\n    let data = useOptionsReplaceForData ? options.replace : options;\n    if (useOptionsReplaceForData && typeof options.count !== 'undefined') {\n      data = {\n        ...data,\n        count: options.count\n      };\n    }\n    if (this.options.interpolation.defaultVariables) {\n      data = {\n        ...this.options.interpolation.defaultVariables,\n        ...data\n      };\n    }\n    if (!useOptionsReplaceForData) {\n      data = {\n        ...data\n      };\n      for (const key of optionsKeys) {\n        delete data[key];\n      }\n    }\n    return data;\n  }\n  static hasDefaultValue(options) {\n    const prefix = 'defaultValue';\n    for (const option in options) {\n      if (Object.prototype.hasOwnProperty.call(options, option) && option.startsWith(prefix) && undefined !== options[option]) {\n        return true;\n      }\n    }\n    return false;\n  }\n}\n\nclass LanguageUtil {\n  constructor(options) {\n    this.options = options;\n    this.supportedLngs = this.options.supportedLngs || false;\n    this.logger = baseLogger.create('languageUtils');\n    this.resolveHierarchyCache = {};\n  }\n  clearCache() {\n    this.resolveHierarchyCache = {};\n  }\n  getScriptPartFromCode(code) {\n    code = getCleanedCode(code);\n    if (!code || !code.includes('-')) return null;\n    const p = code.split('-');\n    if (p.length === 2) return null;\n    p.pop();\n    if (p[p.length - 1].toLowerCase() === 'x') return null;\n    return this.formatLanguageCode(p.join('-'));\n  }\n  getLanguagePartFromCode(code) {\n    code = getCleanedCode(code);\n    if (!code || !code.includes('-')) return code;\n    const p = code.split('-');\n    return this.formatLanguageCode(p[0]);\n  }\n  formatLanguageCode(code) {\n    if (isString(code) && code.includes('-')) {\n      let formattedCode;\n      try {\n        formattedCode = Intl.getCanonicalLocales(code)[0];\n      } catch (e) {}\n      if (formattedCode && this.options.lowerCaseLng) {\n        formattedCode = formattedCode.toLowerCase();\n      }\n      if (formattedCode) return formattedCode;\n      if (this.options.lowerCaseLng) {\n        return code.toLowerCase();\n      }\n      return code;\n    }\n    return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n  }\n  isSupportedCode(code) {\n    if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n      code = this.getLanguagePartFromCode(code);\n    }\n    return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(code);\n  }\n  getBestMatchFromCodes(codes) {\n    if (!codes) return null;\n    let found;\n    codes.forEach(code => {\n      if (found) return;\n      const cleanedLng = this.formatLanguageCode(code);\n      if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;\n    });\n    if (!found && this.options.supportedLngs) {\n      codes.forEach(code => {\n        if (found) return;\n        const lngScOnly = this.getScriptPartFromCode(code);\n        if (this.isSupportedCode(lngScOnly)) return found = lngScOnly;\n        const lngOnly = this.getLanguagePartFromCode(code);\n        if (this.isSupportedCode(lngOnly)) return found = lngOnly;\n        found = this.options.supportedLngs.find(supportedLng => {\n          if (supportedLng === lngOnly) return true;\n          if (!supportedLng.includes('-') && !lngOnly.includes('-')) return false;\n          if (supportedLng.includes('-') && !lngOnly.includes('-') && supportedLng.slice(0, supportedLng.indexOf('-')) === lngOnly) return true;\n          if (supportedLng.startsWith(lngOnly) && lngOnly.length > 1) return true;\n          return false;\n        });\n      });\n    }\n    if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n    return found;\n  }\n  getFallbackCodes(fallbacks, code) {\n    if (!fallbacks) return [];\n    if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n    if (isString(fallbacks)) fallbacks = [fallbacks];\n    if (Array.isArray(fallbacks)) return fallbacks;\n    if (!code) return fallbacks.default || [];\n    let found = fallbacks[code];\n    if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n    if (!found) found = fallbacks[this.formatLanguageCode(code)];\n    if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n    if (!found) found = fallbacks.default;\n    return found || [];\n  }\n  toResolveHierarchy(code, fallbackCode) {\n    const fallbackLng = this.options.fallbackLng;\n    const fallbackLngKey = Array.isArray(fallbackLng) ? fallbackLng.join('|') : fallbackLng;\n    if (fallbackLngKey !== this._cachedFallbackLng) {\n      this.resolveHierarchyCache = {};\n      this._cachedFallbackLng = fallbackLngKey;\n    }\n    const hasCacheableFallback = fallbackCode === undefined || fallbackCode === false || isString(fallbackCode);\n    const usesUncacheableOptionsFallback = fallbackCode === undefined && typeof this.options.fallbackLng === 'function';\n    const cacheable = isString(code) && hasCacheableFallback && !usesUncacheableOptionsFallback;\n    let cacheKey = null;\n    if (cacheable) {\n      let fallbackCacheKey;\n      if (fallbackCode === undefined) fallbackCacheKey = 'undefined';else if (fallbackCode === false) fallbackCacheKey = 'boolean:false';else fallbackCacheKey = `string:${fallbackCode}`;\n      cacheKey = `${code.length}:${code}|${fallbackCacheKey}`;\n    }\n    if (cacheKey !== null) {\n      const cached = this.resolveHierarchyCache[cacheKey];\n      if (cached !== undefined) return cached.slice();\n    }\n    const fallbackCodes = this.getFallbackCodes((fallbackCode === false ? [] : fallbackCode) || this.options.fallbackLng || [], code);\n    const codes = [];\n    const addCode = c => {\n      if (!c) return;\n      if (this.isSupportedCode(c)) {\n        codes.push(c);\n      } else {\n        this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);\n      }\n    };\n    if (isString(code) && (code.includes('-') || code.includes('_'))) {\n      if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n      if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n      if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n    } else if (isString(code)) {\n      addCode(this.formatLanguageCode(code));\n    }\n    fallbackCodes.forEach(fc => {\n      if (!codes.includes(fc)) addCode(this.formatLanguageCode(fc));\n    });\n    if (cacheKey !== null) {\n      this.resolveHierarchyCache[cacheKey] = codes;\n      return codes.slice();\n    }\n    return codes;\n  }\n}\n\nconst suffixesOrder = {\n  zero: 0,\n  one: 1,\n  two: 2,\n  few: 3,\n  many: 4,\n  other: 5\n};\nconst dummyRule = {\n  select: count => count === 1 ? 'one' : 'other',\n  resolvedOptions: () => ({\n    pluralCategories: ['one', 'other']\n  })\n};\nclass PluralResolver {\n  constructor(languageUtils, options = {}) {\n    this.languageUtils = languageUtils;\n    this.options = options;\n    this.logger = baseLogger.create('pluralResolver');\n    this.pluralRulesCache = {};\n  }\n  clearCache() {\n    this.pluralRulesCache = {};\n  }\n  getRule(code, options = {}) {\n    const cleanedCode = getCleanedCode(code === 'dev' ? 'en' : code);\n    const type = options.ordinal ? 'ordinal' : 'cardinal';\n    const cacheKey = JSON.stringify({\n      cleanedCode,\n      type\n    });\n    if (cacheKey in this.pluralRulesCache) {\n      return this.pluralRulesCache[cacheKey];\n    }\n    let rule;\n    try {\n      rule = new Intl.PluralRules(cleanedCode, {\n        type\n      });\n    } catch (err) {\n      if (typeof Intl === 'undefined') {\n        this.logger.error('No Intl support, please use an Intl polyfill!');\n        return dummyRule;\n      }\n      if (!code.match(/-|_/)) return dummyRule;\n      const lngPart = this.languageUtils.getLanguagePartFromCode(code);\n      rule = this.getRule(lngPart, options);\n    }\n    this.pluralRulesCache[cacheKey] = rule;\n    return rule;\n  }\n  needsPlural(code, options = {}) {\n    let rule = this.getRule(code, options);\n    if (!rule) rule = this.getRule('dev', options);\n    return rule?.resolvedOptions().pluralCategories.length > 1;\n  }\n  getPluralFormsOfKey(code, key, options = {}) {\n    return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);\n  }\n  getSuffixes(code, options = {}) {\n    let rule = this.getRule(code, options);\n    if (!rule) rule = this.getRule('dev', options);\n    if (!rule) return [];\n    return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);\n  }\n  getSuffix(code, count, options = {}) {\n    const rule = this.getRule(code, options);\n    if (rule) {\n      return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;\n    }\n    this.logger.warn(`no plural rule found for: ${code}`);\n    return this.getSuffix('dev', count, options);\n  }\n}\n\nconst deepFindWithDefaults = (data, defaultData, key, keySeparator = '.', ignoreJSONStructure = true) => {\n  let path = getPathWithDefaults(data, defaultData, key);\n  if (!path && ignoreJSONStructure && isString(key)) {\n    path = deepFind(data, key, keySeparator);\n    if (path === undefined) path = deepFind(defaultData, key, keySeparator);\n  }\n  return path;\n};\nconst regexSafe = val => val.replace(/\\$/g, '$$$$');\nclass Interpolator {\n  constructor(options = {}) {\n    this.logger = baseLogger.create('interpolator');\n    this.options = options;\n    this.format = options?.interpolation?.format || (value => value);\n    this.init(options);\n  }\n  init(options = {}) {\n    if (!options.interpolation) options.interpolation = {\n      escapeValue: true\n    };\n    const {\n      escape: escape$1,\n      escapeValue,\n      useRawValueToEscape,\n      prefix,\n      prefixEscaped,\n      suffix,\n      suffixEscaped,\n      formatSeparator,\n      unescapeSuffix,\n      unescapePrefix,\n      nestingPrefix,\n      nestingPrefixEscaped,\n      nestingSuffix,\n      nestingSuffixEscaped,\n      nestingOptionsSeparator,\n      maxReplaces,\n      alwaysFormat\n    } = options.interpolation;\n    this.escape = escape$1 !== undefined ? escape$1 : escape;\n    this.escapeValue = escapeValue !== undefined ? escapeValue : true;\n    this.useRawValueToEscape = useRawValueToEscape !== undefined ? useRawValueToEscape : false;\n    this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';\n    this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';\n    this.formatSeparator = formatSeparator || ',';\n    this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix ? regexEscape(unescapePrefix) : '-';\n    this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix ? regexEscape(unescapeSuffix) : '';\n    this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');\n    this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');\n    this.nestingOptionsSeparator = nestingOptionsSeparator || ',';\n    this.maxReplaces = maxReplaces || 1000;\n    this.alwaysFormat = alwaysFormat !== undefined ? alwaysFormat : false;\n    this.resetRegExp();\n  }\n  reset() {\n    if (this.options) this.init(this.options);\n  }\n  resetRegExp() {\n    const getOrResetRegExp = (existingRegExp, pattern) => {\n      if (existingRegExp?.source === pattern) {\n        existingRegExp.lastIndex = 0;\n        return existingRegExp;\n      }\n      return new RegExp(pattern, 'g');\n    };\n    this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);\n    this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);\n    this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\\\))*?)${this.nestingSuffix}`);\n  }\n  interpolate(str, data, lng, options) {\n    let match;\n    let value;\n    let replaces;\n    const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n    const handleFormat = key => {\n      if (!key.includes(this.formatSeparator)) {\n        const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);\n        return this.alwaysFormat ? this.format(path, undefined, lng, {\n          ...options,\n          ...data,\n          interpolationkey: key\n        }) : path;\n      }\n      const p = key.split(this.formatSeparator);\n      const k = p.shift().trim();\n      const f = p.join(this.formatSeparator).trim();\n      return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {\n        ...options,\n        ...data,\n        interpolationkey: k\n      });\n    };\n    this.resetRegExp();\n    if (!this.escapeValue && typeof str === 'string' && /\\$t\\([^)]*\\{[^}]*\\{\\{/.test(str)) {\n      this.logger.warn('nesting options string contains interpolated variables with escapeValue: false — ' + 'if any of those values are attacker-controlled they can inject additional ' + 'nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing ' + 'it to t(), or keep escapeValue: true.');\n    }\n    const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;\n    const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;\n    const todos = [{\n      regex: this.regexpUnescape,\n      safeValue: val => val\n    }, {\n      regex: this.regexp,\n      safeValue: val => this.escapeValue ? this.escape(val) : val\n    }];\n    todos.forEach(todo => {\n      replaces = 0;\n      while (match = todo.regex.exec(str)) {\n        const matchedVar = match[1].trim();\n        value = handleFormat(matchedVar);\n        if (value === undefined) {\n          if (typeof missingInterpolationHandler === 'function') {\n            const temp = missingInterpolationHandler(str, match, options);\n            value = isString(temp) ? temp : '';\n          } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {\n            value = '';\n          } else if (skipOnVariables) {\n            value = match[0];\n            continue;\n          } else {\n            this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);\n            value = '';\n          }\n        } else if (!isString(value) && !this.useRawValueToEscape) {\n          value = makeString(value);\n        }\n        const safeValue = todo.safeValue(value);\n        str = str.replace(match[0], regexSafe(safeValue));\n        if (skipOnVariables) {\n          todo.regex.lastIndex += safeValue.length;\n          todo.regex.lastIndex -= match[0].length;\n        } else {\n          todo.regex.lastIndex = 0;\n        }\n        replaces++;\n        if (replaces >= this.maxReplaces) {\n          break;\n        }\n      }\n    });\n    return str;\n  }\n  nest(str, fc, options = {}) {\n    let match;\n    let value;\n    let clonedOptions;\n    const handleHasOptions = (key, inheritedOptions) => {\n      const sep = this.nestingOptionsSeparator;\n      if (!key.includes(sep)) return key;\n      const c = key.split(new RegExp(`${regexEscape(sep)}[ ]*{`));\n      let optionsString = `{${c[1]}`;\n      key = c[0];\n      optionsString = this.interpolate(optionsString, clonedOptions);\n      const matchedSingleQuotes = optionsString.match(/'/g);\n      const matchedDoubleQuotes = optionsString.match(/\"/g);\n      if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || (matchedDoubleQuotes?.length ?? 0) % 2 !== 0) {\n        optionsString = optionsString.replace(/'/g, '\"');\n      }\n      try {\n        clonedOptions = JSON.parse(optionsString);\n        if (inheritedOptions) clonedOptions = {\n          ...inheritedOptions,\n          ...clonedOptions\n        };\n      } catch (e) {\n        this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);\n        return `${key}${sep}${optionsString}`;\n      }\n      if (clonedOptions.defaultValue && clonedOptions.defaultValue.includes(this.prefix)) delete clonedOptions.defaultValue;\n      return key;\n    };\n    while (match = this.nestingRegexp.exec(str)) {\n      let formatters = [];\n      clonedOptions = {\n        ...options\n      };\n      clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;\n      clonedOptions.applyPostProcessor = false;\n      delete clonedOptions.defaultValue;\n      const keyEndIndex = /{.*}/s.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);\n      if (keyEndIndex !== -1) {\n        formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);\n        match[1] = match[1].slice(0, keyEndIndex);\n      }\n      value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n      if (value && match[0] === str && !isString(value)) return value;\n      if (!isString(value)) value = makeString(value);\n      if (!value) {\n        this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);\n        value = '';\n      }\n      if (formatters.length) {\n        value = formatters.reduce((v, f) => this.format(v, f, options.lng, {\n          ...options,\n          interpolationkey: match[1].trim()\n        }), value.trim());\n      }\n      str = str.replace(match[0], regexSafe(makeString(value)));\n      this.regexp.lastIndex = 0;\n    }\n    return str;\n  }\n}\n\nconst parseFormatStr = formatStr => {\n  let formatName = formatStr.toLowerCase().trim();\n  const formatOptions = {};\n  if (formatStr.includes('(')) {\n    const p = formatStr.split('(');\n    formatName = p[0].toLowerCase().trim();\n    const optStr = p[1].slice(0, -1);\n    if (formatName === 'currency' && !optStr.includes(':')) {\n      if (!formatOptions.currency) formatOptions.currency = optStr.trim();\n    } else if (formatName === 'relativetime' && !optStr.includes(':')) {\n      if (!formatOptions.range) formatOptions.range = optStr.trim();\n    } else {\n      const opts = optStr.split(';');\n      opts.forEach(opt => {\n        if (opt) {\n          const [key, ...rest] = opt.split(':');\n          const val = rest.join(':').trim().replace(/^'+|'+$/g, '');\n          const trimmedKey = key.trim();\n          if (!formatOptions[trimmedKey]) formatOptions[trimmedKey] = val;\n          if (val === 'false') formatOptions[trimmedKey] = false;\n          if (val === 'true') formatOptions[trimmedKey] = true;\n          if (!isNaN(val)) formatOptions[trimmedKey] = parseInt(val, 10);\n        }\n      });\n    }\n  }\n  return {\n    formatName,\n    formatOptions\n  };\n};\nconst createCachedFormatter = fn => {\n  const cache = {};\n  return (v, l, o) => {\n    let optForCache = o;\n    if (o && o.interpolationkey && o.formatParams && o.formatParams[o.interpolationkey] && o[o.interpolationkey]) {\n      optForCache = {\n        ...optForCache,\n        [o.interpolationkey]: undefined\n      };\n    }\n    const key = l + JSON.stringify(optForCache);\n    let frm = cache[key];\n    if (!frm) {\n      frm = fn(getCleanedCode(l), o);\n      cache[key] = frm;\n    }\n    return frm(v);\n  };\n};\nconst createNonCachedFormatter = fn => (v, l, o) => fn(getCleanedCode(l), o)(v);\nclass Formatter {\n  constructor(options = {}) {\n    this.logger = baseLogger.create('formatter');\n    this.options = options;\n    this.init(options);\n  }\n  init(services, options = {\n    interpolation: {}\n  }) {\n    this.formatSeparator = options.interpolation.formatSeparator || ',';\n    const cf = options.cacheInBuiltFormats ? createCachedFormatter : createNonCachedFormatter;\n    this.formats = {\n      number: cf((lng, opt) => {\n        const formatter = new Intl.NumberFormat(lng, {\n          ...opt\n        });\n        return val => formatter.format(val);\n      }),\n      currency: cf((lng, opt) => {\n        const formatter = new Intl.NumberFormat(lng, {\n          ...opt,\n          style: 'currency'\n        });\n        return val => formatter.format(val);\n      }),\n      datetime: cf((lng, opt) => {\n        const formatter = new Intl.DateTimeFormat(lng, {\n          ...opt\n        });\n        return val => formatter.format(val);\n      }),\n      relativetime: cf((lng, opt) => {\n        const formatter = new Intl.RelativeTimeFormat(lng, {\n          ...opt\n        });\n        return val => formatter.format(val, opt.range || 'day');\n      }),\n      list: cf((lng, opt) => {\n        const formatter = new Intl.ListFormat(lng, {\n          ...opt\n        });\n        return val => formatter.format(val);\n      })\n    };\n  }\n  add(name, fc) {\n    this.formats[name.toLowerCase().trim()] = fc;\n  }\n  addCached(name, fc) {\n    this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);\n  }\n  format(value, format, lng, options = {}) {\n    if (!format) return value;\n    if (value == null) return value;\n    const rawFormats = format.split(this.formatSeparator);\n    const formats = [];\n    for (let i = 0; i < rawFormats.length; i++) {\n      let f = rawFormats[i];\n      while (f.indexOf('(') > -1 && !f.includes(')') && i + 1 < rawFormats.length) {\n        f = `${f}${this.formatSeparator}${rawFormats[++i]}`;\n      }\n      formats.push(f);\n    }\n    const result = formats.reduce((mem, f) => {\n      const {\n        formatName,\n        formatOptions\n      } = parseFormatStr(f);\n      if (this.formats[formatName]) {\n        let formatted = mem;\n        try {\n          const valOptions = options?.formatParams?.[options.interpolationkey] || {};\n          const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;\n          formatted = this.formats[formatName](mem, l, {\n            ...formatOptions,\n            ...options,\n            ...valOptions\n          });\n        } catch (error) {\n          this.logger.warn(error);\n        }\n        return formatted;\n      } else {\n        this.logger.warn(`there was no format function for ${formatName}`);\n      }\n      return mem;\n    }, value);\n    return result;\n  }\n}\n\nconst removePending = (q, name) => {\n  if (q.pending[name] !== undefined) {\n    delete q.pending[name];\n    q.pendingCount--;\n  }\n};\nclass Connector extends EventEmitter {\n  constructor(backend, store, services, options = {}) {\n    super();\n    this.backend = backend;\n    this.store = store;\n    this.services = services;\n    this.languageUtils = services.languageUtils;\n    this.options = options;\n    this.logger = baseLogger.create('backendConnector');\n    this.waitingReads = [];\n    this.maxParallelReads = options.maxParallelReads || 10;\n    this.readingCalls = 0;\n    this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;\n    this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;\n    this.state = {};\n    this.queue = [];\n    this.backend?.init?.(services, options.backend, options);\n  }\n  queueLoad(languages, namespaces, options, callback) {\n    const toLoad = {};\n    const pending = {};\n    const toLoadLanguages = {};\n    const toLoadNamespaces = {};\n    languages.forEach(lng => {\n      let hasAllNamespaces = true;\n      namespaces.forEach(ns => {\n        const name = `${lng}|${ns}`;\n        if (!options.reload && this.store.hasResourceBundle(lng, ns)) {\n          this.state[name] = 2;\n        } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {\n          if (pending[name] === undefined) pending[name] = true;\n        } else {\n          this.state[name] = 1;\n          hasAllNamespaces = false;\n          if (pending[name] === undefined) pending[name] = true;\n          if (toLoad[name] === undefined) toLoad[name] = true;\n          if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;\n        }\n      });\n      if (!hasAllNamespaces) toLoadLanguages[lng] = true;\n    });\n    if (Object.keys(toLoad).length || Object.keys(pending).length) {\n      this.queue.push({\n        pending,\n        pendingCount: Object.keys(pending).length,\n        loaded: {},\n        errors: [],\n        callback\n      });\n    }\n    return {\n      toLoad: Object.keys(toLoad),\n      pending: Object.keys(pending),\n      toLoadLanguages: Object.keys(toLoadLanguages),\n      toLoadNamespaces: Object.keys(toLoadNamespaces)\n    };\n  }\n  loaded(name, err, data) {\n    const s = name.split('|');\n    const lng = s[0];\n    const ns = s[1];\n    if (err) this.emit('failedLoading', lng, ns, err);\n    if (!err && data) {\n      this.store.addResourceBundle(lng, ns, data, undefined, undefined, {\n        skipCopy: true\n      });\n    }\n    this.state[name] = err ? -1 : 2;\n    if (err && data) this.state[name] = 0;\n    const loaded = {};\n    this.queue.forEach(q => {\n      pushPath(q.loaded, [lng], ns);\n      removePending(q, name);\n      if (err) q.errors.push(err);\n      if (q.pendingCount === 0 && !q.done) {\n        Object.keys(q.loaded).forEach(l => {\n          if (!loaded[l]) loaded[l] = {};\n          const loadedKeys = q.loaded[l];\n          if (loadedKeys.length) {\n            loadedKeys.forEach(n => {\n              if (loaded[l][n] === undefined) loaded[l][n] = true;\n            });\n          }\n        });\n        q.done = true;\n        if (q.errors.length) {\n          q.callback(q.errors);\n        } else {\n          q.callback();\n        }\n      }\n    });\n    this.emit('loaded', loaded);\n    this.queue = this.queue.filter(q => !q.done);\n  }\n  read(lng, ns, fcName, tried = 0, wait = this.retryTimeout, callback) {\n    if (!lng.length) return callback(null, {});\n    if (this.readingCalls >= this.maxParallelReads) {\n      this.waitingReads.push({\n        lng,\n        ns,\n        fcName,\n        tried,\n        wait,\n        callback\n      });\n      return;\n    }\n    this.readingCalls++;\n    const resolver = (err, data) => {\n      this.readingCalls--;\n      if (this.waitingReads.length > 0) {\n        const next = this.waitingReads.shift();\n        this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);\n      }\n      if (err && data && tried < this.maxRetries) {\n        setTimeout(() => {\n          this.read(lng, ns, fcName, tried + 1, wait * 2, callback);\n        }, wait);\n        return;\n      }\n      callback(err, data);\n    };\n    const fc = this.backend[fcName].bind(this.backend);\n    if (fc.length === 2) {\n      try {\n        const r = fc(lng, ns);\n        if (r && typeof r.then === 'function') {\n          r.then(data => resolver(null, data)).catch(resolver);\n        } else {\n          resolver(null, r);\n        }\n      } catch (err) {\n        resolver(err);\n      }\n      return;\n    }\n    return fc(lng, ns, resolver);\n  }\n  prepareLoading(languages, namespaces, options = {}, callback) {\n    if (!this.backend) {\n      this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n      return callback && callback();\n    }\n    if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);\n    if (isString(namespaces)) namespaces = [namespaces];\n    const toLoad = this.queueLoad(languages, namespaces, options, callback);\n    if (!toLoad.toLoad.length) {\n      if (!toLoad.pending.length) callback();\n      return null;\n    }\n    toLoad.toLoad.forEach(name => {\n      this.loadOne(name);\n    });\n  }\n  load(languages, namespaces, callback) {\n    this.prepareLoading(languages, namespaces, {}, callback);\n  }\n  reload(languages, namespaces, callback) {\n    this.prepareLoading(languages, namespaces, {\n      reload: true\n    }, callback);\n  }\n  loadOne(name, prefix = '') {\n    const s = name.split('|');\n    const lng = s[0];\n    const ns = s[1];\n    this.read(lng, ns, 'read', undefined, undefined, (err, data) => {\n      if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);\n      if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);\n      this.loaded(name, err, data);\n    });\n  }\n  saveMissing(languages, namespace, key, fallbackValue, isUpdate, options = {}, clb = () => {}) {\n    if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {\n      this.logger.warn(`did not save key \"${key}\" as the namespace \"${namespace}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n      return;\n    }\n    if (key === undefined || key === null || key === '') return;\n    if (this.backend?.create) {\n      const opts = {\n        ...options,\n        isUpdate\n      };\n      const fc = this.backend.create.bind(this.backend);\n      if (fc.length < 6) {\n        try {\n          let r;\n          if (fc.length === 5) {\n            r = fc(languages, namespace, key, fallbackValue, opts);\n          } else {\n            r = fc(languages, namespace, key, fallbackValue);\n          }\n          if (r && typeof r.then === 'function') {\n            r.then(data => clb(null, data)).catch(clb);\n          } else {\n            clb(null, r);\n          }\n        } catch (err) {\n          clb(err);\n        }\n      } else {\n        fc(languages, namespace, key, fallbackValue, clb, opts);\n      }\n    }\n    if (!languages || !languages[0]) return;\n    this.store.addResource(languages[0], namespace, key, fallbackValue);\n  }\n}\n\nconst get = () => ({\n  debug: false,\n  initAsync: true,\n  ns: ['translation'],\n  defaultNS: ['translation'],\n  fallbackLng: ['dev'],\n  fallbackNS: false,\n  supportedLngs: false,\n  nonExplicitSupportedLngs: false,\n  load: 'all',\n  preload: false,\n  keySeparator: '.',\n  nsSeparator: ':',\n  pluralSeparator: '_',\n  contextSeparator: '_',\n  enableSelector: false,\n  partialBundledLanguages: false,\n  saveMissing: false,\n  updateMissing: false,\n  saveMissingTo: 'fallback',\n  saveMissingPlurals: true,\n  missingKeyHandler: false,\n  missingInterpolationHandler: false,\n  postProcess: false,\n  postProcessPassResolved: false,\n  returnNull: false,\n  returnEmptyString: true,\n  returnObjects: false,\n  joinArrays: false,\n  returnedObjectHandler: false,\n  parseMissingKeyHandler: false,\n  appendNamespaceToMissingKey: false,\n  appendNamespaceToCIMode: false,\n  overloadTranslationOptionHandler: args => {\n    let ret = {};\n    if (typeof args[1] === 'object') ret = args[1];\n    if (isString(args[1])) ret.defaultValue = args[1];\n    if (isString(args[2])) ret.tDescription = args[2];\n    if (typeof args[2] === 'object' || typeof args[3] === 'object') {\n      const options = args[3] || args[2];\n      Object.keys(options).forEach(key => {\n        ret[key] = options[key];\n      });\n    }\n    return ret;\n  },\n  interpolation: {\n    escapeValue: true,\n    prefix: '{{',\n    suffix: '}}',\n    formatSeparator: ',',\n    unescapePrefix: '-',\n    nestingPrefix: '$t(',\n    nestingSuffix: ')',\n    nestingOptionsSeparator: ',',\n    maxReplaces: 1000,\n    skipOnVariables: true\n  },\n  cacheInBuiltFormats: true\n});\nconst transformOptions = options => {\n  if (isString(options.ns)) options.ns = [options.ns];\n  if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];\n  if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];\n  if (options.supportedLngs && !options.supportedLngs.includes('cimode')) {\n    options.supportedLngs = options.supportedLngs.concat(['cimode']);\n  }\n  return options;\n};\n\nconst noop = () => {};\nconst bindMemberFunctions = inst => {\n  const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));\n  mems.forEach(mem => {\n    if (typeof inst[mem] === 'function') {\n      inst[mem] = inst[mem].bind(inst);\n    }\n  });\n};\nclass I18n extends EventEmitter {\n  constructor(options = {}, callback) {\n    super();\n    this.options = transformOptions(options);\n    this.services = {};\n    this.logger = baseLogger;\n    this.modules = {\n      external: []\n    };\n    bindMemberFunctions(this);\n    if (callback && !this.isInitialized && !options.isClone) {\n      if (!this.options.initAsync) {\n        this.init(options, callback);\n        return this;\n      }\n      setTimeout(() => {\n        this.init(options, callback);\n      }, 0);\n    }\n  }\n  init(options = {}, callback) {\n    this.isInitializing = true;\n    if (typeof options === 'function') {\n      callback = options;\n      options = {};\n    }\n    if (options.defaultNS == null && options.ns) {\n      if (isString(options.ns)) {\n        options.defaultNS = options.ns;\n      } else if (!options.ns.includes('translation')) {\n        options.defaultNS = options.ns[0];\n      }\n    }\n    const defOpts = get();\n    this.options = {\n      ...defOpts,\n      ...this.options,\n      ...transformOptions(options)\n    };\n    this.options.interpolation = {\n      ...defOpts.interpolation,\n      ...this.options.interpolation\n    };\n    if (options.keySeparator !== undefined) {\n      this.options.userDefinedKeySeparator = options.keySeparator;\n    }\n    if (options.nsSeparator !== undefined) {\n      this.options.userDefinedNsSeparator = options.nsSeparator;\n    }\n    if (typeof this.options.overloadTranslationOptionHandler !== 'function') {\n      this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;\n    }\n    const createClassOnDemand = ClassOrObject => {\n      if (!ClassOrObject) return null;\n      if (typeof ClassOrObject === 'function') return new ClassOrObject();\n      return ClassOrObject;\n    };\n    if (!this.options.isClone) {\n      if (this.modules.logger) {\n        baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n      } else {\n        baseLogger.init(null, this.options);\n      }\n      let formatter;\n      if (this.modules.formatter) {\n        formatter = this.modules.formatter;\n      } else {\n        formatter = Formatter;\n      }\n      const lu = new LanguageUtil(this.options);\n      this.store = new ResourceStore(this.options.resources, this.options);\n      const s = this.services;\n      s.logger = baseLogger;\n      s.resourceStore = this.store;\n      s.languageUtils = lu;\n      s.pluralResolver = new PluralResolver(lu, {\n        prepend: this.options.pluralSeparator\n      });\n      if (formatter) {\n        s.formatter = createClassOnDemand(formatter);\n        if (s.formatter.init) s.formatter.init(s, this.options);\n        this.options.interpolation.format = s.formatter.format.bind(s.formatter);\n      }\n      s.interpolator = new Interpolator(this.options);\n      s.utils = {\n        hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n      };\n      s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n      s.backendConnector.on('*', (event, ...args) => {\n        this.emit(event, ...args);\n      });\n      if (this.modules.languageDetector) {\n        s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n        if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);\n      }\n      if (this.modules.i18nFormat) {\n        s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n        if (s.i18nFormat.init) s.i18nFormat.init(this);\n      }\n      this.translator = new Translator(this.services, this.options);\n      this.translator.on('*', (event, ...args) => {\n        this.emit(event, ...args);\n      });\n      this.modules.external.forEach(m => {\n        if (m.init) m.init(this);\n      });\n    }\n    this.format = this.options.interpolation.format;\n    if (!callback) callback = noop;\n    if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n      const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n      if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n    }\n    if (!this.services.languageDetector && !this.options.lng) {\n      this.logger.warn('init: no languageDetector is used and no lng is defined');\n    }\n    const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n    storeApi.forEach(fcName => {\n      this[fcName] = (...args) => this.store[fcName](...args);\n    });\n    const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n    storeApiChained.forEach(fcName => {\n      this[fcName] = (...args) => {\n        this.store[fcName](...args);\n        return this;\n      };\n    });\n    const deferred = defer();\n    const load = () => {\n      const finish = (err, t) => {\n        this.isInitializing = false;\n        if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');\n        this.isInitialized = true;\n        if (!this.options.isClone) this.logger.log('initialized', this.options);\n        this.emit('initialized', this.options);\n        deferred.resolve(t);\n        callback(err, t);\n      };\n      if ((this.languages || this.isLanguageChangingTo) && !this.isInitialized) return finish(null, this.t.bind(this));\n      this.changeLanguage(this.options.lng, finish);\n    };\n    if (this.options.resources || !this.options.initAsync) {\n      load();\n    } else {\n      setTimeout(load, 0);\n    }\n    return deferred;\n  }\n  loadResources(language, callback = noop) {\n    let usedCallback = callback;\n    const usedLng = isString(language) ? language : this.language;\n    if (typeof language === 'function') usedCallback = language;\n    if (!this.options.resources || this.options.partialBundledLanguages) {\n      if (usedLng?.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();\n      const toLoad = [];\n      const append = lng => {\n        if (!lng) return;\n        if (lng === 'cimode') return;\n        const lngs = this.services.languageUtils.toResolveHierarchy(lng);\n        lngs.forEach(l => {\n          if (l === 'cimode') return;\n          if (!toLoad.includes(l)) toLoad.push(l);\n        });\n      };\n      if (!usedLng) {\n        const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n        fallbacks.forEach(l => append(l));\n      } else {\n        append(usedLng);\n      }\n      this.options.preload?.forEach?.(l => append(l));\n      this.services.backendConnector.load(toLoad, this.options.ns, e => {\n        if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);\n        usedCallback(e);\n      });\n    } else {\n      usedCallback(null);\n    }\n  }\n  reloadResources(lngs, ns, callback) {\n    const deferred = defer();\n    if (typeof lngs === 'function') {\n      callback = lngs;\n      lngs = undefined;\n    }\n    if (typeof ns === 'function') {\n      callback = ns;\n      ns = undefined;\n    }\n    if (!lngs) lngs = this.languages;\n    if (!ns) ns = this.options.ns;\n    if (!callback) callback = noop;\n    this.services.backendConnector.reload(lngs, ns, err => {\n      deferred.resolve();\n      callback(err);\n    });\n    return deferred;\n  }\n  use(module) {\n    if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n    if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n    if (module.type === 'backend') {\n      this.modules.backend = module;\n    }\n    if (module.type === 'logger' || module.log && module.warn && module.error) {\n      this.modules.logger = module;\n    }\n    if (module.type === 'languageDetector') {\n      this.modules.languageDetector = module;\n    }\n    if (module.type === 'i18nFormat') {\n      this.modules.i18nFormat = module;\n    }\n    if (module.type === 'postProcessor') {\n      postProcessor.addPostProcessor(module);\n    }\n    if (module.type === 'formatter') {\n      this.modules.formatter = module;\n    }\n    if (module.type === '3rdParty') {\n      this.modules.external.push(module);\n    }\n    return this;\n  }\n  setResolvedLanguage(l) {\n    if (!l || !this.languages) return;\n    if (['cimode', 'dev'].includes(l)) return;\n    for (let li = 0; li < this.languages.length; li++) {\n      const lngInLngs = this.languages[li];\n      if (['cimode', 'dev'].includes(lngInLngs)) continue;\n      if (this.store.hasLanguageSomeTranslations(lngInLngs)) {\n        this.resolvedLanguage = lngInLngs;\n        break;\n      }\n    }\n    if (!this.resolvedLanguage && !this.languages.includes(l) && this.store.hasLanguageSomeTranslations(l)) {\n      this.resolvedLanguage = l;\n      this.languages.unshift(l);\n    }\n  }\n  changeLanguage(lng, callback) {\n    this.isLanguageChangingTo = lng;\n    const deferred = defer();\n    this.emit('languageChanging', lng);\n    const setLngProps = l => {\n      this.language = l;\n      this.languages = this.services.languageUtils.toResolveHierarchy(l);\n      this.resolvedLanguage = undefined;\n      this.setResolvedLanguage(l);\n    };\n    const done = (err, l) => {\n      if (l) {\n        if (this.isLanguageChangingTo === lng) {\n          setLngProps(l);\n          this.translator.changeLanguage(l);\n          this.isLanguageChangingTo = undefined;\n          this.emit('languageChanged', l);\n          this.logger.log('languageChanged', l);\n        }\n      } else {\n        this.isLanguageChangingTo = undefined;\n      }\n      deferred.resolve((...args) => this.t(...args));\n      if (callback) callback(err, (...args) => this.t(...args));\n    };\n    const setLng = lngs => {\n      if (!lng && !lngs && this.services.languageDetector) lngs = [];\n      const fl = isString(lngs) ? lngs : lngs && lngs[0];\n      const l = this.store.hasLanguageSomeTranslations(fl) ? fl : this.services.languageUtils.getBestMatchFromCodes(isString(lngs) ? [lngs] : lngs);\n      if (l) {\n        if (!this.language) {\n          setLngProps(l);\n        }\n        if (!this.translator.language) this.translator.changeLanguage(l);\n        this.services.languageDetector?.cacheUserLanguage?.(l);\n      }\n      this.loadResources(l, err => {\n        done(err, l);\n      });\n    };\n    if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n      setLng(this.services.languageDetector.detect());\n    } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n      if (this.services.languageDetector.detect.length === 0) {\n        this.services.languageDetector.detect().then(setLng);\n      } else {\n        this.services.languageDetector.detect(setLng);\n      }\n    } else {\n      setLng(lng);\n    }\n    return deferred;\n  }\n  getFixedT(lng, ns, keyPrefix, fixedOpts) {\n    const scopeNs = fixedOpts?.scopeNs;\n    const fixedT = (key, opts, ...rest) => {\n      let o;\n      if (typeof opts !== 'object') {\n        o = this.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n      } else {\n        o = {\n          ...opts\n        };\n      }\n      o.lng = o.lng || fixedT.lng;\n      o.lngs = o.lngs || fixedT.lngs;\n      const explicitCallNs = o.ns !== undefined && o.ns !== null;\n      o.ns = o.ns || fixedT.ns;\n      if (o.keyPrefix !== '') o.keyPrefix = o.keyPrefix || keyPrefix || fixedT.keyPrefix;\n      const selectorOpts = {\n        ...this.options,\n        ...o\n      };\n      if (Array.isArray(scopeNs) && !explicitCallNs) selectorOpts.ns = scopeNs;\n      if (typeof o.keyPrefix === 'function') o.keyPrefix = keysFromSelector(o.keyPrefix, selectorOpts);\n      const keySeparator = this.options.keySeparator || '.';\n      let resultKey;\n      if (o.keyPrefix && Array.isArray(key)) {\n        resultKey = key.map(k => {\n          if (typeof k === 'function') k = keysFromSelector(k, selectorOpts);\n          return `${o.keyPrefix}${keySeparator}${k}`;\n        });\n      } else {\n        if (typeof key === 'function') key = keysFromSelector(key, selectorOpts);\n        resultKey = o.keyPrefix ? `${o.keyPrefix}${keySeparator}${key}` : key;\n      }\n      return this.t(resultKey, o);\n    };\n    if (isString(lng)) {\n      fixedT.lng = lng;\n    } else {\n      fixedT.lngs = lng;\n    }\n    fixedT.ns = ns;\n    fixedT.keyPrefix = keyPrefix;\n    return fixedT;\n  }\n  t(...args) {\n    return this.translator?.translate(...args);\n  }\n  exists(...args) {\n    return this.translator?.exists(...args);\n  }\n  setDefaultNamespace(ns) {\n    this.options.defaultNS = ns;\n  }\n  hasLoadedNamespace(ns, options = {}) {\n    if (!this.isInitialized) {\n      this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n      return false;\n    }\n    if (!this.languages || !this.languages.length) {\n      this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n      return false;\n    }\n    const lng = options.lng || this.resolvedLanguage || this.languages[0];\n    const fallbackLng = this.options ? this.options.fallbackLng : false;\n    const lastLng = this.languages[this.languages.length - 1];\n    if (lng.toLowerCase() === 'cimode') return true;\n    const loadNotPending = (l, n) => {\n      const loadState = this.services.backendConnector.state[`${l}|${n}`];\n      return loadState === -1 || loadState === 0 || loadState === 2;\n    };\n    if (options.precheck) {\n      const preResult = options.precheck(this, loadNotPending);\n      if (preResult !== undefined) return preResult;\n    }\n    if (this.hasResourceBundle(lng, ns)) return true;\n    if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;\n    if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n    return false;\n  }\n  loadNamespaces(ns, callback) {\n    const deferred = defer();\n    if (!this.options.ns) {\n      if (callback) callback();\n      return Promise.resolve();\n    }\n    if (isString(ns)) ns = [ns];\n    ns.forEach(n => {\n      if (!this.options.ns.includes(n)) this.options.ns.push(n);\n    });\n    this.loadResources(err => {\n      deferred.resolve();\n      if (callback) callback(err);\n    });\n    return deferred;\n  }\n  loadLanguages(lngs, callback) {\n    const deferred = defer();\n    if (isString(lngs)) lngs = [lngs];\n    const preloaded = this.options.preload || [];\n    const newLngs = lngs.filter(lng => !preloaded.includes(lng) && this.services.languageUtils.isSupportedCode(lng));\n    if (!newLngs.length) {\n      if (callback) callback();\n      return Promise.resolve();\n    }\n    this.options.preload = preloaded.concat(newLngs);\n    this.loadResources(err => {\n      deferred.resolve();\n      if (callback) callback(err);\n    });\n    return deferred;\n  }\n  dir(lng) {\n    if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);\n    if (!lng) return 'rtl';\n    try {\n      const l = new Intl.Locale(lng);\n      if (l && l.getTextInfo) {\n        const ti = l.getTextInfo();\n        if (ti && ti.direction) return ti.direction;\n      }\n    } catch (e) {}\n    const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];\n    const languageUtils = this.services?.languageUtils || new LanguageUtil(get());\n    if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';\n    return rtlLngs.includes(languageUtils.getLanguagePartFromCode(lng)) || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';\n  }\n  static createInstance(options = {}, callback) {\n    const instance = new I18n(options, callback);\n    instance.createInstance = I18n.createInstance;\n    return instance;\n  }\n  cloneInstance(options = {}, callback = noop) {\n    const forkResourceStore = options.forkResourceStore;\n    if (forkResourceStore) delete options.forkResourceStore;\n    const mergedOptions = {\n      ...this.options,\n      ...options,\n      ...{\n        isClone: true\n      }\n    };\n    const clone = new I18n(mergedOptions);\n    if (options.debug !== undefined || options.prefix !== undefined) {\n      clone.logger = clone.logger.clone(options);\n    }\n    const membersToCopy = ['store', 'services', 'language'];\n    membersToCopy.forEach(m => {\n      clone[m] = this[m];\n    });\n    clone.services = {\n      ...this.services\n    };\n    clone.services.utils = {\n      hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n    };\n    if (forkResourceStore) {\n      const clonedData = Object.keys(this.store.data).reduce((prev, l) => {\n        prev[l] = {\n          ...this.store.data[l]\n        };\n        prev[l] = Object.keys(prev[l]).reduce((acc, n) => {\n          acc[n] = {\n            ...prev[l][n]\n          };\n          return acc;\n        }, prev[l]);\n        return prev;\n      }, {});\n      clone.store = new ResourceStore(clonedData, mergedOptions);\n      clone.services.resourceStore = clone.store;\n    }\n    if (options.interpolation) {\n      const defOpts = get();\n      const mergedInterpolation = {\n        ...defOpts.interpolation,\n        ...this.options.interpolation,\n        ...options.interpolation\n      };\n      const mergedForInterpolator = {\n        ...mergedOptions,\n        interpolation: mergedInterpolation\n      };\n      clone.services.interpolator = new Interpolator(mergedForInterpolator);\n    }\n    clone.translator = new Translator(clone.services, mergedOptions);\n    clone.translator.on('*', (event, ...args) => {\n      clone.emit(event, ...args);\n    });\n    clone.init(mergedOptions, callback);\n    clone.translator.options = mergedOptions;\n    clone.translator.backendConnector.services.utils = {\n      hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n    };\n    return clone;\n  }\n  toJSON() {\n    return {\n      options: this.options,\n      store: this.store,\n      language: this.language,\n      languages: this.languages,\n      resolvedLanguage: this.resolvedLanguage\n    };\n  }\n}\nconst instance = I18n.createInstance();\n\nconst createInstance = instance.createInstance;\nconst dir = instance.dir;\nconst init = instance.init;\nconst loadResources = instance.loadResources;\nconst reloadResources = instance.reloadResources;\nconst use = instance.use;\nconst changeLanguage = instance.changeLanguage;\nconst getFixedT = instance.getFixedT;\nconst t = instance.t;\nconst exists = instance.exists;\nconst setDefaultNamespace = instance.setDefaultNamespace;\nconst hasLoadedNamespace = instance.hasLoadedNamespace;\nconst loadNamespaces = instance.loadNamespaces;\nconst loadLanguages = instance.loadLanguages;\n\nexport { changeLanguage, createInstance, instance as default, dir, exists, getFixedT, hasLoadedNamespace, init, keysFromSelector as keyFromSelector, loadLanguages, loadNamespaces, loadResources, reloadResources, setDefaultNamespace, t, use };\n","/*! js-cookie v3.0.8 | MIT */\nfunction assign (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n    for (var key in source) {\n      if (key === '__proto__') continue\n      target[key] = source[key];\n    }\n  }\n  return target\n}\n\nvar defaultConverter = {\n  read: function (value) {\n    if (value[0] === '\"') {\n      value = value.slice(1, -1);\n    }\n    return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n  },\n  write: function (value) {\n    return encodeURIComponent(value).replace(\n      /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n      decodeURIComponent\n    )\n  }\n};\n\nfunction init(converter, defaultAttributes) {\n  function set(name, value, attributes) {\n    if (typeof document === 'undefined') {\n      return\n    }\n\n    attributes = assign({}, defaultAttributes, attributes);\n\n    if (typeof attributes.expires === 'number') {\n      attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n    }\n    if (attributes.expires) {\n      attributes.expires = attributes.expires.toUTCString();\n    }\n\n    name = encodeURIComponent(name)\n      .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n      .replace(/[()]/g, escape);\n\n    var stringifiedAttributes = '';\n    for (var attributeName in attributes) {\n      if (!attributes[attributeName]) {\n        continue\n      }\n\n      stringifiedAttributes += '; ' + attributeName;\n\n      if (attributes[attributeName] === true) {\n        continue\n      }\n\n      // Considers RFC 6265 section 5.2:\n      // ...\n      // 3.  If the remaining unparsed-attributes contains a %x3B (\";\")\n      //     character:\n      // Consume the characters of the unparsed-attributes up to,\n      // not including, the first %x3B (\";\") character.\n      // ...\n      stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n    }\n\n    return (document.cookie =\n      name + '=' + converter.write(value, name) + stringifiedAttributes)\n  }\n\n  function get(name) {\n    if (typeof document === 'undefined' || (arguments.length && !name)) {\n      return\n    }\n\n    // To prevent the for loop in the first place assign an empty array\n    // in case there are no cookies at all.\n    var cookies = document.cookie ? document.cookie.split('; ') : [];\n    var jar = {};\n    for (var i = 0; i < cookies.length; i++) {\n      var parts = cookies[i].split('=');\n      var value = parts.slice(1).join('=');\n\n      try {\n        var found = decodeURIComponent(parts[0]);\n        if (!(found in jar)) jar[found] = converter.read(value, found);\n        if (name === found) {\n          break\n        }\n      } catch (_e) {\n        // Do nothing...\n      }\n    }\n\n    return name ? jar[name] : jar\n  }\n\n  return Object.create(\n    {\n      set: set,\n      get: get,\n      remove: function (name, attributes) {\n        set(\n          name,\n          '',\n          assign({}, attributes, {\n            expires: -1\n          })\n        );\n      },\n      withAttributes: function (attributes) {\n        return init(this.converter, assign({}, this.attributes, attributes))\n      },\n      withConverter: function (converter) {\n        return init(assign({}, this.converter, converter), this.attributes)\n      }\n    },\n    {\n      attributes: { value: Object.freeze(defaultAttributes) },\n      converter: { value: Object.freeze(converter) }\n    }\n  )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n\nexport { api as default };\n","export default function(n){return{all:n=n||new Map,on:function(t,e){var i=n.get(t);i?i.push(e):n.set(t,[e])},off:function(t,e){var i=n.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):n.set(t,[]))},emit:function(t,e){var i=n.get(t);i&&i.slice().map(function(n){n(e)}),(i=n.get(\"*\"))&&i.slice().map(function(n){n(t,e)})}}}\n//# sourceMappingURL=mitt.mjs.map\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//# sourceMappingURL=index.js.map","// 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//# sourceMappingURL=slot.js.map","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//# sourceMappingURL=index.js.map","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//# sourceMappingURL=context.js.map","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//# sourceMappingURL=helpers.js.map","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//# sourceMappingURL=entry.js.map","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//# sourceMappingURL=dep.js.map","// MIT License:\n//\n// Copyright (C) 2022 Fanout, Inc.\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\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell 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\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __values = (this && this.__values) || function(o) {\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n    if (m) return m.call(o);\n    if (o && typeof o.length === \"number\") return {\n        next: function () {\n            if (o && i >= o.length) o = void 0;\n            return { value: o && o[i++], done: !o };\n        }\n    };\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n    if (!m) return o;\n    var i = m.call(o), r, ar = [], e;\n    try {\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n    }\n    catch (error) { e = { error: error }; }\n    finally {\n        try {\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\n        }\n        finally { if (e) throw e.error; }\n    }\n    return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar EventSourceNotAvailableError = /** @class */ (function (_super) {\n    __extends(EventSourceNotAvailableError, _super);\n    function EventSourceNotAvailableError() {\n        return _super.call(this, 'EventSource not available.\\n' +\n            'Consider loading an EventSource polyfill and making it available globally as EventSource, ' +\n            'or passing one in as eventSourceClass to the ReconnectingEventSource constructor.') || this;\n    }\n    return EventSourceNotAvailableError;\n}(Error));\nexport { EventSourceNotAvailableError };\nvar ReconnectingEventSource = /** @class */ (function () {\n    function ReconnectingEventSource(url, configuration) {\n        var _this = this;\n        this.CONNECTING = 0;\n        this.OPEN = 1;\n        this.CLOSED = 2;\n        this._configuration = configuration != null ? Object.assign({}, configuration) : undefined;\n        this.withCredentials = false;\n        this._eventSource = null;\n        this._lastEventId = null;\n        this._timer = null;\n        this._listeners = {};\n        this.url = url.toString();\n        this.readyState = this.CONNECTING;\n        this.max_retry_time = 3000;\n        this.eventSourceClass = globalThis.EventSource;\n        if (this._configuration != null) {\n            if (this._configuration.lastEventId) {\n                this._lastEventId = this._configuration.lastEventId;\n                delete this._configuration['lastEventId'];\n            }\n            if (this._configuration.max_retry_time) {\n                this.max_retry_time = this._configuration.max_retry_time;\n                delete this._configuration['max_retry_time'];\n            }\n            if (this._configuration.eventSourceClass) {\n                this.eventSourceClass = this._configuration.eventSourceClass;\n                delete this._configuration['eventSourceClass'];\n            }\n        }\n        if (this.eventSourceClass == null || typeof this.eventSourceClass !== 'function') {\n            throw new EventSourceNotAvailableError();\n        }\n        this._onevent_wrapped = function (event) { _this._onevent(event); };\n        this._start();\n    }\n    ReconnectingEventSource.prototype.dispatchEvent = function (event) {\n        throw new Error(\"Method not implemented.\");\n    };\n    ReconnectingEventSource.prototype._start = function () {\n        var e_1, _a;\n        var _this = this;\n        var url = this.url;\n        if (this._lastEventId) {\n            if (url.indexOf('?') === -1) {\n                url += '?';\n            }\n            else {\n                url += '&';\n            }\n            url += 'lastEventId=' + encodeURIComponent(this._lastEventId);\n        }\n        this._eventSource = new this.eventSourceClass(url, this._configuration);\n        this._eventSource.onopen = function (event) { _this._onopen(event); };\n        this._eventSource.onerror = function (event) { _this._onerror(event); };\n        this._eventSource.onmessage = function (event) { _this.onmessage(event); };\n        try {\n            // apply listen types\n            for (var _b = __values(Object.keys(this._listeners)), _c = _b.next(); !_c.done; _c = _b.next()) {\n                var type = _c.value;\n                this._eventSource.addEventListener(type, this._onevent_wrapped);\n            }\n        }\n        catch (e_1_1) { e_1 = { error: e_1_1 }; }\n        finally {\n            try {\n                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n            }\n            finally { if (e_1) throw e_1.error; }\n        }\n    };\n    ReconnectingEventSource.prototype._onopen = function (event) {\n        if (this.readyState === 0) {\n            this.readyState = 1;\n            this.onopen(event);\n        }\n    };\n    ReconnectingEventSource.prototype._onerror = function (event) {\n        var _this = this;\n        if (this.readyState === 1) {\n            this.readyState = 0;\n            this.onerror(event);\n        }\n        if (this._eventSource) {\n            if (this._eventSource.readyState === 2) {\n                // reconnect with new object\n                this._eventSource.close();\n                this._eventSource = null;\n                // reconnect after random timeout < max_retry_time\n                var timeout = Math.round(this.max_retry_time * Math.random());\n                this._timer = setTimeout(function () { return _this._start(); }, timeout);\n            }\n        }\n    };\n    ReconnectingEventSource.prototype._onevent = function (event) {\n        var e_2, _a;\n        if (event instanceof MessageEvent) {\n            this._lastEventId = event.lastEventId;\n        }\n        var listenersForType = this._listeners[event.type];\n        if (listenersForType != null) {\n            try {\n                // operate on a copy\n                for (var _b = __values(__spreadArray([], __read(listenersForType), false)), _c = _b.next(); !_c.done; _c = _b.next()) {\n                    var listener = _c.value;\n                    listener.call(this, event);\n                }\n            }\n            catch (e_2_1) { e_2 = { error: e_2_1 }; }\n            finally {\n                try {\n                    if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n                }\n                finally { if (e_2) throw e_2.error; }\n            }\n        }\n        if (event.type === 'message') {\n            this.onmessage(event);\n        }\n    };\n    ReconnectingEventSource.prototype.onopen = function (event) {\n        // may be overridden\n    };\n    ReconnectingEventSource.prototype.onerror = function (event) {\n        // may be overridden\n    };\n    ReconnectingEventSource.prototype.onmessage = function (event) {\n        // may be overridden\n    };\n    ReconnectingEventSource.prototype.close = function () {\n        if (this._timer) {\n            clearTimeout(this._timer);\n            this._timer = null;\n        }\n        if (this._eventSource) {\n            this._eventSource.close();\n            this._eventSource = null;\n        }\n        this.readyState = 2;\n    };\n    ReconnectingEventSource.prototype.addEventListener = function (type, listener, options) {\n        // We don't support the options arg at the moment\n        if (!(type in this._listeners)) {\n            this._listeners[type] = [];\n            if (this._eventSource != null) {\n                this._eventSource.addEventListener(type, this._onevent_wrapped);\n            }\n        }\n        var listenersForType = this._listeners[type];\n        if (Array.isArray(listenersForType) && !listenersForType.includes(listener)) {\n            listenersForType.push(listener);\n        }\n    };\n    ReconnectingEventSource.prototype.removeEventListener = function (type, listener, options) {\n        // We don't support the options arg at the moment\n        var listenersForType = this._listeners[type];\n        if (listenersForType != null) {\n            // eslint-disable-next-line no-constant-condition\n            while (true) {\n                var index = listenersForType.indexOf(listener);\n                if (index === -1) {\n                    break;\n                }\n                listenersForType.splice(index, 1);\n            }\n            if (listenersForType.length <= 0) {\n                delete this._listeners[type];\n                if (this._eventSource != null) {\n                    this._eventSource.removeEventListener(type, this._onevent_wrapped);\n                }\n            }\n        }\n    };\n    // Evidently these are to exist both on the class and the instance\n    ReconnectingEventSource.CONNECTING = 0;\n    ReconnectingEventSource.OPEN = 1;\n    ReconnectingEventSource.CLOSED = 2;\n    return ReconnectingEventSource;\n}());\nexport default ReconnectingEventSource;\n//# sourceMappingURL=reconnecting-eventsource.js.map","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n  extendStatics = Object.setPrototypeOf ||\n      ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n      function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n  return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n  if (typeof b !== \"function\" && b !== null)\n      throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n  extendStatics(d, b);\n  function __() { this.constructor = d; }\n  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n  __assign = Object.assign || function __assign(t) {\n      for (var s, i = 1, n = arguments.length; i < n; i++) {\n          s = arguments[i];\n          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n      }\n      return t;\n  }\n  return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n      t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n      for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n              t[p[i]] = s[p[i]];\n      }\n  return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n  if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n  return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n  return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n  function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n  var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n  var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n  var _, done = false;\n  for (var i = decorators.length - 1; i >= 0; i--) {\n      var context = {};\n      for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n      for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n      context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n      var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n      if (kind === \"accessor\") {\n          if (result === void 0) continue;\n          if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n          if (_ = accept(result.get)) descriptor.get = _;\n          if (_ = accept(result.set)) descriptor.set = _;\n          if (_ = accept(result.init)) initializers.unshift(_);\n      }\n      else if (_ = accept(result)) {\n          if (kind === \"field\") initializers.unshift(_);\n          else descriptor[key] = _;\n      }\n  }\n  if (target) Object.defineProperty(target, contextIn.name, descriptor);\n  done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n  var useValue = arguments.length > 2;\n  for (var i = 0; i < initializers.length; i++) {\n      value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n  }\n  return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n  return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n  if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n  return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n  if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n  return new (P || (P = Promise))(function (resolve, reject) {\n      function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n      function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n      function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n      step((generator = generator.apply(thisArg, _arguments || [])).next());\n  });\n}\n\nexport function __generator(thisArg, body) {\n  var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n  return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n  function verb(n) { return function (v) { return step([n, v]); }; }\n  function step(op) {\n      if (f) throw new TypeError(\"Generator is already executing.\");\n      while (g && (g = 0, op[0] && (_ = 0)), _) try {\n          if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n          if (y = 0, t) op = [op[0] & 2, t.value];\n          switch (op[0]) {\n              case 0: case 1: t = op; break;\n              case 4: _.label++; return { value: op[1], done: false };\n              case 5: _.label++; y = op[1]; op = [0]; continue;\n              case 7: op = _.ops.pop(); _.trys.pop(); continue;\n              default:\n                  if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                  if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                  if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                  if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                  if (t[2]) _.ops.pop();\n                  _.trys.pop(); continue;\n          }\n          op = body.call(thisArg, _);\n      } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n      if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n  }\n}\n\nexport var __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});\n\nexport function __exportStar(m, o) {\n  for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n  var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n  if (m) return m.call(o);\n  if (o && typeof o.length === \"number\") return {\n      next: function () {\n          if (o && i >= o.length) o = void 0;\n          return { value: o && o[i++], done: !o };\n      }\n  };\n  throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n  var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n  if (!m) return o;\n  var i = m.call(o), r, ar = [], e;\n  try {\n      while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n  }\n  catch (error) { e = { error: error }; }\n  finally {\n      try {\n          if (r && !r.done && (m = i[\"return\"])) m.call(i);\n      }\n      finally { if (e) throw e.error; }\n  }\n  return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n  for (var ar = [], i = 0; i < arguments.length; i++)\n      ar = ar.concat(__read(arguments[i]));\n  return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n  for (var r = Array(s), k = 0, i = 0; i < il; i++)\n      for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n          r[k] = a[j];\n  return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n      if (ar || !(i in from)) {\n          if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n          ar[i] = from[i];\n      }\n  }\n  return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n  return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(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 = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n  function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n  function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\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}\n\nexport function __asyncDelegator(o) {\n  var i, p;\n  return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n  function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n  if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n  var m = o[Symbol.asyncIterator], i;\n  return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n  function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n  function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n  if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n  return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n  Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n  o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n  ownKeys = Object.getOwnPropertyNames || function (o) {\n    var ar = [];\n    for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n    return ar;\n  };\n  return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n  if (mod && mod.__esModule) return mod;\n  var result = {};\n  if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n  __setModuleDefault(result, mod);\n  return result;\n}\n\nexport function __importDefault(mod) {\n  return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(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}\n\nexport function __classPrivateFieldSet(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}\n\nexport function __classPrivateFieldIn(state, receiver) {\n  if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n  return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n  if (value !== null && value !== void 0) {\n    if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n    var dispose, inner;\n    if (async) {\n      if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n      dispose = value[Symbol.asyncDispose];\n    }\n    if (dispose === void 0) {\n      if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n      dispose = value[Symbol.dispose];\n      if (async) inner = dispose;\n    }\n    if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n    if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n    env.stack.push({ value: value, dispose: dispose, async: async });\n  }\n  else if (async) {\n    env.stack.push({ async: true });\n  }\n  return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n  var e = new Error(message);\n  return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n  function fail(e) {\n    env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n    env.hasError = true;\n  }\n  var r, s = 0;\n  function next() {\n    while (r = env.stack.pop()) {\n      try {\n        if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n        if (r.dispose) {\n          var result = r.dispose.call(r.value);\n          if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n        }\n        else s |= 1;\n      }\n      catch (e) {\n        fail(e);\n      }\n    }\n    if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n    if (env.hasError) throw env.error;\n  }\n  return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n  if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n      return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n          return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n      });\n  }\n  return path;\n}\n\nexport default {\n  __extends,\n  __assign,\n  __rest,\n  __decorate,\n  __param,\n  __esDecorate,\n  __runInitializers,\n  __propKey,\n  __setFunctionName,\n  __metadata,\n  __awaiter,\n  __generator,\n  __createBinding,\n  __exportStar,\n  __values,\n  __read,\n  __spread,\n  __spreadArrays,\n  __spreadArray,\n  __await,\n  __asyncGenerator,\n  __asyncDelegator,\n  __asyncValues,\n  __makeTemplateObject,\n  __importStar,\n  __importDefault,\n  __classPrivateFieldGet,\n  __classPrivateFieldSet,\n  __classPrivateFieldIn,\n  __addDisposableResource,\n  __disposeResources,\n  __rewriteRelativeImportExtension,\n};\n","const reduxImpl = (reducer, initial) => (set, _get, api) => {\n  api.dispatch = (action) => {\n    set((state) => reducer(state, action), false, action);\n    return action;\n  };\n  api.dispatchFromDevtools = true;\n  return { dispatch: (...args) => api.dispatch(...args), ...initial };\n};\nconst redux = reduxImpl;\n\nconst shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === \"function\";\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n  const api = trackedConnections.get(name);\n  if (!api) return {};\n  return Object.fromEntries(\n    Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n  );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n  if (store === void 0) {\n    return {\n      type: \"untracked\",\n      connection: extensionConnector.connect(options)\n    };\n  }\n  const existingConnection = trackedConnections.get(options.name);\n  if (existingConnection) {\n    return { type: \"tracked\", store, ...existingConnection };\n  }\n  const newConnection = {\n    connection: extensionConnector.connect(options),\n    stores: {}\n  };\n  trackedConnections.set(options.name, newConnection);\n  return { type: \"tracked\", store, ...newConnection };\n};\nconst removeStoreFromTrackedConnections = (name, store) => {\n  if (store === void 0) return;\n  const connectionInfo = trackedConnections.get(name);\n  if (!connectionInfo) return;\n  delete connectionInfo.stores[store];\n  if (Object.keys(connectionInfo.stores).length === 0) {\n    trackedConnections.delete(name);\n  }\n};\nconst v8StackLineRe = /^at (?:new |async )?(.+?) \\(/;\nconst geckoStackLineRe = /^([^@]+)@/;\nfunction findCallerName(stack) {\n  var _a, _b, _c;\n  if (!stack) return void 0;\n  const traceLines = stack.split(\"\\n\");\n  const apiSetStateLineIndex = traceLines.findIndex(\n    (traceLine) => traceLine.includes(\"api.setState\")\n  );\n  if (apiSetStateLineIndex < 0) return void 0;\n  const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || \"\";\n  return ((_b = v8StackLineRe.exec(callerLine)) == null ? void 0 : _b[1]) || ((_c = geckoStackLineRe.exec(callerLine)) == null ? void 0 : _c[1]);\n}\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n  const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n  let extensionConnector;\n  try {\n    extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n  } catch (e) {\n  }\n  if (!extensionConnector) {\n    return fn(set, get, api);\n  }\n  const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n  let isRecording = true;\n  api.setState = ((state, replace, nameOrAction) => {\n    const r = set(state, replace);\n    if (!isRecording) return r;\n    const action = nameOrAction === void 0 ? {\n      type: anonymousActionType || findCallerName(new Error().stack) || \"anonymous\"\n    } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n    if (store === void 0) {\n      connection == null ? void 0 : connection.send(action, get());\n      return r;\n    }\n    connection == null ? void 0 : connection.send(\n      {\n        ...action,\n        type: `${store}/${action.type}`\n      },\n      {\n        ...getTrackedConnectionState(options.name),\n        [store]: api.getState()\n      }\n    );\n    return r;\n  });\n  api.devtools = {\n    cleanup: () => {\n      if (connection && typeof connection.unsubscribe === \"function\") {\n        connection.unsubscribe();\n      }\n      removeStoreFromTrackedConnections(options.name, store);\n    }\n  };\n  const setStateFromDevtools = (...a) => {\n    const originalIsRecording = isRecording;\n    isRecording = false;\n    set(...a);\n    isRecording = originalIsRecording;\n  };\n  const initialState = fn(api.setState, get, api);\n  if (connectionInformation.type === \"untracked\") {\n    connection == null ? void 0 : connection.init(initialState);\n  } else {\n    connectionInformation.stores[connectionInformation.store] = api;\n    connection == null ? void 0 : connection.init(\n      Object.fromEntries(\n        Object.entries(connectionInformation.stores).map(([key, store2]) => [\n          key,\n          key === connectionInformation.store ? initialState : store2.getState()\n        ])\n      )\n    );\n  }\n  if (shouldDispatchFromDevtools(api)) {\n    let didWarnAboutReservedActionType = false;\n    const originalDispatch = api.dispatch;\n    api.dispatch = (...args) => {\n      if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && args[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n        console.warn(\n          '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n        );\n        didWarnAboutReservedActionType = true;\n      }\n      originalDispatch(...args);\n    };\n  }\n  connection.subscribe((message) => {\n    var _a;\n    switch (message.type) {\n      case \"ACTION\":\n        if (typeof message.payload !== \"string\") {\n          console.error(\n            \"[zustand devtools middleware] Unsupported action format\"\n          );\n          return;\n        }\n        return parseJsonThen(\n          message.payload,\n          (action) => {\n            if (action.type === \"__setState\") {\n              if (store === void 0) {\n                setStateFromDevtools(action.state);\n                return;\n              }\n              if (Object.keys(action.state).length !== 1) {\n                console.error(\n                  `\n                    [zustand devtools middleware] Unsupported __setState action format.\n                    When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n                    and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n                    `\n                );\n              }\n              const stateFromDevtools = action.state[store];\n              if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n                return;\n              }\n              if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n                setStateFromDevtools(stateFromDevtools);\n              }\n              return;\n            }\n            if (shouldDispatchFromDevtools(api)) {\n              api.dispatch(action);\n            }\n          }\n        );\n      case \"DISPATCH\":\n        switch (message.payload.type) {\n          case \"RESET\":\n            setStateFromDevtools(initialState);\n            if (store === void 0) {\n              return connection == null ? void 0 : connection.init(api.getState());\n            }\n            return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n          case \"COMMIT\":\n            if (store === void 0) {\n              connection == null ? void 0 : connection.init(api.getState());\n              return;\n            }\n            return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n          case \"ROLLBACK\":\n            return parseJsonThen(message.state, (state) => {\n              if (store === void 0) {\n                setStateFromDevtools(state);\n                connection == null ? void 0 : connection.init(api.getState());\n                return;\n              }\n              setStateFromDevtools(state[store]);\n              connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n            });\n          case \"JUMP_TO_STATE\":\n          case \"JUMP_TO_ACTION\":\n            return parseJsonThen(message.state, (state) => {\n              if (store === void 0) {\n                setStateFromDevtools(state);\n                return;\n              }\n              if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n                setStateFromDevtools(state[store]);\n              }\n            });\n          case \"IMPORT_STATE\": {\n            const { nextLiftedState } = message.payload;\n            const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n            if (!lastComputedState) return;\n            if (store === void 0) {\n              setStateFromDevtools(lastComputedState);\n            } else {\n              setStateFromDevtools(lastComputedState[store]);\n            }\n            connection == null ? void 0 : connection.send(\n              null,\n              // FIXME no-any\n              nextLiftedState\n            );\n            return;\n          }\n          case \"PAUSE_RECORDING\":\n            return isRecording = !isRecording;\n        }\n        return;\n    }\n  });\n  return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, fn) => {\n  let parsed;\n  try {\n    parsed = JSON.parse(stringified);\n  } catch (e) {\n    console.error(\n      \"[zustand devtools middleware] Could not parse the received json\",\n      e\n    );\n  }\n  if (parsed !== void 0) fn(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n  const origSubscribe = api.subscribe;\n  api.subscribe = ((selector, optListener, options) => {\n    let listener = selector;\n    if (optListener) {\n      const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n      let currentSlice = selector(api.getState());\n      listener = (state) => {\n        const nextSlice = selector(state);\n        if (!equalityFn(currentSlice, nextSlice)) {\n          const previousSlice = currentSlice;\n          optListener(currentSlice = nextSlice, previousSlice);\n        }\n      };\n      if (options == null ? void 0 : options.fireImmediately) {\n        optListener(currentSlice, currentSlice);\n      }\n    }\n    return origSubscribe(listener);\n  });\n  const initialState = fn(set, get, api);\n  return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nfunction combine(initialState, create) {\n  return (...args) => Object.assign({}, initialState, create(...args));\n}\n\nfunction createJSONStorage(getStorage, options) {\n  let storage;\n  try {\n    storage = getStorage();\n  } catch (e) {\n    return;\n  }\n  const persistStorage = {\n    getItem: (name) => {\n      var _a;\n      const parse = (str2) => {\n        if (str2 === null) {\n          return null;\n        }\n        return JSON.parse(str2, options == null ? void 0 : options.reviver);\n      };\n      const str = (_a = storage.getItem(name)) != null ? _a : null;\n      if (str instanceof Promise) {\n        return str.then(parse);\n      }\n      return parse(str);\n    },\n    setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)),\n    removeItem: (name) => storage.removeItem(name)\n  };\n  return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n  try {\n    const result = fn(input);\n    if (result instanceof Promise) {\n      return result;\n    }\n    return {\n      then(onFulfilled) {\n        return toThenable(onFulfilled)(result);\n      },\n      catch(_onRejected) {\n        return this;\n      }\n    };\n  } catch (e) {\n    return {\n      then(_onFulfilled) {\n        return this;\n      },\n      catch(onRejected) {\n        return toThenable(onRejected)(e);\n      }\n    };\n  }\n};\nconst persistImpl = (config, baseOptions) => (set, get, api) => {\n  let options = {\n    storage: createJSONStorage(() => window.localStorage),\n    partialize: (state) => state,\n    version: 0,\n    merge: (persistedState, currentState) => ({\n      ...currentState,\n      ...persistedState\n    }),\n    ...baseOptions\n  };\n  let hasHydrated = false;\n  let hydrationVersion = 0;\n  const hydrationListeners = /* @__PURE__ */ new Set();\n  const finishHydrationListeners = /* @__PURE__ */ new Set();\n  let storage = options.storage;\n  if (!storage) {\n    return config(\n      (...args) => {\n        console.warn(\n          `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n        );\n        set(...args);\n      },\n      get,\n      api\n    );\n  }\n  const setItem = () => {\n    const state = options.partialize({ ...get() });\n    return storage.setItem(options.name, {\n      state,\n      version: options.version\n    });\n  };\n  const savedSetState = api.setState;\n  api.setState = (state, replace) => {\n    savedSetState(state, replace);\n    return setItem();\n  };\n  const configResult = config(\n    (...args) => {\n      set(...args);\n      return setItem();\n    },\n    get,\n    api\n  );\n  api.getInitialState = () => configResult;\n  let stateFromStorage;\n  const hydrate = () => {\n    var _a, _b;\n    if (!storage) return;\n    const currentVersion = ++hydrationVersion;\n    hasHydrated = false;\n    hydrationListeners.forEach((cb) => {\n      var _a2;\n      return cb((_a2 = get()) != null ? _a2 : configResult);\n    });\n    const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n    return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n      if (deserializedStorageValue) {\n        if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n          if (options.migrate) {\n            const migration = options.migrate(\n              deserializedStorageValue.state,\n              deserializedStorageValue.version\n            );\n            if (migration instanceof Promise) {\n              return migration.then((result) => [true, result]);\n            }\n            return [true, migration];\n          }\n          console.error(\n            `State loaded from storage couldn't be migrated since no migrate function was provided`\n          );\n        } else {\n          return [false, deserializedStorageValue.state];\n        }\n      }\n      return [false, void 0];\n    }).then((migrationResult) => {\n      var _a2;\n      if (currentVersion !== hydrationVersion) {\n        return;\n      }\n      const [migrated, migratedState] = migrationResult;\n      stateFromStorage = options.merge(\n        migratedState,\n        (_a2 = get()) != null ? _a2 : configResult\n      );\n      set(stateFromStorage, true);\n      if (migrated) {\n        return setItem();\n      }\n    }).then(() => {\n      if (currentVersion !== hydrationVersion) {\n        return;\n      }\n      postRehydrationCallback == null ? void 0 : postRehydrationCallback(get(), void 0);\n      stateFromStorage = get();\n      hasHydrated = true;\n      finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n    }).catch((e) => {\n      if (currentVersion !== hydrationVersion) {\n        return;\n      }\n      postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n    });\n  };\n  api.persist = {\n    setOptions: (newOptions) => {\n      options = {\n        ...options,\n        ...newOptions\n      };\n      if (newOptions.storage) {\n        storage = newOptions.storage;\n      }\n    },\n    clearStorage: () => {\n      ++hydrationVersion;\n      storage == null ? void 0 : storage.removeItem(options.name);\n    },\n    getOptions: () => options,\n    rehydrate: () => hydrate(),\n    hasHydrated: () => hasHydrated,\n    onHydrate: (cb) => {\n      hydrationListeners.add(cb);\n      return () => {\n        hydrationListeners.delete(cb);\n      };\n    },\n    onFinishHydration: (cb) => {\n      finishHydrationListeners.add(cb);\n      return () => {\n        finishHydrationListeners.delete(cb);\n      };\n    }\n  };\n  if (!options.skipHydration) {\n    hydrate();\n  }\n  return stateFromStorage || configResult;\n};\nconst persist = persistImpl;\n\nfunction ssrSafe(config, isSSR = typeof window === \"undefined\") {\n  return (set, get, api) => {\n    if (!isSSR) {\n      return config(set, get, api);\n    }\n    const ssrSet = () => {\n      throw new Error(\"Cannot set state of Zustand store in SSR\");\n    };\n    api.setState = ssrSet;\n    return config(ssrSet, get, api);\n  };\n}\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector, ssrSafe as unstable_ssrSafe };\n","const createStoreImpl = (createState) => {\n  let state;\n  const listeners = /* @__PURE__ */ new Set();\n  const setState = (partial, replace) => {\n    const nextState = typeof partial === \"function\" ? partial(state) : partial;\n    if (!Object.is(nextState, state)) {\n      const previousState = state;\n      state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n      listeners.forEach((listener) => listener(state, previousState));\n    }\n  };\n  const getState = () => state;\n  const getInitialState = () => initialState;\n  const subscribe = (listener) => {\n    listeners.add(listener);\n    return () => listeners.delete(listener);\n  };\n  const api = { setState, getState, getInitialState, subscribe };\n  const initialState = state = createState(setState, getState, api);\n  return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n"],"names":["i","s","e","arguments","r","Promise","Math","Array","Object","a","c","Function","t","TypeError","o","setInterval","clearInterval","Error","Date","setTimeout","clearTimeout","Symbol","m","Map","Set","n","isNaN","String","JSON","WeakMap","RegExp","WeakSet","DOMException","d","window","TextDecoder","fetch","AbortController","encodeURIComponent","h","Reflect","globalThis","self","global","Number","console","g","WeakRef","FinalizationRegistry","queueMicrotask","Uint8Array","Boolean","document","Proxy","setImmediate","process","ArrayBuffer","ex","FormData","Blob","URLSearchParams","navigator","WorkerGlobalScope","URL","decodeURIComponent","btoa","parseInt","f","XMLHttpRequest","ReadableStream","isFinite","Intl","P","u","F","escape","E","MessageEvent","Iterator","AsyncIterator"],"mappings":";4MAOI,EAAc,WACd,SAAS,EAAW,CAAS,EACrB,GACA,KAAI,CAAC,UAAU,CAAG,CAAQ,CAElC,CA4EA,OA3EA,EAAW,SAAS,CAAC,IAAI,CAAG,SAAU,CAAQ,EAC1C,IAAI,EAAa,IAAI,EAGrB,OAFA,EAAW,MAAM,CAAG,IAAI,CACxB,EAAW,QAAQ,CAAG,EACf,CACX,EACA,EAAW,SAAS,CAAC,SAAS,CAAG,SAAU,CAAc,CAAE,CAAK,CAAE,CAAQ,EACtE,IAAI,EAAQ,IAAI,CACZ,EAAa,CA6EzB,SAAsB,CAAK,EACvB,OAAO,AAAC,GAAS,aAAiB,IAAU,EAAM,AAAW,GAH7C,QAAW,AAGkC,EAH5B,IAAI,GAAK,QAAW,AAGQ,EAHF,KAAK,GAAK,QAAW,AAGnB,EAHyB,QAAQ,GAGvB,GAAAA,EAAA,IAAe,EAC1F,EA/EsC,GAAmC,IAAI,IAAc,CAAC,EAAgB,EAAO,GAA3D,EAYhD,MAXA,QAAa,WACT,IAAgB,EAAW,AAAlB,EAAqB,QAAQ,CAAE,EAAS,AAAxC,EAA2C,MAAM,CAC1D,EAAW,GAAG,CAAC,EAEP,EAAS,IAAI,CAAC,EAAY,GAC5B,EAEM,EAAM,UAAU,CAAC,GAEjB,EAAM,aAAa,CAAC,GACpC,GACO,CACX,EACA,EAAW,SAAS,CAAC,aAAa,CAAG,SAAU,CAAI,EAC/C,GAAI,CACA,OAAO,IAAI,CAAC,UAAU,CAAC,EAC3B,CACA,MAAO,EAAK,CACR,EAAK,KAAK,CAAC,EACf,CACJ,EACA,EAAW,SAAS,CAAC,OAAO,CAAG,SAAU,CAAI,CAAE,CA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