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CAAAA,OAHgB,CAKlBnH,EAAL,EAGA,IAAKjoC,CAAAA,EAAc7pC,CAAAA,IAAnB,CACsBw1E,EAApB,CAAA,IAAKuE,CAAAA,EAAL,CAAmC9C,EAAT,CAAYnF,CAAZ,CAA1B,CAAiDztC,CAAAA,SAAjD,CAA2D,CAGzDzL,KAAMA,KAAOu/B,EAAPv/B,EAA2C,CAC3Cu/B,CAAJ,WAAsBx8B,GAAtB,EAKWw8B,CALX,WAK6B58B,GAL7B,EAME6V,CAAA,EAP6C,CAHQ,CAezD5oC,MAAQrF,CAADqF,EAAiB,CACtB0wE,OAAQ1wE,CAAAA,KAAR,CAAc,uCAAd,CAAuDrF,CAAvD,CADsB,CAfiC,CAkBzD6/B,SAAU,EAAAA,EAAK,CAEb,IAAKqB,CAAAA,SAAL,CAAe00C,CAAf,CAAqBC,CAArB,CAAmC5nC,CAAnC,CAFa,CAlB0C,CAA3D,CADF,CATsE,CAoCxEnP,WAAW,EAAA,CACT,IAAK,MAAM+C,CAAX,GAA2B,KAAK6E,CAAAA,EAAhC,CACE7E,CAAa/C,CAAAA,WAAb,EAEF;IAAK4H,CAAAA,EAAL,CAAqB,EAJZ,CA5Cb,CAoDOmwC,KAAAA,EAAP,EAAOA,EAAP,CAAAv6D,MAAOu6D,CAAAA,MAAP,GAAA,IAAA,EAAOA,EAAQC,CAAAA,OAAf,CAAuB,KAAOC,EAAP,EAA4B,CACjDA,CACGC,CAAAA,aADH,EAEGC,CAAAA,QAFH,CAEY,IAAIjB,EAAJ,CAA4Be,CAAOjB,CAAAA,OAAP,EAA5B,CAFZ,CADiD,CAAnD;",
"sources":["blaze-out/k8-opt/bin/java/com/google/devtools/gerritcodereview/plugins/punctual/resources/static/punctual_fe_bin.jstrimmer_bootstrap.js","third_party/java_src/jscomp/java/com/google/javascript/jscomp/js/util/defineproperty.js","third_party/java_src/jscomp/java/com/google/javascript/jscomp/js/util/global.js","third_party/java_src/jscomp/java/com/google/javascript/jscomp/js/util/polyfill.js","third_party/java_src/jscomp/java/com/google/javascript/jscomp/js/es6/dispose.js","javascript/closure/base.js","third_party/javascript/closure/object/object.js","third_party/javascript/closure/string/internal.js","javascript/typescript/contrib/check.ts","third_party/javascript/closure/array/array.js","third_party/javascript/closure/debug/errorcontext.js","third_party/javascript/closure/string/string.js","third_party/javascript/closure/net/xhrio.js","third_party/javascript/closure/async/throwexception.js","blaze-out/k8-opt/bin/third_party/javascript/closure/flags/flags.js","third_party/javascript/closure/labs/useragent/util.js","third_party/javascript/closure/useragent/useragent.js","third_party/javascript/closure/labs/useragent/engine.js","third_party/javascript/closure/crypt/base64.js","javascript/apps/jspb/internal_bytes.js","third_party/javascript/closure/labs/useragent/useragent.js","third_party/javascript/closure/labs/useragent/browser.js","javascript/apps/jspb/bytestring.js","javascript/apps/jspb/exceptions.js","javascript/apps/jspb/internal_options.js","javascript/apps/jspb/internal_symbols.js","javascript/apps/jspb/internal_array_state.js","javascript/apps/jspb/internal.js","javascript/common/asserts/asserts.ts","javascript/common/asserts/guards.ts","javascript/common/bigint/platform.ts","javascript/common/bigint/index.ts","javascript/apps/jspb/binary/utils.js","javascript/apps/jspb/binary/binary_constants.js","javascript/apps/jspb/internal_accessor_helpers.js","javascript/apps/jspb/internal_jspb_adapters.js","javascript/apps/jspb/internal_pivot_selectors.js","javascript/apps/jspb/internal_unknown_fields.js","javascript/apps/jspb/internal_copy.js","javascript/apps/jspb/dynamic_pivot_selection.js","javascript/apps/jspb/internal_construct.js","javascript/apps/jspb/internal_immutability.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$MultiWatchRequest.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/common_jspb/jspb$m$ObjectPath.js","javascript/apps/jspb/internal_operations.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$MultiWatchResponseBatch.Handshake.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/common_jspb/jspb$m$ObjectPath.Part.js","javascript/apps/jspb/message.js","javascript/apps/jspb/internal_transfer_array.js","blaze-out/k8-opt/bin/google/protobuf/timestamp_jspb/jspb$m$Timestamp.js","javascript/apps/jspb/internal_public.js","blaze-out/k8-opt/bin/google/rpc/status_jspb/jspb$m$Status.js","googledata/java/gadgets/features/gapi.util.getOrigin/getorigin_lib.js","ipc/invalidation/javascript/utils/exponentialbackoffdelaygenerator.js","ipc/invalidation/punctual/typescript/impl/client_impl.ts","javascript/abc/libs/gapi/client/auth/sha1.js","javascript/abc/libs/gapi/client/auth/tokencrafter.js","javascript/abc/libs/gapi/client/auth/util.js","third_party/javascript/closure/net/cookies.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/common_jspb/jspb$m$Header.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/common_jspb/jspb$m$ObjectOwner.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/common_jspb/jspb$m$ObjectPath.NullPart.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/common_jspb/jspb$m$Project.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/common_jspb/jspb$m$ObjectId.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/common_jspb/jspb$m$ObjectIdPrefix.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/common_jspb/jspb$m$ObjectChange.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$WatchRequest.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$ChooseServerRequest.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$ChooseServerResponse.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$MultiWatchRequest.Close.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$MultiWatchRequestBatch.js","blaze-out/k8-opt/bin/util/task/status_jspb/jspb$m$StatusProto.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$MultiWatchResponse.Close.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$WatchResponse.Advance.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$WatchResponse.ChangeBatch.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$WatchResponse.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$MultiWatchResponse.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$StreamStatus.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$MultiWatchResponseBatch.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$RefreshCredentialsRequest.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$m$RefreshCredentialsResponse.js","third_party/javascript/closure/disposable/disposable.js","third_party/javascript/closure/events/event.js","third_party/javascript/closure/events/browserfeature.js","third_party/javascript/closure/events/browserevent.js","third_party/javascript/closure/events/eventtype.js","third_party/javascript/closure/events/listenable.js","third_party/javascript/closure/events/listenablekey.js","third_party/javascript/closure/events/listener.js","third_party/javascript/closure/events/listenermap.js","third_party/javascript/closure/events/events.js","third_party/javascript/closure/events/eventtarget.js","third_party/javascript/closure/events/eventhandler.js","third_party/javascript/closure/net/xmlhttpfactory.js","third_party/javascript/closure/labs/net/webchannel.js","ipc/invalidation/punctual/typescript/impl/channel_impl.ts","third_party/javascript/closure/uri/uri.js","blaze-out/k8-opt/bin/google/rpc/code_jspb/jspb$Code.js","third_party/javascript/closure/labs/net/webchannel/webchannelbasetransport.js","ipc/invalidation/punctual/typescript/impl/header.ts","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/common_jspb/jspb$Header.Library.js","ipc/invalidation/punctual/typescript/impl/object_id_impl.ts","ipc/invalidation/punctual/typescript/impl/tokenbucket.ts","ipc/invalidation/punctual/typescript/public/channel_internal.ts","ipc/invalidation/punctual/typescript/public/client.ts","ipc/invalidation/punctual/typescript/public/time.ts","third_party/javascript/closure/math/long.js","ipc/invalidation/punctual/typescript/public/object_id.ts","third_party/javascript/rxjs/src/internal/util/UnsubscriptionError.ts","third_party/javascript/rxjs/src/internal/util/arrRemove.ts","third_party/javascript/rxjs/src/internal/util/isFunction.ts","third_party/javascript/rxjs/src/internal/Subscription.ts","third_party/javascript/rxjs/src/internal/util/noop.ts","third_party/javascript/rxjs/src/internal/util/reportUnhandledError.ts","third_party/javascript/rxjs/src/internal/scheduler/timeoutProvider.ts","third_party/javascript/rxjs/src/internal/Subscriber.ts","third_party/javascript/rxjs/src/internal/symbol/observable.ts","third_party/javascript/rxjs/src/internal/util/identity.ts","third_party/javascript/rxjs/src/internal/util/pipe.ts","third_party/javascript/rxjs/src/internal/Observable.ts","third_party/javascript/rxjs/src/internal/config.ts","third_party/javascript/rxjs/src/internal/util/ObjectUnsubscribedError.ts","third_party/javascript/rxjs/src/internal/Subject.ts","third_party/javascript/rxjs/src/internal/BehaviorSubject.ts","third_party/javascript/rxjs/src/internal/scheduled/scheduleArray.ts","third_party/javascript/rxjs/src/internal/symbol/iterator.ts","third_party/javascript/rxjs/src/internal/observable/from.ts","third_party/javascript/rxjs/src/internal/util/isInteropObservable.ts","third_party/javascript/rxjs/src/internal/util/isArrayLike.ts","third_party/javascript/rxjs/src/internal/util/isPromise.ts","third_party/javascript/rxjs/src/internal/util/isAsyncIterable.ts","third_party/javascript/rxjs/src/internal/util/isIterable.ts","third_party/javascript/rxjs/src/internal/util/throwUnobservableError.ts","third_party/javascript/rxjs/src/internal/util/isScheduler.ts","third_party/javascript/rxjs/src/internal/util/EmptyError.ts","third_party/javascript/rxjs/src/internal/firstValueFrom.ts","third_party/javascript/rxjs/src/internal/operators/OperatorSubscriber.ts","third_party/javascript/rxjs/src/internal/util/lift.ts","third_party/javascript/rxjs/src/internal/operators/map.ts","third_party/javascript/rxjs/src/internal/operators/mergeInternals.ts","third_party/javascript/rxjs/src/internal/operators/mergeMap.ts","third_party/javascript/rxjs/src/internal/observable/never.ts","third_party/javascript/rxjs/src/internal/operators/filter.ts","third_party/javascript/rxjs/src/internal/observable/race.ts","ipc/invalidation/typescript/auth_method.ts","ipc/invalidation/javascript/utils/firstpartyauth.js","buzz/channel/javascript/internal/sharedconstants.ts","ipc/invalidation/typescript/util.ts","third_party/javascript/closure/net/httpstatus.js","javascript/common/async/context/propagate.ts","third_party/javascript/closure/json/json.js","third_party/javascript/closure/net/xmlhttp.js","third_party/javascript/closure/uri/utils.js","third_party/javascript/closure/net/errorcode.js","third_party/javascript/closure/net/eventtype.js","ipc/invalidation/typescript/xhrio.ts","third_party/javascript/closure/structs/structs.js","ipc/invalidation/typescript/jspb_client.ts","third_party/javascript/closure/labs/net/webchannel/requeststats.js","third_party/javascript/closure/async/freelist.js","third_party/javascript/closure/async/workqueue.js","third_party/javascript/closure/async/run.js","third_party/javascript/closure/timer/timer.js","third_party/javascript/closure/async/throttle.js","third_party/javascript/closure/labs/net/webchannel/webchanneldebug.js","third_party/javascript/closure/labs/net/webchannel/channelrequest.js","third_party/javascript/closure/labs/net/webchannel/webchannelbase.js","third_party/javascript/closure/disposable/dispose.js","third_party/javascript/closure/labs/net/webchannel/wirev8.js","third_party/javascript/closure/labs/net/webchannel/forwardchannelrequestpool.js","third_party/javascript/closure/labs/net/webchannel/wire.js","third_party/javascript/closure/labs/net/webchannel/netutils.js","third_party/javascript/closure/json/nativejsonprocessor.js","third_party/javascript/closure/net/fetchxmlhttpfactory.js","third_party/javascript/closure/net/rpc/httpcors.js","third_party/javascript/closure/labs/net/webchanneltransport.js","third_party/javascript/rxjs/src/internal/operators/catchError.ts","third_party/javascript/rxjs/src/internal/operators/concatWith.ts","third_party/javascript/rxjs/src/internal/util/args.ts","third_party/javascript/rxjs/src/internal/operators/mergeAll.ts","third_party/javascript/rxjs/src/internal/operators/concatAll.ts","third_party/javascript/rxjs/src/internal/observable/fromArray.ts","third_party/javascript/rxjs/src/internal/operators/debounce.ts","third_party/javascript/rxjs/src/internal/operators/defaultIfEmpty.ts","third_party/javascript/rxjs/src/internal/operators/take.ts","third_party/javascript/rxjs/src/internal/operators/first.ts","third_party/javascript/rxjs/src/internal/operators/throwIfEmpty.ts","third_party/javascript/rxjs/src/internal/operators/raceWith.ts","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$Affinitization.js","third_party/javascript/closure/labs/net/webchanneltransportfactory.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$WatchRequest.StreamInitiationReason.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$WatchResponse.SignalCase.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/punctual_jspb/jspb$StreamStatus.Code.js","blaze-out/k8-opt/bin/ipc/invalidation/punctual/client/proto/common_jspb/jspb$ObjectPath.Part.PartCase.js","ipc/invalidation/punctual/typescript/impl/project_path.ts","ipc/invalidation/punctual/typescript/public/factory.ts","java/com/google/devtools/gerritcodereview/plugins/punctual/resources/static/plugin.ts"],
"sourcesContent":["var CLOSURE_TOGGLE_ORDINALS = {\n  'GoogFlags__async_throw_on_unicode_to_byte__enable': false,\n  'GoogFlags__client_only_wiz_context_per_component__enable': false,\n  'GoogFlags__client_only_wiz_lazy_tsx__disable': false,\n  'GoogFlags__client_only_wiz_queue_effect_and_on_init_initial_runs__disable': false,\n  'GoogFlags__fixed_noopener_behavior__enable': false,\n  'GoogFlags__jspb_deserialize_binary_int64s_as_gbigint__disable': false,\n  'GoogFlags__jspb_disallow_message_tojson__enable': false,\n  'GoogFlags__jspb_serialize_with_dynamic_pivot_selector__enable': false,\n  'GoogFlags__jspb_throw_in_array_constructor_if_array_is_already_constructed__disable': false,\n  'GoogFlags__jspb_use_constant_default_pivot__enable': false,\n  'GoogFlags__jspb_write_back_bigint__enable': false,\n  'GoogFlags__optimize_get_ei_from_ved__enable': false,\n  'GoogFlags__override_disable_toggles': false,\n  'GoogFlags__testonly_debug_flag__enable': false,\n  'GoogFlags__testonly_disabled_flag__enable': false,\n  'GoogFlags__testonly_stable_flag__disable': false,\n  'GoogFlags__testonly_staging_flag__disable': false,\n  'GoogFlags__use_toggles': false,\n  'GoogFlags__use_user_agent_client_hints__enable': false,\n  'GoogFlags__wiz_enable_native_promise__enable': false,\n};\n","","","","","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Bootstrap for the Google JS Library (Closure).\n *\n * Avoid including base.js more than once. This is strictly discouraged and not\n * supported. goog.require(...) won't work properly in that case.\n *\n * @suppress {deprecated} Users cannot remove deprecated uses here.\n * @provideGoog\n */\n\n\n/**\n * @define {boolean} Overridden to true by the compiler.\n */\nvar COMPILED = false;\n\n\n/**\n * Base namespace for the Closure library.  Checks to see goog is already\n * defined in the current scope before assigning to prevent clobbering if\n * base.js is loaded more than once.\n *\n * @const\n */\nvar goog = goog || {};\n\n/**\n * Reference to the global object.\n * https://www.ecma-international.org/ecma-262/9.0/index.html#sec-global-object\n *\n * More info on this implementation here:\n * https://docs.google.com/document/d/1NAeW4Wk7I7FV0Y2tcUFvQdGMc89k2vdgSXInw8_nvCI/edit\n *\n * @const\n * @suppress {undefinedVars} self won't be referenced unless `this` is falsy.\n * @type {!Global}\n */\ngoog.global =\n    // Check `this` first for backwards compatibility.\n    // Valid unless running as an ES module or in a function wrapper called\n    //   without setting `this` properly.\n    // Note that base.js can't usefully be imported as an ES module, but it may\n    // be compiled into bundles that are loadable as ES modules.\n    this ||\n    // https://developer.mozilla.org/en-US/docs/Web/API/Window/self\n    // For in-page browser environments and workers.\n    self;\n\n\n/**\n * A hook for overriding the define values in uncompiled mode.\n *\n * In uncompiled mode, `CLOSURE_UNCOMPILED_DEFINES` may be defined before\n * loading base.js.  If a key is defined in `CLOSURE_UNCOMPILED_DEFINES`,\n * `goog.define` will use the value instead of the default value.  This\n * allows flags to be overwritten without compilation (this is normally\n * accomplished with the compiler's \"define\" flag).\n *\n * Example:\n * <pre>\n *   var CLOSURE_UNCOMPILED_DEFINES = {'goog.DEBUG': false};\n * </pre>\n *\n * @type {Object<string, (string|number|boolean)>|undefined}\n */\ngoog.global.CLOSURE_UNCOMPILED_DEFINES;\n\n\n/**\n * A hook for overriding the define values in uncompiled or compiled mode,\n * like CLOSURE_UNCOMPILED_DEFINES but effective in compiled code.  In\n * uncompiled code CLOSURE_UNCOMPILED_DEFINES takes precedence.\n *\n * Also unlike CLOSURE_UNCOMPILED_DEFINES the values must be number, boolean or\n * string literals or the compiler will emit an error.\n *\n * While any @define value may be set, only those set with goog.define will be\n * effective for uncompiled code.\n *\n * Example:\n * <pre>\n *   var CLOSURE_DEFINES = {'goog.DEBUG': false} ;\n * </pre>\n *\n * Currently the Closure Compiler will only recognize very simple definitions of\n * this value when looking for values to apply to compiled code and ignore all\n * other references.  Specifically, it looks the value defined at the variable\n * declaration, as with the example above.\n *\n * TODO(b/202066289): Improve the recognized definitions.\n *\n * @type {!Object<string, (string|number|boolean)>|null|undefined}\n */\ngoog.global.CLOSURE_DEFINES;\n\n\n/**\n * Builds an object structure for the provided namespace path, ensuring that\n * names that already exist are not overwritten. For example:\n * \"a.b.c\" -> a = {};a.b={};a.b.c={};\n * Used by goog.provide and goog.exportSymbol.\n * @param {string} name The name of the object that this file defines.\n * @param {*=} object The object to expose at the end of the path.\n * @param {boolean=} overwriteImplicit If object is set and a previous call\n *     implicitly constructed the namespace given by name, this parameter\n *     controls whether object should overwrite the implicitly constructed\n *     namespace or be merged into it. Defaults to false.\n * @param {?Object=} objectToExportTo The object to add the path to; if this\n *     field is not specified, its value defaults to `goog.global`.\n * @private\n */\ngoog.exportPath_ = function(name, object, overwriteImplicit, objectToExportTo) {\n  var parts = name.split('.');\n  var cur = objectToExportTo || goog.global;\n\n  for (var part; parts.length && (part = parts.shift());) {\n    if (!parts.length && object !== undefined) {\n      if (!overwriteImplicit && goog.isObject(object) &&\n          goog.isObject(cur[part])) {\n        // Merge properties on object (the input parameter) with the existing\n        // implicitly defined namespace, so as to not clobber previously\n        // defined child namespaces.\n        for (var prop in object) {\n          if (object.hasOwnProperty(prop)) {\n            cur[part][prop] = object[prop];\n          }\n        }\n      } else {\n        // Either there is no existing implicit namespace, or overwriteImplicit\n        // is set to true, so directly assign object (the input parameter) to\n        // the namespace.\n        cur[part] = object;\n      }\n    } else if (cur[part] && cur[part] !== Object.prototype[part]) {\n      cur = cur[part];\n    } else {\n      cur = cur[part] = {};\n    }\n  }\n};\n\n/**\n * Defines local copies for isolation of multiple chunk set. These values must\n * be set before closure base in order to have goog.define properly work.\n *\n * @suppress {checkVars}\n */\ngoog.CLOSURE_DEFINES = typeof CLOSURE_DEFINES !== 'undefined' ?\n    CLOSURE_DEFINES :\n    goog.global.CLOSURE_DEFINES;\n/**\n * @suppress {checkVars}\n */\ngoog.CLOSURE_UNCOMPILED_DEFINES =\n    typeof CLOSURE_UNCOMPILED_DEFINES !== 'undefined' ?\n    CLOSURE_UNCOMPILED_DEFINES :\n    goog.global.CLOSURE_UNCOMPILED_DEFINES;\n\n/**\n * Defines a named value. In uncompiled mode, the value is retrieved from\n * CLOSURE_DEFINES or CLOSURE_UNCOMPILED_DEFINES if the object is defined and\n * has the property specified, and otherwise used the defined defaultValue.\n * When compiled the default can be overridden using the compiler options or the\n * value set in the CLOSURE_DEFINES object. Returns the defined value so that it\n * can be used safely in modules. Note that the value type MUST be either\n * boolean, number, or string.\n *\n * @suppress {checkVars|lintChecks}\n *\n * @param {string} name The distinguished name to provide.\n * @param {T} defaultValue\n * @return {T} The defined value.\n * @template T\n * @tsType (name: string, defaultValue: boolean): boolean\n * @tsType (name: string, defaultValue: number): number\n * @tsType (name: string, defaultValue: string): string\n */\ngoog.define = function(name, defaultValue) {\n  var value = defaultValue;\n  if (!COMPILED) {\n    // Fallback to goog.global.CLOSURE_UNCOMPILED_DEFINES in the\n    // case that the value is set after closure base. This keeps existing code\n    // working.\n    var uncompiledDefines = goog.CLOSURE_UNCOMPILED_DEFINES ?\n        goog.CLOSURE_UNCOMPILED_DEFINES :\n        goog.global.CLOSURE_UNCOMPILED_DEFINES;\n    // Fallback to goog.global.CLOSURE_DEFINES in the case that the\n    // value is set after closure base. This keeps existing code working.\n    var defines = goog.CLOSURE_DEFINES ? goog.CLOSURE_DEFINES :\n                                         goog.global.CLOSURE_DEFINES;\n    if (uncompiledDefines &&\n        // Anti DOM-clobbering runtime check (b/37736576).\n        /** @type {?} */ (uncompiledDefines).nodeType === undefined &&\n        Object.prototype.hasOwnProperty.call(uncompiledDefines, name)) {\n      value = uncompiledDefines[name];\n    } else if (\n        defines &&\n        // Anti DOM-clobbering runtime check (b/37736576).\n        /** @type {?} */ (defines).nodeType === undefined &&\n        Object.prototype.hasOwnProperty.call(defines, name)) {\n      value = defines[name];\n    }\n  }\n  return value;\n};\n\n\n/**\n * @define {number} Integer year indicating the set of browser features that are\n * guaranteed to be present.  This is defined to include exactly features that\n * work correctly on all \"modern\" browsers that are stable on January 1 of the\n * specified year.  For example,\n * ```js\n * if (goog.FEATURESET_YEAR >= 2019) {\n *   // use APIs known to be available on all major stable browsers Jan 1, 2019\n * } else {\n *   // polyfill for older browsers\n * }\n * ```\n * This is intended to be the primary define for removing\n * unnecessary browser compatibility code (such as ponyfills and workarounds),\n * and should inform the default value for most other defines:\n * ```js\n * const ASSUME_NATIVE_PROMISE =\n *     goog.define('ASSUME_NATIVE_PROMISE', goog.FEATURESET_YEAR >= 2016);\n * ```\n *\n * The default assumption is that IE9 is the lowest supported browser, which was\n * first available Jan 1, 2012.\n *\n * TODO(mathiasb): Reference more thorough documentation when it's available.\n */\ngoog.FEATURESET_YEAR = goog.define('goog.FEATURESET_YEAR', 2012);\n\n\n/**\n * @define {boolean} DEBUG is provided as a convenience so that debugging code\n * that should not be included in a production. It can be easily stripped\n * by specifying --define goog.DEBUG=false to the Closure Compiler aka\n * JSCompiler. For example, most toString() methods should be declared inside an\n * \"if (goog.DEBUG)\" conditional because they are generally used for debugging\n * purposes and it is difficult for the JSCompiler to statically determine\n * whether they are used.\n */\ngoog.DEBUG = goog.define('goog.DEBUG', true);\n\n\n/**\n * @define {string} LOCALE defines the locale being used for compilation. It is\n * used to select locale specific data to be compiled in js binary. BUILD rule\n * can specify this value by \"--define goog.LOCALE=<locale_name>\" as a compiler\n * option.\n *\n * Take into account that the locale code format is important. You should use\n * the canonical Unicode format with hyphen as a delimiter. Language must be\n * lowercase, Language Script - Capitalized, Region - UPPERCASE.\n * There are few examples: pt-BR, en, en-US, sr-Latin-BO, zh-Hans-CN.\n *\n * See more info about locale codes here:\n * http://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers\n *\n * For language codes you should use values defined by ISO 693-1. See it here\n * http://www.w3.org/WAI/ER/IG/ert/iso639.htm. There is only one exception from\n * this rule: the Hebrew language. For legacy reasons the old code (iw) should\n * be used instead of the new code (he).\n *\n * MOE:begin_intracomment_strip\n * See http://g3doc/i18n/identifiers/g3doc/synonyms.\n * MOE:end_intracomment_strip\n */\ngoog.LOCALE = goog.define('goog.LOCALE', 'en');  // default to en\n\n\n/**\n * @define {boolean} Whether this code is running on trusted sites.\n *\n * On untrusted sites, several native functions can be defined or overridden by\n * external libraries like Prototype, Datejs, and JQuery and setting this flag\n * to false forces closure to use its own implementations when possible.\n *\n * If your JavaScript can be loaded by a third party site and you are wary about\n * relying on non-standard implementations, specify\n * \"--define goog.TRUSTED_SITE=false\" to the compiler.\n */\ngoog.TRUSTED_SITE = goog.define('goog.TRUSTED_SITE', true);\n\n\n/**\n * @define {boolean} Whether code that calls {@link goog.setTestOnly} should\n *     be disallowed in the compilation unit.\n */\ngoog.DISALLOW_TEST_ONLY_CODE =\n    goog.define('goog.DISALLOW_TEST_ONLY_CODE', COMPILED && !goog.DEBUG);\n\n\n/**\n * @define {boolean} Whether to use a Chrome app CSP-compliant method for\n *     loading scripts via goog.require. @see appendScriptSrcNode_.\n */\ngoog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING =\n    goog.define('goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING', false);\n\n\n// MOE:begin_strip\n/**\n * Read a flag from the runtime flags object.\n * @param {number} googFlagId Enum ordinal\n * @param {boolean} defaultValue Value to return if the flag is not given\n * @return {boolean}\n */\ngoog.readFlagInternalDoNotUseOrElse = function(googFlagId, defaultValue) {\n  var obj = goog.getObjectByName(goog.FLAGS_OBJECT_);\n  var val = obj && obj[googFlagId];\n  return val != null ? val : defaultValue;\n};\n\n\n/**\n * Name of the object to look for when looking up runtime flag values.  May be a\n * fully qualified object name (e.g. 'foo.bar').\n * @define {string}\n * @private\n */\ngoog.FLAGS_OBJECT_ = goog.define('goog.FLAGS_OBJECT', 'CLOSURE_FLAGS');\n\n\n/**\n * Default value for the STAGING flag.  Defaults to `true`, indicating that\n * flags are enabled by default once they reach the STAGING lifecycle stage.\n * Risk-averse products should set this to `false` in their production builds.\n * This is only necessary for non-Boq products because Boq Web configures this\n * via the goog.flag system by default.\n *\n * @define {boolean}\n */\ngoog.FLAGS_STAGING_DEFAULT = goog.define('goog.FLAGS_STAGING_DEFAULT', true);\n\n/**\n * Defines a local copy for multiple chunk set namespace isolation.\n *\n * @suppress {checkVars}\n */\ngoog.CLOSURE_TOGGLE_ORDINALS = typeof CLOSURE_TOGGLE_ORDINALS === 'object' ?\n    CLOSURE_TOGGLE_ORDINALS :\n    goog.global.CLOSURE_TOGGLE_ORDINALS;\n\n/**\n * Read a toggle's value.  This should not be called directly.  Use the\n * `toggle_provider` build rule instead.  See go/toggle-provider.\n * @param {string} name\n * @return {boolean}\n */\ngoog.readToggleInternalDoNotCallDirectly = function(name) {\n  var ordinals = goog.CLOSURE_TOGGLE_ORDINALS;\n  var ordinal = ordinals && ordinals[name];\n  if (typeof ordinal !== 'number') return Boolean(ordinal);\n  return Boolean(\n      goog.TOGGLES_[Math.floor(ordinal / 30)] & (1 << (ordinal % 30)));\n};\n\n\n/**\n * Bootstrap variable mapping toggle names to ordinals.  This is intended to be\n * read by JSCompiler to replace goog.readToggle...() calls with direct lookups,\n * but is also used by the debug-mode version of the toggle reader.\n * @const {!Object<string, number|boolean>|undefined}\n */\ngoog.global.CLOSURE_TOGGLE_ORDINALS;\n\n\n/**\n * @define {string} Global variable to check for toggles.\n * @private\n */\ngoog.TOGGLE_VAR_ = goog.define('goog.TOGGLE_VAR', '_F_toggles');\n\n\n/** @private @const {!Array<number>} */\ngoog.TOGGLES_ = goog.global[goog.TOGGLE_VAR_] || [];\n// MOE:end_strip\n\n/** @define {boolean} */\ngoog.GENDERED_MESSAGES_ENABLED =\n    goog.define('goog.GENDERED_MESSAGES_ENABLED', true);\n\n/** @private @enum {number} */\ngoog.GrammaticalGender_ = {\n  OTHER: 0,\n  MASCULINE: 1,\n  FEMININE: 2,\n  NEUTER: 3,\n};\n\n/**\n * See go/grammatical-gender-in-capabilities and\n * go/gender-appropriate-ui-jscompiler\n * @private @const {!Object<string, !goog.GrammaticalGender_>}\n */\ngoog.GRAMMATICAL_GENDER_MAP_ = {\n  'FEMININE': goog.GrammaticalGender_.FEMININE,\n  'MASCULINE': goog.GrammaticalGender_.MASCULINE,\n  'NEUTER': goog.GrammaticalGender_.NEUTER,\n};\n\n/**\n * Defines a local copy of viewers grammatical gender for use in gendered\n * messages.  Unknown values are mapped to `OTHER`\n * @private @const {!goog.GrammaticalGender_}\n */\ngoog.viewerGrammaticalGender_ =\n    goog.GRAMMATICAL_GENDER_MAP_[goog.GENDERED_MESSAGES_ENABLED && goog.global['_F_VIEWER_GRAMMATICAL_GENDER']] ||\n    goog.GrammaticalGender_.OTHER;\n\n/**\n * Shared constants for gendered messages based on the value of\n * `goog.viewerGrammaticalGender`\n */\n/** @const */\ngoog.msgKind = {};\n\n/**\n * @const\n * @noinline\n */\ngoog.msgKind.MASCULINE =\n    (goog.viewerGrammaticalGender_ === goog.GrammaticalGender_.MASCULINE);\n\n/**\n * @const\n * @noinline\n */\ngoog.msgKind.FEMININE =\n    (goog.viewerGrammaticalGender_ === goog.GrammaticalGender_.FEMININE);\n\n/**\n * @const\n * @noinline\n */\ngoog.msgKind.NEUTER =\n    (goog.viewerGrammaticalGender_ === goog.GrammaticalGender_.NEUTER);\n\nif (COMPILED && goog.LOCALE == '') {\n  // This code should never execute.  It is here to ensure that the compiler\n  // does not remove the values until goog.LOCALE is defined.\n  goog.logToConsole_('' + [\n    goog.msgKind.MASCULINE, goog.msgKind.FEMININE, goog.msgKind.NEUTER\n  ]);\n}\n\n/**\n * A hook for providing an object that should be used to track the \"legacy\n * namespaces\". The legacy namespace is where symbols from `goog.provide` as\n * well as symbols from `goog.module` with\n * `goog.module.declareLegacyNamespace` are placed.\n *\n * If this isn't specified, `goog.global` will be considered the legacy\n * namespace object.\n *\n * @type {!Object|undefined}\n */\ngoog.global.CLOSURE_UNCOMPILED_LEGACY_NAMESPACE_OBJECT;\n\n\n/**\n * @type {!Object}\n * @private\n */\ngoog.LEGACY_NAMESPACE_OBJECT_ =\n    (!COMPILED &&\n     typeof CLOSURE_UNCOMPILED_LEGACY_NAMESPACE_OBJECT !== 'undefined') ?\n    CLOSURE_UNCOMPILED_LEGACY_NAMESPACE_OBJECT :\n    goog.global;\n\n\n/**\n * Defines a namespace in Closure.\n *\n * A namespace may only be defined once in a codebase. It may be defined using\n * goog.provide() or goog.module().\n *\n * The presence of one or more goog.provide() calls in a file indicates\n * that the file defines the given objects/namespaces.\n * Provided symbols must not be null or undefined.\n *\n * In addition, goog.provide() creates the object stubs for a namespace\n * (for example, goog.provide(\"goog.foo.bar\") will create the object\n * goog.foo.bar if it does not already exist).\n *\n * Build tools also scan for provide/require/module statements\n * to discern dependencies, build dependency files (see deps.js), etc.\n *\n * @see goog.require\n * @see goog.module\n * @param {string} name Namespace provided by this file in the form\n *     \"goog.package.part\".\n * deprecated Use goog.module (see b/159289405)\n */\ngoog.provide = function(name) {\n  if (goog.isInModuleLoader_()) {\n    throw new Error('goog.provide cannot be used within a module.');\n  }\n  if (!COMPILED) {\n    // Ensure that the same namespace isn't provided twice.\n    // A goog.module/goog.provide maps a goog.require to a specific file\n    if (goog.isProvided_(name)) {\n      throw new Error('Namespace \"' + name + '\" already declared.');\n    }\n  }\n\n  goog.constructNamespace_(name);\n};\n\n\n/**\n * @param {string} name Namespace provided by this file in the form\n *     \"goog.package.part\".\n * @param {?Object=} object The object to embed in the namespace.\n * @param {boolean=} overwriteImplicit If object is set and a previous call\n *     implicitly constructed the namespace given by name, this parameter\n *     controls whether opt_obj should overwrite the implicitly constructed\n *     namespace or be merged into it. Defaults to false.\n * @private\n */\ngoog.constructNamespace_ = function(name, object, overwriteImplicit) {\n  if (!COMPILED) {\n    delete goog.implicitNamespaces_[name];\n\n    var namespace = name;\n    while ((namespace = namespace.substring(0, namespace.lastIndexOf('.')))) {\n      if (goog.getObjectByName(namespace, goog.LEGACY_NAMESPACE_OBJECT_)) {\n        break;\n      }\n      goog.implicitNamespaces_[namespace] = true;\n    }\n  }\n\n  goog.exportPath_(\n      name, object, overwriteImplicit, goog.LEGACY_NAMESPACE_OBJECT_);\n};\n\n\n/**\n * According to the CSP3 spec a nonce must be a valid base64 string.\n * @see https://www.w3.org/TR/CSP3/#grammardef-base64-value\n * @private @const\n */\ngoog.NONCE_PATTERN_ = /^[\\w+/_-]+[=]{0,2}$/;\n\n\n/**\n * Returns CSP nonce, if set for any script tag.\n * @param {?Window=} opt_window The window context used to retrieve the nonce.\n *     Defaults to global context.\n * @return {string} CSP nonce or empty string if no nonce is present.\n * @private\n */\ngoog.getScriptNonce_ = function(opt_window) {\n  var doc = (opt_window || goog.global).document;\n  var script = doc.querySelector && doc.querySelector('script[nonce]');\n  if (script) {\n    // Try to get the nonce from the IDL property first, because browsers that\n    // implement additional nonce protection features (currently only Chrome) to\n    // prevent nonce stealing via CSS do not expose the nonce via attributes.\n    // See https://github.com/whatwg/html/issues/2369\n    var nonce = script['nonce'] || script.getAttribute('nonce');\n    if (nonce && goog.NONCE_PATTERN_.test(nonce)) {\n      return nonce;\n    }\n  }\n  return '';\n};\n\n\n/**\n * Module identifier validation regexp.\n * Note: This is a conservative check, it is very possible to be more lenient,\n *   the primary exclusion here is \"/\" and \"\\\" and a leading \".\", these\n *   restrictions are intended to leave the door open for using goog.require\n *   with relative file paths rather than module identifiers.\n * @private\n */\ngoog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/;\n\n\n/**\n * Defines a module in Closure.\n *\n * Marks that this file must be loaded as a module and claims the namespace.\n *\n * A namespace may only be defined once in a codebase. It may be defined using\n * goog.provide() or goog.module().\n *\n * goog.module() has three requirements:\n * - goog.module may not be used in the same file as goog.provide.\n * - goog.module must be the first statement in the file.\n * - only one goog.module is allowed per file.\n *\n * When a goog.module annotated file is loaded, it is enclosed in\n * a strict function closure. This means that:\n * - any variables declared in a goog.module file are private to the file\n * (not global), though the compiler is expected to inline the module.\n * - The code must obey all the rules of \"strict\" JavaScript.\n * - the file will be marked as \"use strict\"\n *\n * NOTE: unlike goog.provide, goog.module does not declare any symbols by\n * itself. If declared symbols are desired, use\n * goog.module.declareLegacyNamespace().\n *\n * MOE:begin_intracomment_strip\n * See the goog.module announcement at http://go/goog.module-announce\n * MOE:end_intracomment_strip\n *\n * See the public goog.module proposal: http://goo.gl/Va1hin\n *\n * @param {string} name Namespace provided by this file in the form\n *     \"goog.package.part\", is expected but not required.\n * @return {void}\n */\ngoog.module = function(name) {\n  if (COMPILED) {\n    // In the optimized code, goog.module calls are complete removed but\n    // due to b/389129315 the function itself is retained.\n    return;\n  }\n  if (typeof name !== 'string' || !name ||\n      name.search(goog.VALID_MODULE_RE_) == -1) {\n    throw new Error('Invalid module identifier');\n  }\n  if (!goog.isInGoogModuleLoader_()) {\n    throw new Error(\n        'Module ' + name + ' has been loaded incorrectly. Note, ' +\n        'modules cannot be loaded as normal scripts. They require some kind of ' +\n        'pre-processing step. You\\'re likely trying to load a module via a ' +\n        'script tag or as a part of a concatenated bundle without rewriting the ' +\n        'module. For more info see: ' +\n        'https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.');\n  }\n  if (goog.moduleLoaderState_.moduleName) {\n    throw new Error('goog.module may only be called once per module.');\n  }\n\n  // Store the module name for the loader.\n  goog.moduleLoaderState_.moduleName = name;\n  // Ensure that the same namespace isn't provided twice.\n  // A goog.module/goog.provide maps a goog.require to a specific file\n  if (goog.isProvided_(name)) {\n    throw new Error('Namespace \"' + name + '\" already declared.');\n  }\n  delete goog.implicitNamespaces_[name];\n};\n\n\n/**\n * @param {string} name The module identifier.\n * @return {?} The module exports for an already loaded module or null.\n *\n * Note: This is not an alternative to goog.require, it does not\n * indicate a hard dependency, instead it is used to indicate\n * an optional dependency or to access the exports of a module\n * that has already been loaded.\n * @suppress {missingProvide}\n */\ngoog.module.get = function(name) {\n  return COMPILED ? null : goog.module.getInternal_(name);\n};\n\n\n/**\n * @param {string} name The module identifier.\n * @return {?} The module exports for an already loaded module or null.\n * @private\n */\ngoog.module.getInternal_ = function(name) {\n  if (!COMPILED) {\n    if (name in goog.loadedModules_) {\n      return goog.loadedModules_[name].exports;\n    } else if (!goog.implicitNamespaces_[name]) {\n      var ns = goog.getObjectByName(name, goog.LEGACY_NAMESPACE_OBJECT_);\n      return ns != null ? ns : null;\n    }\n  }\n  return null;\n};\n\n// MOE:begin_strip\n/**\n * Defines dynamic import execution path for uncompiled mode.\n *\n * @param {string} name The module identifier.\n * @return {?} The module exports for an already loaded module or null.\n *\n * NOTE: In compiled code, JsCompiler will transpile this function call.\n * DO NOT OPENSOURCE\n */\ngoog.requireDynamic = function(name) {\n  if (!COMPILED) {\n    if (!goog.importHandler_ || !goog.uncompiledChunkIdHandler_) {\n      throw new Error('Need to setup import handler and chunk id handler.');\n    }\n    return goog.importHandler_(goog.uncompiledChunkIdHandler_(name))\n        .then(function() {\n          var module = goog.module.getInternal_(name);\n          if (module == null) {\n            throw new Error('Module ' + name + ' is not loaded.');\n          }\n          return module;\n        });\n  }\n  return null;\n};\n\n\n/**\n * Handler for dynamic import.\n * DO NOT OPENSOURCE\n */\ngoog.importHandler_ = null;\n\n\n/**\n * Chunk ID calculator.\n * @private {?function(string)}\n * DO NOT OPENSOURCE\n */\ngoog.uncompiledChunkIdHandler_ = null;\n\n\n/**\n * Sets import handler.\n * @param {function(string)} fn\n * DO NOT OPENSOURCE\n */\ngoog.setImportHandlerInternalDoNotCallOrElse = function(fn) {\n  goog.importHandler_ = fn;\n};\n\n\n/**\n * Sets chunk ID calculator.\n * @param {function(string)} fn\n * NOTE: The chunk ID calculator is only used in uncompiled mode.\n * DO NOT OPENSOURCE\n */\ngoog.setUncompiledChunkIdHandlerInternalDoNotCallOrElse = function(fn) {\n  goog.uncompiledChunkIdHandler_ = fn;\n};\n\n\n/**\n * This exists purely as a hint to JsTrimmer, so that it can convert it to\n * goog.require in certain circumstances.\n *\n * @param {string} namespace\n * DO NOT OPENSOURCE\n */\ngoog.maybeRequireFrameworkInternalOnlyDoNotCallOrElse = function(namespace) {};\n// MOE:end_strip\n\n/**\n * Types of modules the debug loader can load.\n * @enum {string}\n */\ngoog.ModuleType = {\n  ES6: 'es6',\n  GOOG: 'goog'\n};\n\n\n/**\n * @private {?{\n *   moduleName: (string|undefined),\n *   declareLegacyNamespace:boolean,\n *   preventModuleExportSealing:boolean,\n *   type: ?goog.ModuleType\n * }}\n */\ngoog.moduleLoaderState_ = null;\n\n\n/**\n * @private\n * @return {boolean} Whether a goog.module or an es6 module is currently being\n *     initialized.\n */\ngoog.isInModuleLoader_ = function() {\n  return goog.isInGoogModuleLoader_() || goog.isInEs6ModuleLoader_();\n};\n\n\n/**\n * @private\n * @return {boolean} Whether a goog.module is currently being initialized.\n */\ngoog.isInGoogModuleLoader_ = function() {\n  return !!goog.moduleLoaderState_ &&\n      goog.moduleLoaderState_.type == goog.ModuleType.GOOG;\n};\n\n\n/**\n * @private\n * @return {boolean} Whether an es6 module is currently being initialized.\n */\ngoog.isInEs6ModuleLoader_ = function() {\n  var inLoader = !!goog.moduleLoaderState_ &&\n      goog.moduleLoaderState_.type == goog.ModuleType.ES6;\n\n  if (inLoader) {\n    return true;\n  }\n\n  var jscomp = goog.LEGACY_NAMESPACE_OBJECT_['$jscomp'];\n\n  if (jscomp) {\n    // jscomp may not have getCurrentModulePath if this is a compiled bundle\n    // that has some of the runtime, but not all of it. This can happen if\n    // optimizations are turned on so the unused runtime is removed but renaming\n    // and Closure pass are off (so $jscomp is still named $jscomp and the\n    // goog.provide/require calls still exist).\n    if (typeof jscomp.getCurrentModulePath != 'function') {\n      return false;\n    }\n\n    // Bundled ES6 module.\n    return !!jscomp.getCurrentModulePath();\n  }\n\n  return false;\n};\n\n\n/**\n * Provide the module's exports as a globally accessible object under the\n * module's declared name.  This is intended to ease migration to goog.module\n * for files that have existing usages.\n * @suppress {missingProvide}\n */\ngoog.module.declareLegacyNamespace = function() {\n  if (!COMPILED && !goog.isInGoogModuleLoader_()) {\n    throw new Error(\n        'goog.module.declareLegacyNamespace must be called from ' +\n        'within a goog.module');\n  }\n  if (!COMPILED && !goog.moduleLoaderState_.moduleName) {\n    throw new Error(\n        'goog.module must be called prior to ' +\n        'goog.module.declareLegacyNamespace.');\n  }\n  goog.moduleLoaderState_.declareLegacyNamespace = true;\n};\n\n\n/**\n * Ensures that a module's exports object is not sealed after the module is\n * evaluated.\n * @suppress {missingProvide}\n */\ngoog.module.preventModuleExportSealing = function() {\n  if (!COMPILED && !goog.isInGoogModuleLoader_()) {\n    throw new Error(\n        'goog.module.preventModuleExportSealing must be called from ' +\n        'within a goog.module');\n  }\n  if (!COMPILED && !goog.moduleLoaderState_.moduleName) {\n    throw new Error(\n        'goog.module must be called prior to ' +\n        'goog.module.preventModuleExportSealing.');\n  }\n  goog.moduleLoaderState_.preventModuleExportSealing = true;\n};\n\n\n/**\n * Associates an ES6 module with a Closure module ID so that is available via\n * goog.require. The associated ID  acts like a goog.module ID - it does not\n * create any global names, it is merely available via goog.require /\n * goog.module.get / goog.forwardDeclare / goog.requireType. goog.require and\n * goog.module.get will return the entire module as if it was import *'d. This\n * allows Closure files to reference ES6 modules for the sake of migration.\n *\n * @param {string} namespace\n * @suppress {missingProvide}\n */\ngoog.declareModuleId = function(namespace) {\n  if (!COMPILED) {\n    if (!goog.isInEs6ModuleLoader_()) {\n      throw new Error(\n          'goog.declareModuleId may only be called from ' +\n          'within an ES6 module');\n    }\n    if (goog.moduleLoaderState_ && goog.moduleLoaderState_.moduleName) {\n      throw new Error(\n          'goog.declareModuleId may only be called once per module.');\n    }\n    if (namespace in goog.loadedModules_) {\n      throw new Error(\n          'Module with namespace \"' + namespace + '\" already exists.');\n    }\n  }\n  if (goog.moduleLoaderState_) {\n    // Not bundled - debug loading.\n    goog.moduleLoaderState_.moduleName = namespace;\n  } else {\n    // Bundled - not debug loading, no module loader state.\n    var jscomp = goog.LEGACY_NAMESPACE_OBJECT_['$jscomp'];\n    if (!jscomp || typeof jscomp.getCurrentModulePath != 'function') {\n      throw new Error(\n          'Module with namespace \"' + namespace +\n          '\" has been loaded incorrectly.');\n    }\n    var exports = jscomp.require(jscomp.getCurrentModulePath());\n    goog.loadedModules_[namespace] = {\n      exports: exports,\n      type: goog.ModuleType.ES6,\n      moduleId: namespace\n    };\n  }\n};\n\n\n/**\n * Marks that the current file should only be used for testing, and never for\n * live code in production.\n *\n * In the case of unit tests, the message may optionally be an exact namespace\n * for the test (e.g. 'goog.stringTest'). The linter will then ignore the extra\n * provide (if not explicitly defined in the code).\n *\n * @param {string=} opt_message Optional message to add to the error that's\n *     raised when used in production code.\n */\ngoog.setTestOnly = function(opt_message) {\n  if (goog.DISALLOW_TEST_ONLY_CODE) {\n    opt_message = opt_message || '';\n    throw new Error(\n        'Importing test-only code into non-debug environment' +\n        (opt_message ? ': ' + opt_message : '.'));\n  }\n};\n\n\n/**\n * Forward declares a symbol. This is an indication to the compiler that the\n * symbol may be used in the source yet is not required and may not be provided\n * in compilation.\n *\n * The most common usage of forward declaration is code that takes a type as a\n * function parameter but does not need to require it. By forward declaring\n * instead of requiring, no hard dependency is made, and (if not required\n * elsewhere) the namespace may never be required and thus, not be pulled\n * into the JavaScript binary. If it is required elsewhere, it will be type\n * checked as normal.\n *\n * Before using goog.forwardDeclare, please read the documentation at\n * https://github.com/google/closure-compiler/wiki/Bad-Type-Annotation to\n * understand the options and tradeoffs when working with forward declarations.\n *\n * @param {string} name The namespace to forward declare in the form of\n *     \"goog.package.part\".\n * @deprecated See go/noforwarddeclaration, Use `goog.requireType` instead.\n */\ngoog.forwardDeclare = function(name) {};\n\nif (!COMPILED) {\n  /**\n   * Check if the given name has been goog.provided. This will return false for\n   * names that are available only as implicit namespaces.\n   * @param {string} name name of the object to look for.\n   * @return {boolean} Whether the name has been provided.\n   * @private\n   */\n  goog.isProvided_ = function(name) {\n    return (name in goog.loadedModules_) ||\n        (!goog.implicitNamespaces_[name] &&\n         goog.getObjectByName(name, goog.LEGACY_NAMESPACE_OBJECT_) != null);\n  };\n\n  /**\n   * Namespaces implicitly defined by goog.provide. For example,\n   * goog.provide('goog.events.Event') implicitly declares that 'goog' and\n   * 'goog.events' must be namespaces.\n   *\n   * @type {!Object<string, (boolean|undefined)>}\n   * @private\n   */\n  goog.implicitNamespaces_ = {'goog.module': true};\n\n  // NOTE: We add goog.module as an implicit namespace as goog.module is defined\n  // here and because the existing module package has not been moved yet out of\n  // the goog.module namespace. This satisfies both the debug loader and\n  // ahead-of-time dependency management.\n}\n\n\n/**\n * Returns an object based on its fully qualified external name.  The object\n * is not found if null or undefined.  If you are using a compilation pass that\n * renames property names beware that using this function will not find renamed\n * properties.\n *\n * @param {string} name The fully qualified name.\n * @param {Object=} opt_obj The object within which to look; default is\n *     |goog.global|.\n * @return {?} The value (object or primitive) or, if not found, null.\n */\ngoog.getObjectByName = function(name, opt_obj) {\n  var parts = name.split('.');\n  var cur = opt_obj || goog.global;\n  for (var i = 0; i < parts.length; i++) {\n    cur = cur[parts[i]];\n    if (cur == null) {\n      return null;\n    }\n  }\n  return cur;\n};\n\n\n/**\n * Adds a dependency from a file to the files it requires.\n * @param {string} relPath The path to the js file.\n * @param {!Array<string>} provides An array of strings with\n *     the names of the objects this file provides.\n * @param {!Array<string>} requires An array of strings with\n *     the names of the objects this file requires.\n * @param {boolean|!Object<string>=} opt_loadFlags Parameters indicating\n *     how the file must be loaded.  The boolean 'true' is equivalent\n *     to {'module': 'goog'} for backwards-compatibility.  Valid properties\n *     and values include {'module': 'goog'} and {'lang': 'es6'}.\n */\ngoog.addDependency = function(relPath, provides, requires, opt_loadFlags) {\n  if (!COMPILED && goog.DEPENDENCIES_ENABLED) {\n    goog.debugLoader_.addDependency(relPath, provides, requires, opt_loadFlags);\n  }\n};\n\n\n// NOTE(nnaze): The debug DOM loader was included in base.js as an original way\n// to do \"debug-mode\" development.  The dependency system can sometimes be\n// confusing, as can the debug DOM loader's asynchronous nature.\n//\n// With the DOM loader, a call to goog.require() is not blocking -- the script\n// will not load until some point after the current script.  If a namespace is\n// needed at runtime, it needs to be defined in a previous script, or loaded via\n// require() with its registered dependencies.\n//\n// User-defined namespaces may need their own deps file. For a reference on\n// creating a deps file, see:\n// MOE:begin_strip\n// Internally: http://go/deps-files and http://go/be#js_deps\n// MOE:end_strip\n// Externally: https://developers.google.com/closure/library/docs/depswriter\n//\n// Because of legacy clients, the DOM loader can't be easily removed from\n// base.js.  Work was done to make it disableable or replaceable for\n// different environments (DOM-less JavaScript interpreters like Rhino or V8,\n// for example). See bootstrap/ for more information.\n\n\n/**\n * @define {boolean} Whether to enable the debug loader.\n *\n * If enabled, a call to goog.require() will attempt to load the namespace by\n * appending a script tag to the DOM (if the namespace has been registered).\n *\n * If disabled, goog.require() will simply assert that the namespace has been\n * provided (and depend on the fact that some outside tool correctly ordered\n * the script).\n */\ngoog.ENABLE_DEBUG_LOADER = goog.define('goog.ENABLE_DEBUG_LOADER', false);\n\n\n/**\n * @param {string} msg\n * @private\n */\ngoog.logToConsole_ = function(msg) {\n  if (goog.global.console) {\n    goog.global.console['error'](msg);\n  }\n};\n\n\n/**\n * Implements a system for the dynamic resolution of dependencies that works in\n * parallel with the BUILD system.\n *\n * Note that all calls to goog.require will be stripped by the compiler.\n *\n * @see goog.provide\n * @param {string} namespace Namespace (as was given in goog.provide,\n *     goog.module, or goog.declareModuleId) in the form\n *     \"goog.package.part\".\n * @return {?} If called within a goog.module or ES6 module file, the associated\n *     namespace or module otherwise null.\n */\ngoog.require = function(namespace) {\n  if (!COMPILED) {\n    // Might need to lazy load on old IE.\n    if (goog.ENABLE_DEBUG_LOADER) {\n      goog.debugLoader_.requested(namespace);\n    }\n\n    // If the object already exists we do not need to do anything.\n    if (goog.isProvided_(namespace)) {\n      if (goog.isInModuleLoader_()) {\n        return goog.module.getInternal_(namespace);\n      }\n    } else if (goog.ENABLE_DEBUG_LOADER) {\n      var moduleLoaderState = goog.moduleLoaderState_;\n      goog.moduleLoaderState_ = null;\n      try {\n        goog.debugLoader_.load_(namespace);\n      } finally {\n        goog.moduleLoaderState_ = moduleLoaderState;\n      }\n    }\n\n    return null;\n  }\n};\n\n\n/**\n * Requires a symbol for its type information. This is an indication to the\n * compiler that the symbol may appear in type annotations, yet it is not\n * referenced at runtime.\n *\n * When called within a goog.module or ES6 module file, the return value may be\n * assigned to or destructured into a variable, but it may not be otherwise used\n * in code outside of a type annotation.\n *\n * Note that all calls to goog.requireType will be stripped by the compiler.\n *\n * @param {string} namespace Namespace (as was given in goog.provide,\n *     goog.module, or goog.declareModuleId) in the form\n *     \"goog.package.part\".\n * @return {?}\n */\ngoog.requireType = function(namespace) {\n  // Return an empty object so that single-level destructuring of the return\n  // value doesn't crash at runtime when using the debug loader. Multi-level\n  // destructuring isn't supported.\n  return {};\n};\n\n\n/**\n * Path for included scripts.\n * @type {string}\n */\ngoog.basePath = '';\n\n\n/**\n * A hook for overriding the base path.\n * @type {string|undefined}\n */\ngoog.global.CLOSURE_BASE_PATH;\n\n\n/**\n * A function to import a single script. This is meant to be overridden when\n * Closure is being run in non-HTML contexts, such as web workers. It's defined\n * in the global scope so that it can be set before base.js is loaded, which\n * allows deps.js to be imported properly.\n *\n * The first parameter the script source, which is a relative URI. The second,\n * optional parameter is the script contents, in the event the script needed\n * transformation. It should return true if the script was imported, false\n * otherwise.\n * @type {(function(string, string=): boolean)|undefined}\n */\ngoog.global.CLOSURE_IMPORT_SCRIPT;\n\n\n/**\n * When defining a class Foo with an abstract method bar(), you can do:\n * Foo.prototype.bar = goog.abstractMethod\n *\n * Now if a subclass of Foo fails to override bar(), an error will be thrown\n * when bar() is invoked.\n *\n * @type {!Function}\n * @throws {Error} when invoked to indicate the method should be overridden.\n * @deprecated Use \"@abstract\" annotation instead of goog.abstractMethod in new\n *     code. See\n *     https://github.com/google/closure-compiler/wiki/@abstract-classes-and-methods\n */\ngoog.abstractMethod = function() {\n  throw new Error('unimplemented abstract method');\n};\n\n\n/**\n * Adds a `getInstance` static method that always returns the same\n * instance object.\n * @param {!Function} ctor The constructor for the class to add the static\n *     method to.\n * @suppress {missingProperties} 'instance_' isn't a property on 'Function'\n *     but we don't have a better type to use here.\n */\ngoog.addSingletonGetter = function(ctor) {\n  // instance_ is immediately set to prevent issues with sealed constructors\n  // such as are encountered when a constructor is returned as the export object\n  // of a goog.module in unoptimized code.\n  // Declare type to avoid conformance violations that ctor.instance_ is unknown\n  /** @type {undefined|!Object} @suppress {underscore} */\n  ctor.instance_ = undefined;\n  ctor.getInstance = function() {\n    if (ctor.instance_) {\n      return ctor.instance_;\n    }\n    if (goog.DEBUG) {\n      // NOTE: JSCompiler can't optimize away Array#push.\n      goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = ctor;\n    }\n    // Cast to avoid conformance violations that ctor.instance_ is unknown\n    return /** @type {!Object|undefined} */ (ctor.instance_) = new ctor;\n  };\n};\n\n\n/**\n * All singleton classes that have been instantiated, for testing. Don't read\n * it directly, use the `goog.testing.singleton` module. The compiler\n * removes this variable if unused.\n * @type {!Array<!Function>}\n * @private\n */\ngoog.instantiatedSingletons_ = [];\n\n\n/**\n * @define {boolean} Whether to load goog.modules using `eval` when using\n * the debug loader.  This provides a better debugging experience as the\n * source is unmodified and can be edited using Chrome Workspaces or similar.\n * However in some environments the use of `eval` is banned\n * so we provide an alternative.\n */\ngoog.LOAD_MODULE_USING_EVAL = goog.define('goog.LOAD_MODULE_USING_EVAL', true);\n\n\n/**\n * @define {boolean} Whether the exports of goog.modules should be sealed when\n * possible.\n */\ngoog.SEAL_MODULE_EXPORTS = goog.define('goog.SEAL_MODULE_EXPORTS', goog.DEBUG);\n\n\n/**\n * The registry of initialized modules:\n * The module identifier or path to module exports map.\n * @private @const {!Object<string, {exports:?,type:string,moduleId:string}>}\n */\ngoog.loadedModules_ = {};\n\n\n/**\n * True if the debug loader enabled and used.\n * @const {boolean}\n */\ngoog.DEPENDENCIES_ENABLED = !COMPILED && goog.ENABLE_DEBUG_LOADER;\n\n\n\n/**\n * @define {boolean} If true assume that ES modules have already been\n * transpiled by the jscompiler (in the same way that transpile.js would\n * transpile them - to jscomp modules). Useful only for servers that wish to use\n * the debug loader and transpile server side. Thus this is only respected if\n * goog.TRANSPILE is \"never\".\n */\ngoog.ASSUME_ES_MODULES_TRANSPILED =\n    goog.define('goog.ASSUME_ES_MODULES_TRANSPILED', false);\n\n\n/**\n * @define {string} Trusted Types policy name. If non-empty then Closure will\n * use Trusted Types.\n */\ngoog.TRUSTED_TYPES_POLICY_NAME =\n    goog.define('goog.TRUSTED_TYPES_POLICY_NAME', 'goog');\n\n\n/**\n * @param {function(?):?|string} moduleDef The module definition.\n */\ngoog.loadModule = function(moduleDef) {\n  // NOTE: we allow function definitions to be either in the from\n  // of a string to eval (which keeps the original source intact) or\n  // in a eval forbidden environment (CSP) we allow a function definition\n  // which in its body must call `goog.module`, and return the exports\n  // of the module.\n  var previousState = goog.moduleLoaderState_;\n  try {\n    goog.moduleLoaderState_ = {\n      moduleName: '',\n      declareLegacyNamespace: false,\n      preventModuleExportSealing: false,\n      type: goog.ModuleType.GOOG\n    };\n    var origExports = {};\n    var exports = origExports;\n    if (typeof moduleDef === 'function') {\n      exports = moduleDef.call(undefined, exports);\n    } else if (typeof moduleDef === 'string') {\n      exports = goog.loadModuleFromSource_.call(undefined, exports, moduleDef);\n    } else {\n      throw new Error('Invalid module definition');\n    }\n\n    var moduleName = goog.moduleLoaderState_.moduleName;\n    if (typeof moduleName === 'string' && moduleName) {\n      // Don't seal legacy namespaces as they may be used as a parent of\n      // another namespace\n      if (goog.moduleLoaderState_.declareLegacyNamespace) {\n        // Whether exports was overwritten via default export assignment.\n        // This is important for legacy namespaces as it dictates whether\n        // previously a previously loaded implicit namespace should be clobbered\n        // or not.\n        var isDefaultExport = origExports !== exports;\n        goog.constructNamespace_(moduleName, exports, isDefaultExport);\n      } else if (\n          goog.SEAL_MODULE_EXPORTS && Object.seal &&\n          typeof exports == 'object' && exports != null &&\n          !goog.moduleLoaderState_.preventModuleExportSealing) {\n        Object.seal(exports);\n      }\n\n      var data = {\n        exports: exports,\n        type: goog.ModuleType.GOOG,\n        moduleId: goog.moduleLoaderState_.moduleName\n      };\n      goog.loadedModules_[moduleName] = data;\n    } else {\n      throw new Error('Invalid module name \\\"' + moduleName + '\\\"');\n    }\n  } finally {\n    goog.moduleLoaderState_ = previousState;\n  }\n};\n\n\n/**\n * @private @const\n */\ngoog.loadModuleFromSource_ =\n    /** @type {function(!Object, string):?} */ (function(exports) {\n      // NOTE: we avoid declaring parameters or local variables here to avoid\n      // masking globals or leaking values into the module definition.\n      'use strict';\n      eval(goog.CLOSURE_EVAL_PREFILTER_.createScript(arguments[1]));\n      return exports;\n    });\n\n\n/**\n * Normalize a file path by removing redundant \"..\" and extraneous \".\" file\n * path components.\n * @param {string} path\n * @return {string}\n * @private\n */\ngoog.normalizePath_ = function(path) {\n  var components = path.split('/');\n  var i = 0;\n  while (i < components.length) {\n    if (components[i] == '.') {\n      components.splice(i, 1);\n    } else if (\n        i && components[i] == '..' && components[i - 1] &&\n        components[i - 1] != '..') {\n      components.splice(--i, 2);\n    } else {\n      i++;\n    }\n  }\n  return components.join('/');\n};\n\n\n/**\n * Provides a hook for loading a file when using Closure's goog.require() API\n * with goog.modules.  In particular this hook is provided to support Node.js.\n *\n * @type {(function(string):string)|undefined}\n */\ngoog.global.CLOSURE_LOAD_FILE_SYNC;\n\n\n/**\n * Loads file by synchronous XHR. Should not be used in production environments.\n * @param {string} src Source URL.\n * @return {?string} File contents, or null if load failed.\n * @private\n */\ngoog.loadFileSync_ = function(src) {\n  if (goog.global.CLOSURE_LOAD_FILE_SYNC) {\n    return goog.global.CLOSURE_LOAD_FILE_SYNC(src);\n  } else {\n    try {\n      /** @type {XMLHttpRequest} */\n      var xhr = new goog.global['XMLHttpRequest']();\n      xhr.open('get', src, false);\n      xhr.send();\n      // NOTE: Successful http: requests have a status of 200, but successful\n      // file: requests may have a status of zero.  Any other status, or a\n      // thrown exception (particularly in case of file: requests) indicates\n      // some sort of error, which we treat as a missing or unavailable file.\n      return xhr.status == 0 || xhr.status == 200 ? xhr.responseText : null;\n    } catch (err) {\n      // No need to rethrow or log, since errors should show up on their own.\n      return null;\n    }\n  }\n};\n\n//==============================================================================\n// Language Enhancements\n//==============================================================================\n\n\n/**\n * This is a \"fixed\" version of the typeof operator.  It differs from the typeof\n * operator in such a way that null returns 'null' and arrays return 'array'.\n * @param {?} value The value to get the type of.\n * @return {string} The name of the type.\n */\ngoog.typeOf = function(value) {\n  var s = typeof value;\n\n  if (s != 'object') {\n    return s;\n  }\n\n  if (!value) {\n    return 'null';\n  }\n\n  if (Array.isArray(value)) {\n    return 'array';\n  }\n  return s;\n};\n\n\n/**\n * Returns true if the object looks like an array. To qualify as array like\n * the value needs to be either a NodeList or an object with a Number length\n * property. Note that for this function neither strings nor functions are\n * considered \"array-like\".\n *\n * @param {?} val Variable to test.\n * @return {boolean} Whether variable is an array.\n */\ngoog.isArrayLike = function(val) {\n  var type = goog.typeOf(val);\n  // We do not use goog.isObject here in order to exclude function values.\n  return type == 'array' || type == 'object' && typeof val.length == 'number';\n};\n\n\n/**\n * Returns true if the object looks like a Date. To qualify as Date-like the\n * value needs to be an object and have a getFullYear() function.\n * @param {?} val Variable to test.\n * @return {boolean} Whether variable is a like a Date.\n */\ngoog.isDateLike = function(val) {\n  return goog.isObject(val) && typeof val.getFullYear == 'function';\n};\n\n\n/**\n * Returns true if the specified value is an object.  This includes arrays and\n * functions.\n * @param {?} val Variable to test.\n * @return {boolean} Whether variable is an object.\n */\ngoog.isObject = function(val) {\n  var type = typeof val;\n  return type == 'object' && val != null || type == 'function';\n  // return Object(val) === val also works, but is slower, especially if val is\n  // not an object.\n};\n\n\n/**\n * Gets a unique ID for an object. This mutates the object so that further calls\n * with the same object as a parameter returns the same value. The unique ID is\n * guaranteed to be unique across the current session amongst objects that are\n * passed into `getUid`. There is no guarantee that the ID is unique or\n * consistent across sessions. It is unsafe to generate unique ID for function\n * prototypes.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {number} The unique ID for the object.\n */\ngoog.getUid = function(obj) {\n  // TODO(arv): Make the type stricter, do not accept null.\n  return Object.prototype.hasOwnProperty.call(obj, goog.UID_PROPERTY_) &&\n      obj[goog.UID_PROPERTY_] ||\n      (obj[goog.UID_PROPERTY_] = ++goog.uidCounter_);\n};\n\n\n/**\n * Whether the given object is already assigned a unique ID.\n *\n * This does not modify the object.\n *\n * @param {!Object} obj The object to check.\n * @return {boolean} Whether there is an assigned unique id for the object.\n */\ngoog.hasUid = function(obj) {\n  return !!obj[goog.UID_PROPERTY_];\n};\n\n\n/**\n * Removes the unique ID from an object. This is useful if the object was\n * previously mutated using `goog.getUid` in which case the mutation is\n * undone.\n * @param {Object} obj The object to remove the unique ID field from.\n */\ngoog.removeUid = function(obj) {\n  // TODO(arv): Make the type stricter, do not accept null.\n\n  // In IE, DOM nodes are not instances of Object and throw an exception if we\n  // try to delete.  Instead we try to use removeAttribute.\n  if (obj !== null && 'removeAttribute' in obj) {\n    obj.removeAttribute(goog.UID_PROPERTY_);\n  }\n\n  try {\n    delete obj[goog.UID_PROPERTY_];\n  } catch (ex) {\n  }\n};\n\n\n/**\n * Name for unique ID property. Initialized in a way to help avoid collisions\n * with other closure JavaScript on the same page.\n * @type {string}\n * @private\n */\ngoog.UID_PROPERTY_ = 'closure_uid_' + ((Math.random() * 1e9) >>> 0);\n\n\n/**\n * Counter for UID.\n * @type {number}\n * @private\n */\ngoog.uidCounter_ = 0;\n\n\n/**\n * Clones a value. The input may be an Object, Array, or basic type. Objects and\n * arrays will be cloned recursively.\n *\n * WARNINGS:\n * <code>goog.cloneObject</code> does not detect reference loops. Objects that\n * refer to themselves will cause infinite recursion.\n *\n * <code>goog.cloneObject</code> is unaware of unique identifiers, and copies\n * UIDs created by <code>getUid</code> into cloned results.\n *\n * @param {*} obj The value to clone.\n * @return {*} A clone of the input value.\n * @deprecated goog.cloneObject is unsafe. Prefer the goog.object methods.\n */\ngoog.cloneObject = function(obj) {\n  var type = goog.typeOf(obj);\n  if (type == 'object' || type == 'array') {\n    if (typeof obj.clone === 'function') {\n      return obj.clone();\n    }\n    if (typeof Map !== 'undefined' && obj instanceof Map) {\n      return new Map(obj);\n    } else if (typeof Set !== 'undefined' && obj instanceof Set) {\n      return new Set(obj);\n    }\n    var clone = type == 'array' ? [] : {};\n    for (var key in obj) {\n      clone[key] = goog.cloneObject(obj[key]);\n    }\n    return clone;\n  }\n\n  return obj;\n};\n\n\n/**\n * A native implementation of goog.bind.\n * @param {?function(this:T, ...)} fn A function to partially apply.\n * @param {T} selfObj Specifies the object which this should point to when the\n *     function is run.\n * @param {...*} var_args Additional arguments that are partially applied to the\n *     function.\n * @return {!Function} A partially-applied form of the function goog.bind() was\n *     invoked as a method of.\n * @template T\n * @private\n */\ngoog.bindNative_ = function(fn, selfObj, var_args) {\n  return /** @type {!Function} */ (fn.call.apply(fn.bind, arguments));\n};\n\n\n/**\n * A pure-JS implementation of goog.bind.\n * @param {?function(this:T, ...)} fn A function to partially apply.\n * @param {T} selfObj Specifies the object which this should point to when the\n *     function is run.\n * @param {...*} var_args Additional arguments that are partially applied to the\n *     function.\n * @return {!Function} A partially-applied form of the function goog.bind() was\n *     invoked as a method of.\n * @template T\n * @private\n */\ngoog.bindJs_ = function(fn, selfObj, var_args) {\n  if (!fn) {\n    throw new Error();\n  }\n\n  if (arguments.length > 2) {\n    var boundArgs = Array.prototype.slice.call(arguments, 2);\n    return function() {\n      // Prepend the bound arguments to the current arguments.\n      var newArgs = Array.prototype.slice.call(arguments);\n      Array.prototype.unshift.apply(newArgs, boundArgs);\n      return fn.apply(selfObj, newArgs);\n    };\n\n  } else {\n    return function() {\n      return fn.apply(selfObj, arguments);\n    };\n  }\n};\n\n\n/**\n * Partially applies this function to a particular 'this object' and zero or\n * more arguments. The result is a new function with some arguments of the first\n * function pre-filled and the value of this 'pre-specified'.\n *\n * Remaining arguments specified at call-time are appended to the pre-specified\n * ones.\n *\n * Also see: {@link #partial}.\n *\n * Usage:\n * <pre>var barMethBound = goog.bind(myFunction, myObj, 'arg1', 'arg2');\n * barMethBound('arg3', 'arg4');</pre>\n *\n * @param {?function(this:T, ...)} fn A function to partially apply.\n * @param {T} selfObj Specifies the object which this should point to when the\n *     function is run.\n * @param {...*} var_args Additional arguments that are partially applied to the\n *     function.\n * @return {!Function} A partially-applied form of the function goog.bind() was\n *     invoked as a method of.\n * @template T\n * @suppress {deprecated} See above.\n * @deprecated use `=> {}` or Function.prototype.bind instead.\n */\ngoog.bind = function(fn, selfObj, var_args) {\n  // TODO(nicksantos): narrow the type signature.\n  if ((goog.TRUSTED_SITE && goog.FEATURESET_YEAR > 2012) ||\n      (Function.prototype.bind &&\n       // NOTE(nicksantos): Somebody pulled base.js into the default Chrome\n       // extension environment. This means that for Chrome extensions, they get\n       // the implementation of Function.prototype.bind that calls goog.bind\n       // instead of the native one. Even worse, we don't want to introduce a\n       // circular dependency between goog.bind and Function.prototype.bind, so\n       // we have to hack this to make sure it works correctly.\n       Function.prototype.bind.toString().indexOf('native code') != -1)) {\n    goog.bind = goog.bindNative_;\n  } else {\n    goog.bind = goog.bindJs_;\n  }\n  return goog.bind.apply(null, arguments);\n};\n\n\n/**\n * Like goog.bind(), except that a 'this object' is not required. Useful when\n * the target function is already bound.\n *\n * Usage:\n * var g = goog.partial(f, arg1, arg2);\n * g(arg3, arg4);\n *\n * @param {Function} fn A function to partially apply.\n * @param {...*} var_args Additional arguments that are partially applied to fn.\n * @return {!Function} A partially-applied form of the function goog.partial()\n *     was invoked as a method of.\n */\ngoog.partial = function(fn, var_args) {\n  var args = Array.prototype.slice.call(arguments, 1);\n  return function() {\n    // Clone the array (with slice()) and append additional arguments\n    // to the existing arguments.\n    var newArgs = args.slice();\n    newArgs.push.apply(newArgs, arguments);\n    return fn.apply(/** @type {?} */ (this), newArgs);\n  };\n};\n\n\n/**\n * @return {number} An integer value representing the number of milliseconds\n *     between midnight, January 1, 1970 and the current time.\n * @deprecated Use Date.now\n */\ngoog.now = function() {\n  return Date.now();\n};\n\n\n/**\n * Evals JavaScript in the global scope.\n *\n * Throws an exception if eval is not defined.\n * @param {string|!TrustedScript} script JavaScript string.\n */\ngoog.globalEval = function(script) {\n  (0, eval)(script);\n};\n\n\n/**\n * Optional map of CSS class names to obfuscated names used with\n * goog.getCssName().\n * @private {!Object<string, string>|undefined}\n * @see goog.setCssNameMapping\n */\ngoog.cssNameMapping_;\n\n\n/**\n * Optional obfuscation style for CSS class names. Should be set to either\n * 'BY_WHOLE' or 'BY_PART' if defined.\n * @type {string|undefined}\n * @private\n * @see goog.setCssNameMapping\n */\ngoog.cssNameMappingStyle_;\n\n\n\n/**\n * A hook for modifying the default behavior goog.getCssName. The function\n * if present, will receive the standard output of the goog.getCssName as\n * its input.\n *\n * @type {(function(string):string)|undefined}\n */\ngoog.global.CLOSURE_CSS_NAME_MAP_FN;\n\n\n/**\n * Handles strings that are intended to be used as CSS class names.\n *\n * This function works in tandem with @see goog.setCssNameMapping.\n *\n * Without any mapping set, the arguments are simple joined with a hyphen and\n * passed through unaltered.\n *\n * When there is a mapping, there are two possible styles in which these\n * mappings are used. In the BY_PART style, each part (i.e. in between hyphens)\n * of the passed in css name is rewritten according to the map. In the BY_WHOLE\n * style, the full css name is looked up in the map directly. If a rewrite is\n * not specified by the map, the compiler will output a warning.\n *\n * When the mapping is passed to the compiler, it will replace calls to\n * goog.getCssName with the strings from the mapping, e.g.\n *     var x = goog.getCssName('foo');\n *     var y = goog.getCssName(this.baseClass, 'active');\n *  becomes:\n *     var x = 'foo';\n *     var y = this.baseClass + '-active';\n *\n * If one argument is passed it will be processed, if two are passed only the\n * modifier will be processed, as it is assumed the first argument was generated\n * as a result of calling goog.getCssName.\n *\n * @param {string} className The class name.\n * @param {string=} opt_modifier A modifier to be appended to the class name.\n * @return {string} The class name or the concatenation of the class name and\n *     the modifier.\n */\ngoog.getCssName = function(className, opt_modifier) {\n  // String() is used for compatibility with compiled soy where the passed\n  // className can be non-string objects.\n  if (String(className).charAt(0) == '.') {\n    throw new Error(\n        'className passed in goog.getCssName must not start with \".\".' +\n        ' You passed: ' + className);\n  }\n\n  var getMapping = function(cssName) {\n    return goog.cssNameMapping_[cssName] || cssName;\n  };\n\n  var renameByParts = function(cssName) {\n    // Remap all the parts individually.\n    var parts = cssName.split('-');\n    var mapped = [];\n    for (var i = 0; i < parts.length; i++) {\n      mapped.push(getMapping(parts[i]));\n    }\n    return mapped.join('-');\n  };\n\n  var rename;\n  if (goog.cssNameMapping_) {\n    rename =\n        goog.cssNameMappingStyle_ == 'BY_WHOLE' ? getMapping : renameByParts;\n  } else {\n    rename = function(a) {\n      return a;\n    };\n  }\n\n  var result =\n      opt_modifier ? className + '-' + rename(opt_modifier) : rename(className);\n\n  // The special CLOSURE_CSS_NAME_MAP_FN allows users to specify further\n  // processing of the class name.\n  if (goog.global.CLOSURE_CSS_NAME_MAP_FN) {\n    return goog.global.CLOSURE_CSS_NAME_MAP_FN(result);\n  }\n\n  return result;\n};\n\n\n/**\n * Sets the map to check when returning a value from goog.getCssName(). Example:\n * <pre>\n * goog.setCssNameMapping({\n *   \"goog\": \"a\",\n *   \"disabled\": \"b\",\n * });\n *\n * var x = goog.getCssName('goog');\n * // The following evaluates to: \"a a-b\".\n * goog.getCssName('goog') + ' ' + goog.getCssName(x, 'disabled')\n * </pre>\n * When declared as a map of string literals to string literals, the JSCompiler\n * will replace all calls to goog.getCssName() using the supplied map if the\n * --process_closure_primitives flag is set.\n *\n * @param {!Object} mapping A map of strings to strings where keys are possible\n *     arguments to goog.getCssName() and values are the corresponding values\n *     that should be returned.\n * @param {string=} opt_style The style of css name mapping. There are two valid\n *     options: 'BY_PART', and 'BY_WHOLE'.\n * @see goog.getCssName for a description.\n */\ngoog.setCssNameMapping = function(mapping, opt_style) {\n  goog.cssNameMapping_ = mapping;\n  goog.cssNameMappingStyle_ = opt_style;\n};\n\n\n/**\n * To use CSS renaming in compiled mode, one of the input files should have a\n * call to goog.setCssNameMapping() with an object literal that the JSCompiler\n * can extract and use to replace all calls to goog.getCssName(). In uncompiled\n * mode, JavaScript code should be loaded before this base.js file that declares\n * a global variable, CLOSURE_CSS_NAME_MAPPING, which is used below. This is\n * to ensure that the mapping is loaded before any calls to goog.getCssName()\n * are made in uncompiled mode.\n *\n * A hook for overriding the CSS name mapping.\n * @type {!Object<string, string>|undefined}\n */\ngoog.global.CLOSURE_CSS_NAME_MAPPING;\n\n\nif (!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING) {\n  // This does not call goog.setCssNameMapping() because the JSCompiler\n  // requires that goog.setCssNameMapping() be called with an object literal.\n  goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING;\n}\n\n/**\n * Options bag type for `goog.getMsg()` third argument.\n *\n * It is important to note that these options need to be known at compile time,\n * so they must always be provided to `goog.getMsg()` as an actual object\n * literal in the function call. Otherwise, closure-compiler will report an\n * error.\n * @record\n */\ngoog.GetMsgOptions = function() {};\n\n/**\n * If `true`, escape '<' in the message string to '&lt;'.\n *\n * Used by Closure Templates where the generated code size and performance is\n * critical which is why {@link goog.html.SafeHtmlFormatter} is not used.\n * The value must be literal `true` or `false`.\n * @type {boolean|undefined}\n */\ngoog.GetMsgOptions.prototype.html;\n\n/**\n * If `true`, unescape common html entities: &gt;, &lt;, &apos;, &quot; and\n * &amp;.\n *\n * Used for messages not in HTML context, such as with the `textContent`\n * property.\n * The value must be literal `true` or `false`.\n * @type {boolean|undefined}\n */\ngoog.GetMsgOptions.prototype.unescapeHtmlEntities;\n\n/**\n * Associates placeholder names with strings showing how their values are\n * obtained.\n *\n * This field is intended for use in automatically generated JS code.\n * Human-written code should use meaningful placeholder names instead.\n *\n * closure-compiler uses this as the contents of the `<ph>` tag in the\n * XMB file it generates or defaults to `-` for historical reasons.\n *\n * Must be an object literal.\n * Ignored at runtime.\n * Keys are placeholder names.\n * Values are string literals indicating how the value is obtained.\n * Typically this is a snippet of source code.\n * @type {!Object<string, string>|undefined}\n */\ngoog.GetMsgOptions.prototype.original_code;\n\n/**\n * Associates placeholder names with example values.\n *\n * closure-compiler uses this as the contents of the `<ex>` tag in the\n * XMB file it generates or defaults to `-` for historical reasons.\n *\n * Must be an object literal.\n * Ignored at runtime.\n * Keys are placeholder names.\n * Values are string literals containing example placeholder values.\n * (e.g. \"George McFly\" for a name placeholder)\n * @type {!Object<string, string>|undefined}\n */\ngoog.GetMsgOptions.prototype.example;\n\n/**\n * A hook for providing a custom message retrieval function to\n * augment `goog.getMsg`.\n *\n * If an object is assigned to `CLOSURE_P16N_GET_MSG` in the global scope\n * *before* base.js is loaded, `goog.getMsg` will use the function provided\n * under the key 'goog.getMsg' on this object instead of its default\n * implementation. This allows a \"p16n library\" to take over the message\n * localization process.\n *\n * The provided object is expected to have the following structure:\n * <pre>\n *   {\n *     'goog.getMsg': function(string, !Object<string, string>=,\n * !goog.GetMsgOptions=): string, 'declareIcuTemplate': function(string, string,\n * !Object<string, string>=, !goog.GetMsgOptions=): string\n *   }\n * </pre>\n *\n * Example:\n * <pre>\n *   // In a script loaded *before* base.js:\n *   window.CLOSURE_P16N_GET_MSG = {\n *     'goog.getMsg': function(str, opt_values, opt_options) {\n *       // Custom logic to fetch and format the message from a p16n system.\n *       // 'str' is the original message string.\n *       // 'opt_values' is the placeholder map.\n *       // 'opt_options' are options like html/unescapeHtmlEntities.\n *       return p16nLibrary.getLocalizedMessage(str, opt_values, opt_options);\n *     },\n *     'declareIcuTemplate': function(templateString, name, opt_values,\n * opt_options) {\n *       // Custom logic to declare an ICU template.\n *       return p16nLibrary.declareIcuTemplate(templateString, name, opt_values,\n * opt_options);\n *     }\n *   };\n * </pre>\n *\n *\n * @type {({\n *   'goog.getMsg': (function(string, !Object<string, string>=,\n * !goog.GetMsgOptions=): string), 'declareIcuTemplate': (function(string,\n * string, !Object<string, string>=, !goog.GetMsgOptions=): string)\n * }|undefined)}\n */\ngoog.global.CLOSURE_P16N_GET_MSG;\n\n/**\n * @define {boolean} Whether to use the global CLOSURE_P16N_GET_MSG override for\n * goog.getMsg.\n */\ngoog.USE_GET_MSG_OVERRIDE = goog.define('goog.USE_GET_MSG_OVERRIDE', false);\n\n/**\n * Gets a localized message.\n *\n * This function is a compiler primitive. If you give the compiler a localized\n * message bundle, it will replace the string at compile-time with a localized\n * version, and expand goog.getMsg call to a concatenated string.\n *\n * Messages must be initialized in the form:\n * <code>\n * var MSG_NAME = goog.getMsg('Hello {$placeholder}', {'placeholder': 'world'});\n * </code>\n *\n * This function produces a string which should be treated as plain text. Use\n * {@link goog.html.SafeHtmlFormatter} in conjunction with goog.getMsg to\n * produce SafeHtml.\n *\n * @param {string} str Translatable string, places holders in the form {$foo}.\n * @param {!Object<string, string>=} opt_values Maps place holder name to value.\n * @param {!goog.GetMsgOptions=} opt_options see `goog.GetMsgOptions`\n * @return {string} message with placeholders filled.\n */\ngoog.getMsg = function(str, opt_values, opt_options) {\n  if (goog.USE_GET_MSG_OVERRIDE && !COMPILED) {\n    if (goog.global.CLOSURE_P16N_GET_MSG &&\n        goog.global.CLOSURE_P16N_GET_MSG['goog.getMsg'] != undefined) {\n      str = goog.global.CLOSURE_P16N_GET_MSG['goog.getMsg'](\n          str, opt_values, opt_options);\n    } else {\n      throw new Error('Closure p16n getMsg override is not available.');\n    }\n  }\n  if (opt_options && opt_options.html) {\n    // Note that '&' is not replaced because the translation can contain HTML\n    // entities.\n    str = str.replace(/</g, '&lt;');\n  }\n  if (opt_options && opt_options.unescapeHtmlEntities) {\n    // Note that \"&amp;\" must be the last to avoid \"creating\" new entities.\n    str = str.replace(/&lt;/g, '<')\n              .replace(/&gt;/g, '>')\n              .replace(/&apos;/g, '\\'')\n              .replace(/&quot;/g, '\"')\n              .replace(/&amp;/g, '&');\n  }\n  if (opt_values) {\n    str = str.replace(/\\{\\$([^}]+)}/g, function(match, key) {\n      return (opt_values != null && key in opt_values) ? opt_values[key] :\n                                                         match;\n    });\n  }\n  return str;\n};\n\n\n/**\n * Gets a localized message. If the message does not have a translation, gives a\n * fallback message.\n *\n * This is useful when introducing a new message that has not yet been\n * translated into all languages.\n *\n * This function is a compiler primitive. Must be used in the form:\n * <code>var x = goog.getMsgWithFallback(MSG_A, MSG_B);</code>\n * where MSG_A and MSG_B were initialized with goog.getMsg.\n *\n * @param {string} a The preferred message.\n * @param {string} b The fallback message.\n * @return {string} The best translated message.\n */\ngoog.getMsgWithFallback = function(a, b) {\n  return a;\n};\n\n\n/**\n * Exposes an unobfuscated global namespace path for the given object.\n * Note that fields of the exported object *will* be obfuscated, unless they are\n * exported in turn via this function or goog.exportProperty.\n *\n * Also handy for making public items that are defined in anonymous closures.\n *\n * ex. goog.exportSymbol('public.path.Foo', Foo);\n *\n * ex. goog.exportSymbol('public.path.Foo.staticFunction', Foo.staticFunction);\n *     public.path.Foo.staticFunction();\n *\n * ex. goog.exportSymbol('public.path.Foo.prototype.myMethod',\n *                       Foo.prototype.myMethod);\n *     new public.path.Foo().myMethod();\n *\n * @param {string} publicPath Unobfuscated name to export.\n * @param {*} object Object the name should point to.\n * @param {?Object=} objectToExportTo The object to add the path to; default\n *     is goog.global.\n */\ngoog.exportSymbol = function(publicPath, object, objectToExportTo) {\n  goog.exportPath_(\n      publicPath, object, /* overwriteImplicit= */ true, objectToExportTo);\n};\n\n\n/**\n * Exports a property unobfuscated into the object's namespace.\n * ex. goog.exportProperty(Foo, 'staticFunction', Foo.staticFunction);\n * ex. goog.exportProperty(Foo.prototype, 'myMethod', Foo.prototype.myMethod);\n * @param {Object} object Object whose static property is being exported.\n * @param {string} publicName Unobfuscated name to export.\n * @param {*} symbol Object the name should point to.\n */\ngoog.exportProperty = function(object, publicName, symbol) {\n  object[publicName] = symbol;\n};\n\n\n/**\n * Returns the value of a given name, or undefined if there are no other\n * references to the name.\n *\n * This function is evaluated statically, at compile time, as long as the\n * appropriate compiler passes are enabled.  If these compiler passes are not\n * enabled, the function is a no-op, and will just return its argument\n * unmodified.\n *\n * Usage:\n * <pre>\n * // If there are other references to `x`, `xOrUndefined` will be `x`.\n * // Otherwise, `xOrUndefined` will be `undefined`.\n * var xOrUndefined = goog.weakUsage(x);\n * </pre>\n *\n * It is an error to call `goog.weakUsage` with an argument that is not a name.\n *\n * @param {T} name A symbol name to reference weakly.\n * @return {T|undefined} The object or undefined.\n * @template T\n * @noinline\n */\ngoog.weakUsage = function(name) {\n  return name;\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * Usage:\n * <pre>\n * function ParentClass(a, b) { }\n * ParentClass.prototype.foo = function(a) { };\n *\n * function ChildClass(a, b, c) {\n *   ChildClass.base(this, 'constructor', a, b);\n * }\n * goog.inherits(ChildClass, ParentClass);\n *\n * var child = new ChildClass('a', 'b', 'see');\n * child.foo(); // This works.\n * </pre>\n *\n * @param {!Function} childCtor Child class.\n * @param {!Function} parentCtor Parent class.\n * @suppress {strictMissingProperties} superClass_ and base is not defined on\n *    Function.\n * @deprecated Use ECMAScript class syntax instead.\n */\ngoog.inherits = function(childCtor, parentCtor) {\n  /** @constructor */\n  function tempCtor() {}\n  tempCtor.prototype = parentCtor.prototype;\n  childCtor.superClass_ = parentCtor.prototype;\n  childCtor.prototype = new tempCtor();\n  /** @override */\n  childCtor.prototype.constructor = childCtor;\n\n  /**\n   * Calls superclass constructor/method.\n   *\n   * This function is only available if you use goog.inherits to\n   * express inheritance relationships between classes.\n   *\n   * NOTE: This is a replacement for goog.base and for superClass_\n   * property defined in childCtor.\n   *\n   * @param {!Object} me Should always be \"this\".\n   * @param {string} methodName The method name to call. Calling\n   *     superclass constructor can be done with the special string\n   *     'constructor'.\n   * @param {...*} var_args The arguments to pass to superclass\n   *     method/constructor.\n   * @return {*} The return value of the superclass method/constructor.\n   */\n  childCtor.base = function(me, methodName, var_args) {\n    // Copying using loop to avoid deop due to passing arguments object to\n    // function. This is faster in many JS engines as of late 2014.\n    var args = new Array(arguments.length - 2);\n    for (var i = 2; i < arguments.length; i++) {\n      args[i - 2] = arguments[i];\n    }\n    return parentCtor.prototype[methodName].apply(me, args);\n  };\n};\n\n\n/**\n * Allow for aliasing within scope functions.  This function exists for\n * uncompiled code - in compiled code the calls will be inlined and the aliases\n * applied.  In uncompiled code the function is simply run since the aliases as\n * written are valid JavaScript.\n *\n * MOE:begin_intracomment_strip\n * See the goog.scope document at http://go/goog.scope\n *\n * For more on goog.scope deprecation, see the style guide entry:\n * http://go/jsstyle#appendices-legacy-exceptions-goog-scope\n * MOE:end_intracomment_strip\n *\n * @param {function()} fn Function to call.  This function can contain aliases\n *     to namespaces (e.g. \"var dom = goog.dom\") or classes\n *     (e.g. \"var Timer = goog.Timer\").\n * @deprecated Use goog.module instead.\n */\ngoog.scope = function(fn) {\n  if (goog.isInModuleLoader_()) {\n    throw new Error('goog.scope is not supported within a module.');\n  }\n  fn.call(goog.global);\n};\n\n\n/*\n * To support uncompiled, strict mode bundles that use eval to divide source\n * like so:\n *    eval('someSource;//# sourceUrl sourcefile.js');\n * We need to export the globally defined symbols \"goog\" and \"COMPILED\".\n * Exporting \"goog\" breaks the compiler optimizations, so we required that\n * be defined externally.\n * NOTE: We don't use goog.exportSymbol here because we don't want to trigger\n * extern generation when that compiler option is enabled.\n */\nif (!COMPILED) {\n  goog.LEGACY_NAMESPACE_OBJECT_['COMPILED'] = COMPILED;\n}\n\n/**\n * Returns the parameter.\n * @param {string} s\n * @return {string}\n * @private\n */\ngoog.identity_ = function(s) {\n  return s;\n};\n\n\n/**\n * Creates Trusted Types policy if Trusted Types are supported by the browser.\n * The policy just blesses any string as a Trusted Type. It is not visibility\n * restricted because anyone can also call trustedTypes.createPolicy directly.\n * However, the allowed names should be restricted by a HTTP header and the\n * reference to the created policy should be visibility restricted.\n * @param {string} name\n * @return {?TrustedTypePolicy}\n */\ngoog.createTrustedTypesPolicy = function(name) {\n  var policy = null;\n  var policyFactory = goog.global.trustedTypes;\n  if (!policyFactory || !policyFactory.createPolicy) {\n    return policy;\n  }\n  // trustedTypes.createPolicy throws if called with a name that is already\n  // registered, even in report-only mode. Until the API changes, catch the\n  // error not to break the applications functionally. In such case, the code\n  // will fall back to using regular Safe Types.\n  // TODO(koto): Remove catching once createPolicy API stops throwing.\n  try {\n    policy = policyFactory.createPolicy(name, {\n      createHTML: goog.identity_,\n      createScript: goog.identity_,\n      createScriptURL: goog.identity_\n    });\n  } catch (e) {\n    goog.logToConsole_(e.message);\n  }\n  return policy;\n};\n\n// There's a bug in the compiler where without collapse properties the\n// Closure namespace defines do not guard code correctly. To help reduce code\n// size also check for !COMPILED even though it redundant until this is fixed.\nif (!COMPILED && goog.DEPENDENCIES_ENABLED) {\n  // MOE:begin_strip\n  // TODO(b/67050526) This object is obsolete but some people are relying on\n  // it internally. Keep it around until we migrate them.\n  /**\n   * @private\n   * @type {{\n   *   loadFlags: !Object<string, !Object<string, string>>,\n   *   nameToPath: !Object<string, string>,\n   *   requires: !Object<string, !Object<string, boolean>>,\n   *   visited: !Object<string, boolean>,\n   *   written: !Object<string, boolean>,\n   *   deferred: !Object<string, string>\n   * }}\n   */\n  goog.dependencies_ = {\n    loadFlags: {},  // 1 to 1\n\n    nameToPath: {},  // 1 to 1\n\n    requires: {},  // 1 to many\n\n    // Used when resolving dependencies to prevent us from visiting file\n    // twice.\n    visited: {},\n\n    written: {},  // Used to keep track of script files we have written.\n\n    deferred: {}  // Used to track deferred module evaluations in old IEs\n  };\n\n  /**\n   * @return {!Object}\n   * @private\n   */\n  goog.getLoader_ = function() {\n    return {\n      dependencies_: goog.dependencies_,\n      writeScriptTag_: goog.writeScriptTag_\n    };\n  };\n\n\n  /**\n   * @param {string} src The script url.\n   * @param {string=} opt_sourceText The optionally source text to evaluate\n   * @return {boolean} True if the script was imported, false otherwise.\n   * @private\n   */\n  goog.writeScriptTag_ = function(src, opt_sourceText) {\n    if (goog.inHtmlDocument_()) {\n      /** @type {!HTMLDocument} */\n      var doc = goog.global.document;\n\n      // If the user tries to require a new symbol after document load,\n      // something has gone terribly wrong. Doing a document.write would\n      // wipe out the page. This does not apply to the CSP-compliant method\n      // of writing script tags.\n      if (!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING &&\n          doc.readyState == 'complete') {\n        // Certain test frameworks load base.js multiple times, which tries\n        // to write deps.js each time. If that happens, just fail silently.\n        // These frameworks wipe the page between each load of base.js, so this\n        // is OK.\n        var isDeps = /\\bdeps.js$/.test(src);\n        if (isDeps) {\n          return false;\n        } else {\n          throw Error('Cannot write \"' + src + '\" after document load');\n        }\n      }\n\n      var nonceAttr = '';\n      var nonce = goog.getScriptNonce_();\n      if (nonce) {\n        nonceAttr = ' nonce=\"' + nonce + '\"';\n      }\n\n      if (opt_sourceText === undefined) {\n        var script = '<script src=\"' + src + '\"' + nonceAttr + '></' +\n            'script>';\n        doc.write(\n            goog.TRUSTED_TYPES_POLICY_ ?\n                goog.TRUSTED_TYPES_POLICY_.createHTML(script) :\n                script);\n      } else {\n        var script = '<script' + nonceAttr + '>' +\n            goog.protectScriptTag_(opt_sourceText) + '</' +\n            'script>';\n        doc.write(\n            goog.TRUSTED_TYPES_POLICY_ ?\n                goog.TRUSTED_TYPES_POLICY_.createHTML(script) :\n                script);\n      }\n      return true;\n    } else {\n      return false;\n    }\n  };\n  // MOE:end_strip\n\n\n  /**\n   * Tries to detect whether is in the context of an HTML document.\n   * @return {boolean} True if it looks like HTML document.\n   * @private\n   */\n  goog.inHtmlDocument_ = function() {\n    /** @type {!Document} */\n    var doc = goog.global.document;\n    return doc != null && 'write' in doc;  // XULDocument misses write.\n  };\n\n\n  /**\n   * We'd like to check for if the document readyState is 'loading'; however\n   * there are bugs on IE 10 and below where the readyState being anything other\n   * than 'complete' is not reliable.\n   * @return {boolean}\n   * @private\n   */\n  goog.isDocumentLoading_ = function() {\n    // attachEvent is available on IE 6 thru 10 only, and thus can be used to\n    // detect those browsers.\n    /** @type {!HTMLDocument} */\n    var doc = goog.global.document;\n    return doc.attachEvent ? doc.readyState != 'complete' :\n                             doc.readyState == 'loading';\n  };\n\n\n  /**\n   * Tries to detect the base path of base.js script that bootstraps Closure.\n   * @private\n   */\n  goog.findBasePath_ = function() {\n    if (goog.global.CLOSURE_BASE_PATH != undefined &&\n        // Anti DOM-clobbering runtime check (b/37736576).\n        typeof goog.global.CLOSURE_BASE_PATH === 'string') {\n      goog.basePath = goog.global.CLOSURE_BASE_PATH;\n      return;\n    } else if (!goog.inHtmlDocument_()) {\n      return;\n    }\n    /** @type {!Document} */\n    var doc = goog.global.document;\n    // If we have a currentScript available, use it exclusively.\n    var currentScript = doc.currentScript;\n    if (currentScript) {\n      var scripts = [currentScript];\n    } else {\n      var scripts = doc.getElementsByTagName('SCRIPT');\n    }\n    // Search backwards since the current script is in almost all cases the one\n    // that has base.js.\n    for (var i = scripts.length - 1; i >= 0; --i) {\n      var script = /** @type {!HTMLScriptElement} */ (scripts[i]);\n      var src = script.src;\n      var qmark = src.lastIndexOf('?');\n      var l = qmark == -1 ? src.length : qmark;\n      if (src.slice(l - 7, l) == 'base.js') {\n        goog.basePath = src.slice(0, l - 7);\n        return;\n      }\n    }\n  };\n\n  goog.findBasePath_();\n\n  /**\n   * Rewrites closing script tags in input to avoid ending an enclosing script\n   * tag.\n   *\n   * @param {string} str\n   * @return {string}\n   * @private\n   */\n  goog.protectScriptTag_ = function(str) {\n    return str.replace(/<\\/(SCRIPT)/ig, '\\\\x3c/$1');\n  };\n\n\n  /**\n   * A debug loader is responsible for downloading and executing javascript\n   * files in an unbundled, uncompiled environment.\n   *\n   * This can be custimized via the setDependencyFactory method, or by\n   * CLOSURE_IMPORT_SCRIPT/CLOSURE_LOAD_FILE_SYNC.\n   *\n   * @struct @constructor @final @private\n   */\n  goog.DebugLoader_ = function() {\n    /** @private @const {!Object<string, !goog.Dependency>} */\n    this.dependencies_ = {};\n    /** @private @const {!Object<string, string>} */\n    this.idToPath_ = {};\n    /** @private @const {!Object<string, boolean>} */\n    this.written_ = {};\n    /** @private @const {!Array<!goog.Dependency>} */\n    this.loadingDeps_ = [];\n    /** @private {!Array<!goog.Dependency>} */\n    this.depsToLoad_ = [];\n    /** @private {boolean} */\n    this.paused_ = false;\n    /** @private {!goog.DependencyFactory} */\n    this.factory_ = new goog.DependencyFactory();\n    /** @private @const {!Object<string, !Function>} */\n    this.deferredCallbacks_ = {};\n    /** @private @const {!Array<string>} */\n    this.deferredQueue_ = [];\n  };\n\n\n  /**\n   * Loads the Closure deps.js file.\n   *\n   * Exposed a function so after base is loaded, and\n   * then this can be called to load the closure deps.js file.\n   */\n  goog.DebugLoader_.prototype.loadClosureDeps = function() {\n    // Circumvent addDependency, which would try to transpile deps.js if\n    // transpile is set to always.\n    var relPath = 'deps.js';\n    this.depsToLoad_.push(this.factory_.createDependency(\n        goog.normalizePath_(goog.basePath + relPath), relPath, [], [], {}));\n    this.loadDeps_();\n  };\n\n\n  /**\n   * Notifies the debug loader when a dependency has been requested.\n   *\n   * @param {string} absPathOrId Path of the dependency or goog id.\n   * @param {boolean=} opt_force\n   */\n  goog.DebugLoader_.prototype.requested = function(absPathOrId, opt_force) {\n    var path = this.getPathFromDeps_(absPathOrId);\n    if (path &&\n        (opt_force || this.areDepsLoaded_(this.dependencies_[path].requires))) {\n      var callback = this.deferredCallbacks_[path];\n      if (callback) {\n        delete this.deferredCallbacks_[path];\n        callback();\n      }\n    }\n  };\n\n\n  /**\n   * Sets the dependency factory, which can be used to create custom\n   * goog.Dependency implementations to control how dependencies are loaded.\n   *\n   * @param {!goog.DependencyFactory} factory\n   */\n  goog.DebugLoader_.prototype.setDependencyFactory = function(factory) {\n    this.factory_ = factory;\n  };\n\n\n  /**\n   * Travserses the dependency graph and queues the given dependency, and all of\n   * its transitive dependencies, for loading and then starts loading if not\n   * paused.\n   *\n   * @param {string} namespace\n   * @private\n   */\n  goog.DebugLoader_.prototype.load_ = function(namespace) {\n    if (!this.getPathFromDeps_(namespace)) {\n      var errorMessage = 'goog.require could not find: ' + namespace;\n      goog.logToConsole_(errorMessage);\n    } else {\n      var loader = this;\n\n      var deps = [];\n\n      /** @param {string} namespace */\n      var visit = function(namespace) {\n        var path = loader.getPathFromDeps_(namespace);\n\n        if (!path) {\n          throw new Error('Bad dependency path or symbol: ' + namespace);\n        }\n\n        if (loader.written_[path]) {\n          return;\n        }\n\n        loader.written_[path] = true;\n\n        var dep = loader.dependencies_[path];\n        // MOE:begin_strip\n        if (goog.dependencies_.written[dep.relativePath]) {\n          return;\n        }\n        // MOE:end_strip\n        for (var i = 0; i < dep.requires.length; i++) {\n          if (!goog.isProvided_(dep.requires[i])) {\n            visit(dep.requires[i]);\n          }\n        }\n\n        deps.push(dep);\n      };\n\n      visit(namespace);\n\n      var wasLoading = !!this.depsToLoad_.length;\n      this.depsToLoad_ = this.depsToLoad_.concat(deps);\n\n      if (!this.paused_ && !wasLoading) {\n        this.loadDeps_();\n      }\n    }\n  };\n\n\n  /**\n   * Loads any queued dependencies until they are all loaded or paused.\n   *\n   * @private\n   */\n  goog.DebugLoader_.prototype.loadDeps_ = function() {\n    var loader = this;\n    var paused = this.paused_;\n\n    while (this.depsToLoad_.length && !paused) {\n      (function() {\n        var loadCallDone = false;\n        var dep = loader.depsToLoad_.shift();\n\n        var loaded = false;\n        loader.loading_(dep);\n\n        var controller = {\n          pause: function() {\n            if (loadCallDone) {\n              throw new Error('Cannot call pause after the call to load.');\n            } else {\n              paused = true;\n            }\n          },\n          resume: function() {\n            if (loadCallDone) {\n              loader.resume_();\n            } else {\n              // Some dep called pause and then resume in the same load call.\n              // Just keep running this same loop.\n              paused = false;\n            }\n          },\n          loaded: function() {\n            if (loaded) {\n              throw new Error('Double call to loaded.');\n            }\n\n            loaded = true;\n            loader.loaded_(dep);\n          },\n          pending: function() {\n            // Defensive copy.\n            var pending = [];\n            for (var i = 0; i < loader.loadingDeps_.length; i++) {\n              pending.push(loader.loadingDeps_[i]);\n            }\n            return pending;\n          },\n          /**\n           * @param {goog.ModuleType} type\n           */\n          setModuleState: function(type) {\n            goog.moduleLoaderState_ = {\n              type: type,\n              moduleName: '',\n              declareLegacyNamespace: false,\n              preventModuleExportSealing: false,\n            };\n          },\n          /** @type {function(string, string, string=)} */\n          registerEs6ModuleExports: function(\n              path, exports, opt_closureNamespace) {\n            if (opt_closureNamespace) {\n              goog.loadedModules_[opt_closureNamespace] = {\n                exports: exports,\n                type: goog.ModuleType.ES6,\n                moduleId: opt_closureNamespace || ''\n              };\n            }\n          },\n          /** @type {function(string, ?)} */\n          registerGoogModuleExports: function(moduleId, exports) {\n            goog.loadedModules_[moduleId] = {\n              exports: exports,\n              type: goog.ModuleType.GOOG,\n              moduleId: moduleId\n            };\n          },\n          clearModuleState: function() {\n            goog.moduleLoaderState_ = null;\n          },\n          defer: function(callback) {\n            if (loadCallDone) {\n              throw new Error(\n                  'Cannot register with defer after the call to load.');\n            }\n            loader.defer_(dep, callback);\n          },\n          areDepsLoaded: function() {\n            return loader.areDepsLoaded_(dep.requires);\n          }\n        };\n\n        try {\n          dep.load(controller);\n        } finally {\n          loadCallDone = true;\n        }\n      })();\n    }\n\n    if (paused) {\n      this.pause_();\n    }\n  };\n\n\n  /** @private */\n  goog.DebugLoader_.prototype.pause_ = function() {\n    this.paused_ = true;\n  };\n\n\n  /** @private */\n  goog.DebugLoader_.prototype.resume_ = function() {\n    if (this.paused_) {\n      this.paused_ = false;\n      this.loadDeps_();\n    }\n  };\n\n\n  /**\n   * Marks the given dependency as loading (load has been called but it has not\n   * yet marked itself as finished). Useful for dependencies that want to know\n   * what else is loading. Example: goog.modules cannot eval if there are\n   * loading dependencies.\n   *\n   * @param {!goog.Dependency} dep\n   * @private\n   */\n  goog.DebugLoader_.prototype.loading_ = function(dep) {\n    this.loadingDeps_.push(dep);\n  };\n\n\n  /**\n   * Marks the given dependency as having finished loading and being available\n   * for require.\n   *\n   * @param {!goog.Dependency} dep\n   * @private\n   */\n  goog.DebugLoader_.prototype.loaded_ = function(dep) {\n    for (var i = 0; i < this.loadingDeps_.length; i++) {\n      if (this.loadingDeps_[i] == dep) {\n        this.loadingDeps_.splice(i, 1);\n        break;\n      }\n    }\n\n    for (var i = 0; i < this.deferredQueue_.length; i++) {\n      if (this.deferredQueue_[i] == dep.path) {\n        this.deferredQueue_.splice(i, 1);\n        break;\n      }\n    }\n\n    if (this.loadingDeps_.length == this.deferredQueue_.length &&\n        !this.depsToLoad_.length) {\n      // Something has asked to load these, but they may not be directly\n      // required again later, so load them now that we know we're done loading\n      // everything else. e.g. a goog module entry point.\n      while (this.deferredQueue_.length) {\n        this.requested(this.deferredQueue_.shift(), true);\n      }\n    }\n\n    dep.loaded();\n  };\n\n\n  /**\n   * @param {!Array<string>} pathsOrIds\n   * @return {boolean}\n   * @private\n   */\n  goog.DebugLoader_.prototype.areDepsLoaded_ = function(pathsOrIds) {\n    for (var i = 0; i < pathsOrIds.length; i++) {\n      var path = this.getPathFromDeps_(pathsOrIds[i]);\n      if (!path ||\n          (!(path in this.deferredCallbacks_) &&\n           !goog.isProvided_(pathsOrIds[i]))) {\n        return false;\n      }\n    }\n\n    return true;\n  };\n\n\n  /**\n   * @param {string} absPathOrId\n   * @return {?string}\n   * @private\n   */\n  goog.DebugLoader_.prototype.getPathFromDeps_ = function(absPathOrId) {\n    if (absPathOrId in this.idToPath_) {\n      return this.idToPath_[absPathOrId];\n    } else if (absPathOrId in this.dependencies_) {\n      return absPathOrId;\n    } else {\n      return null;\n    }\n  };\n\n\n  /**\n   * @param {!goog.Dependency} dependency\n   * @param {!Function} callback\n   * @private\n   */\n  goog.DebugLoader_.prototype.defer_ = function(dependency, callback) {\n    this.deferredCallbacks_[dependency.path] = callback;\n    this.deferredQueue_.push(dependency.path);\n  };\n\n\n  /**\n   * Interface for goog.Dependency implementations to have some control over\n   * loading of dependencies.\n   *\n   * @record\n   */\n  goog.LoadController = function() {};\n\n\n  /**\n   * Tells the controller to halt loading of more dependencies.\n   */\n  goog.LoadController.prototype.pause = function() {};\n\n\n  /**\n   * Tells the controller to resume loading of more dependencies if paused.\n   */\n  goog.LoadController.prototype.resume = function() {};\n\n\n  /**\n   * Tells the controller that this dependency has finished loading.\n   *\n   * This causes this to be removed from pending() and any load callbacks to\n   * fire.\n   */\n  goog.LoadController.prototype.loaded = function() {};\n\n\n  /**\n   * List of dependencies on which load has been called but which have not\n   * called loaded on their controller. This includes the current dependency.\n   *\n   * @return {!Array<!goog.Dependency>}\n   */\n  goog.LoadController.prototype.pending = function() {};\n\n\n  /**\n   * Registers an object as an ES6 module's exports so that goog.modules may\n   * require it by path.\n   *\n   * @param {string} path Full path of the module.\n   * @param {?} exports\n   * @param {string=} opt_closureNamespace Closure namespace to associate with\n   *     this module.\n   */\n  goog.LoadController.prototype.registerEs6ModuleExports = function(\n      path, exports, opt_closureNamespace) {};\n\n\n  /**\n   * Sets the current module state.\n   *\n   * @param {goog.ModuleType} type Type of module.\n   */\n  goog.LoadController.prototype.setModuleState = function(type) {};\n\n\n  /**\n   * Clears the current module state.\n   */\n  goog.LoadController.prototype.clearModuleState = function() {};\n\n\n  /**\n   * Registers a callback to call once the dependency is actually requested\n   * via goog.require + all of the immediate dependencies have been loaded or\n   * all other files have been loaded. Allows for lazy loading until\n   * require'd without pausing dependency loading, which is needed on old IE.\n   *\n   * @param {!Function} callback\n   */\n  goog.LoadController.prototype.defer = function(callback) {};\n\n\n  /**\n   * @return {boolean}\n   */\n  goog.LoadController.prototype.areDepsLoaded = function() {};\n\n\n  /**\n   * Basic super class for all dependencies Closure Library can load.\n   *\n   * This default implementation is designed to load untranspiled, non-module\n   * scripts in a web broswer.\n   *\n   * For goog.modules see {@see goog.GoogModuleDependency}.\n   * For untranspiled ES6 modules {@see goog.Es6ModuleDependency}.\n   *\n   * @param {string} path Absolute path of this script.\n   * @param {string} relativePath Path of this script relative to goog.basePath.\n   * @param {!Array<string>} provides goog.provided or goog.module symbols\n   *     in this file.\n   * @param {!Array<string>} requires goog symbols or relative paths to Closure\n   *     this depends on.\n   * @param {!Object<string, string>} loadFlags\n   * @struct @constructor\n   */\n  goog.Dependency = function(\n      path, relativePath, provides, requires, loadFlags) {\n    /** @const */\n    this.path = path;\n    /** @const */\n    this.relativePath = relativePath;\n    /** @const */\n    this.provides = provides;\n    /** @const */\n    this.requires = requires;\n    /** @const */\n    this.loadFlags = loadFlags;\n    /** @private {boolean} */\n    this.loaded_ = false;\n    /** @private {!Array<function()>} */\n    this.loadCallbacks_ = [];\n  };\n\n\n  /**\n   * @return {string} The pathname part of this dependency's path if it is a\n   *     URI.\n   */\n  goog.Dependency.prototype.getPathName = function() {\n    var pathName = this.path;\n    var protocolIndex = pathName.indexOf('://');\n    if (protocolIndex >= 0) {\n      pathName = pathName.substring(protocolIndex + 3);\n      var slashIndex = pathName.indexOf('/');\n      if (slashIndex >= 0) {\n        pathName = pathName.substring(slashIndex + 1);\n      }\n    }\n    return pathName;\n  };\n\n\n  /**\n   * @param {function()} callback Callback to fire as soon as this has loaded.\n   * @final\n   */\n  goog.Dependency.prototype.onLoad = function(callback) {\n    if (this.loaded_) {\n      callback();\n    } else {\n      this.loadCallbacks_.push(callback);\n    }\n  };\n\n\n  /**\n   * Marks this dependency as loaded and fires any callbacks registered with\n   * onLoad.\n   * @final\n   */\n  goog.Dependency.prototype.loaded = function() {\n    this.loaded_ = true;\n    var callbacks = this.loadCallbacks_;\n    this.loadCallbacks_ = [];\n    for (var i = 0; i < callbacks.length; i++) {\n      callbacks[i]();\n    }\n  };\n\n\n  /**\n   * Whether or not document.written / appended script tags should be deferred.\n   *\n   * @private {boolean}\n   */\n  goog.Dependency.defer_ = false;\n\n\n  /**\n   * Map of script ready / state change callbacks. Old IE cannot handle putting\n   * these properties on goog.global.\n   *\n   * @private @const {!Object<string, function(?):undefined>}\n   */\n  goog.Dependency.callbackMap_ = {};\n\n\n  /**\n   * @param {function(...?):?} callback\n   * @return {string}\n   * @private\n   */\n  goog.Dependency.registerCallback_ = function(callback) {\n    var key = Math.random().toString(32);\n    goog.Dependency.callbackMap_[key] = callback;\n    return key;\n  };\n\n\n  /**\n   * @param {string} key\n   * @private\n   */\n  goog.Dependency.unregisterCallback_ = function(key) {\n    delete goog.Dependency.callbackMap_[key];\n  };\n\n\n  /**\n   * @param {string} key\n   * @param {...?} var_args\n   * @private\n   */\n  goog.Dependency.callback_ = function(key, var_args) {\n    if (key in goog.Dependency.callbackMap_) {\n      var callback = goog.Dependency.callbackMap_[key];\n      var args = [];\n      for (var i = 1; i < arguments.length; i++) {\n        args.push(arguments[i]);\n      }\n      callback.apply(undefined, args);\n    } else {\n      var errorMessage = 'Callback key ' + key +\n          ' does not exist (was base.js loaded more than once?).';\n      // MOE:begin_strip\n      // TODO(johnplaisted): Some people internally are mistakenly loading\n      // base.js twice, and this can happen while a dependency is loading,\n      // wiping out state.\n      goog.logToConsole_(errorMessage);\n      // MOE:end_strip\n      // MOE:insert throw Error(errorMessage);\n    }\n  };\n\n\n  /**\n   * Starts loading this dependency. This dependency can pause loading if it\n   * needs to and resume it later via the controller interface.\n   *\n   * When this is loaded it should call controller.loaded(). Note that this will\n   * end up calling the loaded method of this dependency; there is no need to\n   * call it explicitly.\n   *\n   * @param {!goog.LoadController} controller\n   */\n  goog.Dependency.prototype.load = function(controller) {\n    if (goog.global.CLOSURE_IMPORT_SCRIPT) {\n      if (goog.global.CLOSURE_IMPORT_SCRIPT(this.path)) {\n        controller.loaded();\n      } else {\n        controller.pause();\n      }\n      return;\n    }\n\n    if (!goog.inHtmlDocument_()) {\n      goog.logToConsole_(\n          'Cannot use default debug loader outside of HTML documents.');\n      if (this.relativePath == 'deps.js') {\n        // CLOSURE_IMPORT_SCRIPT should be set *before* base.js is loaded.\n        goog.logToConsole_(\n            'Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js.');\n        controller.loaded();\n      } else {\n        controller.pause();\n      }\n      return;\n    }\n\n    /** @type {!HTMLDocument} */\n    var doc = goog.global.document;\n\n    // If the user tries to require a new symbol after document load,\n    // something has gone terribly wrong. Doing a document.write would\n    // wipe out the page. This does not apply to the CSP-compliant method\n    // of writing script tags.\n    if (doc.readyState == 'complete' &&\n        !goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING) {\n      // Certain test frameworks load base.js multiple times, which tries\n      // to write deps.js each time. If that happens, just fail silently.\n      // These frameworks wipe the page between each load of base.js, so this\n      // is OK.\n      var isDeps = /\\bdeps.js$/.test(this.path);\n      if (isDeps) {\n        controller.loaded();\n        return;\n      } else {\n        throw Error('Cannot write \"' + this.path + '\" after document load');\n      }\n    }\n\n    var nonce = goog.getScriptNonce_();\n    if (!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING &&\n        goog.isDocumentLoading_()) {\n      var key;\n      var callback = function(script) {\n        if (script.readyState && script.readyState != 'complete') {\n          script.onload = callback;\n          return;\n        }\n        goog.Dependency.unregisterCallback_(key);\n        controller.loaded();\n      };\n      key = goog.Dependency.registerCallback_(callback);\n\n      var defer = goog.Dependency.defer_ ? ' defer' : '';\n      var nonceAttr = nonce ? ' nonce=\"' + nonce + '\"' : '';\n      var script = '<script src=\"' + this.path + '\"' + nonceAttr + defer +\n          ' id=\"script-' + key + '\"><\\/script>';\n\n      script += '<script' + nonceAttr + '>';\n\n      if (goog.Dependency.defer_) {\n        script += 'document.getElementById(\\'script-' + key +\n            '\\').onload = function() {\\n' +\n            '  goog.Dependency.callback_(\\'' + key + '\\', this);\\n' +\n            '};\\n';\n      } else {\n        script += 'goog.Dependency.callback_(\\'' + key +\n            '\\', document.getElementById(\\'script-' + key + '\\'));';\n      }\n\n      script += '<\\/script>';\n\n      doc.write(\n          goog.TRUSTED_TYPES_POLICY_ ?\n              goog.TRUSTED_TYPES_POLICY_.createHTML(script) :\n              script);\n    } else {\n      var scriptEl =\n          /** @type {!HTMLScriptElement} */ (doc.createElement('script'));\n      scriptEl.defer = goog.Dependency.defer_;\n      scriptEl.async = false;\n\n      // If CSP nonces are used, propagate them to dynamically created scripts.\n      // This is necessary to allow nonce-based CSPs without 'strict-dynamic'.\n      if (nonce) {\n        scriptEl.nonce = nonce;\n      }\n\n      scriptEl.onload = function() {\n        scriptEl.onload = null;\n        controller.loaded();\n      };\n\n      scriptEl.src = goog.TRUSTED_TYPES_POLICY_ ?\n          goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path) :\n          this.path;\n      doc.head.appendChild(scriptEl);\n    }\n  };\n\n\n  /**\n   * @param {string} path Absolute path of this script.\n   * @param {string} relativePath Path of this script relative to goog.basePath.\n   * @param {!Array<string>} provides Should be an empty array.\n   *     TODO(johnplaisted) add support for adding closure namespaces to ES6\n   *     modules for interop purposes.\n   * @param {!Array<string>} requires goog symbols or relative paths to Closure\n   *     this depends on.\n   * @param {!Object<string, string>} loadFlags\n   * @struct @constructor\n   * @extends {goog.Dependency}\n   */\n  goog.Es6ModuleDependency = function(\n      path, relativePath, provides, requires, loadFlags) {\n    goog.Es6ModuleDependency.base(\n        this, 'constructor', path, relativePath, provides, requires, loadFlags);\n  };\n  goog.inherits(goog.Es6ModuleDependency, goog.Dependency);\n\n\n  /**\n   * @override\n   * @param {!goog.LoadController} controller\n   */\n  goog.Es6ModuleDependency.prototype.load = function(controller) {\n    if (goog.global.CLOSURE_IMPORT_SCRIPT) {\n      if (goog.global.CLOSURE_IMPORT_SCRIPT(this.path)) {\n        controller.loaded();\n      } else {\n        controller.pause();\n      }\n      return;\n    }\n\n    if (!goog.inHtmlDocument_()) {\n      goog.logToConsole_(\n          'Cannot use default debug loader outside of HTML documents.');\n      controller.pause();\n      return;\n    }\n\n    /** @type {!HTMLDocument} */\n    var doc = goog.global.document;\n\n    var dep = this;\n\n    // TODO(johnplaisted): Does document.writing really speed up anything? Any\n    // difference between this and just waiting for interactive mode and then\n    // appending?\n    function write(src, contents) {\n      var nonceAttr = '';\n      var nonce = goog.getScriptNonce_();\n      if (nonce) {\n        nonceAttr = ' nonce=\"' + nonce + '\"';\n      }\n\n      if (contents) {\n        var script = '<script type=\"module\" crossorigin' + nonceAttr + '>' +\n            contents + '</' +\n            'script>';\n        doc.write(\n            goog.TRUSTED_TYPES_POLICY_ ?\n                goog.TRUSTED_TYPES_POLICY_.createHTML(script) :\n                script);\n      } else {\n        var script = '<script type=\"module\" crossorigin src=\"' + src + '\"' +\n            nonceAttr + '></' +\n            'script>';\n        doc.write(\n            goog.TRUSTED_TYPES_POLICY_ ?\n                goog.TRUSTED_TYPES_POLICY_.createHTML(script) :\n                script);\n      }\n    }\n\n    function append(src, contents) {\n      var scriptEl =\n          /** @type {!HTMLScriptElement} */ (doc.createElement('script'));\n      scriptEl.defer = true;\n      scriptEl.async = false;\n      scriptEl.type = 'module';\n      scriptEl.setAttribute('crossorigin', true);\n\n      // If CSP nonces are used, propagate them to dynamically created scripts.\n      // This is necessary to allow nonce-based CSPs without 'strict-dynamic'.\n      var nonce = goog.getScriptNonce_();\n      if (nonce) {\n        scriptEl.nonce = nonce;\n      }\n\n      if (contents) {\n        scriptEl.text = goog.TRUSTED_TYPES_POLICY_ ?\n            goog.TRUSTED_TYPES_POLICY_.createScript(contents) :\n            contents;\n      } else {\n        scriptEl.src = goog.TRUSTED_TYPES_POLICY_ ?\n            goog.TRUSTED_TYPES_POLICY_.createScriptURL(src) :\n            src;\n      }\n\n      doc.head.appendChild(scriptEl);\n    }\n\n    var create;\n\n    if (goog.isDocumentLoading_()) {\n      create = write;\n      // We can ONLY call document.write if we are guaranteed that any\n      // non-module script tags document.written after this are deferred.\n      // Small optimization, in theory document.writing is faster.\n      goog.Dependency.defer_ = true;\n    } else {\n      create = append;\n    }\n\n    // Write 4 separate tags here:\n    // 1) Sets the module state at the correct time (just before execution).\n    // 2) A src node for this, which just hopefully lets the browser load it a\n    //    little early (no need to parse #3).\n    // 3) Import the module and register it.\n    // 4) Clear the module state at the correct time. Guaranteed to run even\n    //    if there is an error in the module (#3 will not run if there is an\n    //    error in the module).\n    var beforeKey = goog.Dependency.registerCallback_(function() {\n      goog.Dependency.unregisterCallback_(beforeKey);\n      controller.setModuleState(goog.ModuleType.ES6);\n    });\n    create(undefined, 'goog.Dependency.callback_(\"' + beforeKey + '\")');\n\n    // TODO(johnplaisted): Does this really speed up anything?\n    create(this.path, undefined);\n\n    var registerKey = goog.Dependency.registerCallback_(function(exports) {\n      goog.Dependency.unregisterCallback_(registerKey);\n      controller.registerEs6ModuleExports(\n          dep.path, exports, goog.moduleLoaderState_.moduleName);\n    });\n    create(\n        undefined,\n        'import * as m from \"' + this.path + '\"; goog.Dependency.callback_(\"' +\n            registerKey + '\", m)');\n\n    var afterKey = goog.Dependency.registerCallback_(function() {\n      goog.Dependency.unregisterCallback_(afterKey);\n      controller.clearModuleState();\n      controller.loaded();\n    });\n    create(undefined, 'goog.Dependency.callback_(\"' + afterKey + '\")');\n  };\n\n\n  /**\n   * Superclass of any dependency that needs to be loaded into memory,\n   * transformed, and then eval'd (goog.modules and transpiled files).\n   *\n   * @param {string} path Absolute path of this script.\n   * @param {string} relativePath Path of this script relative to goog.basePath.\n   * @param {!Array<string>} provides goog.provided or goog.module symbols\n   *     in this file.\n   * @param {!Array<string>} requires goog symbols or relative paths to Closure\n   *     this depends on.\n   * @param {!Object<string, string>} loadFlags\n   * @struct @constructor @abstract\n   * @extends {goog.Dependency}\n   */\n  goog.TransformedDependency = function(\n      path, relativePath, provides, requires, loadFlags) {\n    goog.TransformedDependency.base(\n        this, 'constructor', path, relativePath, provides, requires, loadFlags);\n    /** @private {?string} */\n    this.contents_ = null;\n\n    /**\n     * Whether to lazily make the synchronous XHR (when goog.require'd) or make\n     * the synchronous XHR when initially loading. On FireFox 61 there is a bug\n     * where an ES6 module cannot make a synchronous XHR (rather, it can, but if\n     * it does then no other ES6 modules will load after).\n     *\n     * tl;dr we lazy load due to bugs on older browsers and eager load due to\n     * bugs on newer ones.\n     *\n     * https://bugzilla.mozilla.org/show_bug.cgi?id=1477090\n     *\n     * @private @const {boolean}\n     */\n    this.lazyFetch_ = !goog.inHtmlDocument_() ||\n        !('noModule' in goog.global.document.createElement('script'));\n  };\n  goog.inherits(goog.TransformedDependency, goog.Dependency);\n\n\n  /**\n   * @override\n   * @param {!goog.LoadController} controller\n   */\n  goog.TransformedDependency.prototype.load = function(controller) {\n    var dep = this;\n\n    function fetch() {\n      dep.contents_ = goog.loadFileSync_(dep.path);\n\n      if (dep.contents_) {\n        dep.contents_ = dep.transform(dep.contents_);\n        if (dep.contents_) {\n          dep.contents_ += '\\n//# sourceURL=' + dep.path;\n        }\n      }\n    }\n\n    if (goog.global.CLOSURE_IMPORT_SCRIPT) {\n      fetch();\n      if (this.contents_ &&\n          goog.global.CLOSURE_IMPORT_SCRIPT('', this.contents_)) {\n        this.contents_ = null;\n        controller.loaded();\n      } else {\n        controller.pause();\n      }\n      return;\n    }\n\n\n    var isEs6 = this.loadFlags['module'] == goog.ModuleType.ES6;\n\n    if (!this.lazyFetch_) {\n      fetch();\n    }\n\n    function load() {\n      if (dep.lazyFetch_) {\n        fetch();\n      }\n\n      if (!dep.contents_) {\n        // loadFileSync_ or transform are responsible. Assume they logged an\n        // error.\n        return;\n      }\n\n      if (isEs6) {\n        controller.setModuleState(goog.ModuleType.ES6);\n      }\n\n      var namespace;\n\n      try {\n        var contents = dep.contents_;\n        dep.contents_ = null;\n        goog.globalEval(goog.CLOSURE_EVAL_PREFILTER_.createScript(contents));\n        if (isEs6) {\n          namespace = goog.moduleLoaderState_.moduleName;\n        }\n      } finally {\n        if (isEs6) {\n          controller.clearModuleState();\n        }\n      }\n\n      if (isEs6) {\n        // Due to circular dependencies this may not be available for require\n        // right now.\n        goog.LEGACY_NAMESPACE_OBJECT_['$jscomp']['require']['ensure'](\n            [dep.getPathName()], function() {\n              controller.registerEs6ModuleExports(\n                  dep.path,\n                  goog.LEGACY_NAMESPACE_OBJECT_['$jscomp']['require'](\n                      dep.getPathName()),\n                  namespace);\n            });\n      }\n\n      controller.loaded();\n    }\n\n    // Do not fetch now; in FireFox 47 the synchronous XHR doesn't block all\n    // events. If we fetched now and then document.write'd the contents the\n    // document.write would be an eval and would execute too soon! Instead write\n    // a script tag to fetch and eval synchronously at the correct time.\n    function fetchInOwnScriptThenLoad() {\n      /** @type {!HTMLDocument} */\n      var doc = goog.global.document;\n\n      var key = goog.Dependency.registerCallback_(function() {\n        goog.Dependency.unregisterCallback_(key);\n        load();\n      });\n\n      var nonce = goog.getScriptNonce_();\n      var nonceAttr = nonce ? ' nonce=\"' + nonce + '\"' : '';\n      var script = '<script' + nonceAttr + '>' +\n          goog.protectScriptTag_('goog.Dependency.callback_(\"' + key + '\");') +\n          '</' +\n          'script>';\n      doc.write(\n          goog.TRUSTED_TYPES_POLICY_ ?\n              goog.TRUSTED_TYPES_POLICY_.createHTML(script) :\n              script);\n    }\n\n    // If one thing is pending it is this.\n    var anythingElsePending = controller.pending().length > 1;\n\n    // Additionally if we are meant to defer scripts but the page is still\n    // loading (e.g. an ES6 module is loading) then also defer. Or if we are\n    // meant to defer and anything else is pending then defer (those may be\n    // scripts that did not need transformation and are just script tags with\n    // defer set to true, and we need to evaluate after that deferred script).\n    var needsAsyncLoading = goog.Dependency.defer_ &&\n        (anythingElsePending || goog.isDocumentLoading_());\n\n    if (needsAsyncLoading) {\n      // Note that we only defer when we have to rather than 100% of the time.\n      // Always defering would work, but then in theory the order of\n      // goog.require calls would then matter. We want to enforce that most of\n      // the time the order of the require calls does not matter.\n      controller.defer(function() {\n        load();\n      });\n      return;\n    }\n    // TODO(johnplaisted): Externs are missing onreadystatechange for\n    // HTMLDocument.\n    /** @type {?} */\n    var doc = goog.global.document;\n\n    if (isEs6 && goog.inHtmlDocument_() && goog.isDocumentLoading_()) {\n      goog.Dependency.defer_ = true;\n      // Transpiled ES6 modules still need to load like regular ES6 modules,\n      // aka only after the document is interactive.\n      controller.pause();\n      var oldCallback = doc.onreadystatechange;\n      doc.onreadystatechange = function() {\n        if (doc.readyState == 'interactive') {\n          doc.onreadystatechange = oldCallback;\n          load();\n          controller.resume();\n        }\n        if (typeof oldCallback === 'function') {\n          oldCallback.apply(undefined, arguments);\n        }\n      };\n    } else {\n      // Always eval on old IE.\n      if (!goog.inHtmlDocument_() || !goog.isDocumentLoading_()) {\n        load();\n      } else {\n        fetchInOwnScriptThenLoad();\n      }\n    }\n  };\n\n\n  /**\n   * @param {string} contents\n   * @return {string}\n   * @abstract\n   */\n  goog.TransformedDependency.prototype.transform = function(contents) {};\n\n\n  /**\n   * An ES6 module dependency that was transpiled to a jscomp module outside\n   * of the debug loader, e.g. server side.\n   *\n   * @param {string} path Absolute path of this script.\n   * @param {string} relativePath Path of this script relative to goog.basePath.\n   * @param {!Array<string>} provides goog.provided or goog.module symbols\n   *     in this file.\n   * @param {!Array<string>} requires goog symbols or relative paths to Closure\n   *     this depends on.\n   * @param {!Object<string, string>} loadFlags\n   * @struct @constructor\n   * @extends {goog.TransformedDependency}\n   */\n  goog.PreTranspiledEs6ModuleDependency = function(\n      path, relativePath, provides, requires, loadFlags) {\n    goog.PreTranspiledEs6ModuleDependency.base(\n        this, 'constructor', path, relativePath, provides, requires, loadFlags);\n  };\n  goog.inherits(\n      goog.PreTranspiledEs6ModuleDependency, goog.TransformedDependency);\n\n\n  /**\n   * @override\n   * @param {string} contents\n   * @return {string}\n   */\n  goog.PreTranspiledEs6ModuleDependency.prototype.transform = function(\n      contents) {\n    return contents;\n  };\n\n\n  /**\n   * A goog.module, transpiled or not. Will always perform some minimal\n   * transformation even when not transpiled to wrap in a goog.loadModule\n   * statement.\n   *\n   * @param {string} path Absolute path of this script.\n   * @param {string} relativePath Path of this script relative to goog.basePath.\n   * @param {!Array<string>} provides goog.provided or goog.module symbols\n   *     in this file.\n   * @param {!Array<string>} requires goog symbols or relative paths to Closure\n   *     this depends on.\n   * @param {!Object<string, string>} loadFlags\n   * @struct @constructor\n   * @extends {goog.TransformedDependency}\n   */\n  goog.GoogModuleDependency = function(\n      path, relativePath, provides, requires, loadFlags) {\n    goog.GoogModuleDependency.base(\n        this, 'constructor', path, relativePath, provides, requires, loadFlags);\n  };\n  goog.inherits(goog.GoogModuleDependency, goog.TransformedDependency);\n\n\n  /**\n   * @override\n   * @param {string} contents\n   * @return {string}\n   */\n  goog.GoogModuleDependency.prototype.transform = function(contents) {\n    if (!goog.LOAD_MODULE_USING_EVAL || goog.global.JSON === undefined) {\n      return '' +\n          'goog.loadModule(function(exports) {' +\n          '\"use strict\";' + contents +\n          '\\n' +  // terminate any trailing single line comment.\n          ';return exports' +\n          '});' +\n          '\\n//# sourceURL=' + this.path + '\\n';\n    } else {\n      return '' +\n          'goog.loadModule(' +\n          goog.global.JSON.stringify(\n              contents + '\\n//# sourceURL=' + this.path + '\\n') +\n          ');';\n    }\n  };\n\n\n  /**\n   * @param {string} relPath\n   * @param {!Array<string>|undefined} provides\n   * @param {!Array<string>} requires\n   * @param {boolean|!Object<string>=} opt_loadFlags\n   * @see goog.addDependency\n   */\n  goog.DebugLoader_.prototype.addDependency = function(\n      relPath, provides, requires, opt_loadFlags) {\n    provides = provides || [];\n    relPath = relPath.replace(/\\\\/g, '/');\n    var path = goog.normalizePath_(goog.basePath + relPath);\n    if (!opt_loadFlags || typeof opt_loadFlags === 'boolean') {\n      opt_loadFlags = opt_loadFlags ? {'module': goog.ModuleType.GOOG} : {};\n    }\n    var dep = this.factory_.createDependency(\n        path, relPath, provides, requires, opt_loadFlags);\n    this.dependencies_[path] = dep;\n    for (var i = 0; i < provides.length; i++) {\n      this.idToPath_[provides[i]] = path;\n    }\n    this.idToPath_[relPath] = path;\n  };\n\n\n  /**\n   * Creates goog.Dependency instances for the debug loader to load.\n   *\n   * Should be overridden to have the debug loader use custom subclasses of\n   * goog.Dependency.\n   *\n   * @struct @constructor\n   */\n  goog.DependencyFactory = function() {};\n\n\n  /**\n   * @param {string} path Absolute path of the file.\n   * @param {string} relativePath Path relative to closure\u2019s base.js.\n   * @param {!Array<string>} provides Array of provided goog.provide/module ids.\n   * @param {!Array<string>} requires Array of required goog.provide/module /\n   *     relative ES6 module paths.\n   * @param {!Object<string, string>} loadFlags\n   * @return {!goog.Dependency}\n   */\n  goog.DependencyFactory.prototype.createDependency = function(\n      path, relativePath, provides, requires, loadFlags) {\n    // MOE:begin_strip\n    var provide, require;\n    for (var i = 0; provide = provides[i]; i++) {\n      goog.dependencies_.nameToPath[provide] = relativePath;\n      goog.dependencies_.loadFlags[relativePath] = loadFlags;\n    }\n    for (var j = 0; require = requires[j]; j++) {\n      if (!(relativePath in goog.dependencies_.requires)) {\n        goog.dependencies_.requires[relativePath] = {};\n      }\n      goog.dependencies_.requires[relativePath][require] = true;\n    }\n    // MOE:end_strip\n\n    if (loadFlags['module'] == goog.ModuleType.GOOG) {\n      return new goog.GoogModuleDependency(\n          path, relativePath, provides, requires, loadFlags);\n    } else {\n      if (loadFlags['module'] == goog.ModuleType.ES6) {\n        if (goog.ASSUME_ES_MODULES_TRANSPILED) {\n          return new goog.PreTranspiledEs6ModuleDependency(\n              path, relativePath, provides, requires, loadFlags);\n        } else {\n          return new goog.Es6ModuleDependency(\n              path, relativePath, provides, requires, loadFlags);\n        }\n      } else {\n        return new goog.Dependency(\n            path, relativePath, provides, requires, loadFlags);\n      }\n    }\n  };\n\n\n  /** @private @const */\n  goog.debugLoader_ = new goog.DebugLoader_();\n\n\n  /**\n   * Loads the Closure deps.js file.\n   *\n   * Exposed a public function so after base is loaded, and\n   * then this can be called to load the closure deps.js file.\n   */\n  goog.loadClosureDeps = function() {\n    goog.debugLoader_.loadClosureDeps();\n  };\n\n\n  /**\n   * Sets the dependency factory, which can be used to create custom\n   * goog.Dependency implementations to control how dependencies are loaded.\n   *\n   * Note:\n   * You can call goog.loadClosureDeps to load the Closure dependency file\n   * later, after your factory is injected.\n   *\n   * @param {!goog.DependencyFactory} factory\n   */\n  goog.setDependencyFactory = function(factory) {\n    goog.debugLoader_.setDependencyFactory(factory);\n  };\n\n\n  /**\n   * Trusted Types policy for the debug loader.\n   * @private @const {?TrustedTypePolicy}\n   */\n  goog.TRUSTED_TYPES_POLICY_ = goog.TRUSTED_TYPES_POLICY_NAME ?\n      goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME + '#base') :\n      null;\n}\n\n\nif (!COMPILED) {\n  /**\n   * Trusted Types for running dev servers.\n   *\n   * @private @const\n   */\n  goog.CLOSURE_EVAL_PREFILTER_ = goog.global.trustedTypes &&\n          goog.createTrustedTypesPolicy('goog#base#devonly#eval') ||\n      {createScript: goog.identity_};\n}\n\n/**\n * go/goog-code-location-design\n * @enum {string}\n */\ngoog.CodeLocation = {\n  // Enums cannot be empty,\n  DO_NOT_USE: '',\n  // and need multiple distinct values so TS doesn't think `goog.CodeLocation`\n  // returns a unique singleton value.\n  DO_NOT_USE_ME_EITHER: '.',\n};\n\n/**\n * Returns the stack location of this function's caller's caller.\n * e.g:\n *   1| function foo() {\n *   2|    console.log(goog.callerLocation());\n *   3| }\n *   4| function bar() {\n *   5|    foo(); // this is the code location that goog.callerLocation returns\n *   6| }\n *   7| bar();\n *\n *  -> prints \"at bar (...filepath.ts:5:4)\" (i.e. foo() call on line 5)\n *\n * @return {!goog.CodeLocation}\n */\ngoog.callerLocation = function() {\n  if (!COMPILED) {\n    var err = new Error();\n    var stack = err.stack;\n    /**\n     * We\u2019re using index 3 for the stack split because:\n     * - index [1] returns `const err = new Error();` in base.js (above line)\n     * - index [2] returns function annotated with a goog.CodeLocation default\n     * parameter, which does the call to goog.callerLocation\n     * - index [3] returns\n     * the users call to the function which calls goog.callerLocation\n     */\n    if (stack) stack = stack.split(/\\n/g)[3];\n    if (stack) stack = stack.trim();\n    return /** @type {!goog.CodeLocation} */ (stack || '');\n  }\n  return /** @type {!goog.CodeLocation} */ ('');\n};\n\n\n/**\n * Returns a stable relatively short obfuscated string for a given input\n * string literal.\n *\n * It is guaranteed that:\n * 1. goog.callerLocationIdInternalDoNotCallOrElse(\"foo\") !=\n * goog.callerLocationIdInternalDoNotCallOrElse(\"bar\")\n * 2. goog.callerLocationIdInternalDoNotCallOrElse(\"foo\") ==\n * goog.callerLocationIdInternalDoNotCallOrElse(\"foo\")\n *\n * In unobfuscated mode, the string is just returned with '_' appended to mark\n * the processing. Unobfuscated mode is the \"u\"  and \"du\" modes in MSS, or\n * running a web dev server.\n * @param {string} id The identifier to obfuscate.\n * @return {!goog.CodeLocation}\n *\n * @idGenerator {consistent}\n */\ngoog.callerLocationIdInternalDoNotCallOrElse = function(id) {\n  return /** @type {!goog.CodeLocation} */ (id);\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Utilities for manipulating objects/maps/hashes.\n */\ngoog.module('goog.object');\ngoog.module.declareLegacyNamespace();\n\n/**\n * Calls a function for each element in an object/map/hash.\n * @param {?Object<K,V>} obj The object over which to iterate.\n * @param {function(this:T,V,?,?Object<K,V>):?} f The function to call for every\n *     element. This function takes 3 arguments (the value, the key and the\n *     object) and the return value is ignored.\n * @param {T=} opt_obj This is used as the 'this' object within f.\n * @return {void}\n * @template T,K,V\n */\nfunction forEach(obj, f, opt_obj) {\n  for (const key in obj) {\n    f.call(/** @type {?} */ (opt_obj), obj[key], key, obj);\n  }\n}\n\n/**\n * Calls a function for each element in an object/map/hash. If that call returns\n * true, adds the element to a new object.\n * @param {?Object<K,V>} obj The object over which to iterate.\n * @param {function(this:T,V,?,?Object<K,V>):boolean} f The function to call for\n *     every element. This function takes 3 arguments (the value, the key and\n *     the object) and should return a boolean. If the return value is true the\n *     element is added to the result object. If it is false the element is not\n *     included.\n * @param {T=} opt_obj This is used as the 'this' object within f.\n * @return {!Object<K,V>} a new object in which only elements that passed the\n *     test are present.\n * @template T,K,V\n */\nfunction filter(obj, f, opt_obj) {\n  const res = {};\n  for (const key in obj) {\n    if (f.call(/** @type {?} */ (opt_obj), obj[key], key, obj)) {\n      res[key] = obj[key];\n    }\n  }\n  return res;\n}\n\n/**\n * For every element in an object/map/hash calls a function and inserts the\n * result into a new object.\n * @param {?Object<K,V>} obj The object over which to iterate.\n * @param {function(this:T,V,?,?Object<K,V>):R} f The function to call for every\n *     element. This function takes 3 arguments (the value, the key and the\n *     object) and should return something. The result will be inserted into a\n *     new object.\n * @param {T=} opt_obj This is used as the 'this' object within f.\n * @return {!Object<K,R>} a new object with the results from f.\n * @template T,K,V,R\n */\nfunction map(obj, f, opt_obj) {\n  const res = {};\n  for (const key in obj) {\n    res[key] = f.call(/** @type {?} */ (opt_obj), obj[key], key, obj);\n  }\n  return res;\n}\n\n/**\n * Calls a function for each element in an object/map/hash. If any\n * call returns true, returns true (without checking the rest). If\n * all calls return false, returns false.\n * @param {?Object<K,V>} obj The object to check.\n * @param {function(this:T,V,?,?Object<K,V>):boolean} f The function to call for\n *     every element. This function takes 3 arguments (the value, the key and\n *     the object) and should return a boolean.\n * @param {T=} opt_obj This is used as the 'this' object within f.\n * @return {boolean} true if any element passes the test.\n * @template T,K,V\n */\nfunction some(obj, f, opt_obj) {\n  for (const key in obj) {\n    if (f.call(/** @type {?} */ (opt_obj), obj[key], key, obj)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * Calls a function for each element in an object/map/hash. If\n * all calls return true, returns true. If any call returns false, returns\n * false at this point and does not continue to check the remaining elements.\n * @param {?Object<K,V>} obj The object to check.\n * @param {?function(this:T,V,?,?Object<K,V>):boolean} f The function to call\n *     for every element. This function takes 3 arguments (the value, the key\n *     and the object) and should return a boolean.\n * @param {T=} opt_obj This is used as the 'this' object within f.\n * @return {boolean} false if any element fails the test.\n * @template T,K,V\n */\nfunction every(obj, f, opt_obj) {\n  for (const key in obj) {\n    if (!f.call(/** @type {?} */ (opt_obj), obj[key], key, obj)) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Returns the number of key-value pairs in the object map.\n * @param {?Object} obj The object for which to get the number of key-value\n *     pairs.\n * @return {number} The number of key-value pairs in the object map.\n */\nfunction getCount(obj) {\n  let rv = 0;\n  for (const key in obj) {\n    rv++;\n  }\n  return rv;\n}\n\n/**\n * Returns one key from the object map, if any exists.\n * For map literals the returned key will be the first one in most of the\n * browsers (a know exception is Konqueror).\n * @param {?Object} obj The object to pick a key from.\n * @return {string|undefined} The key or undefined if the object is empty.\n */\nfunction getAnyKey(obj) {\n  for (const key in obj) {\n    return key;\n  }\n}\n\n/**\n * Returns one value from the object map, if any exists.\n * For map literals the returned value will be the first one in most of the\n * browsers (a know exception is Konqueror).\n * @param {?Object<K,V>} obj The object to pick a value from.\n * @return {V|undefined} The value or undefined if the object is empty.\n * @template K,V\n */\nfunction getAnyValue(obj) {\n  for (const key in obj) {\n    return obj[key];\n  }\n}\n\n/**\n * Whether the object/hash/map contains the given object as a value.\n * An alias for containsValue(obj, val).\n * @param {?Object<K,V>} obj The object in which to look for val.\n * @param {V} val The object for which to check.\n * @return {boolean} true if val is present.\n * @template K,V\n */\nfunction contains(obj, val) {\n  return containsValue(obj, val);\n}\n\n/**\n * Returns the values of the object/map/hash.\n * @param {?Object<K,V>} obj The object from which to get the values.\n * @return {!Array<V>} The values in the object/map/hash.\n * @template K,V\n */\nfunction getValues(obj) {\n  const res = [];\n  let i = 0;\n  for (const key in obj) {\n    res[i++] = obj[key];\n  }\n  return res;\n}\n\n/**\n * Returns the keys of the object/map/hash.\n * @param {?Object} obj The object from which to get the keys.\n * @return {!Array<string>} Array of property keys.\n */\nfunction getKeys(obj) {\n  const res = [];\n  let i = 0;\n  for (const key in obj) {\n    res[i++] = key;\n  }\n  return res;\n}\n\n/**\n * Get a value from an object multiple levels deep.  This is useful for\n * pulling values from deeply nested objects, such as JSON responses.\n * Example usage: getValueByKeys(jsonObj, 'foo', 'entries', 3)\n * @param {?Object} obj An object to get the value from. Can be array-like.\n * @param {...(string|number|!IArrayLike<number|string>)} var_args A number of\n *     keys (as strings, or numbers, for array-like objects). Can also be\n *     specified as a single array of keys.\n * @return {*} The resulting value. If, at any point, the value for a key in the\n *     current object is null or undefined, returns undefined.\n */\nfunction getValueByKeys(obj, var_args) {\n  const isArrayLike = goog.isArrayLike(var_args);\n  const keys = isArrayLike ?\n      /** @type {!IArrayLike<number|string>} */ (var_args) :\n      arguments;\n\n  // Start with the 2nd parameter for the variable parameters syntax.\n  for (let i = isArrayLike ? 0 : 1; i < keys.length; i++) {\n    if (obj == null) return undefined;\n    obj = obj[keys[i]];\n  }\n\n  return obj;\n}\n\n/**\n * Whether the object/map/hash contains the given key.\n * @param {?Object} obj The object in which to look for key.\n * @param {?} key The key for which to check.\n * @return {boolean} true If the map contains the key.\n */\nfunction containsKey(obj, key) {\n  return obj !== null && key in obj;\n}\n\n/**\n * Whether the object/map/hash contains the given value. This is O(n).\n * @param {?Object<K,V>} obj The object in which to look for val.\n * @param {V} val The value for which to check.\n * @return {boolean} true If the map contains the value.\n * @template K,V\n */\nfunction containsValue(obj, val) {\n  for (const key in obj) {\n    if (obj[key] == val) {\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * Searches an object for an element that satisfies the given condition and\n * returns its key.\n * @param {?Object<K,V>} obj The object to search in.\n * @param {function(this:T,V,string,?Object<K,V>):boolean} f The function to\n *     call for every element. Takes 3 arguments (the value, the key and the\n *     object) and should return a boolean.\n * @param {T=} thisObj An optional \"this\" context for the function.\n * @return {string|undefined} The key of an element for which the function\n *     returns true or undefined if no such element is found.\n * @template T,K,V\n */\nfunction findKey(obj, f, thisObj = undefined) {\n  for (const key in obj) {\n    if (f.call(/** @type {?} */ (thisObj), obj[key], key, obj)) {\n      return key;\n    }\n  }\n  return undefined;\n}\n\n/**\n * Searches an object for an element that satisfies the given condition and\n * returns its value.\n * @param {?Object<K,V>} obj The object to search in.\n * @param {function(this:T,V,string,?Object<K,V>):boolean} f The function to\n *     call for every element. Takes 3 arguments (the value, the key and the\n *     object) and should return a boolean.\n * @param {T=} thisObj An optional \"this\" context for the function.\n * @return {V} The value of an element for which the function returns true or\n *     undefined if no such element is found.\n * @template T,K,V\n */\nfunction findValue(obj, f, thisObj = undefined) {\n  const key = findKey(obj, f, thisObj);\n  return key && obj[key];\n}\n\n/**\n * Whether the object/map/hash is empty.\n * @param {?Object} obj The object to test.\n * @return {boolean} true if obj is empty.\n */\nfunction isEmpty(obj) {\n  for (const key in obj) {\n    return false;\n  }\n  return true;\n}\n\n/**\n * Removes all key value pairs from the object/map/hash.\n * @param {?Object} obj The object to clear.\n * @return {void}\n */\nfunction clear(obj) {\n  for (const i in obj) {\n    delete obj[i];\n  }\n}\n\n/**\n * Removes a key-value pair based on the key.\n * @param {?Object} obj The object from which to remove the key.\n * @param {?} key The key to remove.\n * @return {boolean} Whether an element was removed.\n */\nfunction remove(obj, key) {\n  let rv;\n  if (rv = key in /** @type {!Object} */ (obj)) {\n    delete obj[key];\n  }\n  return rv;\n}\n\n/**\n * Adds a key-value pair to the object. Throws an exception if the key is\n * already in use. Use set if you want to change an existing pair.\n * @param {?Object<K,V>} obj The object to which to add the key-value pair.\n * @param {string} key The key to add.\n * @param {V} val The value to add.\n * @return {void}\n * @template K,V\n */\nfunction add(obj, key, val) {\n  if (obj !== null && key in obj) {\n    throw new Error(`The object already contains the key \"${key}\"`);\n  }\n  set(obj, key, val);\n}\n\n/**\n * Returns the value for the given key.\n * @param {?Object<K,V>} obj The object from which to get the value.\n * @param {string} key The key for which to get the value.\n * @param {R=} val The value to return if no item is found for the given key\n *     (default is undefined).\n * @return {V|R|undefined} The value for the given key.\n * @template K,V,R\n */\nfunction get(obj, key, val = undefined) {\n  if (obj !== null && key in obj) {\n    return obj[key];\n  }\n  return val;\n}\n\n/**\n * Adds a key-value pair to the object/map/hash.\n * @param {?Object<K,V>} obj The object to which to add the key-value pair.\n * @param {string} key The key to add.\n * @param {V} value The value to add.\n * @template K,V\n * @return {void}\n */\nfunction set(obj, key, value) {\n  obj[key] = value;\n}\n\n/**\n * Adds a key-value pair to the object/map/hash if it doesn't exist yet.\n * @param {?Object<K,V>} obj The object to which to add the key-value pair.\n * @param {string} key The key to add.\n * @param {V} value The value to add if the key wasn't present.\n * @return {V} The value of the entry at the end of the function.\n * @template K,V\n */\nfunction setIfUndefined(obj, key, value) {\n  return key in /** @type {!Object} */ (obj) ? obj[key] : (obj[key] = value);\n}\n\n/**\n * Sets a key and value to an object if the key is not set. The value will be\n * the return value of the given function. If the key already exists, the\n * object will not be changed and the function will not be called (the function\n * will be lazily evaluated -- only called if necessary).\n * This function is particularly useful when used with an `Object` which is\n * acting as a cache.\n * @param {?Object<K,V>} obj The object to which to add the key-value pair.\n * @param {string} key The key to add.\n * @param {function():V} f The value to add if the key wasn't present.\n * @return {V} The value of the entry at the end of the function.\n * @template K,V\n */\nfunction setWithReturnValueIfNotSet(obj, key, f) {\n  if (key in obj) {\n    return obj[key];\n  }\n\n  const val = f();\n  obj[key] = val;\n  return val;\n}\n\n/**\n * Compares two objects for equality using === on the values.\n * @param {!Object<K,V>} a\n * @param {!Object<K,V>} b\n * @return {boolean}\n * @template K,V\n */\nfunction equals(a, b) {\n  for (const k in a) {\n    if (!(k in b) || a[k] !== b[k]) {\n      return false;\n    }\n  }\n  for (const k in b) {\n    if (!(k in a)) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Returns a shallow clone of the object.\n * @param {?Object<K,V>} obj Object to clone.\n * @return {!Object<K,V>} Clone of the input object.\n * @template K,V\n */\nfunction clone(obj) {\n  const res = {};\n  for (const key in obj) {\n    res[key] = obj[key];\n  }\n  return res;\n}\n\n/**\n * Clones a value. The input may be an Object, Array, or basic type. Objects and\n * arrays will be cloned recursively.\n * WARNINGS:\n * <code>unsafeClone</code> does not detect reference loops. Objects\n * that refer to themselves will cause infinite recursion.\n * <code>unsafeClone</code> is unaware of unique identifiers, and\n * copies UIDs created by <code>getUid</code> into cloned results.\n * @param {T} obj The value to clone.\n * @return {T} A clone of the input value.\n * @template T\n */\nfunction unsafeClone(obj) {\n  if (!obj || typeof obj !== 'object') return obj;\n  if (typeof obj.clone === 'function') return obj.clone();\n  if (typeof Map !== 'undefined' && obj instanceof Map) {\n    return new Map(obj);\n  } else if (typeof Set !== 'undefined' && obj instanceof Set) {\n    return new Set(obj);\n  } else if (obj instanceof Date) {\n    return new Date(obj.getTime());\n  }\n  const clone = Array.isArray(obj) ? [] :\n      typeof ArrayBuffer === 'function' &&\n          typeof ArrayBuffer.isView === 'function' && ArrayBuffer.isView(obj) &&\n          !(obj instanceof DataView) ?\n                                     new obj.constructor(obj.length) :\n                                     {};\n  for (const key in obj) {\n    clone[key] = unsafeClone(obj[key]);\n  }\n  return clone;\n}\n\n/**\n * Returns a new object in which all the keys and values are interchanged\n * (keys become values and values become keys). If multiple keys map to the\n * same value, the chosen transposed value is implementation-dependent.\n * @param {?Object} obj The object to transpose.\n * @return {!Object} The transposed object.\n */\nfunction transpose(obj) {\n  const transposed = {};\n  for (const key in obj) {\n    transposed[obj[key]] = key;\n  }\n  return transposed;\n}\n\n/**\n * The names of the fields that are defined on Object.prototype.\n * @type {!Array<string>}\n */\nconst PROTOTYPE_FIELDS = [\n  'constructor',\n  'hasOwnProperty',\n  'isPrototypeOf',\n  'propertyIsEnumerable',\n  'toLocaleString',\n  'toString',\n  'valueOf',\n];\n\n/**\n * Extends an object with another object.\n * This operates 'in-place'; it does not create a new Object.\n * Example:\n * var o = {};\n * extend(o, {a: 0, b: 1});\n * o; // {a: 0, b: 1}\n * extend(o, {b: 2, c: 3});\n * o; // {a: 0, b: 2, c: 3}\n * @param {?Object} target The object to modify. Existing properties will be\n *     overwritten if they are also present in one of the objects in `var_args`.\n * @param {...(?Object|undefined)} var_args The objects from which values\n *     will be copied.\n * @return {void}\n * @deprecated Prefer Object.assign\n */\nfunction extend(target, var_args) {\n  let key;\n  let source;\n  for (let i = 1; i < arguments.length; i++) {\n    source = arguments[i];\n    for (key in source) {\n      target[key] = source[key];\n    }\n\n    // For IE the for-in-loop does not contain any properties that are not\n    // enumerable on the prototype object (for example isPrototypeOf from\n    // Object.prototype) and it will also not include 'replace' on objects that\n    // extend String and change 'replace' (not that it is common for anyone to\n    // extend anything except Object).\n\n    for (let j = 0; j < PROTOTYPE_FIELDS.length; j++) {\n      key = PROTOTYPE_FIELDS[j];\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n}\n\n/**\n * Creates a new object built from the key-value pairs provided as arguments.\n * @param {...*} var_args If only one argument is provided and it is an array\n *     then this is used as the arguments, otherwise even arguments are used as\n *     the property names and odd arguments are used as the property values.\n * @return {!Object} The new object.\n * @throws {!Error} If there are uneven number of arguments or there is only one\n *     non array argument.\n */\nfunction create(var_args) {\n  const argLength = arguments.length;\n  if (argLength == 1 && Array.isArray(arguments[0])) {\n    return create.apply(null, arguments[0]);\n  }\n\n  if (argLength % 2) {\n    throw new Error('Uneven number of arguments');\n  }\n\n  const rv = {};\n  for (let i = 0; i < argLength; i += 2) {\n    rv[arguments[i]] = arguments[i + 1];\n  }\n  return rv;\n}\n\n/**\n * Creates a new object where the property names come from the arguments but\n * the value is always set to true\n * @param {...*} var_args If only one argument is provided and it is an array\n *     then this is used as the arguments, otherwise the arguments are used as\n *     the property names.\n * @return {!Object} The new object.\n */\nfunction createSet(var_args) {\n  const argLength = arguments.length;\n  if (argLength == 1 && Array.isArray(arguments[0])) {\n    return createSet.apply(null, arguments[0]);\n  }\n\n  const rv = {};\n  for (let i = 0; i < argLength; i++) {\n    rv[arguments[i]] = true;\n  }\n  return rv;\n}\n\n/**\n * Creates an immutable view of the underlying object, if the browser\n * supports immutable objects.\n * In default mode, writes to this view will fail silently. In strict mode,\n * they will throw an error.\n * @param {!Object<K,V>} obj An object.\n * @return {!Object<K,V>} An immutable view of that object, or the original\n *     object if this browser does not support immutables.\n * @template K,V\n */\nfunction createImmutableView(obj) {\n  let result = obj;\n  if (Object.isFrozen && !Object.isFrozen(obj)) {\n    result = Object.create(obj);\n    Object.freeze(result);\n  }\n  return result;\n}\n\n/**\n * @param {!Object} obj An object.\n * @return {boolean} Whether this is an immutable view of the object.\n */\nfunction isImmutableView(obj) {\n  return !!Object.isFrozen && Object.isFrozen(obj);\n}\n\n/**\n * Get all properties names on a given Object regardless of enumerability.\n * <p> If the browser does not support `Object.getOwnPropertyNames` nor\n * `Object.getPrototypeOf` then this is equivalent to using\n * `getKeys`\n * @param {?Object} obj The object to get the properties of.\n * @param {boolean=} includeObjectPrototype Whether properties defined on\n *     `Object.prototype` should be included in the result.\n * @param {boolean=} includeFunctionPrototype Whether properties defined on\n *     `Function.prototype` should be included in the result.\n * @return {!Array<string>}\n * @public\n */\nfunction getAllPropertyNames(\n    obj, includeObjectPrototype = undefined,\n    includeFunctionPrototype = undefined) {\n  if (!obj) {\n    return [];\n  }\n\n  // Naively use a for..in loop to get the property names if the browser doesn't\n  // support any other APIs for getting it.\n  if (!Object.getOwnPropertyNames || !Object.getPrototypeOf) {\n    return getKeys(obj);\n  }\n\n  const visitedSet = {};\n\n  // Traverse the prototype chain and add all properties to the visited set.\n  let proto = obj;\n  while (proto && (proto !== Object.prototype || !!includeObjectPrototype) &&\n         (proto !== Function.prototype || !!includeFunctionPrototype)) {\n    const names = Object.getOwnPropertyNames(proto);\n    for (let i = 0; i < names.length; i++) {\n      visitedSet[names[i]] = true;\n    }\n    proto = Object.getPrototypeOf(proto);\n  }\n\n  return getKeys(visitedSet);\n}\n\n/**\n * Given a ES5 or ES6 class reference, return its super class / super\n * constructor.\n * This should be used in rare cases where you need to walk up the inheritance\n * tree (this is generally a bad idea). But this work with ES5 and ES6 classes,\n * unlike relying on the superClass_ property.\n * Note: To start walking up the hierarchy from an instance call this with its\n * `constructor` property; e.g. `getSuperClass(instance.constructor)`.\n * @param {function(new: ?)} constructor\n * @return {?Object}\n */\nfunction getSuperClass(constructor) {\n  const proto = Object.getPrototypeOf(constructor.prototype);\n  return proto && proto.constructor;\n}\n\nexports = {\n  add,\n  clear,\n  clone,\n  contains,\n  containsKey,\n  containsValue,\n  create,\n  createImmutableView,\n  createSet,\n  equals,\n  every,\n  extend,\n  filter,\n  findKey,\n  findValue,\n  forEach,\n  get,\n  getAllPropertyNames,\n  getAnyKey,\n  getAnyValue,\n  getCount,\n  getKeys,\n  getSuperClass,\n  getValueByKeys,\n  getValues,\n  isEmpty,\n  isImmutableView,\n  map,\n  remove,\n  set,\n  setIfUndefined,\n  setWithReturnValueIfNotSet,\n  some,\n  transpose,\n  unsafeClone,\n};\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview String functions called from Closure packages that couldn't\n * depend on each other. Outside Closure, use goog.string function which\n * delegate to these.\n */\n\n\ngoog.module('goog.string.internal');\n\ngoog.module.declareLegacyNamespace();\n\n/**\n * Fast prefix-checker.\n * @param {string} str The string to check.\n * @param {string} prefix A string to look for at the start of `str`.\n * @return {boolean} True if `str` begins with `prefix`.\n * @see goog.string.startsWith\n */\nfunction startsWith(str, prefix) {\n  return str.lastIndexOf(prefix, 0) == 0;\n}\n\n/**\n * Fast suffix-checker.\n * @param {string} str The string to check.\n * @param {string} suffix A string to look for at the end of `str`.\n * @return {boolean} True if `str` ends with `suffix`.\n * @see goog.string.endsWith\n */\nfunction endsWith(str, suffix) {\n  const l = str.length - suffix.length;\n  return l >= 0 && str.indexOf(suffix, l) == l;\n}\n\n/**\n * Case-insensitive prefix-checker.\n * @param {string} str The string to check.\n * @param {string} prefix  A string to look for at the end of `str`.\n * @return {boolean} True if `str` begins with `prefix` (ignoring\n *     case).\n * @see goog.string.caseInsensitiveStartsWith\n */\nfunction caseInsensitiveStartsWith(str, prefix) {\n  return (caseInsensitiveCompare(prefix, str.slice(0, prefix.length)) == 0);\n}\n\n/**\n * Case-insensitive suffix-checker.\n * @param {string} str The string to check.\n * @param {string} suffix A string to look for at the end of `str`.\n * @return {boolean} True if `str` ends with `suffix` (ignoring\n *     case).\n * @see goog.string.caseInsensitiveEndsWith\n */\nfunction caseInsensitiveEndsWith(str, suffix) {\n  return (\n      caseInsensitiveCompare(suffix, str.slice(str.length - suffix.length)) ==\n      0);\n}\n\n/**\n * Case-insensitive equality checker.\n * @param {string} str1 First string to check.\n * @param {string} str2 Second string to check.\n * @return {boolean} True if `str1` and `str2` are the same string,\n *     ignoring case.\n * @see goog.string.caseInsensitiveEquals\n */\nfunction caseInsensitiveEquals(str1, str2) {\n  return str1.toLowerCase() == str2.toLowerCase();\n}\n\n/**\n * Checks if a string is empty or contains only whitespaces.\n * @param {string} str The string to check.\n * @return {boolean} Whether `str` is empty or whitespace only.\n * @see goog.string.isEmptyOrWhitespace\n */\nfunction isEmptyOrWhitespace(str) {\n  // testing length == 0 first is actually slower in all browsers (about the\n  // same in Opera).\n  // Since IE doesn't include non-breaking-space (0xa0) in their \\s character\n  // class (as required by section 7.2 of the ECMAScript spec), we explicitly\n  // include it in the regexp to enforce consistent cross-browser behavior.\n  return /^[\\s\\xa0]*$/.test(str);\n}\n\n/**\n * Trims white spaces to the left and right of a string.\n * @param {string} str The string to trim.\n * @return {string} A trimmed copy of `str`.\n */\nconst trim = (goog.TRUSTED_SITE &&\n              (goog.FEATURESET_YEAR >= 2018 || String.prototype.trim)) ?\n    function(str) {\n      return str.trim();\n    } :\n    function(str) {\n      // Since IE doesn't include non-breaking-space (0xa0) in their \\s\n      // character class (as required by section 7.2 of the ECMAScript spec),\n      // we explicitly include it in the regexp to enforce consistent\n      // cross-browser behavior.\n      // NOTE: We don't use String#replace because it might have side effects\n      // causing this function to not compile to 0 bytes.\n      return /^[\\s\\xa0]*([\\s\\S]*?)[\\s\\xa0]*$/.exec(str)[1];\n    };\n\n/**\n * A string comparator that ignores case.\n * -1 = str1 less than str2\n *  0 = str1 equals str2\n *  1 = str1 greater than str2\n *\n * @param {string} str1 The string to compare.\n * @param {string} str2 The string to compare `str1` to.\n * @return {number} The comparator result, as described above.\n * @see goog.string.caseInsensitiveCompare\n */\nfunction caseInsensitiveCompare(str1, str2) {\n  const test1 = String(str1).toLowerCase();\n  const test2 = String(str2).toLowerCase();\n\n  if (test1 < test2) {\n    return -1;\n  } else if (test1 == test2) {\n    return 0;\n  } else {\n    return 1;\n  }\n}\n\n/**\n * Converts \\n to <br>s or <br />s.\n * @param {string} str The string in which to convert newlines.\n * @param {boolean=} opt_xml Whether to use XML compatible tags.\n * @return {string} A copy of `str` with converted newlines.\n * @see goog.string.newLineToBr\n */\nfunction newLineToBr(str, opt_xml) {\n  return str.replace(/(\\r\\n|\\r|\\n)/g, opt_xml ? '<br />' : '<br>');\n}\n\n/**\n * Escapes double quote '\"' and single quote '\\'' characters in addition to\n * '&', '<', and '>' so that a string can be included in an HTML tag attribute\n * value within double or single quotes.\n * @param {string} str string to be escaped.\n * @param {boolean=} opt_isLikelyToContainHtmlChars\n * @return {string} An escaped copy of `str`.\n * @see goog.string.htmlEscape\n */\nfunction htmlEscape(str, opt_isLikelyToContainHtmlChars) {\n  if (opt_isLikelyToContainHtmlChars) {\n    str = str.replace(AMP_RE, '&amp;')\n              .replace(LT_RE, '&lt;')\n              .replace(GT_RE, '&gt;')\n              .replace(QUOT_RE, '&quot;')\n              .replace(SINGLE_QUOTE_RE, '&#39;')\n              .replace(NULL_RE, '&#0;');\n    return str;\n\n  } else {\n    // quick test helps in the case when there are no chars to replace, in\n    // worst case this makes barely a difference to the time taken\n    if (!ALL_RE.test(str)) return str;\n\n    // str.indexOf is faster than regex.test in this case\n    if (str.indexOf('&') != -1) {\n      str = str.replace(AMP_RE, '&amp;');\n    }\n    if (str.indexOf('<') != -1) {\n      str = str.replace(LT_RE, '&lt;');\n    }\n    if (str.indexOf('>') != -1) {\n      str = str.replace(GT_RE, '&gt;');\n    }\n    if (str.indexOf('\"') != -1) {\n      str = str.replace(QUOT_RE, '&quot;');\n    }\n    if (str.indexOf('\\'') != -1) {\n      str = str.replace(SINGLE_QUOTE_RE, '&#39;');\n    }\n    if (str.indexOf('\\x00') != -1) {\n      str = str.replace(NULL_RE, '&#0;');\n    }\n    return str;\n  }\n}\n\n/**\n * Regular expression that matches an ampersand, for use in escaping.\n * @const {!RegExp}\n */\nconst AMP_RE = /&/g;\n\n/**\n * Regular expression that matches a less than sign, for use in escaping.\n * @const {!RegExp}\n */\nconst LT_RE = /</g;\n\n/**\n * Regular expression that matches a greater than sign, for use in escaping.\n * @const {!RegExp}\n */\nconst GT_RE = />/g;\n\n/**\n * Regular expression that matches a double quote, for use in escaping.\n * @const {!RegExp}\n */\nconst QUOT_RE = /\"/g;\n\n/**\n * Regular expression that matches a single quote, for use in escaping.\n * @const {!RegExp}\n */\nconst SINGLE_QUOTE_RE = /'/g;\n\n/**\n * Regular expression that matches null character, for use in escaping.\n * @const {!RegExp}\n */\nconst NULL_RE = /\\x00/g;\n\n/**\n * Regular expression that matches any character that needs to be escaped.\n * @const {!RegExp}\n */\nconst ALL_RE = /[\\x00&<>\"']/;\n\n/**\n * Do escaping of whitespace to preserve spatial formatting. We use character\n * entity #160 to make it safer for xml.\n * @param {string} str The string in which to escape whitespace.\n * @param {boolean=} opt_xml Whether to use XML compatible tags.\n * @return {string} An escaped copy of `str`.\n * @see goog.string.whitespaceEscape\n */\nfunction whitespaceEscape(str, opt_xml) {\n  // This doesn't use goog.string.preserveSpaces for backwards compatibility.\n  return newLineToBr(str.replace(/  /g, ' &#160;'), opt_xml);\n}\n\n/**\n * Determines whether a string contains a substring.\n * @param {string} str The string to search.\n * @param {string} subString The substring to search for.\n * @return {boolean} Whether `str` contains `subString`.\n * @see goog.string.contains\n */\nfunction contains(str, subString) {\n  return str.indexOf(subString) != -1;\n}\n\n/**\n * Determines whether a string contains a substring, ignoring case.\n * @param {string} str The string to search.\n * @param {string} subString The substring to search for.\n * @return {boolean} Whether `str` contains `subString`.\n * @see goog.string.caseInsensitiveContains\n */\nfunction caseInsensitiveContains(str, subString) {\n  return contains(str.toLowerCase(), subString.toLowerCase());\n}\n\n/**\n * Compares two version numbers.\n *\n * @param {string|number} version1 Version of first item.\n * @param {string|number} version2 Version of second item.\n *\n * @return {number}  1 if `version1` is higher.\n *                   0 if arguments are equal.\n *                  -1 if `version2` is higher.\n * @see goog.string.compareVersions\n */\nfunction compareVersions(version1, version2) {\n  let order = 0;\n  // Trim leading and trailing whitespace and split the versions into\n  // subversions.\n  const v1Subs = trim(String(version1)).split('.');\n  const v2Subs = trim(String(version2)).split('.');\n  const subCount = Math.max(v1Subs.length, v2Subs.length);\n\n  // Iterate over the subversions, as long as they appear to be equivalent.\n  for (let subIdx = 0; order == 0 && subIdx < subCount; subIdx++) {\n    let v1Sub = v1Subs[subIdx] || '';\n    let v2Sub = v2Subs[subIdx] || '';\n\n    do {\n      // Split the subversions into pairs of numbers and qualifiers (like 'b').\n      // Two different RegExp objects are use to make it clear the code\n      // is side-effect free\n      const v1Comp = /(\\d*)(\\D*)(.*)/.exec(v1Sub) || ['', '', '', ''];\n      const v2Comp = /(\\d*)(\\D*)(.*)/.exec(v2Sub) || ['', '', '', ''];\n      // Break if there are no more matches.\n      if (v1Comp[0].length == 0 && v2Comp[0].length == 0) {\n        break;\n      }\n\n      // Parse the numeric part of the subversion. A missing number is\n      // equivalent to 0.\n      const v1CompNum = v1Comp[1].length == 0 ? 0 : parseInt(v1Comp[1], 10);\n      const v2CompNum = v2Comp[1].length == 0 ? 0 : parseInt(v2Comp[1], 10);\n\n      // Compare the subversion components. The number has the highest\n      // precedence. Next, if the numbers are equal, a subversion without any\n      // qualifier is always higher than a subversion with any qualifier. Next,\n      // the qualifiers are compared as strings.\n      order = compareElements(v1CompNum, v2CompNum) ||\n          compareElements(v1Comp[2].length == 0, v2Comp[2].length == 0) ||\n          compareElements(v1Comp[2], v2Comp[2]);\n      // Stop as soon as an inequality is discovered.\n\n      v1Sub = v1Comp[3];\n      v2Sub = v2Comp[3];\n    } while (order == 0);\n  }\n\n  return order;\n}\n\n/**\n * Compares elements of a version number.\n *\n * @param {string|number|boolean} left An element from a version number.\n * @param {string|number|boolean} right An element from a version number.\n *\n * @return {number}  1 if `left` is higher.\n *                   0 if arguments are equal.\n *                  -1 if `right` is higher.\n */\nfunction compareElements(left, right) {\n  if (left < right) {\n    return -1;\n  } else if (left > right) {\n    return 1;\n  }\n  return 0;\n}\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n\nexports = {\n  caseInsensitiveCompare,\n  caseInsensitiveContains,\n  caseInsensitiveEndsWith,\n  caseInsensitiveEquals,\n  caseInsensitiveStartsWith,\n  compareVersions,\n  contains,\n  endsWith,\n  htmlEscape,\n  isEmptyOrWhitespace,\n  newLineToBr,\n  startsWith,\n  trim,\n  whitespaceEscape,\n};\n","/**\n * @fileoverview Helper methods for checking program state.\n *\n * Statically all helpers assert that the type of the input is sufficiently\n * narrow. At runtime the helpers behave in two different ways:\n * - checkExhaustive* - unconditionally throws.\n * - assumeExhaustive* - does nothing.\n *\n * Prefer `checkExhaustive()` unless you find yourself writing\n * `try {\n *    checkExhaustive(value);\n *  } catch (error) {\n *    // Handle the error.\n *  }`\n * in which case use `assumeExhaustive()` directly, without the `try`.\n */\n\n/**\n * Throw an exception on unexpected values.\n *\n * checkExhaustive can be used along with type narrowing to ensure at\n * compile time that all possible types for a value have been handled. For cases\n * where exhaustiveness can not be guaranteed at compile time (i.e. proto enums)\n * an exception will be thrown.\n *\n * A common use-case is in switch statements:\n *\n * ```\n * // enumValue: Enum.A | Enum.B\n * switch(enumValue) {\n *   case Enum.A:\n *   case Enum.B:\n *     break;\n *   default:\n *     checkExhaustive(enumValue);\n * }\n * ```\n *\n * This method throws an exception rather than using an assertion because\n * assertions are stripped in production code and we need the check to fail in\n * production.\n *\n * @param value The value to be checked\n * @param msg An optional error message to throw\n */\nexport function checkExhaustive(value: never, msg?: string): never {\n  return checkExhaustiveAllowing<never>(value, msg);\n}\n\n/**\n * Throw an exception on unexpected values.\n *\n * checkExhaustiveAllowing is similar to checkExhaustive, with one difference\n * that user can specify expected type of value other than 'never'.\n *\n * The template parameter is absolutely required so that the type checker can\n * actually ensure that nothing other than the explicitly-allowed types is\n * passed.  If the allowed type is broader than you expect, consider trying a\n * different approach to narrow it, or else using the go/guards-and-assertions\n * library to make a different kind of assertion.\n *\n * It is useful when enum contains values that should never occur. Those should\n * be passed as the type argument to checkExhaustiveAllowing. A common use-case\n * would be like:\n *\n * ```\n * // enumValue: Enum.A | Enum.B | Enum.UNSPECIFIED | Enum.UNKNOWN\n * switch(enumValue) {\n *   case Enum.A:\n *   case Enum.B:\n *     break;\n *   default:\n *     checkExhaustiveAllowing<Enum.UNSPECIFIED|Enum.UNKNOWN>(enumValue);\n * }\n * ```\n *\n * @param value The value to be checked\n * @param msg An optional error message to throw\n */\nexport function checkExhaustiveAllowing<\n  Allowed = never,\n  Arg extends Allowed = Allowed,\n>(value: Arg, msg = `unexpected value ${value}!`): never {\n  throw new Error(msg);\n}\n\n/**\n * Type argument for legacy incorrect usages of `checkExhaustiveAllowing`.\n * This function is intended to be called with an explicit template parameter,\n * but this was not always enforced. When the parameter is elided, the type\n * checker cannot actually verify anything useful. This placeholder type allows\n * legacy callsites to continue passing type checking, but should not be used in\n * new calls.\n *\n * Consider replacing the call to `checkExhaustiveAllowing` with a call to the\n * Guards and Assertions library (go/guards-and-assertions).\n */\nexport type LegacyIncorrectUsage = unknown;\n\n/**\n * Fail to compile on unexpected values.\n *\n * assumeExhaustive can be used along with type narrowing to ensure at compile\n * time that all possible types for a value have been handled. At runtime it is\n * a no-op.\n *\n * A common use-case is in switch statements:\n *\n * ```\n * // sensibleDefault: string\n * // numericEnumValue: Enum.A | Enum.B\n * switch(numericEnumValue) {\n *   case Enum.A:\n *     return 'A';\n *   case Enum.B:\n *     return 'B';\n *   default:\n *     assumeExhaustive(numericEnumValue);\n *     return sensibleDefault;\n * }\n * ```\n */\nexport function assumeExhaustive(value: never): void {}\n\n/**\n * Fail to compile on unexpected values.\n *\n * assumeExhaustiveAllowing is similar to assumeExhaustive, with one difference\n * that user can specify expected type of value other than 'never'.\n *\n * It is useful when enum contains values that should never occur. Those should\n * be passed as the type argument to assumeExhaustiveAllowing. A common use-case\n * would be like:\n *\n * ```\n * // enumValue: Enum.A | Enum.B | Enum.UNSPECIFIED | Enum.UNKNOWN\n * switch(enumValue) {\n *   case Enum.A:\n *     break;\n *   case Enum.B:\n *     break;\n *   default:\n *     assumeExhaustiveAllowing<Enum.UNSPECIFIED|Enum.UNKNOWN>(enumValue);\n *     break;\n * }\n * ```\n */\nexport function assumeExhaustiveAllowing<\n  Allowed = never,\n  Arg extends Allowed = Allowed,\n>(value: Arg): void {}\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Utilities for manipulating arrays.\n */\n\n\ngoog.module('goog.array');\ngoog.module.declareLegacyNamespace();\n\nconst asserts = goog.require('goog.asserts');\n\n\n/**\n * @define {boolean} NATIVE_ARRAY_PROTOTYPES indicates whether the code should\n * rely on Array.prototype functions, if available.\n *\n * The Array.prototype functions can be defined by external libraries like\n * Prototype and setting this flag to false forces closure to use its own\n * goog.array implementation.\n *\n * If your javascript can be loaded by a third party site and you are wary about\n * relying on the prototype functions, specify\n * \"--define goog.NATIVE_ARRAY_PROTOTYPES=false\" to the JSCompiler.\n *\n * Setting goog.TRUSTED_SITE to false will automatically set\n * NATIVE_ARRAY_PROTOTYPES to false.\n */\ngoog.NATIVE_ARRAY_PROTOTYPES =\n    goog.define('goog.NATIVE_ARRAY_PROTOTYPES', goog.TRUSTED_SITE);\n\n\n/**\n * @define {boolean} If true, JSCompiler will use the native implementation of\n * array functions where appropriate (e.g., `Array#filter`) and remove the\n * unused pure JS implementation.\n */\nconst ASSUME_NATIVE_FUNCTIONS = goog.define(\n    'goog.array.ASSUME_NATIVE_FUNCTIONS', goog.FEATURESET_YEAR > 2012);\nexports.ASSUME_NATIVE_FUNCTIONS = ASSUME_NATIVE_FUNCTIONS;\n\n\n/**\n * Returns the last element in an array without removing it.\n * Same as {@link goog.array.last}.\n * @param {IArrayLike<T>|string} array The array.\n * @return {T} Last item in array.\n * @template T\n */\nfunction peek(array) {\n  return array[array.length - 1];\n}\nexports.peek = peek;\n\n\n/**\n * Returns the last element in an array without removing it.\n * Same as {@link goog.array.peek}.\n * @param {IArrayLike<T>|string} array The array.\n * @return {T} Last item in array.\n * @template T\n */\nexports.last = peek;\n\n// NOTE(arv): Since most of the array functions are generic it allows you to\n// pass an array-like object. Strings have a length and are considered array-\n// like. However, the 'in' operator does not work on strings so we cannot just\n// use the array path even if the browser supports indexing into strings. We\n// therefore end up splitting the string.\n\n\n/**\n * Returns the index of the first element of an array with a specified value, or\n * -1 if the element is not present in the array.\n *\n * See {@link http://tinyurl.com/developer-mozilla-org-array-indexof}\n *\n * @param {IArrayLike<T>|string} arr The array to be searched.\n * @param {T} obj The object for which we are searching.\n * @param {number=} opt_fromIndex The index at which to start the search. If\n *     omitted the search starts at index 0.\n * @return {number} The index of the first matching array element.\n * @template T\n */\nconst indexOf = goog.NATIVE_ARRAY_PROTOTYPES &&\n        (ASSUME_NATIVE_FUNCTIONS || Array.prototype.indexOf) ?\n    function(arr, obj, opt_fromIndex) {\n      asserts.assert(arr.length != null);\n\n      return Array.prototype.indexOf.call(arr, obj, opt_fromIndex);\n    } :\n    function(arr, obj, opt_fromIndex) {\n      const fromIndex = opt_fromIndex == null ?\n          0 :\n          (opt_fromIndex < 0 ? Math.max(0, arr.length + opt_fromIndex) :\n                               opt_fromIndex);\n\n      if (typeof arr === 'string') {\n        // Array.prototype.indexOf uses === so only strings should be found.\n        if (typeof obj !== 'string' || obj.length != 1) {\n          return -1;\n        }\n        return arr.indexOf(obj, fromIndex);\n      }\n\n      for (let i = fromIndex; i < arr.length; i++) {\n        if (i in arr && arr[i] === obj) return i;\n      }\n      return -1;\n    };\nexports.indexOf = indexOf;\n\n\n/**\n * Returns the index of the last element of an array with a specified value, or\n * -1 if the element is not present in the array.\n *\n * See {@link http://tinyurl.com/developer-mozilla-org-array-lastindexof}\n *\n * @param {!IArrayLike<T>|string} arr The array to be searched.\n * @param {T} obj The object for which we are searching.\n * @param {?number=} opt_fromIndex The index at which to start the search. If\n *     omitted the search starts at the end of the array.\n * @return {number} The index of the last matching array element.\n * @template T\n */\nconst lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES &&\n        (ASSUME_NATIVE_FUNCTIONS || Array.prototype.lastIndexOf) ?\n    function(arr, obj, opt_fromIndex) {\n      asserts.assert(arr.length != null);\n\n      // Firefox treats undefined and null as 0 in the fromIndex argument which\n      // leads it to always return -1\n      const fromIndex = opt_fromIndex == null ? arr.length - 1 : opt_fromIndex;\n      return Array.prototype.lastIndexOf.call(arr, obj, fromIndex);\n    } :\n    function(arr, obj, opt_fromIndex) {\n      let fromIndex = opt_fromIndex == null ? arr.length - 1 : opt_fromIndex;\n\n      if (fromIndex < 0) {\n        fromIndex = Math.max(0, arr.length + fromIndex);\n      }\n\n      if (typeof arr === 'string') {\n        // Array.prototype.lastIndexOf uses === so only strings should be found.\n        if (typeof obj !== 'string' || obj.length != 1) {\n          return -1;\n        }\n        return arr.lastIndexOf(obj, fromIndex);\n      }\n\n      for (let i = fromIndex; i >= 0; i--) {\n        if (i in arr && arr[i] === obj) return i;\n      }\n      return -1;\n    };\nexports.lastIndexOf = lastIndexOf;\n\n\n/**\n * Calls a function for each element in an array. Skips holes in the array.\n * See {@link http://tinyurl.com/developer-mozilla-org-array-foreach}\n *\n * @param {IArrayLike<T>|string} arr Array or array like object over\n *     which to iterate.\n * @param {?function(this: S, T, number, ?): ?} f The function to call for every\n *     element. This function takes 3 arguments (the element, the index and the\n *     array). The return value is ignored.\n * @param {S=} opt_obj The object to be used as the value of 'this' within f.\n * @template T,S\n */\nconst forEach = goog.NATIVE_ARRAY_PROTOTYPES &&\n        (ASSUME_NATIVE_FUNCTIONS || Array.prototype.forEach) ?\n    function(arr, f, opt_obj) {\n      asserts.assert(arr.length != null);\n\n      Array.prototype.forEach.call(arr, f, opt_obj);\n    } :\n    function(arr, f, opt_obj) {\n      const l = arr.length;  // must be fixed during loop... see docs\n      const arr2 = (typeof arr === 'string') ? arr.split('') : arr;\n      for (let i = 0; i < l; i++) {\n        if (i in arr2) {\n          f.call(/** @type {?} */ (opt_obj), arr2[i], i, arr);\n        }\n      }\n    };\nexports.forEach = forEach;\n\n\n/**\n * Calls a function for each element in an array, starting from the last\n * element rather than the first.\n *\n * @param {IArrayLike<T>|string} arr Array or array\n *     like object over which to iterate.\n * @param {?function(this: S, T, number, ?): ?} f The function to call for every\n *     element. This function\n *     takes 3 arguments (the element, the index and the array). The return\n *     value is ignored.\n * @param {S=} opt_obj The object to be used as the value of 'this'\n *     within f.\n * @template T,S\n */\nfunction forEachRight(arr, f, opt_obj) {\n  const l = arr.length;  // must be fixed during loop... see docs\n  const arr2 = (typeof arr === 'string') ? arr.split('') : arr;\n  for (let i = l - 1; i >= 0; --i) {\n    if (i in arr2) {\n      f.call(/** @type {?} */ (opt_obj), arr2[i], i, arr);\n    }\n  }\n}\nexports.forEachRight = forEachRight;\n\n\n/**\n * Calls a function for each element in an array, and if the function returns\n * true adds the element to a new array.\n *\n * See {@link http://tinyurl.com/developer-mozilla-org-array-filter}\n *\n * @param {IArrayLike<T>|string} arr Array or array\n *     like object over which to iterate.\n * @param {?function(this:S, T, number, ?):boolean} f The function to call for\n *     every element. This function\n *     takes 3 arguments (the element, the index and the array) and must\n *     return a Boolean. If the return value is true the element is added to the\n *     result array. If it is false the element is not included.\n * @param {S=} opt_obj The object to be used as the value of 'this'\n *     within f.\n * @return {!Array<T>} a new array in which only elements that passed the test\n *     are present.\n * @template T,S\n */\nconst filter = goog.NATIVE_ARRAY_PROTOTYPES &&\n        (ASSUME_NATIVE_FUNCTIONS || Array.prototype.filter) ?\n    function(arr, f, opt_obj) {\n      asserts.assert(arr.length != null);\n\n      return Array.prototype.filter.call(arr, f, opt_obj);\n    } :\n    function(arr, f, opt_obj) {\n      const l = arr.length;  // must be fixed during loop... see docs\n      const res = [];\n      let resLength = 0;\n      const arr2 = (typeof arr === 'string') ? arr.split('') : arr;\n      for (let i = 0; i < l; i++) {\n        if (i in arr2) {\n          const val = arr2[i];  // in case f mutates arr2\n          if (f.call(/** @type {?} */ (opt_obj), val, i, arr)) {\n            res[resLength++] = val;\n          }\n        }\n      }\n      return res;\n    };\nexports.filter = filter;\n\n\n/**\n * Calls a function for each element in an array and inserts the result into a\n * new array.\n *\n * See {@link http://tinyurl.com/developer-mozilla-org-array-map}\n *\n * @param {IArrayLike<VALUE>|string} arr Array or array like object\n *     over which to iterate.\n * @param {function(this:THIS, VALUE, number, ?): RESULT} f The function to call\n *     for every element. This function takes 3 arguments (the element,\n *     the index and the array) and should return something. The result will be\n *     inserted into a new array.\n * @param {THIS=} opt_obj The object to be used as the value of 'this' within f.\n * @return {!Array<RESULT>} a new array with the results from f.\n * @template THIS, VALUE, RESULT\n */\nconst map = goog.NATIVE_ARRAY_PROTOTYPES &&\n        (ASSUME_NATIVE_FUNCTIONS || Array.prototype.map) ?\n    function(arr, f, opt_obj) {\n      asserts.assert(arr.length != null);\n\n      return Array.prototype.map.call(arr, f, opt_obj);\n    } :\n    function(arr, f, opt_obj) {\n      const l = arr.length;  // must be fixed during loop... see docs\n      const res = new Array(l);\n      const arr2 = (typeof arr === 'string') ? arr.split('') : arr;\n      for (let i = 0; i < l; i++) {\n        if (i in arr2) {\n          res[i] = f.call(/** @type {?} */ (opt_obj), arr2[i], i, arr);\n        }\n      }\n      return res;\n    };\nexports.map = map;\n\n\n/**\n * Passes every element of an array into a function and accumulates the result.\n *\n * See {@link http://tinyurl.com/developer-mozilla-org-array-reduce}\n * Note that this implementation differs from the native Array.prototype.reduce\n * in that the initial value is assumed to be defined (the MDN docs linked above\n * recommend not omitting this parameter, although it is technically optional).\n *\n * For example:\n * var a = [1, 2, 3, 4];\n * reduce(a, function(r, v, i, arr) {return r + v;}, 0);\n * returns 10\n *\n * @param {IArrayLike<T>|string} arr Array or array\n *     like object over which to iterate.\n * @param {function(this:S, R, T, number, ?) : R} f The function to call for\n *     every element. This function\n *     takes 4 arguments (the function's previous result or the initial value,\n *     the value of the current array element, the current array index, and the\n *     array itself)\n *     function(previousValue, currentValue, index, array).\n * @param {?} val The initial value to pass into the function on the first call.\n * @param {S=} opt_obj  The object to be used as the value of 'this'\n *     within f.\n * @return {R} Result of evaluating f repeatedly across the values of the array.\n * @template T,S,R\n */\nconst reduce = goog.NATIVE_ARRAY_PROTOTYPES &&\n        (ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduce) ?\n    function(arr, f, val, opt_obj) {\n      asserts.assert(arr.length != null);\n      if (opt_obj) {\n        f = (goog.TRUSTED_SITE) ? f.bind(opt_obj) : goog.bind(f, opt_obj);\n      }\n      return Array.prototype.reduce.call(arr, f, val);\n    } :\n    function(arr, f, val, opt_obj) {\n      let rval = val;\n      forEach(arr, function(val, index) {\n        rval = f.call(/** @type {?} */ (opt_obj), rval, val, index, arr);\n      });\n      return rval;\n    };\nexports.reduce = reduce;\n\n\n/**\n * Passes every element of an array into a function and accumulates the result,\n * starting from the last element and working towards the first.\n *\n * See {@link http://tinyurl.com/developer-mozilla-org-array-reduceright}\n *\n * For example:\n * var a = ['a', 'b', 'c'];\n * reduceRight(a, function(r, v, i, arr) {return r + v;}, '');\n * returns 'cba'\n *\n * @param {IArrayLike<T>|string} arr Array or array\n *     like object over which to iterate.\n * @param {?function(this:S, R, T, number, ?) : R} f The function to call for\n *     every element. This function\n *     takes 4 arguments (the function's previous result or the initial value,\n *     the value of the current array element, the current array index, and the\n *     array itself)\n *     function(previousValue, currentValue, index, array).\n * @param {?} val The initial value to pass into the function on the first call.\n * @param {S=} opt_obj The object to be used as the value of 'this'\n *     within f.\n * @return {R} Object returned as a result of evaluating f repeatedly across the\n *     values of the array.\n * @template T,S,R\n */\nconst reduceRight = goog.NATIVE_ARRAY_PROTOTYPES &&\n        (ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduceRight) ?\n    function(arr, f, val, opt_obj) {\n      asserts.assert(arr.length != null);\n      asserts.assert(f != null);\n      if (opt_obj) {\n        f = (goog.TRUSTED_SITE) ? f.bind(opt_obj) : goog.bind(f, opt_obj);\n      }\n      return Array.prototype.reduceRight.call(arr, f, val);\n    } :\n    function(arr, f, val, opt_obj) {\n      let rval = val;\n      forEachRight(arr, function(val, index) {\n        rval = f.call(/** @type {?} */ (opt_obj), rval, val, index, arr);\n      });\n      return rval;\n    };\nexports.reduceRight = reduceRight;\n\n\n/**\n * Calls f for each element of an array. If any call returns true, some()\n * returns true (without checking the remaining elements). If all calls\n * return false, some() returns false.\n *\n * See {@link http://tinyurl.com/developer-mozilla-org-array-some}\n *\n * @param {IArrayLike<T>|string} arr Array or array\n *     like object over which to iterate.\n * @param {?function(this:S, T, number, ?) : boolean} f The function to call for\n *     for every element. This function takes 3 arguments (the element, the\n *     index and the array) and should return a boolean.\n * @param {S=} opt_obj  The object to be used as the value of 'this'\n *     within f.\n * @return {boolean} true if any element passes the test.\n * @template T,S\n */\nconst some = goog.NATIVE_ARRAY_PROTOTYPES &&\n        (ASSUME_NATIVE_FUNCTIONS || Array.prototype.some) ?\n    function(arr, f, opt_obj) {\n      asserts.assert(arr.length != null);\n\n      return Array.prototype.some.call(arr, f, opt_obj);\n    } :\n    function(arr, f, opt_obj) {\n      const l = arr.length;  // must be fixed during loop... see docs\n      const arr2 = (typeof arr === 'string') ? arr.split('') : arr;\n      for (let i = 0; i < l; i++) {\n        if (i in arr2 && f.call(/** @type {?} */ (opt_obj), arr2[i], i, arr)) {\n          return true;\n        }\n      }\n      return false;\n    };\nexports.some = some;\n\n\n/**\n * Call f for each element of an array. If all calls return true, every()\n * returns true. If any call returns false, every() returns false and\n * does not continue to check the remaining elements.\n *\n * See {@link http://tinyurl.com/developer-mozilla-org-array-every}\n *\n * @param {IArrayLike<T>|string} arr Array or array\n *     like object over which to iterate.\n * @param {?function(this:S, T, number, ?) : boolean} f The function to call for\n *     for every element. This function takes 3 arguments (the element, the\n *     index and the array) and should return a boolean.\n * @param {S=} opt_obj The object to be used as the value of 'this'\n *     within f.\n * @return {boolean} false if any element fails the test.\n * @template T,S\n */\nconst every = goog.NATIVE_ARRAY_PROTOTYPES &&\n        (ASSUME_NATIVE_FUNCTIONS || Array.prototype.every) ?\n    function(arr, f, opt_obj) {\n      asserts.assert(arr.length != null);\n\n      return Array.prototype.every.call(arr, f, opt_obj);\n    } :\n    function(arr, f, opt_obj) {\n      const l = arr.length;  // must be fixed during loop... see docs\n      const arr2 = (typeof arr === 'string') ? arr.split('') : arr;\n      for (let i = 0; i < l; i++) {\n        if (i in arr2 && !f.call(/** @type {?} */ (opt_obj), arr2[i], i, arr)) {\n          return false;\n        }\n      }\n      return true;\n    };\nexports.every = every;\n\n\n/**\n * Counts the array elements that fulfill the predicate, i.e. for which the\n * callback function returns true. Skips holes in the array.\n *\n * @param {!IArrayLike<T>|string} arr Array or array like object\n *     over which to iterate.\n * @param {function(this: S, T, number, ?): boolean} f The function to call for\n *     every element. Takes 3 arguments (the element, the index and the array).\n * @param {S=} opt_obj The object to be used as the value of 'this' within f.\n * @return {number} The number of the matching elements.\n * @template T,S\n */\nfunction count(arr, f, opt_obj) {\n  let count = 0;\n  forEach(arr, function(element, index, arr) {\n    if (f.call(/** @type {?} */ (opt_obj), element, index, arr)) {\n      ++count;\n    }\n  }, opt_obj);\n  return count;\n}\nexports.count = count;\n\n\n/**\n * Search an array for the first element that satisfies a given condition and\n * return that element.\n * @param {IArrayLike<T>|string} arr Array or array\n *     like object over which to iterate.\n * @param {?function(this:S, T, number, ?) : boolean} f The function to call\n *     for every element. This function takes 3 arguments (the element, the\n *     index and the array) and should return a boolean.\n * @param {S=} opt_obj An optional \"this\" context for the function.\n * @return {T|null} The first array element that passes the test, or null if no\n *     element is found.\n * @template T,S\n */\nfunction find(arr, f, opt_obj) {\n  const i = findIndex(arr, f, opt_obj);\n  return i < 0 ? null : typeof arr === 'string' ? arr.charAt(i) : arr[i];\n}\nexports.find = find;\n\n\n/**\n * Search an array for the first element that satisfies a given condition and\n * return its index.\n * @param {IArrayLike<T>|string} arr Array or array\n *     like object over which to iterate.\n * @param {?function(this:S, T, number, ?) : boolean} f The function to call for\n *     every element. This function\n *     takes 3 arguments (the element, the index and the array) and should\n *     return a boolean.\n * @param {S=} opt_obj An optional \"this\" context for the function.\n * @return {number} The index of the first array element that passes the test,\n *     or -1 if no element is found.\n * @template T,S\n */\nfunction findIndex(arr, f, opt_obj) {\n  const l = arr.length;  // must be fixed during loop... see docs\n  const arr2 = (typeof arr === 'string') ? arr.split('') : arr;\n  for (let i = 0; i < l; i++) {\n    if (i in arr2 && f.call(/** @type {?} */ (opt_obj), arr2[i], i, arr)) {\n      return i;\n    }\n  }\n  return -1;\n}\nexports.findIndex = findIndex;\n\n\n/**\n * Search an array (in reverse order) for the last element that satisfies a\n * given condition and return that element.\n * @param {IArrayLike<T>|string} arr Array or array\n *     like object over which to iterate.\n * @param {?function(this:S, T, number, ?) : boolean} f The function to call\n *     for every element. This function\n *     takes 3 arguments (the element, the index and the array) and should\n *     return a boolean.\n * @param {S=} opt_obj An optional \"this\" context for the function.\n * @return {T|null} The last array element that passes the test, or null if no\n *     element is found.\n * @template T,S\n */\nfunction findRight(arr, f, opt_obj) {\n  const i = findIndexRight(arr, f, opt_obj);\n  return i < 0 ? null : typeof arr === 'string' ? arr.charAt(i) : arr[i];\n}\nexports.findRight = findRight;\n\n\n/**\n * Search an array (in reverse order) for the last element that satisfies a\n * given condition and return its index.\n * @param {IArrayLike<T>|string} arr Array or array\n *     like object over which to iterate.\n * @param {?function(this:S, T, number, ?) : boolean} f The function to call\n *     for every element. This function\n *     takes 3 arguments (the element, the index and the array) and should\n *     return a boolean.\n * @param {S=} opt_obj An optional \"this\" context for the function.\n * @return {number} The index of the last array element that passes the test,\n *     or -1 if no element is found.\n * @template T,S\n */\nfunction findIndexRight(arr, f, opt_obj) {\n  const l = arr.length;  // must be fixed during loop... see docs\n  const arr2 = (typeof arr === 'string') ? arr.split('') : arr;\n  for (let i = l - 1; i >= 0; i--) {\n    if (i in arr2 && f.call(/** @type {?} */ (opt_obj), arr2[i], i, arr)) {\n      return i;\n    }\n  }\n  return -1;\n}\nexports.findIndexRight = findIndexRight;\n\n\n/**\n * Whether the array contains the given object.\n * @param {IArrayLike<?>|string} arr The array to test for the presence of the\n *     element.\n * @param {*} obj The object for which to test.\n * @return {boolean} true if obj is present.\n */\nfunction contains(arr, obj) {\n  return indexOf(arr, obj) >= 0;\n}\nexports.contains = contains;\n\n\n/**\n * Whether the array is empty.\n * @param {IArrayLike<?>|string} arr The array to test.\n * @return {boolean} true if empty.\n */\nfunction isEmpty(arr) {\n  return arr.length == 0;\n}\nexports.isEmpty = isEmpty;\n\n\n/**\n * Clears the array.\n * @param {IArrayLike<?>} arr Array or array like object to clear.\n */\nfunction clear(arr) {\n  // For non real arrays we don't have the magic length so we delete the\n  // indices.\n  if (!Array.isArray(arr)) {\n    for (let i = arr.length - 1; i >= 0; i--) {\n      delete arr[i];\n    }\n  }\n  arr.length = 0;\n}\nexports.clear = clear;\n\n\n/**\n * Pushes an item into an array, if it's not already in the array.\n * @param {Array<T>} arr Array into which to insert the item.\n * @param {T} obj Value to add.\n * @template T\n */\nfunction insert(arr, obj) {\n  if (!contains(arr, obj)) {\n    arr.push(obj);\n  }\n}\nexports.insert = insert;\n\n\n/**\n * Inserts an object at the given index of the array.\n * @param {IArrayLike<?>} arr The array to modify.\n * @param {*} obj The object to insert.\n * @param {number=} opt_i The index at which to insert the object. If omitted,\n *      treated as 0. A negative index is counted from the end of the array.\n */\nfunction insertAt(arr, obj, opt_i) {\n  splice(arr, opt_i, 0, obj);\n}\nexports.insertAt = insertAt;\n\n\n/**\n * Inserts at the given index of the array, all elements of another array.\n * @param {IArrayLike<?>} arr The array to modify.\n * @param {IArrayLike<?>} elementsToAdd The array of elements to add.\n * @param {number=} opt_i The index at which to insert the object. If omitted,\n *      treated as 0. A negative index is counted from the end of the array.\n */\nfunction insertArrayAt(arr, elementsToAdd, opt_i) {\n  goog.partial(splice, arr, opt_i, 0).apply(null, elementsToAdd);\n}\nexports.insertArrayAt = insertArrayAt;\n\n\n/**\n * Inserts an object into an array before a specified object.\n * @param {Array<T>} arr The array to modify.\n * @param {T} obj The object to insert.\n * @param {T=} opt_obj2 The object before which obj should be inserted. If obj2\n *     is omitted or not found, obj is inserted at the end of the array.\n * @template T\n */\nfunction insertBefore(arr, obj, opt_obj2) {\n  let i;\n  if (arguments.length == 2 || (i = indexOf(arr, opt_obj2)) < 0) {\n    arr.push(obj);\n  } else {\n    insertAt(arr, obj, i);\n  }\n}\nexports.insertBefore = insertBefore;\n\n\n/**\n * Removes the first occurrence of a particular value from an array.\n * @param {IArrayLike<T>} arr Array from which to remove\n *     value.\n * @param {T} obj Object to remove.\n * @return {boolean} True if an element was removed.\n * @template T\n */\nfunction remove(arr, obj) {\n  const i = indexOf(arr, obj);\n  let rv;\n  if ((rv = i >= 0)) {\n    removeAt(arr, i);\n  }\n  return rv;\n}\nexports.remove = remove;\n\n\n/**\n * Removes the last occurrence of a particular value from an array.\n * @param {!IArrayLike<T>} arr Array from which to remove value.\n * @param {T} obj Object to remove.\n * @return {boolean} True if an element was removed.\n * @template T\n */\nfunction removeLast(arr, obj) {\n  const i = lastIndexOf(arr, obj);\n  if (i >= 0) {\n    removeAt(arr, i);\n    return true;\n  }\n  return false;\n}\nexports.removeLast = removeLast;\n\n\n/**\n * Removes from an array the element at index i\n * @param {IArrayLike<?>} arr Array or array like object from which to\n *     remove value.\n * @param {number} i The index to remove.\n * @return {boolean} True if an element was removed.\n */\nfunction removeAt(arr, i) {\n  asserts.assert(arr.length != null);\n\n  // use generic form of splice\n  // splice returns the removed items and if successful the length of that\n  // will be 1\n  return Array.prototype.splice.call(arr, i, 1).length == 1;\n}\nexports.removeAt = removeAt;\n\n\n/**\n * Removes the first value that satisfies the given condition.\n * @param {IArrayLike<T>} arr Array or array\n *     like object over which to iterate.\n * @param {?function(this:S, T, number, ?) : boolean} f The function to call\n *     for every element. This function\n *     takes 3 arguments (the element, the index and the array) and should\n *     return a boolean.\n * @param {S=} opt_obj An optional \"this\" context for the function.\n * @return {boolean} True if an element was removed.\n * @template T,S\n */\nfunction removeIf(arr, f, opt_obj) {\n  const i = findIndex(arr, f, opt_obj);\n  if (i >= 0) {\n    removeAt(arr, i);\n    return true;\n  }\n  return false;\n}\nexports.removeIf = removeIf;\n\n\n/**\n * Removes all values that satisfy the given condition.\n * @param {IArrayLike<T>} arr Array or array\n *     like object over which to iterate.\n * @param {?function(this:S, T, number, ?) : boolean} f The function to call\n *     for every element. This function\n *     takes 3 arguments (the element, the index and the array) and should\n *     return a boolean.\n * @param {S=} opt_obj An optional \"this\" context for the function.\n * @return {number} The number of items removed\n * @template T,S\n */\nfunction removeAllIf(arr, f, opt_obj) {\n  let removedCount = 0;\n  forEachRight(arr, function(val, index) {\n    if (f.call(/** @type {?} */ (opt_obj), val, index, arr)) {\n      if (removeAt(arr, index)) {\n        removedCount++;\n      }\n    }\n  });\n  return removedCount;\n}\nexports.removeAllIf = removeAllIf;\n\n\n/**\n * Returns a new array that is the result of joining the arguments.  If arrays\n * are passed then their items are added, however, if non-arrays are passed they\n * will be added to the return array as is.\n *\n * Note that ArrayLike objects will be added as is, rather than having their\n * items added.\n *\n * concat([1, 2], [3, 4]) -> [1, 2, 3, 4]\n * concat(0, [1, 2]) -> [0, 1, 2]\n * concat([1, 2], null) -> [1, 2, null]\n *\n * @param {...*} var_args Items to concatenate.  Arrays will have each item\n *     added, while primitives and objects will be added as is.\n * @return {!Array<?>} The new resultant array.\n */\nfunction concat(var_args) {\n  return Array.prototype.concat.apply([], arguments);\n}\nexports.concat = concat;\n\n\n/**\n * Returns a new array that contains the contents of all the arrays passed.\n * @param {...!Array<T>} var_args\n * @return {!Array<T>}\n * @template T\n */\nfunction join(var_args) {\n  return Array.prototype.concat.apply([], arguments);\n}\nexports.join = join;\n\n\n/**\n * Converts an object to an array.\n * @param {IArrayLike<T>|string} object  The object to convert to an\n *     array.\n * @return {!Array<T>} The object converted into an array. If object has a\n *     length property, every property indexed with a non-negative number\n *     less than length will be included in the result. If object does not\n *     have a length property, an empty array will be returned.\n * @template T\n */\nfunction toArray(object) {\n  const length = object.length;\n\n  // If length is not a number the following is false. This case is kept for\n  // backwards compatibility since there are callers that pass objects that are\n  // not array like.\n  if (length > 0) {\n    const rv = new Array(length);\n    for (let i = 0; i < length; i++) {\n      rv[i] = object[i];\n    }\n    return rv;\n  }\n  return [];\n}\nexports.toArray = toArray;\n\n\n/**\n * Does a shallow copy of an array.\n * @param {IArrayLike<T>|string} arr  Array or array-like object to\n *     clone.\n * @return {!Array<T>} Clone of the input array.\n * @template T\n */\nconst clone = toArray;\nexports.clone = clone;\n\n\n/**\n * Extends an array with another array, element, or \"array like\" object.\n * This function operates 'in-place', it does not create a new Array.\n *\n * Example:\n * var a = [];\n * extend(a, [0, 1]);\n * a; // [0, 1]\n * extend(a, 2);\n * a; // [0, 1, 2]\n *\n * @param {Array<VALUE>} arr1  The array to modify.\n * @param {...(IArrayLike<VALUE>|VALUE)} var_args The elements or arrays of\n *     elements to add to arr1.\n * @template VALUE\n */\nfunction extend(arr1, var_args) {\n  for (let i = 1; i < arguments.length; i++) {\n    const arr2 = arguments[i];\n    if (goog.isArrayLike(arr2)) {\n      const len1 = arr1.length || 0;\n      const len2 = arr2.length || 0;\n      arr1.length = len1 + len2;\n      for (let j = 0; j < len2; j++) {\n        arr1[len1 + j] = arr2[j];\n      }\n    } else {\n      arr1.push(arr2);\n    }\n  }\n}\nexports.extend = extend;\n\n\n/**\n * Adds or removes elements from an array. This is a generic version of Array\n * splice. This means that it might work on other objects similar to arrays,\n * such as the arguments object.\n *\n * @param {IArrayLike<T>} arr The array to modify.\n * @param {number|undefined} index The index at which to start changing the\n *     array. If not defined, treated as 0.\n * @param {number} howMany How many elements to remove (0 means no removal. A\n *     value below 0 is treated as zero and so is any other non number. Numbers\n *     are floored).\n * @param {...T} var_args Optional, additional elements to insert into the\n *     array.\n * @return {!Array<T>} the removed elements.\n * @template T\n */\nfunction splice(arr, index, howMany, var_args) {\n  asserts.assert(arr.length != null);\n\n  return Array.prototype.splice.apply(arr, slice(arguments, 1));\n}\nexports.splice = splice;\n\n\n/**\n * Returns a new array from a segment of an array. This is a generic version of\n * Array slice. This means that it might work on other objects similar to\n * arrays, such as the arguments object.\n *\n * @param {IArrayLike<T>|string} arr The array from\n * which to copy a segment.\n * @param {number} start The index of the first element to copy.\n * @param {number=} opt_end The index after the last element to copy.\n * @return {!Array<T>} A new array containing the specified segment of the\n *     original array.\n * @template T\n */\nfunction slice(arr, start, opt_end) {\n  asserts.assert(arr.length != null);\n\n  // passing 1 arg to slice is not the same as passing 2 where the second is\n  // null or undefined (in that case the second argument is treated as 0).\n  // we could use slice on the arguments object and then use apply instead of\n  // testing the length\n  if (arguments.length <= 2) {\n    return Array.prototype.slice.call(arr, start);\n  } else {\n    return Array.prototype.slice.call(arr, start, opt_end);\n  }\n}\nexports.slice = slice;\n\n\n/**\n * Removes all duplicates from an array (retaining only the first\n * occurrence of each array element).  This function modifies the\n * array in place and doesn't change the order of the non-duplicate items.\n *\n * For objects, duplicates are identified as having the same unique ID as\n * defined by {@link goog.getUid}.\n *\n * Alternatively you can specify a custom hash function that returns a unique\n * value for each item in the array it should consider unique.\n *\n * Runtime: N,\n * Worstcase space: 2N (no dupes)\n *\n * @param {IArrayLike<T>} arr The array from which to remove\n *     duplicates.\n * @param {Array=} opt_rv An optional array in which to return the results,\n *     instead of performing the removal inplace.  If specified, the original\n *     array will remain unchanged.\n * @param {function(T):string=} opt_keyFn An optional function to use to\n *     apply to every item in the array. This function should return a unique\n *     value for each item in the array it should consider unique.\n * @template T\n */\nfunction removeDuplicates(arr, opt_rv, opt_keyFn) {\n  const returnArray = opt_rv || arr;\n  \n  if (goog.FEATURESET_YEAR >= 2018) {\n    const defaultKeyFn = (item) => item;\n    const keyFn = opt_keyFn || defaultKeyFn;\n\n    let cursorInsert = 0;\n    let cursorRead = 0;\n    const seen = new Set();\n\n    while (cursorRead < arr.length) {\n      const current = arr[cursorRead++];\n      const key = keyFn(current);\n      if (!seen.has(key)) {\n        seen.add(key);\n        returnArray[cursorInsert++] = current;\n      }\n    }\n    returnArray.length = cursorInsert;\n  } else {\n    const defaultKeyFn = function(item) {\n      // Prefix each type with a single character representing the type to\n      // prevent conflicting keys (e.g. true and 'true').\n      return goog.isObject(item) ? 'o' + goog.getUid(item) :\n                                  (typeof item).charAt(0) + item;\n    };\n    const keyFn = opt_keyFn || defaultKeyFn;\n\n    let cursorInsert = 0;\n    let cursorRead = 0;\n    const seen = {};\n\n    while (cursorRead < arr.length) {\n      const current = arr[cursorRead++];\n      const key = keyFn(current);\n      if (!Object.prototype.hasOwnProperty.call(seen, key)) {\n        seen[key] = true;\n        returnArray[cursorInsert++] = current;\n      }\n    }\n    returnArray.length = cursorInsert;\n  }\n}\nexports.removeDuplicates = removeDuplicates;\n\n\n/**\n * Searches the specified array for the specified target using the binary\n * search algorithm.  If no opt_compareFn is specified, elements are compared\n * using <code>defaultCompare</code>, which compares the elements\n * using the built in < and > operators.  This will produce the expected\n * behavior for homogeneous arrays of String(s) and Number(s). The array\n * specified <b>must</b> be sorted in ascending order (as defined by the\n * comparison function).  If the array is not sorted, results are undefined.\n * If the array contains multiple instances of the specified target value, the\n * left-most instance will be found.\n *\n * Runtime: O(log n)\n *\n * @param {IArrayLike<VALUE>} arr The array to be searched.\n * @param {TARGET} target The sought value.\n * @param {function(TARGET, VALUE): number=} opt_compareFn Optional comparison\n *     function by which the array is ordered. Should take 2 arguments to\n *     compare, the target value and an element from your array, and return a\n *     negative number, zero, or a positive number depending on whether the\n *     first argument is less than, equal to, or greater than the second.\n * @return {number} Lowest index of the target value if found, otherwise\n *     (-(insertion point) - 1). The insertion point is where the value should\n *     be inserted into arr to preserve the sorted property.  Return value >= 0\n *     iff target is found.\n * @template TARGET, VALUE\n */\nfunction binarySearch(arr, target, opt_compareFn) {\n  return binarySearch_(\n      arr, opt_compareFn || defaultCompare, false /* isEvaluator */, target);\n}\nexports.binarySearch = binarySearch;\n\n\n/**\n * Selects an index in the specified array using the binary search algorithm.\n * The evaluator receives an element and determines whether the desired index\n * is before, at, or after it.  The evaluator must be consistent (formally,\n * map(map(arr, evaluator, opt_obj), Math.sign)\n * must be monotonically non-increasing).\n *\n * Runtime: O(log n)\n *\n * @param {IArrayLike<VALUE>} arr The array to be searched.\n * @param {function(this:THIS, VALUE, number, ?): number} evaluator\n *     Evaluator function that receives 3 arguments (the element, the index and\n *     the array). Should return a negative number, zero, or a positive number\n *     depending on whether the desired index is before, at, or after the\n *     element passed to it.\n * @param {THIS=} opt_obj The object to be used as the value of 'this'\n *     within evaluator.\n * @return {number} Index of the leftmost element matched by the evaluator, if\n *     such exists; otherwise (-(insertion point) - 1). The insertion point is\n *     the index of the first element for which the evaluator returns negative,\n *     or arr.length if no such element exists. The return value is non-negative\n *     iff a match is found.\n * @template THIS, VALUE\n */\nfunction binarySelect(arr, evaluator, opt_obj) {\n  return binarySearch_(\n      arr, evaluator, true /* isEvaluator */, undefined /* opt_target */,\n      opt_obj);\n}\nexports.binarySelect = binarySelect;\n\n\n/**\n * Implementation of a binary search algorithm which knows how to use both\n * comparison functions and evaluators. If an evaluator is provided, will call\n * the evaluator with the given optional data object, conforming to the\n * interface defined in binarySelect. Otherwise, if a comparison function is\n * provided, will call the comparison function against the given data object.\n *\n * This implementation purposefully does not use goog.bind or goog.partial for\n * performance reasons.\n *\n * Runtime: O(log n)\n *\n * @param {IArrayLike<?>} arr The array to be searched.\n * @param {function(?, ?, ?): number | function(?, ?): number} compareFn\n *     Either an evaluator or a comparison function, as defined by binarySearch\n *     and binarySelect above.\n * @param {boolean} isEvaluator Whether the function is an evaluator or a\n *     comparison function.\n * @param {?=} opt_target If the function is a comparison function, then\n *     this is the target to binary search for.\n * @param {Object=} opt_selfObj If the function is an evaluator, this is an\n *     optional this object for the evaluator.\n * @return {number} Lowest index of the target value if found, otherwise\n *     (-(insertion point) - 1). The insertion point is where the value should\n *     be inserted into arr to preserve the sorted property.  Return value >= 0\n *     iff target is found.\n * @private\n */\nfunction binarySearch_(arr, compareFn, isEvaluator, opt_target, opt_selfObj) {\n  let left = 0;            // inclusive\n  let right = arr.length;  // exclusive\n  let found;\n  while (left < right) {\n    const middle = left + ((right - left) >>> 1);\n    let compareResult;\n    if (isEvaluator) {\n      compareResult = compareFn.call(opt_selfObj, arr[middle], middle, arr);\n    } else {\n      // NOTE(dimvar): To avoid this cast, we'd have to use function overloading\n      // for the type of binarySearch_, which the type system can't express yet.\n      compareResult = /** @type {function(?, ?): number} */ (compareFn)(\n          opt_target, arr[middle]);\n    }\n    if (compareResult > 0) {\n      left = middle + 1;\n    } else {\n      right = middle;\n      // We are looking for the lowest index so we can't return immediately.\n      found = !compareResult;\n    }\n  }\n  // left is the index if found, or the insertion point otherwise.\n  // Avoiding bitwise not operator, as that causes a loss in precision for array\n  // indexes outside the bounds of a 32-bit signed integer.  Array indexes have\n  // a maximum value of 2^32-2 https://tc39.es/ecma262/#array-index\n  return found ? left : -left - 1;\n}\n\n\n/**\n * Sorts the specified array into ascending order.  If no opt_compareFn is\n * specified, elements are compared using\n * <code>defaultCompare</code>, which compares the elements using\n * the built in < and > operators.  This will produce the expected behavior\n * for homogeneous arrays of String(s) and Number(s), unlike the native sort,\n * but will give unpredictable results for heterogeneous lists of strings and\n * numbers with different numbers of digits.\n *\n * This sort is not guaranteed to be stable.\n *\n * Runtime: Same as `Array.prototype.sort`\n *\n * @param {Array<T>} arr The array to be sorted.\n * @param {?function(T,T):number=} opt_compareFn Optional comparison\n *     function by which the\n *     array is to be ordered. Should take 2 arguments to compare, and return a\n *     negative number, zero, or a positive number depending on whether the\n *     first argument is less than, equal to, or greater than the second.\n * @template T\n */\nfunction sort(arr, opt_compareFn) {\n  // TODO(arv): Update type annotation since null is not accepted.\n  arr.sort(opt_compareFn || defaultCompare);\n}\nexports.sort = sort;\n\n\n/**\n * Sorts the specified array into ascending order in a stable way.  If no\n * opt_compareFn is specified, elements are compared using\n * <code>defaultCompare</code>, which compares the elements using\n * the built in < and > operators.  This will produce the expected behavior\n * for homogeneous arrays of String(s) and Number(s).\n *\n * Runtime: Same as `Array.prototype.sort`, plus an additional\n * O(n) overhead of copying the array twice.\n *\n * @param {Array<T>} arr The array to be sorted.\n * @param {?function(T, T): number=} opt_compareFn Optional comparison function\n *     by which the array is to be ordered. Should take 2 arguments to compare,\n *     and return a negative number, zero, or a positive number depending on\n *     whether the first argument is less than, equal to, or greater than the\n *     second.\n * @template T\n */\nfunction stableSort(arr, opt_compareFn) {\n  const compArr = new Array(arr.length);\n  for (let i = 0; i < arr.length; i++) {\n    compArr[i] = {index: i, value: arr[i]};\n  }\n  const valueCompareFn = opt_compareFn || defaultCompare;\n  function stableCompareFn(obj1, obj2) {\n    return valueCompareFn(obj1.value, obj2.value) || obj1.index - obj2.index;\n  }\n  sort(compArr, stableCompareFn);\n  for (let i = 0; i < arr.length; i++) {\n    arr[i] = compArr[i].value;\n  }\n}\nexports.stableSort = stableSort;\n\n\n/**\n * Sort the specified array into ascending order based on item keys\n * returned by the specified key function.\n * If no opt_compareFn is specified, the keys are compared in ascending order\n * using <code>defaultCompare</code>.\n *\n * Runtime: O(S(f(n)), where S is runtime of <code>sort</code>\n * and f(n) is runtime of the key function.\n *\n * @param {Array<T>} arr The array to be sorted.\n * @param {function(T): K} keyFn Function taking array element and returning\n *     a key used for sorting this element.\n * @param {?function(K, K): number=} opt_compareFn Optional comparison function\n *     by which the keys are to be ordered. Should take 2 arguments to compare,\n *     and return a negative number, zero, or a positive number depending on\n *     whether the first argument is less than, equal to, or greater than the\n *     second.\n * @template T,K\n */\nfunction sortByKey(arr, keyFn, opt_compareFn) {\n  const keyCompareFn = opt_compareFn || defaultCompare;\n  sort(arr, function(a, b) {\n    return keyCompareFn(keyFn(a), keyFn(b));\n  });\n}\nexports.sortByKey = sortByKey;\n\n\n/**\n * Sorts an array of objects by the specified object key and compare\n * function. If no compare function is provided, the key values are\n * compared in ascending order using <code>defaultCompare</code>.\n * This won't work for keys that get renamed by the compiler. So use\n * {'foo': 1, 'bar': 2} rather than {foo: 1, bar: 2}.\n * @param {Array<Object>} arr An array of objects to sort.\n * @param {string} key The object key to sort by.\n * @param {Function=} opt_compareFn The function to use to compare key\n *     values.\n */\nfunction sortObjectsByKey(arr, key, opt_compareFn) {\n  sortByKey(arr, function(obj) {\n    return obj[key];\n  }, opt_compareFn);\n}\nexports.sortObjectsByKey = sortObjectsByKey;\n\n\n/**\n * Tells if the array is sorted.\n * @param {!IArrayLike<T>} arr The array.\n * @param {?function(T,T):number=} opt_compareFn Function to compare the\n *     array elements.\n *     Should take 2 arguments to compare, and return a negative number, zero,\n *     or a positive number depending on whether the first argument is less\n *     than, equal to, or greater than the second.\n * @param {boolean=} opt_strict If true no equal elements are allowed.\n * @return {boolean} Whether the array is sorted.\n * @template T\n */\nfunction isSorted(arr, opt_compareFn, opt_strict) {\n  const compare = opt_compareFn || defaultCompare;\n  for (let i = 1; i < arr.length; i++) {\n    const compareResult = compare(arr[i - 1], arr[i]);\n    if (compareResult > 0 || compareResult == 0 && opt_strict) {\n      return false;\n    }\n  }\n  return true;\n}\nexports.isSorted = isSorted;\n\n\n/**\n * Compares two arrays for equality. Two arrays are considered equal if they\n * have the same length and their corresponding elements are equal according to\n * the comparison function.\n *\n * @param {IArrayLike<A>} arr1 The first array to compare.\n * @param {IArrayLike<B>} arr2 The second array to compare.\n * @param {?function(A,B):boolean=} opt_equalsFn Optional comparison function.\n *     Should take 2 arguments to compare, and return true if the arguments\n *     are equal. Defaults to {@link goog.array.defaultCompareEquality} which\n *     compares the elements using the built-in '===' operator.\n * @return {boolean} Whether the two arrays are equal.\n * @template A\n * @template B\n */\nfunction equals(arr1, arr2, opt_equalsFn) {\n  if (!goog.isArrayLike(arr1) || !goog.isArrayLike(arr2) ||\n      arr1.length != arr2.length) {\n    return false;\n  }\n  const l = arr1.length;\n  const equalsFn = opt_equalsFn || defaultCompareEquality;\n  for (let i = 0; i < l; i++) {\n    if (!equalsFn(arr1[i], arr2[i])) {\n      return false;\n    }\n  }\n  return true;\n}\nexports.equals = equals;\n\n\n/**\n * 3-way array compare function.\n * @param {!IArrayLike<VALUE>} arr1 The first array to\n *     compare.\n * @param {!IArrayLike<VALUE>} arr2 The second array to\n *     compare.\n * @param {function(VALUE, VALUE): number=} opt_compareFn Optional comparison\n *     function by which the array is to be ordered. Should take 2 arguments to\n *     compare, and return a negative number, zero, or a positive number\n *     depending on whether the first argument is less than, equal to, or\n *     greater than the second.\n * @return {number} Negative number, zero, or a positive number depending on\n *     whether the first argument is less than, equal to, or greater than the\n *     second.\n * @template VALUE\n */\nfunction compare3(arr1, arr2, opt_compareFn) {\n  const compare = opt_compareFn || defaultCompare;\n  const l = Math.min(arr1.length, arr2.length);\n  for (let i = 0; i < l; i++) {\n    const result = compare(arr1[i], arr2[i]);\n    if (result != 0) {\n      return result;\n    }\n  }\n  return defaultCompare(arr1.length, arr2.length);\n}\nexports.compare3 = compare3;\n\n\n/**\n * Compares its two arguments for order, using the built in < and >\n * operators.\n * @param {VALUE} a The first object to be compared.\n * @param {VALUE} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n *     argument is less than, equal to, or greater than the second,\n *     respectively.\n * @template VALUE\n */\nfunction defaultCompare(a, b) {\n  return a > b ? 1 : a < b ? -1 : 0;\n}\nexports.defaultCompare = defaultCompare;\n\n\n/**\n * Compares its two arguments for inverse order, using the built in < and >\n * operators.\n * @param {VALUE} a The first object to be compared.\n * @param {VALUE} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n *     argument is greater than, equal to, or less than the second,\n *     respectively.\n * @template VALUE\n */\nfunction inverseDefaultCompare(a, b) {\n  return -defaultCompare(a, b);\n}\nexports.inverseDefaultCompare = inverseDefaultCompare;\n\n\n/**\n * Compares its two arguments for equality, using the built in === operator.\n * @param {*} a The first object to compare.\n * @param {*} b The second object to compare.\n * @return {boolean} True if the two arguments are equal, false otherwise.\n */\nfunction defaultCompareEquality(a, b) {\n  return a === b;\n}\nexports.defaultCompareEquality = defaultCompareEquality;\n\n\n/**\n * Inserts a value into a sorted array. The array is not modified if the\n * value is already present.\n * @param {IArrayLike<VALUE>} array The array to modify.\n * @param {VALUE} value The object to insert.\n * @param {function(VALUE, VALUE): number=} opt_compareFn Optional comparison\n *     function by which the array is ordered. Should take 2 arguments to\n *     compare, and return a negative number, zero, or a positive number\n *     depending on whether the first argument is less than, equal to, or\n *     greater than the second.\n * @return {boolean} True if an element was inserted.\n * @template VALUE\n */\nfunction binaryInsert(array, value, opt_compareFn) {\n  const index = binarySearch(array, value, opt_compareFn);\n  if (index < 0) {\n    insertAt(array, value, -(index + 1));\n    return true;\n  }\n  return false;\n}\nexports.binaryInsert = binaryInsert;\n\n\n/**\n * Removes a value from a sorted array.\n * @param {!IArrayLike<VALUE>} array The array to modify.\n * @param {VALUE} value The object to remove.\n * @param {function(VALUE, VALUE): number=} opt_compareFn Optional comparison\n *     function by which the array is ordered. Should take 2 arguments to\n *     compare, and return a negative number, zero, or a positive number\n *     depending on whether the first argument is less than, equal to, or\n *     greater than the second.\n * @return {boolean} True if an element was removed.\n * @template VALUE\n */\nfunction binaryRemove(array, value, opt_compareFn) {\n  const index = binarySearch(array, value, opt_compareFn);\n  return (index >= 0) ? removeAt(array, index) : false;\n}\nexports.binaryRemove = binaryRemove;\n\n\n/**\n * Splits an array into disjoint buckets according to a splitting function.\n * @param {IArrayLike<T>} array The array.\n * @param {function(this:S, T, number, !IArrayLike<T>):?} sorter Function to\n *     call for every element.  This takes 3 arguments (the element, the index\n *     and the array) and must return a valid object key (a string, number,\n *     etc), or undefined, if that object should not be placed in a bucket.\n * @param {S=} opt_obj The object to be used as the value of 'this' within\n *     sorter.\n * @return {!Object<!Array<T>>} An object, with keys being all of the unique\n *     return values of sorter, and values being arrays containing the items for\n *     which the splitter returned that key.\n * @template T,S\n */\nfunction bucket(array, sorter, opt_obj) {\n  const buckets = {};\n\n  for (let i = 0; i < array.length; i++) {\n    const value = array[i];\n    const key = sorter.call(/** @type {?} */ (opt_obj), value, i, array);\n    if (key !== undefined) {\n      // Push the value to the right bucket, creating it if necessary.\n      const bucket = buckets[key] || (buckets[key] = []);\n      bucket.push(value);\n    }\n  }\n\n  return buckets;\n}\nexports.bucket = bucket;\n\n\n// TODO: b/385200988 - Remove @tsType tag below after clutz is fixed.\n/**\n * Splits an array into disjoint buckets according to a splitting function.\n * @param {!IArrayLike<V>} array The array.\n * @param {function(V, number, !IArrayLike<V>):(K|undefined)} sorter Function to\n *     call for every element.  This takes 3 arguments (the element, the index,\n *     and the array) and must return a value to use as a key, or undefined, if\n *     that object should not be placed in a bucket.\n * @return {!Map<K, !Array<V>>} A map, with keys being all of the unique\n *     return values of sorter, and values being arrays containing the items for\n *     which the splitter returned that key.\n * @template K,V\n * @tsType <K, V>(\n *   array: ArrayLike<V>,\n *   sorter: (value: V, index: number, array: ArrayLike<V>) => K | undefined,\n * ): Map<K, V[]>\n */\nfunction bucketToMap(array, sorter) {\n  const /** !Map<K, !Array<V>> */ buckets = new Map();\n\n  for (let i = 0; i < array.length; i++) {\n    const value = array[i];\n    const key = sorter(value, i, array);\n    if (key !== undefined) {\n      // Push the value to the right bucket, creating it if necessary.\n      let bucket = buckets.get(key);\n      if (!bucket) {\n        bucket = [];\n        buckets.set(key, bucket);\n      }\n      bucket.push(value);\n    }\n  }\n\n  return buckets;\n}\nexports.bucketToMap = bucketToMap;\n\n\n/**\n * Creates a new object built from the provided array and the key-generation\n * function.\n * @param {IArrayLike<T>} arr Array or array like object over\n *     which to iterate whose elements will be the values in the new object.\n * @param {?function(this:S, T, number, ?) : string} keyFunc The function to\n *     call for every element. This function takes 3 arguments (the element, the\n *     index and the array) and should return a string that will be used as the\n *     key for the element in the new object. If the function returns the same\n *     key for more than one element, the value for that key is\n *     implementation-defined.\n * @param {S=} opt_obj The object to be used as the value of 'this'\n *     within keyFunc.\n * @return {!Object<T>} The new object.\n * @template T,S\n */\nfunction toObject(arr, keyFunc, opt_obj) {\n  const ret = {};\n  forEach(arr, function(element, index) {\n    ret[keyFunc.call(/** @type {?} */ (opt_obj), element, index, arr)] =\n        element;\n  });\n  return ret;\n}\nexports.toObject = toObject;\n\n\n/**\n * Creates a new ES6 Map built from the provided array and the key-generation\n * function.\n * @param {!IArrayLike<V>} arr Array or array like object over which to iterate\n *     whose elements will be the values in the new object.\n * @param {?function(V, number, ?) : K} keyFunc The function to call for every\n *     element. This function takes 3 arguments (the element, the index, and the\n *     array) and should return a value that will be used as the key for the\n *     element in the new object. If the function returns the same key for more\n *     than one element, the value for that key is implementation-defined.\n * @return {!Map<K, V>} The new map.\n * @template K,V\n */\nfunction toMap(arr, keyFunc) {\n  const /** !Map<K, V> */ map = new Map();\n\n  for (let i = 0; i < arr.length; i++) {\n    const element = arr[i];\n    map.set(keyFunc(element, i, arr), element);\n  }\n\n  return map;\n}\nexports.toMap = toMap;\n\n\n/**\n * Creates a range of numbers in an arithmetic progression.\n *\n * Range takes 1, 2, or 3 arguments:\n * <pre>\n * range(5) is the same as range(0, 5, 1) and produces [0, 1, 2, 3, 4]\n * range(2, 5) is the same as range(2, 5, 1) and produces [2, 3, 4]\n * range(-2, -5, -1) produces [-2, -3, -4]\n * range(-2, -5, 1) produces [], since stepping by 1 wouldn't ever reach -5.\n * </pre>\n *\n * @param {number} startOrEnd The starting value of the range if an end argument\n *     is provided. Otherwise, the start value is 0, and this is the end value.\n * @param {number=} opt_end The optional end value of the range.\n * @param {number=} opt_step The step size between range values. Defaults to 1\n *     if opt_step is undefined or 0.\n * @return {!Array<number>} An array of numbers for the requested range. May be\n *     an empty array if adding the step would not converge toward the end\n *     value.\n */\nfunction range(startOrEnd, opt_end, opt_step) {\n  const array = [];\n  let start = 0;\n  let end = startOrEnd;\n  const step = opt_step || 1;\n  if (opt_end !== undefined) {\n    start = startOrEnd;\n    end = opt_end;\n  }\n\n  if (step * (end - start) < 0) {\n    // Sign mismatch: start + step will never reach the end value.\n    return [];\n  }\n\n  if (step > 0) {\n    for (let i = start; i < end; i += step) {\n      array.push(i);\n    }\n  } else {\n    for (let i = start; i > end; i += step) {\n      array.push(i);\n    }\n  }\n  return array;\n}\nexports.range = range;\n\n\n/**\n * Returns an array consisting of the given value repeated N times.\n *\n * @param {VALUE} value The value to repeat.\n * @param {number} n The repeat count.\n * @return {!Array<VALUE>} An array with the repeated value.\n * @template VALUE\n */\nfunction repeat(value, n) {\n  const array = [];\n  for (let i = 0; i < n; i++) {\n    array[i] = value;\n  }\n  return array;\n}\nexports.repeat = repeat;\n\n\n/**\n * Returns an array consisting of every argument with all arrays\n * expanded in-place recursively.\n *\n * @param {...*} var_args The values to flatten.\n * @return {!Array<?>} An array containing the flattened values.\n */\nfunction flatten(var_args) {\n  const CHUNK_SIZE = 8192;\n\n  const result = [];\n  for (let i = 0; i < arguments.length; i++) {\n    const element = arguments[i];\n    if (Array.isArray(element)) {\n      for (let c = 0; c < element.length; c += CHUNK_SIZE) {\n        const chunk = slice(element, c, c + CHUNK_SIZE);\n        const recurseResult = flatten.apply(null, chunk);\n        for (let r = 0; r < recurseResult.length; r++) {\n          result.push(recurseResult[r]);\n        }\n      }\n    } else {\n      result.push(element);\n    }\n  }\n  return result;\n}\nexports.flatten = flatten;\n\n\n/**\n * Rotates an array in-place. After calling this method, the element at\n * index i will be the element previously at index (i - n) %\n * array.length, for all values of i between 0 and array.length - 1,\n * inclusive.\n *\n * For example, suppose list comprises [t, a, n, k, s]. After invoking\n * rotate(array, 1) (or rotate(array, -4)), array will comprise [s, t, a, n, k].\n *\n * @param {!Array<T>} array The array to rotate.\n * @param {number} n The amount to rotate.\n * @return {!Array<T>} The array.\n * @template T\n */\nfunction rotate(array, n) {\n  asserts.assert(array.length != null);\n\n  if (array.length) {\n    n %= array.length;\n    if (n > 0) {\n      Array.prototype.unshift.apply(array, array.splice(-n, n));\n    } else if (n < 0) {\n      Array.prototype.push.apply(array, array.splice(0, -n));\n    }\n  }\n  return array;\n}\nexports.rotate = rotate;\n\n\n/**\n * Moves one item of an array to a new position keeping the order of the rest\n * of the items. Example use case: keeping a list of JavaScript objects\n * synchronized with the corresponding list of DOM elements after one of the\n * elements has been dragged to a new position.\n * @param {!IArrayLike<?>} arr The array to modify.\n * @param {number} fromIndex Index of the item to move between 0 and\n *     `arr.length - 1`.\n * @param {number} toIndex Target index between 0 and `arr.length - 1`.\n */\nfunction moveItem(arr, fromIndex, toIndex) {\n  asserts.assert(fromIndex >= 0 && fromIndex < arr.length);\n  asserts.assert(toIndex >= 0 && toIndex < arr.length);\n  // Remove 1 item at fromIndex.\n  const removedItems = Array.prototype.splice.call(arr, fromIndex, 1);\n  // Insert the removed item at toIndex.\n  Array.prototype.splice.call(arr, toIndex, 0, removedItems[0]);\n  // We don't use goog.array.insertAt and goog.array.removeAt, because they're\n  // significantly slower than splice.\n}\nexports.moveItem = moveItem;\n\n\n/**\n * Creates a new array for which the element at position i is an array of the\n * ith element of the provided arrays.  The returned array will only be as long\n * as the shortest array provided; additional values are ignored.  For example,\n * the result of zipping [1, 2] and [3, 4, 5] is [[1,3], [2, 4]].\n *\n * This is similar to the zip() function in Python.  See {@link\n * http://docs.python.org/library/functions.html#zip}\n *\n * @param {...!IArrayLike<?>} var_args Arrays to be combined.\n * @return {!Array<!Array<?>>} A new array of arrays created from\n *     provided arrays.\n */\nfunction zip(var_args) {\n  if (!arguments.length) {\n    return [];\n  }\n  const result = [];\n  let minLen = arguments[0].length;\n  for (let i = 1; i < arguments.length; i++) {\n    if (arguments[i].length < minLen) {\n      minLen = arguments[i].length;\n    }\n  }\n  for (let i = 0; i < minLen; i++) {\n    const value = [];\n    for (let j = 0; j < arguments.length; j++) {\n      value.push(arguments[j][i]);\n    }\n    result.push(value);\n  }\n  return result;\n}\nexports.zip = zip;\n\n\n/**\n * Shuffles the values in the specified array using the Fisher-Yates in-place\n * shuffle (also known as the Knuth Shuffle). By default, calls Math.random()\n * and so resets the state of that random number generator. Similarly, may reset\n * the state of any other specified random number generator.\n *\n * Runtime: O(n)\n *\n * @param {!Array<?>} arr The array to be shuffled.\n * @param {function():number=} opt_randFn Optional random function to use for\n *     shuffling.\n *     Takes no arguments, and returns a random number on the interval [0, 1).\n *     Defaults to Math.random() using JavaScript's built-in Math library.\n */\nfunction shuffle(arr, opt_randFn) {\n  const randFn = opt_randFn || Math.random;\n\n  for (let i = arr.length - 1; i > 0; i--) {\n    // Choose a random array index in [0, i] (inclusive with i).\n    const j = Math.floor(randFn() * (i + 1));\n\n    const tmp = arr[i];\n    arr[i] = arr[j];\n    arr[j] = tmp;\n  }\n}\nexports.shuffle = shuffle;\n\n\n/**\n * Returns a new array of elements from arr, based on the indexes of elements\n * provided by index_arr. For example, the result of index copying\n * ['a', 'b', 'c'] with index_arr [1,0,0,2] is ['b', 'a', 'a', 'c'].\n *\n * @param {!IArrayLike<T>} arr The array to get a indexed copy from.\n * @param {!IArrayLike<number>} index_arr An array of indexes to get from arr.\n * @return {!Array<T>} A new array of elements from arr in index_arr order.\n * @template T\n */\nfunction copyByIndex(arr, index_arr) {\n  const result = [];\n  forEach(index_arr, function(index) {\n    result.push(arr[index]);\n  });\n  return result;\n}\nexports.copyByIndex = copyByIndex;\n\n\n/**\n * Maps each element of the input array into zero or more elements of the output\n * array.\n *\n * @param {!IArrayLike<VALUE>|string} arr Array or array like object\n *     over which to iterate.\n * @param {function(this:THIS, VALUE, number, ?): !Array<RESULT>} f The function\n *     to call for every element. This function takes 3 arguments (the element,\n *     the index and the array) and should return an array. The result will be\n *     used to extend a new array.\n * @param {THIS=} opt_obj The object to be used as the value of 'this' within f.\n * @return {!Array<RESULT>} a new array with the concatenation of all arrays\n *     returned from f.\n * @template THIS, VALUE, RESULT\n */\nfunction concatMap(arr, f, opt_obj) {\n  return concat.apply([], map(arr, f, opt_obj));\n}\nexports.concatMap = concatMap;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Provides methods dealing with context on error objects.\n */\n\ngoog.module('goog.debug.errorcontext');\n\ngoog.module.declareLegacyNamespace();\n\n/**\n * Adds key-value context to the error.\n * @param {!Error} err The error to add context to.\n * @param {string} contextKey Key for the context to be added.\n * @param {string} contextValue Value for the context to be added.\n */\nfunction addErrorContext(err, contextKey, contextValue) {\n  if (!err[CONTEXT_KEY]) {\n    err[CONTEXT_KEY] = {};\n  }\n  err[CONTEXT_KEY][contextKey] = contextValue;\n}\n\n/**\n * @param {!Error} err The error to get context from.\n * @return {!Object<string, string>} The context of the provided error.\n */\nfunction getErrorContext(err) {\n  return err[CONTEXT_KEY] || {};\n}\n\n// TODO(aaronsn): convert this to a Symbol once goog.debug.ErrorReporter is\n// able to use ES6.\n/** @const {string} */\nconst CONTEXT_KEY = '__closure__error__context__984382';\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n\nexports = {\n  addErrorContext,\n  getErrorContext,\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Utilities for string manipulation.\n */\n\n\n/**\n * Namespace for string utilities\n */\ngoog.provide('goog.string');\n\ngoog.require('goog.string.internal');\ngoog.require('google3.third_party.javascript.safevalues.dom.index');\ngoog.require('google3.third_party.javascript.safevalues.restricted.reviewed');\n\n\n/**\n * @define {boolean} Enables HTML escaping of lowercase letter \"e\" which helps\n * with detection of double-escaping as this letter is frequently used.\n */\ngoog.string.DETECT_DOUBLE_ESCAPING =\n    goog.define('goog.string.DETECT_DOUBLE_ESCAPING', false);\n\n\n/**\n * @define {boolean} Whether to force non-dom html unescaping.\n */\ngoog.string.FORCE_NON_DOM_HTML_UNESCAPING =\n    goog.define('goog.string.FORCE_NON_DOM_HTML_UNESCAPING', false);\n\n\n/**\n * Common Unicode string characters.\n * @enum {string}\n */\ngoog.string.Unicode = {\n  NBSP: '\\xa0',\n  ZERO_WIDTH_SPACE: '\\u200b'  // This is equivalent to <wbr>.\n};\n\n\n/**\n * Fast prefix-checker.\n * @param {string} str The string to check.\n * @param {string} prefix A string to look for at the start of `str`.\n * @return {boolean} True if `str` begins with `prefix`.\n */\ngoog.string.startsWith = goog.string.internal.startsWith;\n\n\n/**\n * Fast suffix-checker.\n * @param {string} str The string to check.\n * @param {string} suffix A string to look for at the end of `str`.\n * @return {boolean} True if `str` ends with `suffix`.\n */\ngoog.string.endsWith = goog.string.internal.endsWith;\n\n\n/**\n * Case-insensitive prefix-checker.\n * @param {string} str The string to check.\n * @param {string} prefix  A string to look for at the end of `str`.\n * @return {boolean} True if `str` begins with `prefix` (ignoring\n *     case).\n */\ngoog.string.caseInsensitiveStartsWith =\n    goog.string.internal.caseInsensitiveStartsWith;\n\n\n/**\n * Case-insensitive suffix-checker.\n * @param {string} str The string to check.\n * @param {string} suffix A string to look for at the end of `str`.\n * @return {boolean} True if `str` ends with `suffix` (ignoring\n *     case).\n */\ngoog.string.caseInsensitiveEndsWith =\n    goog.string.internal.caseInsensitiveEndsWith;\n\n\n/**\n * Case-insensitive equality checker.\n * @param {string} str1 First string to check.\n * @param {string} str2 Second string to check.\n * @return {boolean} True if `str1` and `str2` are the same string,\n *     ignoring case.\n */\ngoog.string.caseInsensitiveEquals = goog.string.internal.caseInsensitiveEquals;\n\n\n/**\n * Does simple python-style string substitution.\n * subs(\"foo%s hot%s\", \"bar\", \"dog\") becomes \"foobar hotdog\".\n * @param {string} str The string containing the pattern.\n * @param {...*} var_args The items to substitute into the pattern.\n * @return {string} A copy of `str` in which each occurrence of\n *     {@code %s} has been replaced an argument from `var_args`.\n */\ngoog.string.subs = function(str, var_args) {\n  'use strict';\n  const splitParts = str.split('%s');\n  let returnString = '';\n\n  const subsArguments = Array.prototype.slice.call(arguments, 1);\n  while (subsArguments.length &&\n         // Replace up to the last split part. We are inserting in the\n         // positions between split parts.\n         splitParts.length > 1) {\n    returnString += splitParts.shift() + subsArguments.shift();\n  }\n\n  return returnString + splitParts.join('%s');  // Join unused '%s'\n};\n\n\n/**\n * Converts multiple whitespace chars (spaces, non-breaking-spaces, new lines\n * and tabs) to a single space, and strips leading and trailing whitespace.\n * @param {string} str Input string.\n * @return {string} A copy of `str` with collapsed whitespace.\n */\ngoog.string.collapseWhitespace = function(str) {\n  'use strict';\n  // Since IE doesn't include non-breaking-space (0xa0) in their \\s character\n  // class (as required by section 7.2 of the ECMAScript spec), we explicitly\n  // include it in the regexp to enforce consistent cross-browser behavior.\n  return str.replace(/[\\s\\xa0]+/g, ' ').replace(/^\\s+|\\s+$/g, '');\n};\n\n\n/**\n * Checks if a string is empty or contains only whitespaces.\n * @param {string} str The string to check.\n * @return {boolean} Whether `str` is empty or whitespace only.\n */\ngoog.string.isEmptyOrWhitespace = goog.string.internal.isEmptyOrWhitespace;\n\n\n/**\n * Checks if a string is empty.\n * @param {string} str The string to check.\n * @return {boolean} Whether `str` is empty.\n */\ngoog.string.isEmptyString = function(str) {\n  'use strict';\n  return str.length == 0;\n};\n\n\n/**\n * Checks if a string is empty or contains only whitespaces.\n *\n * @param {string} str The string to check.\n * @return {boolean} Whether `str` is empty or whitespace only.\n * @deprecated Use goog.string.isEmptyOrWhitespace instead.\n */\ngoog.string.isEmpty = goog.string.isEmptyOrWhitespace;\n\n\n/**\n * Checks if a string is null, undefined, empty or contains only whitespaces.\n * @param {*} str The string to check.\n * @return {boolean} Whether `str` is null, undefined, empty, or\n *     whitespace only.\n * @deprecated Use goog.string.isEmptyOrWhitespace(goog.string.makeSafe(str))\n *     instead.\n */\ngoog.string.isEmptyOrWhitespaceSafe = function(str) {\n  'use strict';\n  return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(str));\n};\n\n\n/**\n * Checks if a string is null, undefined, empty or contains only whitespaces.\n *\n * @param {*} str The string to check.\n * @return {boolean} Whether `str` is null, undefined, empty, or\n *     whitespace only.\n * @deprecated Use goog.string.isEmptyOrWhitespace instead.\n */\ngoog.string.isEmptySafe = goog.string.isEmptyOrWhitespaceSafe;\n\n\n/**\n * Checks if a string is all breaking whitespace.\n * @param {string} str The string to check.\n * @return {boolean} Whether the string is all breaking whitespace.\n */\ngoog.string.isBreakingWhitespace = function(str) {\n  'use strict';\n  return !/[^\\t\\n\\r ]/.test(str);\n};\n\n\n/**\n * Checks if a string contains all letters.\n * @param {string} str string to check.\n * @return {boolean} True if `str` consists entirely of letters.\n */\ngoog.string.isAlpha = function(str) {\n  'use strict';\n  return !/[^a-zA-Z]/.test(str);\n};\n\n\n/**\n * Checks if a string contains only numbers.\n * @param {*} str string to check. If not a string, it will be\n *     casted to one.\n * @return {boolean} True if `str` is numeric.\n */\ngoog.string.isNumeric = function(str) {\n  'use strict';\n  return !/[^0-9]/.test(str);\n};\n\n\n/**\n * Checks if a string contains only numbers or letters.\n * @param {string} str string to check.\n * @return {boolean} True if `str` is alphanumeric.\n */\ngoog.string.isAlphaNumeric = function(str) {\n  'use strict';\n  return !/[^a-zA-Z0-9]/.test(str);\n};\n\n\n/**\n * Checks if a character is a space character.\n * @param {string} ch Character to check.\n * @return {boolean} True if `ch` is a space.\n */\ngoog.string.isSpace = function(ch) {\n  'use strict';\n  return ch == ' ';\n};\n\n\n/**\n * Checks if a character is a valid unicode character.\n * @param {string} ch Character to check.\n * @return {boolean} True if `ch` is a valid unicode character.\n */\ngoog.string.isUnicodeChar = function(ch) {\n  'use strict';\n  return ch.length == 1 && ch >= ' ' && ch <= '~' ||\n      ch >= '\\u0080' && ch <= '\\uFFFD';\n};\n\n\n/**\n * Takes a string and replaces newlines with a space. Multiple lines are\n * replaced with a single space.\n * @param {string} str The string from which to strip newlines.\n * @return {string} A copy of `str` stripped of newlines.\n */\ngoog.string.stripNewlines = function(str) {\n  'use strict';\n  return str.replace(/(\\r\\n|\\r|\\n)+/g, ' ');\n};\n\n\n/**\n * Replaces Windows and Mac new lines with unix style: \\r or \\r\\n with \\n.\n * @param {string} str The string to in which to canonicalize newlines.\n * @return {string} `str` A copy of {@code} with canonicalized newlines.\n */\ngoog.string.canonicalizeNewlines = function(str) {\n  'use strict';\n  return str.replace(/(\\r\\n|\\r|\\n)/g, '\\n');\n};\n\n\n/**\n * Normalizes whitespace in a string, replacing all whitespace chars with\n * a space.\n * @param {string} str The string in which to normalize whitespace.\n * @return {string} A copy of `str` with all whitespace normalized.\n */\ngoog.string.normalizeWhitespace = function(str) {\n  'use strict';\n  return str.replace(/\\xa0|\\s/g, ' ');\n};\n\n\n/**\n * Normalizes spaces in a string, replacing all consecutive spaces and tabs\n * with a single space. Replaces non-breaking space with a space.\n * @param {string} str The string in which to normalize spaces.\n * @return {string} A copy of `str` with all consecutive spaces and tabs\n *    replaced with a single space.\n */\ngoog.string.normalizeSpaces = function(str) {\n  'use strict';\n  return str.replace(/\\xa0|[ \\t]+/g, ' ');\n};\n\n\n/**\n * Removes the breaking spaces from the left and right of the string and\n * collapses the sequences of breaking spaces in the middle into single spaces.\n * The original and the result strings render the same way in HTML.\n * @param {string} str A string in which to collapse spaces.\n * @return {string} Copy of the string with normalized breaking spaces.\n */\ngoog.string.collapseBreakingSpaces = function(str) {\n  'use strict';\n  return str.replace(/[\\t\\r\\n ]+/g, ' ')\n      .replace(/^[\\t\\r\\n ]+|[\\t\\r\\n ]+$/g, '');\n};\n\n\n/**\n * Trims white spaces to the left and right of a string.\n * @param {string} str The string to trim.\n * @return {string} A trimmed copy of `str`.\n */\ngoog.string.trim = goog.string.internal.trim;\n\n\n/**\n * Trims whitespaces at the left end of a string.\n * @param {string} str The string to left trim.\n * @return {string} A trimmed copy of `str`.\n */\ngoog.string.trimLeft = function(str) {\n  'use strict';\n  // Since IE doesn't include non-breaking-space (0xa0) in their \\s character\n  // class (as required by section 7.2 of the ECMAScript spec), we explicitly\n  // include it in the regexp to enforce consistent cross-browser behavior.\n  return str.replace(/^[\\s\\xa0]+/, '');\n};\n\n\n/**\n * Trims whitespaces at the right end of a string.\n * @param {string} str The string to right trim.\n * @return {string} A trimmed copy of `str`.\n */\ngoog.string.trimRight = function(str) {\n  'use strict';\n  // Since IE doesn't include non-breaking-space (0xa0) in their \\s character\n  // class (as required by section 7.2 of the ECMAScript spec), we explicitly\n  // include it in the regexp to enforce consistent cross-browser behavior.\n  return str.replace(/[\\s\\xa0]+$/, '');\n};\n\n\n/**\n * A string comparator that ignores case.\n * -1 = str1 less than str2\n *  0 = str1 equals str2\n *  1 = str1 greater than str2\n *\n * @param {string} str1 The string to compare.\n * @param {string} str2 The string to compare `str1` to.\n * @return {number} The comparator result, as described above.\n */\ngoog.string.caseInsensitiveCompare =\n    goog.string.internal.caseInsensitiveCompare;\n\n\n/**\n * Compares two strings interpreting their numeric substrings as numbers.\n *\n * @param {string} str1 First string.\n * @param {string} str2 Second string.\n * @param {!RegExp} tokenizerRegExp Splits a string into substrings of\n *     non-negative integers, non-numeric characters and optionally fractional\n *     numbers starting with a decimal point.\n * @return {number} Negative if str1 < str2, 0 is str1 == str2, positive if\n *     str1 > str2.\n * @private\n */\ngoog.string.numberAwareCompare_ = function(str1, str2, tokenizerRegExp) {\n  'use strict';\n  if (str1 == str2) {\n    return 0;\n  }\n  if (!str1) {\n    return -1;\n  }\n  if (!str2) {\n    return 1;\n  }\n\n  // Using match to split the entire string ahead of time turns out to be faster\n  // for most inputs than using RegExp.exec or iterating over each character.\n  const tokens1 = str1.toLowerCase().match(tokenizerRegExp);\n  const tokens2 = str2.toLowerCase().match(tokenizerRegExp);\n\n  const count = Math.min(tokens1.length, tokens2.length);\n\n  for (let i = 0; i < count; i++) {\n    const a = tokens1[i];\n    const b = tokens2[i];\n\n    // Compare pairs of tokens, returning if one token sorts before the other.\n    if (a != b) {\n      // Only if both tokens are integers is a special comparison required.\n      // Decimal numbers are sorted as strings (e.g., '.09' < '.1').\n      const num1 = parseInt(a, 10);\n      if (!isNaN(num1)) {\n        const num2 = parseInt(b, 10);\n        if (!isNaN(num2) && num1 - num2) {\n          return num1 - num2;\n        }\n      }\n      return a < b ? -1 : 1;\n    }\n  }\n\n  // If one string is a substring of the other, the shorter string sorts first.\n  if (tokens1.length != tokens2.length) {\n    return tokens1.length - tokens2.length;\n  }\n\n  // The two strings must be equivalent except for case (perfect equality is\n  // tested at the head of the function.) Revert to default ASCII string\n  // comparison to stabilize the sort.\n  return str1 < str2 ? -1 : 1;\n};\n\n\n/**\n * String comparison function that handles non-negative integer numbers in a\n * way humans might expect. Using this function, the string 'File 2.jpg' sorts\n * before 'File 10.jpg', and 'Version 1.9' before 'Version 1.10'. The comparison\n * is mostly case-insensitive, though strings that are identical except for case\n * are sorted with the upper-case strings before lower-case.\n *\n * This comparison function is up to 50x slower than either the default or the\n * case-insensitive compare. It should not be used in time-critical code, but\n * should be fast enough to sort several hundred short strings (like filenames)\n * with a reasonable delay.\n *\n * @param {string} str1 The string to compare in a numerically sensitive way.\n * @param {string} str2 The string to compare `str1` to.\n * @return {number} less than 0 if str1 < str2, 0 if str1 == str2, greater than\n *     0 if str1 > str2.\n */\ngoog.string.intAwareCompare = function(str1, str2) {\n  'use strict';\n  return goog.string.numberAwareCompare_(str1, str2, /\\d+|\\D+/g);\n};\n\n\n/**\n * String comparison function that handles non-negative integer and fractional\n * numbers in a way humans might expect. Using this function, the string\n * 'File 2.jpg' sorts before 'File 10.jpg', and '3.14' before '3.2'. Equivalent\n * to {@link goog.string.intAwareCompare} apart from the way how it interprets\n * dots.\n *\n * @param {string} str1 The string to compare in a numerically sensitive way.\n * @param {string} str2 The string to compare `str1` to.\n * @return {number} less than 0 if str1 < str2, 0 if str1 == str2, greater than\n *     0 if str1 > str2.\n */\ngoog.string.floatAwareCompare = function(str1, str2) {\n  'use strict';\n  return goog.string.numberAwareCompare_(str1, str2, /\\d+|\\.\\d+|\\D+/g);\n};\n\n\n/**\n * Alias for {@link goog.string.floatAwareCompare}.\n *\n * @param {string} str1\n * @param {string} str2\n * @return {number}\n */\ngoog.string.numerateCompare = goog.string.floatAwareCompare;\n\n\n/**\n * URL-encodes a string\n * @param {*} str The string to url-encode.\n * @return {string} An encoded copy of `str` that is safe for urls.\n *     Note that '#', ':', and other characters used to delimit portions\n *     of URLs *will* be encoded.\n */\ngoog.string.urlEncode = function(str) {\n  'use strict';\n  return encodeURIComponent(String(str));\n};\n\n\n/**\n * URL-decodes the string. We need to specially handle '+'s because\n * the javascript library doesn't convert them to spaces.\n * @param {string} str The string to url decode.\n * @return {string} The decoded `str`.\n */\ngoog.string.urlDecode = function(str) {\n  'use strict';\n  return decodeURIComponent(str.replace(/\\+/g, ' '));\n};\n\n\n/**\n * Converts \\n to <br>s or <br />s.\n * @param {string} str The string in which to convert newlines.\n * @param {boolean=} opt_xml Whether to use XML compatible tags.\n * @return {string} A copy of `str` with converted newlines.\n */\ngoog.string.newLineToBr = goog.string.internal.newLineToBr;\n\n\n/**\n * Escapes double quote '\"' and single quote '\\'' characters in addition to\n * '&', '<', and '>' so that a string can be included in an HTML tag attribute\n * value within double or single quotes.\n *\n * It should be noted that > doesn't need to be escaped for the HTML or XML to\n * be valid, but it has been decided to escape it for consistency with other\n * implementations.\n *\n * With goog.string.DETECT_DOUBLE_ESCAPING, this function escapes also the\n * lowercase letter \"e\".\n *\n * NOTE(pupius):\n * HtmlEscape is often called during the generation of large blocks of HTML.\n * Using statics for the regular expressions and strings is an optimization\n * that can more than half the amount of time IE spends in this function for\n * large apps, since strings and regexes both contribute to GC allocations.\n *\n * Testing for the presence of a character before escaping increases the number\n * of function calls, but actually provides a speed increase for the average\n * case -- since the average case often doesn't require the escaping of all 4\n * characters and indexOf() is much cheaper than replace().\n * The worst case does suffer slightly from the additional calls, therefore the\n * opt_isLikelyToContainHtmlChars option has been included for situations\n * where all 4 HTML entities are very likely to be present and need escaping.\n *\n * Some benchmarks (times tended to fluctuate +-0.05ms):\n *                                     FireFox                     IE6\n * (no chars / average (mix of cases) / all 4 chars)\n * no checks                     0.13 / 0.22 / 0.22         0.23 / 0.53 / 0.80\n * indexOf                       0.08 / 0.17 / 0.26         0.22 / 0.54 / 0.84\n * indexOf + re test             0.07 / 0.17 / 0.28         0.19 / 0.50 / 0.85\n *\n * An additional advantage of checking if replace actually needs to be called\n * is a reduction in the number of object allocations, so as the size of the\n * application grows the difference between the various methods would increase.\n *\n * @param {string} str string to be escaped.\n * @param {boolean=} opt_isLikelyToContainHtmlChars Don't perform a check to see\n *     if the character needs replacing - use this option if you expect each of\n *     the characters to appear often. Leave false if you expect few html\n *     characters to occur in your strings, such as if you are escaping HTML.\n * @return {string} An escaped copy of `str`.\n */\ngoog.string.htmlEscape = function(str, opt_isLikelyToContainHtmlChars) {\n  'use strict';\n  str = goog.string.internal.htmlEscape(str, opt_isLikelyToContainHtmlChars);\n  if (goog.string.DETECT_DOUBLE_ESCAPING) {\n    str = str.replace(goog.string.E_RE_, '&#101;');\n  }\n  return str;\n};\n\n\n/**\n * Regular expression that matches a lowercase letter \"e\", for use in escaping.\n * @const {!RegExp}\n * @private\n */\ngoog.string.E_RE_ = /e/g;\n\n\n/**\n * Unescapes an HTML string.\n *\n * @param {string} str The string to unescape.\n * @return {string} An unescaped copy of `str`.\n */\ngoog.string.unescapeEntities = function(str) {\n  'use strict';\n  if (goog.string.contains(str, '&')) {\n    // We are careful not to use a DOM if we do not have one or we explicitly\n    // requested non-DOM html unescaping.\n    if (!goog.string.FORCE_NON_DOM_HTML_UNESCAPING &&\n        'document' in goog.global) {\n      return goog.string.unescapeEntitiesUsingDom_(str);\n    } else {\n      // Fall back on pure XML entities\n      return goog.string.unescapePureXmlEntities_(str);\n    }\n  }\n  return str;\n};\n\n\n/**\n * Unescapes a HTML string using the provided document.\n *\n * @param {string} str The string to unescape.\n * @param {!Document} document A document to use in escaping the string.\n * @return {string} An unescaped copy of `str`.\n */\ngoog.string.unescapeEntitiesWithDocument = function(str, document) {\n  'use strict';\n  if (goog.string.contains(str, '&')) {\n    return goog.string.unescapeEntitiesUsingDom_(str, document);\n  }\n  return str;\n};\n\n\n/**\n * Unescapes an HTML string using a DOM to resolve non-XML, non-numeric\n * entities. This function is XSS-safe and whitespace-preserving.\n * @private\n * @param {string} str The string to unescape.\n * @param {Document=} opt_document An optional document to use for creating\n *     elements. If this is not specified then the default window.document\n *     will be used.\n * @return {string} The unescaped `str` string.\n */\ngoog.string.unescapeEntitiesUsingDom_ = function(str, opt_document) {\n  'use strict';\n  /** @type {!Object<string, string>} */\n  const seen = {'&amp;': '&', '&lt;': '<', '&gt;': '>', '&quot;': '\"'};\n  /** @type {!Element} */\n  let div;\n  if (opt_document) {\n    div = opt_document.createElement('div');\n  } else {\n    div = goog.global.document.createElement('div');\n  }\n  // Match as many valid entity characters as possible. If the actual entity\n  // happens to be shorter, it will still work as innerHTML will return the\n  // trailing characters unchanged. Since the entity characters do not include\n  // open angle bracket, there is no chance of XSS from the innerHTML use.\n  // Since no whitespace is passed to innerHTML, whitespace is preserved.\n  return str.replace(goog.string.HTML_ENTITY_PATTERN_, function(s, entity) {\n    'use strict';\n    // Check for cached entity.\n    let value = seen[s];\n    if (value) {\n      return value;\n    }\n    // Check for numeric entity.\n    if (entity.charAt(0) == '#') {\n      // Prefix with 0 so that hex entities (e.g. &#x10) parse as hex numbers.\n      const n = Number('0' + entity.slice(1));\n      if (!isNaN(n)) {\n        value = String.fromCharCode(n);\n      }\n    }\n    // Fall back to innerHTML otherwise.\n    if (!value) {\n      // Append a non-entity character to avoid a bug in Webkit that parses\n      // an invalid entity at the end of innerHTML text as the empty string.\n      goog.module.get('google3.third_party.javascript.safevalues.dom.index')\n          .setElementInnerHtml(\n              div,\n              goog.module\n                  .get(\n                      'google3.third_party.javascript.safevalues.restricted.reviewed')\n                  .htmlSafeByReview(\n                      s + ' ', {justification: 'Single HTML entity.'}));\n      // Then remove the trailing character from the result.\n      value = div.firstChild.nodeValue.slice(0, -1);\n    }\n    // Cache and return.\n    return seen[s] = value;\n  });\n};\n\n\n/**\n * Unescapes XML entities.\n * @private\n * @param {string} str The string to unescape.\n * @return {string} An unescaped copy of `str`.\n */\ngoog.string.unescapePureXmlEntities_ = function(str) {\n  'use strict';\n  return str.replace(/&([^;]+);/g, function(s, entity) {\n    'use strict';\n    switch (entity) {\n      case 'amp':\n        return '&';\n      case 'lt':\n        return '<';\n      case 'gt':\n        return '>';\n      case 'quot':\n        return '\"';\n      default:\n        if (entity.charAt(0) == '#') {\n          // Prefix with 0 so that hex entities (e.g. &#x10) parse as hex.\n          const n = Number('0' + entity.slice(1));\n          if (!isNaN(n)) {\n            return String.fromCharCode(n);\n          }\n        }\n        // For invalid entities we just return the entity\n        return s;\n    }\n  });\n};\n\n\n/**\n * Regular expression that matches an HTML entity.\n * See also HTML5: Tokenization / Tokenizing character references.\n * @private\n * @type {!RegExp}\n */\ngoog.string.HTML_ENTITY_PATTERN_ = /&([^;\\s<&]+);?/g;\n\n\n/**\n * Do escaping of whitespace to preserve spatial formatting. We use character\n * entity #160 to make it safer for xml.\n * @param {string} str The string in which to escape whitespace.\n * @param {boolean=} opt_xml Whether to use XML compatible tags.\n * @return {string} An escaped copy of `str`.\n */\ngoog.string.whitespaceEscape = function(str, opt_xml) {\n  'use strict';\n  // This doesn't use goog.string.preserveSpaces for backwards compatibility.\n  return goog.string.newLineToBr(str.replace(/  /g, ' &#160;'), opt_xml);\n};\n\n\n/**\n * Preserve spaces that would be otherwise collapsed in HTML by replacing them\n * with non-breaking space Unicode characters.\n * @param {string} str The string in which to preserve whitespace.\n * @return {string} A copy of `str` with preserved whitespace.\n */\ngoog.string.preserveSpaces = function(str) {\n  'use strict';\n  return str.replace(/(^|[\\n ]) /g, '$1' + goog.string.Unicode.NBSP);\n};\n\n\n/**\n * Strip quote characters around a string.  The second argument is a string of\n * characters to treat as quotes.  This can be a single character or a string of\n * multiple character and in that case each of those are treated as possible\n * quote characters. For example:\n *\n * <pre>\n * goog.string.stripQuotes('\"abc\"', '\"`') --\u003e 'abc'\n * goog.string.stripQuotes('`abc`', '\"`') --\u003e 'abc'\n * </pre>\n *\n * @param {string} str The string to strip.\n * @param {string} quoteChars The quote characters to strip.\n * @return {string} A copy of `str` without the quotes.\n */\ngoog.string.stripQuotes = function(str, quoteChars) {\n  'use strict';\n  const length = quoteChars.length;\n  for (let i = 0; i < length; i++) {\n    const quoteChar = length == 1 ? quoteChars : quoteChars.charAt(i);\n    if (str.charAt(0) == quoteChar && str.charAt(str.length - 1) == quoteChar) {\n      return str.substring(1, str.length - 1);\n    }\n  }\n  return str;\n};\n\n\n/**\n * Truncates a string to a certain length and adds '...' if necessary.  The\n * length also accounts for the ellipsis, so a maximum length of 10 and a string\n * 'Hello World!' produces 'Hello W...'.\n * @param {string} str The string to truncate.\n * @param {number} chars Max number of characters.\n * @param {boolean=} opt_protectEscapedCharacters Whether to protect escaped\n *     characters from being cut off in the middle.\n * @return {string} The truncated `str` string.\n */\ngoog.string.truncate = function(str, chars, opt_protectEscapedCharacters) {\n  'use strict';\n  if (opt_protectEscapedCharacters) {\n    str = goog.string.unescapeEntities(str);\n  }\n\n  if (str.length > chars) {\n    str = str.substring(0, chars - 3) + '...';\n  }\n\n  if (opt_protectEscapedCharacters) {\n    str = goog.string.htmlEscape(str);\n  }\n\n  return str;\n};\n\n\n/**\n * Truncate a string in the middle, adding \"...\" if necessary,\n * and favoring the beginning of the string.\n * @param {string} str The string to truncate the middle of.\n * @param {number} chars Max number of characters.\n * @param {boolean=} opt_protectEscapedCharacters Whether to protect escaped\n *     characters from being cutoff in the middle.\n * @param {number=} opt_trailingChars Optional number of trailing characters to\n *     leave at the end of the string, instead of truncating as close to the\n *     middle as possible.\n * @return {string} A truncated copy of `str`.\n */\ngoog.string.truncateMiddle = function(\n    str, chars, opt_protectEscapedCharacters, opt_trailingChars) {\n  'use strict';\n  if (opt_protectEscapedCharacters) {\n    str = goog.string.unescapeEntities(str);\n  }\n\n  if (opt_trailingChars && str.length > chars) {\n    if (opt_trailingChars > chars) {\n      opt_trailingChars = chars;\n    }\n    const endPoint = str.length - opt_trailingChars;\n    const startPoint = chars - opt_trailingChars;\n    str = str.substring(0, startPoint) + '...' + str.substring(endPoint);\n  } else if (str.length > chars) {\n    // Favor the beginning of the string:\n    let half = Math.floor(chars / 2);\n    const endPos = str.length - half;\n    half += chars % 2;\n    str = str.substring(0, half) + '...' + str.substring(endPos);\n  }\n\n  if (opt_protectEscapedCharacters) {\n    str = goog.string.htmlEscape(str);\n  }\n\n  return str;\n};\n\n\n/**\n * Special chars that need to be escaped for goog.string.quote.\n * @private {!Object<string, string>}\n */\ngoog.string.specialEscapeChars_ = {\n  '\\0': '\\\\0',\n  '\\b': '\\\\b',\n  '\\f': '\\\\f',\n  '\\n': '\\\\n',\n  '\\r': '\\\\r',\n  '\\t': '\\\\t',\n  '\\x0B': '\\\\x0B',  // '\\v' is not supported in JScript\n  '\"': '\\\\\"',\n  '\\\\': '\\\\\\\\',\n  // To support the use case of embedding quoted strings inside of script\n  // tags, we have to make sure HTML comments and opening/closing script tags do\n  // not appear in the resulting string. The specific strings that must be\n  // escaped are documented at:\n  // https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements\n  '<': '\\\\u003C'  // NOTE: JSON.parse crashes on '\\\\x3c'.\n};\n\n\n/**\n * Character mappings used internally for goog.string.escapeChar.\n * @private {!Object<string, string>}\n */\ngoog.string.jsEscapeCache_ = {\n  '\\'': '\\\\\\''\n};\n\n\n/**\n * Encloses a string in double quotes and escapes characters so that the\n * string is a valid JS string. The resulting string is safe to embed in\n * `<script>` tags as \"<\" is escaped.\n * @param {string} s The string to quote.\n * @return {string} A copy of `s` surrounded by double quotes.\n */\ngoog.string.quote = function(s) {\n  'use strict';\n  s = String(s);\n  const sb = ['\"'];\n  for (let i = 0; i < s.length; i++) {\n    const ch = s.charAt(i);\n    const cc = ch.charCodeAt(0);\n    sb[i + 1] = goog.string.specialEscapeChars_[ch] ||\n        ((cc > 31 && cc < 127) ? ch : goog.string.escapeChar(ch));\n  }\n  sb.push('\"');\n  return sb.join('');\n};\n\n\n/**\n * Takes a string and returns the escaped string for that input string.\n * @param {string} str The string to escape.\n * @return {string} An escaped string representing `str`.\n */\ngoog.string.escapeString = function(str) {\n  'use strict';\n  const sb = [];\n  for (let i = 0; i < str.length; i++) {\n    sb[i] = goog.string.escapeChar(str.charAt(i));\n  }\n  return sb.join('');\n};\n\n\n/**\n * Takes a character and returns the escaped string for that character. For\n * example escapeChar(String.fromCharCode(15)) -> \"\\\\x0E\".\n * @param {string} c The character to escape.\n * @return {string} An escaped string representing `c`.\n */\ngoog.string.escapeChar = function(c) {\n  'use strict';\n  if (c in goog.string.jsEscapeCache_) {\n    return goog.string.jsEscapeCache_[c];\n  }\n\n  if (c in goog.string.specialEscapeChars_) {\n    return goog.string.jsEscapeCache_[c] = goog.string.specialEscapeChars_[c];\n  }\n\n  let rv = c;\n  const cc = c.charCodeAt(0);\n  if (cc > 31 && cc < 127) {\n    rv = c;\n  } else {\n    // tab is 9 but handled above\n    if (cc < 256) {\n      rv = '\\\\x';\n      if (cc < 16 || cc > 256) {\n        rv += '0';\n      }\n    } else {\n      rv = '\\\\u';\n      if (cc < 4096) {  // \\u1000\n        rv += '0';\n      }\n    }\n    rv += cc.toString(16).toUpperCase();\n  }\n\n  return goog.string.jsEscapeCache_[c] = rv;\n};\n\n\n/**\n * Determines whether a string contains a substring.\n * @param {string} str The string to search.\n * @param {string} subString The substring to search for.\n * @return {boolean} Whether `str` contains `subString`.\n */\ngoog.string.contains = goog.string.internal.contains;\n\n\n/**\n * Determines whether a string contains a substring, ignoring case.\n * @param {string} str The string to search.\n * @param {string} subString The substring to search for.\n * @return {boolean} Whether `str` contains `subString`.\n */\ngoog.string.caseInsensitiveContains =\n    goog.string.internal.caseInsensitiveContains;\n\n\n/**\n * Returns the non-overlapping occurrences of ss in s.\n * If either s or ss evalutes to false, then returns zero.\n * @param {string} s The string to look in.\n * @param {string} ss The string to look for.\n * @return {number} Number of occurrences of ss in s.\n */\ngoog.string.countOf = function(s, ss) {\n  'use strict';\n  return s && ss ? s.split(ss).length - 1 : 0;\n};\n\n\n/**\n * Removes a substring of a specified length at a specific\n * index in a string.\n * @param {string} s The base string from which to remove.\n * @param {number} index The index at which to remove the substring.\n * @param {number} stringLength The length of the substring to remove.\n * @return {string} A copy of `s` with the substring removed or the full\n *     string if nothing is removed or the input is invalid.\n */\ngoog.string.removeAt = function(s, index, stringLength) {\n  'use strict';\n  let resultStr = s;\n  // If the index is greater or equal to 0 then remove substring\n  if (index >= 0 && index < s.length && stringLength > 0) {\n    resultStr = s.slice(0, index) + s.slice(index + stringLength);\n  }\n  return resultStr;\n};\n\n\n/**\n * Removes the first occurrence of a substring from a string.\n * @param {string} str The base string from which to remove.\n * @param {string} substr The string to remove.\n * @return {string} A copy of `str` with `substr` removed or the\n *     full string if nothing is removed.\n */\ngoog.string.remove = function(str, substr) {\n  'use strict';\n  return str.replace(substr, '');\n};\n\n\n/**\n *  Removes all occurrences of a substring from a string.\n *  @param {string} s The base string from which to remove.\n *  @param {string} ss The string to remove.\n *  @return {string} A copy of `s` with `ss` removed or the full\n *      string if nothing is removed.\n */\ngoog.string.removeAll = function(s, ss) {\n  'use strict';\n  const re = new RegExp(goog.string.regExpEscape(ss), 'g');\n  return s.replace(re, '');\n};\n\n\n/**\n *  Replaces all occurrences of a substring of a string with a new substring.\n *  @param {string} s The base string from which to remove.\n *  @param {string} ss The string to replace.\n *  @param {string} replacement The replacement string.\n *  @return {string} A copy of `s` with `ss` replaced by\n *      `replacement` or the original string if nothing is replaced.\n */\ngoog.string.replaceAll = function(s, ss, replacement) {\n  'use strict';\n  const re = new RegExp(goog.string.regExpEscape(ss), 'g');\n  return s.replace(re, replacement.replace(/\\$/g, '$$$$'));\n};\n\n\n/**\n * Escapes characters in the string that are not safe to use in a RegExp.\n * @param {*} s The string to escape. If not a string, it will be casted\n *     to one.\n * @return {string} A RegExp safe, escaped copy of `s`.\n */\ngoog.string.regExpEscape = function(s) {\n  'use strict';\n  return String(s)\n      .replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g, '\\\\$1')\n      .replace(/\\x08/g, '\\\\x08');\n};\n\n\n/**\n * Repeats a string n times.\n * @param {string} string The string to repeat.\n * @param {number} length The number of times to repeat.\n * @return {string} A string containing `length` repetitions of\n *     `string`.\n */\ngoog.string.repeat = (goog.FEATURESET_YEAR >= 2018 || String.prototype.repeat) ?\n    function(string, length) {\n      'use strict';\n      // The native method is over 100 times faster than the alternative.\n      return string.repeat(length);\n    } :\n    function(string, length) {\n      'use strict';\n      return new Array(length + 1).join(string);\n    };\n\n\n/**\n * Pads number to given length and optionally rounds it to a given precision.\n * For example:\n * <pre>padNumber(1.25, 2, 3) -> '01.250'\n * padNumber(1.25, 2) -> '01.25'\n * padNumber(1.25, 2, 1) -> '01.3'\n * padNumber(1.25, 0) -> '1.25'</pre>\n *\n * @param {number} num The number to pad.\n * @param {number} length The desired length.\n * @param {number=} opt_precision The desired precision.\n * @return {string} `num` as a string with the given options.\n */\ngoog.string.padNumber = function(num, length, opt_precision) {\n  'use strict';\n  if (!Number.isFinite(num)) return String(num);\n  let s =\n      (opt_precision !== undefined) ? num.toFixed(opt_precision) : String(num);\n  let index = s.indexOf('.');\n  if (index === -1) {\n    index = s.length;\n  }\n  const sign = s[0] === '-' ? '-' : '';\n  if (sign) {\n    s = s.substring(1);\n  }\n  return sign + goog.string.repeat('0', Math.max(0, length - index)) + s;\n};\n\n\n/**\n * Returns a string representation of the given object, with\n * null and undefined being returned as the empty string.\n *\n * @param {*} obj The object to convert.\n * @return {string} A string representation of the `obj`.\n */\ngoog.string.makeSafe = function(obj) {\n  'use strict';\n  return obj == null ? '' : String(obj);\n};\n\n/**\n * Returns a string with at least 64-bits of randomness.\n *\n * Doesn't trust JavaScript's random function entirely. Uses a combination of\n * random and current timestamp, and then encodes the string in base-36 to\n * make it shorter.\n *\n * @return {string} A random string, e.g. sn1s7vb4gcic.\n */\ngoog.string.getRandomString = function() {\n  'use strict';\n  const x = 2147483648;\n  return Math.floor(Math.random() * x).toString(36) +\n      Math.abs(Math.floor(Math.random() * x) ^ goog.now()).toString(36);\n};\n\n\n/**\n * Compares two version numbers.\n *\n * @param {string|number} version1 Version of first item.\n * @param {string|number} version2 Version of second item.\n *\n * @return {number}  1 if `version1` is higher.\n *                   0 if arguments are equal.\n *                  -1 if `version2` is higher.\n */\ngoog.string.compareVersions = goog.string.internal.compareVersions;\n\n\n/**\n * String hash function similar to java.lang.String.hashCode().\n * The hash code for a string is computed as\n * s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n * where s[i] is the ith character of the string and n is the length of\n * the string. We mod the result to make it between 0 (inclusive) and 2^32\n * (exclusive).\n * @param {string} str A string.\n * @return {number} Hash value for `str`, between 0 (inclusive) and 2^32\n *  (exclusive). The empty string returns 0.\n */\ngoog.string.hashCode = function(str) {\n  'use strict';\n  let result = 0;\n  for (let i = 0; i < str.length; ++i) {\n    // Normalize to 4 byte range, 0 ... 2^32.\n    result = (31 * result + str.charCodeAt(i)) >>> 0;\n  }\n  return result;\n};\n\n\n/**\n * The most recent unique ID. |0 is equivalent to Math.floor in this case.\n * @type {number}\n * @private\n */\ngoog.string.uniqueStringCounter_ = Math.random() * 0x80000000 | 0;\n\n\n/**\n * Generates and returns a string which is unique in the current document.\n * This is useful, for example, to create unique IDs for DOM elements.\n * @return {string} A unique id.\n */\ngoog.string.createUniqueString = function() {\n  'use strict';\n  return 'goog_' + goog.string.uniqueStringCounter_++;\n};\n\n\n/**\n * Converts the supplied string to a number, which may be Infinity or NaN.\n * This function strips whitespace: (toNumber(' 123') === 123)\n * This function accepts scientific notation: (toNumber('1e1') === 10)\n *\n * This is better than JavaScript's built-in conversions because, sadly:\n *     (Number(' ') === 0) and (parseFloat('123a') === 123)\n *\n * @param {string} str The string to convert.\n * @return {number} The number the supplied string represents, or NaN.\n */\ngoog.string.toNumber = function(str) {\n  'use strict';\n  const num = Number(str);\n  if (num == 0 && goog.string.isEmptyOrWhitespace(str)) {\n    return NaN;\n  }\n  return num;\n};\n\n\n/**\n * Returns whether the given string is lower camel case (e.g. \"isFooBar\").\n *\n * Note that this assumes the string is entirely letters.\n * @see http://en.wikipedia.org/wiki/CamelCase#Variations_and_synonyms\n *\n * @param {string} str String to test.\n * @return {boolean} Whether the string is lower camel case.\n */\ngoog.string.isLowerCamelCase = function(str) {\n  'use strict';\n  return /^[a-z]+([A-Z][a-z]*)*$/.test(str);\n};\n\n\n/**\n * Returns whether the given string is upper camel case (e.g. \"FooBarBaz\").\n *\n * Note that this assumes the string is entirely letters.\n * @see http://en.wikipedia.org/wiki/CamelCase#Variations_and_synonyms\n *\n * @param {string} str String to test.\n * @return {boolean} Whether the string is upper camel case.\n */\ngoog.string.isUpperCamelCase = function(str) {\n  'use strict';\n  return /^([A-Z][a-z]*)+$/.test(str);\n};\n\n\n/**\n * Converts a string from selector-case to camelCase (e.g. from\n * \"multi-part-string\" to \"multiPartString\"), useful for converting\n * CSS selectors and HTML dataset keys to their equivalent JS properties.\n * @param {string} str The string in selector-case form.\n * @return {string} The string in camelCase form.\n */\ngoog.string.toCamelCase = function(str) {\n  'use strict';\n  return String(str).replace(/\\-([a-z])/g, function(all, match) {\n    'use strict';\n    return match.toUpperCase();\n  });\n};\n\n\n/**\n * Converts a string from camelCase to selector-case (e.g. from\n * \"multiPartString\" to \"multi-part-string\"), useful for converting JS\n * style and dataset properties to equivalent CSS selectors and HTML keys.\n * @param {string} str The string in camelCase form.\n * @return {string} The string in selector-case form.\n */\ngoog.string.toSelectorCase = function(str) {\n  'use strict';\n  return String(str).replace(/([A-Z])/g, '-$1').toLowerCase();\n};\n\n\n/**\n * Converts a string into TitleCase. First character of the string is always\n * capitalized in addition to the first letter of every subsequent word.\n * Words are delimited by one or more whitespaces by default. Custom delimiters\n * can optionally be specified to replace the default, which doesn't preserve\n * whitespace delimiters and instead must be explicitly included if needed.\n *\n * Default delimiter => \" \":\n *    goog.string.toTitleCase('oneTwoThree')    => 'OneTwoThree'\n *    goog.string.toTitleCase('one two three')  => 'One Two Three'\n *    goog.string.toTitleCase('  one   two   ') => '  One   Two   '\n *    goog.string.toTitleCase('one_two_three')  => 'One_two_three'\n *    goog.string.toTitleCase('one-two-three')  => 'One-two-three'\n *\n * Custom delimiter => \"_-.\":\n *    goog.string.toTitleCase('oneTwoThree', '_-.')       => 'OneTwoThree'\n *    goog.string.toTitleCase('one two three', '_-.')     => 'One two three'\n *    goog.string.toTitleCase('  one   two   ', '_-.')    => '  one   two   '\n *    goog.string.toTitleCase('one_two_three', '_-.')     => 'One_Two_Three'\n *    goog.string.toTitleCase('one-two-three', '_-.')     => 'One-Two-Three'\n *    goog.string.toTitleCase('one...two...three', '_-.') => 'One...Two...Three'\n *    goog.string.toTitleCase('one. two. three', '_-.')   => 'One. two. three'\n *    goog.string.toTitleCase('one-two.three', '_-.')     => 'One-Two.Three'\n *\n * @param {string} str String value in camelCase form.\n * @param {string=} opt_delimiters Custom delimiter character set used to\n *      distinguish words in the string value. Each character represents a\n *      single delimiter. When provided, default whitespace delimiter is\n *      overridden and must be explicitly included if needed.\n * @return {string} String value in TitleCase form.\n */\ngoog.string.toTitleCase = function(str, opt_delimiters) {\n  'use strict';\n  let delimiters = (typeof opt_delimiters === 'string') ?\n      goog.string.regExpEscape(opt_delimiters) :\n      '\\\\s';\n\n  // For IE8, we need to prevent using an empty character set. Otherwise,\n  // incorrect matching will occur.\n  delimiters = delimiters ? '|[' + delimiters + ']+' : '';\n\n  const regexp = new RegExp('(^' + delimiters + ')([a-z])', 'g');\n  return str.replace(regexp, function(all, p1, p2) {\n    'use strict';\n    return p1 + p2.toUpperCase();\n  });\n};\n\n\n/**\n * Capitalizes a string, i.e. converts the first letter to uppercase\n * and all other letters to lowercase, e.g.:\n *\n * goog.string.capitalize('one')     => 'One'\n * goog.string.capitalize('ONE')     => 'One'\n * goog.string.capitalize('one two') => 'One two'\n *\n * Note that this function does not trim initial whitespace.\n *\n * @param {string} str String value to capitalize.\n * @return {string} String value with first letter in uppercase.\n */\ngoog.string.capitalize = function(str) {\n  'use strict';\n  return String(str.charAt(0)).toUpperCase() +\n      String(str.slice(1)).toLowerCase();\n};\n\n\n/**\n * Parse a string in decimal or hexidecimal ('0xFFFF') form.\n *\n * To parse a particular radix, please use parseInt(string, radix) directly. See\n * https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/parseInt\n *\n * This is a wrapper for the built-in parseInt function that will only parse\n * numbers as base 10 or base 16.  Some JS implementations assume strings\n * starting with \"0\" are intended to be octal. ES3 allowed but discouraged\n * this behavior. ES5 forbids it.  This function emulates the ES5 behavior.\n *\n * For more information, see Mozilla JS Reference: http://goo.gl/8RiFj\n *\n * @param {string|number|null|undefined} value The value to be parsed.\n * @return {number} The number, parsed. If the string failed to parse, this\n *     will be NaN.\n */\ngoog.string.parseInt = function(value) {\n  'use strict';\n  // Force finite numbers to strings.\n  if (isFinite(value)) {\n    value = String(value);\n  }\n\n  if (typeof value === 'string') {\n    // If the string starts with '0x' or '-0x', parse as hex.\n    return /^\\s*-?0x/i.test(value) ? parseInt(value, 16) : parseInt(value, 10);\n  }\n\n  return NaN;\n};\n\n\n/**\n * Splits a string on a separator a limited number of times.\n *\n * This implementation is more similar to Python or Java, where the limit\n * parameter specifies the maximum number of splits rather than truncating\n * the number of results.\n *\n * See http://docs.python.org/2/library/stdtypes.html#str.split\n * See JavaDoc: http://goo.gl/F2AsY\n * See Mozilla reference: http://goo.gl/dZdZs\n *\n * @param {string} str String to split.\n * @param {string} separator The separator.\n * @param {number} limit The limit to the number of splits. The resulting array\n *     will have a maximum length of limit+1.  Negative numbers are the same\n *     as zero.\n * @return {!Array<string>} The string, split.\n */\ngoog.string.splitLimit = function(str, separator, limit) {\n  'use strict';\n  const parts = str.split(separator);\n  const returnVal = [];\n\n  // Only continue doing this while we haven't hit the limit and we have\n  // parts left.\n  while (limit > 0 && parts.length) {\n    returnVal.push(parts.shift());\n    limit--;\n  }\n\n  // If there are remaining parts, append them to the end.\n  if (parts.length) {\n    returnVal.push(parts.join(separator));\n  }\n\n  return returnVal;\n};\n\n\n/**\n * Finds the characters to the right of the last instance of any separator\n *\n * This function is similar to goog.string.path.baseName, except it can take a\n * list of characters to split the string on. It will return the rightmost\n * grouping of characters to the right of any separator as a left-to-right\n * oriented string.\n *\n * @see goog.string.path.baseName\n * @param {string} str The string\n * @param {string|!Array<string>} separators A list of separator characters\n * @return {string} The last part of the string with respect to the separators\n */\ngoog.string.lastComponent = function(str, separators) {\n  'use strict';\n  if (!separators) {\n    return str;\n  } else if (typeof separators == 'string') {\n    separators = [separators];\n  }\n\n  let lastSeparatorIndex = -1;\n  for (let i = 0; i < separators.length; i++) {\n    if (separators[i] == '') {\n      continue;\n    }\n    const currentSeparatorIndex = str.lastIndexOf(separators[i]);\n    if (currentSeparatorIndex > lastSeparatorIndex) {\n      lastSeparatorIndex = currentSeparatorIndex;\n    }\n  }\n  if (lastSeparatorIndex == -1) {\n    return str;\n  }\n  return str.slice(lastSeparatorIndex + 1);\n};\n\n\n/**\n * Computes the Levenshtein edit distance between two strings.\n * @param {string} a\n * @param {string} b\n * @return {number} The edit distance between the two strings.\n */\ngoog.string.editDistance = function(a, b) {\n  'use strict';\n  const v0 = [];\n  const v1 = [];\n\n  if (a == b) {\n    return 0;\n  }\n\n  if (!a.length || !b.length) {\n    return Math.max(a.length, b.length);\n  }\n\n  for (let i = 0; i < b.length + 1; i++) {\n    v0[i] = i;\n  }\n\n  for (let i = 0; i < a.length; i++) {\n    v1[0] = i + 1;\n\n    for (let j = 0; j < b.length; j++) {\n      const cost = Number(a[i] != b[j]);\n      // Cost for the substring is the minimum of adding one character, removing\n      // one character, or a swap.\n      v1[j + 1] = Math.min(v1[j] + 1, v0[j + 1] + 1, v0[j] + cost);\n    }\n\n    for (let j = 0; j < v0.length; j++) {\n      v0[j] = v1[j];\n    }\n  }\n\n  return v1[b.length];\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Wrapper class for handling XmlHttpRequests.\n *\n * One off requests can be sent through goog.net.XhrIo.send() or an\n * instance can be created to send multiple requests.  Each request uses its\n * own XmlHttpRequest object and handles clearing of the event callback to\n * ensure no leaks.\n *\n * XhrIo is event based, it dispatches events on success, failure, finishing,\n * ready-state change, or progress (download and upload).\n *\n * The ready-state or timeout event fires first, followed by\n * a generic completed event. Then the abort, error, or success event\n * is fired as appropriate. Progress events are fired as they are\n * received. Lastly, the ready event will fire to indicate that the\n * object may be used to make another request.\n *\n * The error event may also be called before completed and\n * ready-state-change if the XmlHttpRequest.open() or .send() methods throw.\n *\n * This class does not support multiple requests, queuing, or prioritization.\n *\n * When progress events are supported by the browser, and progress is\n * enabled via .setProgressEventsEnabled(true), the\n * goog.net.EventType.PROGRESS event will be the re-dispatched browser\n * progress event. Additionally, a DOWNLOAD_PROGRESS or UPLOAD_PROGRESS event\n * will be fired for download and upload progress respectively.\n */\n\n\ngoog.provide('goog.net.XhrIo');\n\ngoog.require('goog.array');\ngoog.require('goog.asserts');\ngoog.require('goog.collections.maps');\ngoog.require('goog.debug.entryPointRegistry');\ngoog.require('goog.events.EventTarget');\ngoog.require('goog.json.hybrid');\ngoog.require('goog.log');\ngoog.require('goog.net.ErrorCode');\ngoog.require('goog.net.EventType');\ngoog.require('goog.net.HttpStatus');\ngoog.require('goog.net.XmlHttp');\ngoog.require('goog.object');\ngoog.require('goog.string');\ngoog.require('goog.uri.utils');\ngoog.require('google3.javascript.common.async.context.propagate');\ngoog.requireType('goog.Uri');\ngoog.requireType('goog.debug.ErrorHandler');\ngoog.requireType('goog.net.XhrLike');\ngoog.requireType('goog.net.XmlHttpFactory');\n\ngoog.scope(function() {\n\n'use strict';\n/**\n * Basic class for handling XMLHttpRequests.\n * @param {goog.net.XmlHttpFactory=} opt_xmlHttpFactory Factory to use when\n *     creating XMLHttpRequest objects.\n * @constructor\n * @extends {goog.events.EventTarget}\n */\ngoog.net.XhrIo = function(opt_xmlHttpFactory) {\n  'use strict';\n  XhrIo.base(this, 'constructor');\n\n  /**\n   * Map of default headers to add to every request, use:\n   * XhrIo.headers.set(name, value)\n   * @type {!Map<string,string>}\n   */\n  this.headers = new Map();\n\n  /**\n   * Optional XmlHttpFactory\n   * @private {goog.net.XmlHttpFactory}\n   */\n  this.xmlHttpFactory_ = opt_xmlHttpFactory || null;\n\n  /**\n   * Whether XMLHttpRequest is active.  A request is active from the time send()\n   * is called until onReadyStateChange() is complete, or error() or abort()\n   * is called.\n   * @private {boolean}\n   */\n  this.active_ = false;\n\n  /**\n   * The XMLHttpRequest object that is being used for the transfer.\n   * @private {?goog.net.XhrLike.OrNative}\n   */\n  this.xhr_ = null;\n\n  /**\n   * Last URL that was requested.\n   * @private {string|goog.Uri}\n   */\n  this.lastUri_ = '';\n\n  /**\n   * Method for the last request.\n   * @private {string}\n   */\n  this.lastMethod_ = '';\n\n  /**\n   * Last error code.\n   * @private {!goog.net.ErrorCode}\n   */\n  this.lastErrorCode_ = goog.net.ErrorCode.NO_ERROR;\n\n  /**\n   * Last error message.\n   * @private {Error|string}\n   */\n  this.lastError_ = '';\n\n  /**\n   * Used to ensure that we don't dispatch an multiple ERROR events. This can\n   * happen in IE when it does a synchronous load and one error is handled in\n   * the ready state change and one is handled due to send() throwing an\n   * exception.\n   * @private {boolean}\n   */\n  this.errorDispatched_ = false;\n\n  /**\n   * Used to make sure we don't fire the complete event from inside a send call.\n   * @private {boolean}\n   */\n  this.inSend_ = false;\n\n  /**\n   * Used in determining if a call to {@link #onReadyStateChange_} is from\n   * within a call to this.xhr_.open.\n   * @private {boolean}\n   */\n  this.inOpen_ = false;\n\n  /**\n   * Used in determining if a call to {@link #onReadyStateChange_} is from\n   * within a call to this.xhr_.abort.\n   * @private {boolean}\n   */\n  this.inAbort_ = false;\n\n  /**\n   * Number of milliseconds after which an incomplete request will be aborted\n   * and a {@link goog.net.EventType.TIMEOUT} event raised; 0 means no timeout\n   * is set.\n   * @private {number}\n   */\n  this.timeoutInterval_ = 0;\n\n  /**\n   * Timer to track request timeout.\n   * @private {?number}\n   */\n  this.timeoutId_ = null;\n\n  /**\n   * The requested type for the response. The empty string means use the default\n   * XHR behavior.\n   * @private {goog.net.XhrIo.ResponseType}\n   */\n  this.responseType_ = ResponseType.DEFAULT;\n\n  /**\n   * Whether a \"credentialed\" request is to be sent (one that is aware of\n   * cookies and authentication). This is applicable only for cross-domain\n   * requests and more recent browsers that support this part of the HTTP Access\n   * Control standard.\n   *\n   * @see http://www.w3.org/TR/XMLHttpRequest/#the-withcredentials-attribute\n   *\n   * @private {boolean}\n   */\n  this.withCredentials_ = false;\n\n  /**\n   * Whether progress events are enabled for this request. This is\n   * disabled by default because setting a progress event handler\n   * causes pre-flight OPTIONS requests to be sent for CORS requests,\n   * even in cases where a pre-flight request would not otherwise be\n   * sent.\n   *\n   * @see http://xhr.spec.whatwg.org/#security-considerations\n   *\n   * Note that this can cause problems for Firefox 22 and below, as an\n   * older \"LSProgressEvent\" will be dispatched by the browser. That\n   * progress event is no longer supported, and can lead to failures,\n   * including throwing exceptions.\n   *\n   * @see http://bugzilla.mozilla.org/show_bug.cgi?id=845631\n   * @see b/23469793\n   *\n   * @private {boolean}\n   */\n  this.progressEventsEnabled_ = false;\n\n  /**\n   * Specification for Trust Token operations (issuance, signing, and\n   * redemption).\n   * @private {?TrustTokenAttributeType}\n   */\n  this.trustToken_ = null;\n  // MOE:begin_strip\n\n  /**\n   * Options for attribution reporting (eventSourceEligible, triggerEligible).\n   * @private {?AttributionReportingRequestOptions}\n   */\n  this.attributionReportingOptions_ = null;\n  // MOE:end_strip\n};\ngoog.inherits(goog.net.XhrIo, goog.events.EventTarget);\n\nconst XhrIo = goog.net.XhrIo;\n\n/**\n * Response types that may be requested for XMLHttpRequests.\n * @enum {string}\n * @see http://www.w3.org/TR/XMLHttpRequest/#the-responsetype-attribute\n */\ngoog.net.XhrIo.ResponseType = {\n  DEFAULT: '',\n  TEXT: 'text',\n  DOCUMENT: 'document',\n  // Not supported as of Chrome 10.0.612.1 dev\n  BLOB: 'blob',\n  ARRAY_BUFFER: 'arraybuffer',\n};\n\nconst ResponseType = goog.net.XhrIo.ResponseType;\n\n\n/**\n * A reference to the XhrIo logger\n * @private {?goog.log.Logger}\n * @const\n */\ngoog.net.XhrIo.prototype.logger_ = goog.log.getLogger('goog.net.XhrIo');\n\n\n/**\n * The Content-Type HTTP header name\n * @type {string}\n */\ngoog.net.XhrIo.CONTENT_TYPE_HEADER = 'Content-Type';\n\n\n/**\n * The Content-Transfer-Encoding HTTP header name\n * @type {string}\n */\ngoog.net.XhrIo.CONTENT_TRANSFER_ENCODING = 'Content-Transfer-Encoding';\n\n\n/**\n * The pattern matching the 'http' and 'https' URI schemes\n * @type {!RegExp}\n */\ngoog.net.XhrIo.HTTP_SCHEME_PATTERN = /^https?$/i;\n\nconst HTTP_SCHEME_PATTERN = goog.net.XhrIo.HTTP_SCHEME_PATTERN;\n\n\n/**\n * The methods that typically come along with form data.  We set different\n * headers depending on whether the HTTP action is one of these.\n * @type {!Array<string>}\n */\ngoog.net.XhrIo.METHODS_WITH_FORM_DATA = ['POST', 'PUT'];\n\n\n/**\n * The Content-Type HTTP header value for a url-encoded form\n * @type {string}\n */\ngoog.net.XhrIo.FORM_CONTENT_TYPE =\n    'application/x-www-form-urlencoded;charset=utf-8';\n\n\n/**\n * All non-disposed instances of goog.net.XhrIo created\n * by {@link goog.net.XhrIo.send} are in this Array.\n * @see goog.net.XhrIo.cleanup\n * @private {!Array<!goog.net.XhrIo>}\n */\ngoog.net.XhrIo.sendInstances_ = [];\n\n\n/**\n * Static send that creates a short lived instance of XhrIo to send the\n * request.\n * @see goog.net.XhrIo.cleanup\n * @param {string|goog.Uri} url Uri to make request to.\n * @param {?function(this:goog.net.XhrIo, ?)=} opt_callback Callback function\n *     for when request is complete.\n * @param {string=} opt_method Send method, default: GET.\n * @param {ArrayBuffer|ArrayBufferView|Blob|Document|FormData|string=}\n *     opt_content Body data.\n * @param {(?Object|?goog.collections.maps.MapLike<string, string>)=}\n *     opt_headers Map of headers to add to the request.\n * @param {number=} opt_timeoutInterval Number of milliseconds after which an\n *     incomplete request will be aborted; 0 means no timeout is set.\n * @param {boolean=} opt_withCredentials Whether to send credentials with the\n *     request. Default to false. See {@link goog.net.XhrIo#setWithCredentials}.\n * @return {!goog.net.XhrIo} The sent XhrIo.\n */\ngoog.net.XhrIo.send = function(\n    url, opt_callback, opt_method, opt_content, opt_headers,\n    opt_timeoutInterval, opt_withCredentials) {\n  'use strict';\n  const x = new goog.net.XhrIo();\n  goog.net.XhrIo.sendInstances_.push(x);\n  if (opt_callback) {\n    x.listen(goog.net.EventType.COMPLETE, opt_callback);\n  }\n  x.listenOnce(goog.net.EventType.READY, x.cleanupSend_);\n  if (opt_timeoutInterval) {\n    x.setTimeoutInterval(opt_timeoutInterval);\n  }\n  if (opt_withCredentials) {\n    x.setWithCredentials(opt_withCredentials);\n  }\n  x.send(url, opt_method, opt_content, opt_headers);\n  return x;\n};\n\n\n/**\n * Disposes all non-disposed instances of goog.net.XhrIo created by\n * {@link goog.net.XhrIo.send}.\n * {@link goog.net.XhrIo.send} cleans up the goog.net.XhrIo instance\n * it creates when the request completes or fails.  However, if\n * the request never completes, then the goog.net.XhrIo is not disposed.\n * This can occur if the window is unloaded before the request completes.\n * We could have {@link goog.net.XhrIo.send} return the goog.net.XhrIo\n * it creates and make the client of {@link goog.net.XhrIo.send} be\n * responsible for disposing it in this case.  However, this makes things\n * significantly more complicated for the client, and the whole point\n * of {@link goog.net.XhrIo.send} is that it's simple and easy to use.\n * Clients of {@link goog.net.XhrIo.send} should call\n * {@link goog.net.XhrIo.cleanup} when doing final\n * cleanup on window unload.\n */\ngoog.net.XhrIo.cleanup = function() {\n  'use strict';\n  const instances = goog.net.XhrIo.sendInstances_;\n  while (instances.length) {\n    instances.pop().dispose();\n  }\n};\n\n\n/**\n * Null-safe wrapper around AsyncContext.Snapshot.wrap.\n * @const {function(?Function): ?Function}\n */\nconst propagateAsyncContext =\n    goog.module.get('google3.javascript.common.async.context.propagate')\n        .propagateAsyncContext;\n\n\n/**\n * Installs exception protection for all entry point introduced by\n * goog.net.XhrIo instances which are not protected by\n * {@link goog.debug.ErrorHandler#protectWindowSetTimeout},\n * {@link goog.debug.ErrorHandler#protectWindowSetInterval}, or\n * {@link goog.events.protectBrowserEventEntryPoint}.\n *\n * @param {goog.debug.ErrorHandler} errorHandler Error handler with which to\n *     protect the entry point(s).\n */\ngoog.net.XhrIo.protectEntryPoints = function(errorHandler) {\n  'use strict';\n  goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_ =\n      errorHandler.protectEntryPoint(\n          goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_);\n};\n\n\n/**\n * Disposes of the specified goog.net.XhrIo created by\n * {@link goog.net.XhrIo.send} and removes it from\n * {@link goog.net.XhrIo.pendingStaticSendInstances_}.\n * @private\n */\ngoog.net.XhrIo.prototype.cleanupSend_ = function() {\n  'use strict';\n  this.dispose();\n  goog.array.remove(goog.net.XhrIo.sendInstances_, this);\n};\n\n\n/**\n * Returns the number of milliseconds after which an incomplete request will be\n * aborted, or 0 if no timeout is set.\n * @return {number} Timeout interval in milliseconds.\n */\ngoog.net.XhrIo.prototype.getTimeoutInterval = function() {\n  'use strict';\n  return this.timeoutInterval_;\n};\n\n\n/**\n * Sets the number of milliseconds after which an incomplete request will be\n * aborted and a {@link goog.net.EventType.TIMEOUT} event raised; 0 means no\n * timeout is set.\n * @param {number} ms Timeout interval in milliseconds; 0 means none.\n */\ngoog.net.XhrIo.prototype.setTimeoutInterval = function(ms) {\n  'use strict';\n  this.timeoutInterval_ = Math.max(0, ms);\n};\n\n\n/**\n * Sets the desired type for the response. At time of writing, this is only\n * supported in very recent versions of WebKit (10.0.612.1 dev and later).\n *\n * If this is used, the response may only be accessed via {@link #getResponse}.\n *\n * @param {goog.net.XhrIo.ResponseType} type The desired type for the response.\n */\ngoog.net.XhrIo.prototype.setResponseType = function(type) {\n  'use strict';\n  this.responseType_ = type;\n};\n\n\n/**\n * Gets the desired type for the response.\n * @return {goog.net.XhrIo.ResponseType} The desired type for the response.\n */\ngoog.net.XhrIo.prototype.getResponseType = function() {\n  'use strict';\n  return this.responseType_;\n};\n\n\n/**\n * Sets whether a \"credentialed\" request that is aware of cookie and\n * authentication information should be made. This option is only supported by\n * browsers that support HTTP Access Control. As of this writing, this option\n * is not supported in IE.\n *\n * @param {boolean} withCredentials Whether this should be a \"credentialed\"\n *     request.\n */\ngoog.net.XhrIo.prototype.setWithCredentials = function(withCredentials) {\n  'use strict';\n  this.withCredentials_ = withCredentials;\n};\n\n\n/**\n * Gets whether a \"credentialed\" request is to be sent.\n * @return {boolean} The desired type for the response.\n */\ngoog.net.XhrIo.prototype.getWithCredentials = function() {\n  'use strict';\n  return this.withCredentials_;\n};\n\n\n/**\n * Sets whether progress events are enabled for this request. Note\n * that progress events require pre-flight OPTIONS request handling\n * for CORS requests, and may cause trouble with older browsers. See\n * progressEventsEnabled_ for details.\n * @param {boolean} enabled Whether progress events should be enabled.\n */\ngoog.net.XhrIo.prototype.setProgressEventsEnabled = function(enabled) {\n  'use strict';\n  this.progressEventsEnabled_ = enabled;\n};\n\n\n/**\n * Gets whether progress events are enabled.\n * @return {boolean} Whether progress events are enabled for this request.\n */\ngoog.net.XhrIo.prototype.getProgressEventsEnabled = function() {\n  'use strict';\n  return this.progressEventsEnabled_;\n};\n\n/**\n * Specify a Trust Tokens operation to execute alongside the request.\n * @param {!TrustTokenAttributeType} trustToken a Trust Tokens operation to\n *     execute.\n */\ngoog.net.XhrIo.prototype.setTrustToken = function(trustToken) {\n  'use strict';\n  this.trustToken_ = trustToken;\n};\n\n// MOE:begin_strip\n/**\n * Specify the attribution reporting options for the request.\n * @param {!AttributionReportingRequestOptions} attributionReportingOptions\n */\ngoog.net.XhrIo.prototype.setAttributionReporting = function(\n    attributionReportingOptions) {\n  'use strict';\n  this.attributionReportingOptions_ = attributionReportingOptions;\n};\n\n/**\n * Get the response URL from the Xhr object. This is the final URL after any\n * redirects.\n * @return {string} The response URL, or an empty string if unavailable.\n */\ngoog.net.XhrIo.prototype.getResponseUrl = function() {\n  'use strict';\n  try {\n    return this.xhr_ ? this.xhr_.responseURL : '';\n  } catch (e) {\n    goog.log.fine(this.logger_, 'Can not get responseURL: ' + e.message);\n    return '';\n  }\n};\n\n\n// MOE:end_strip\n/**\n * Instance send that actually uses XMLHttpRequest to make a server call.\n * @param {string|goog.Uri} url Uri to make request to.\n * @param {string=} opt_method Send method, default: GET.\n * @param {ArrayBuffer|ArrayBufferView|Blob|Document|FormData|string=}\n *     opt_content Body data.\n * @param {(?Object|?goog.collections.maps.MapLike<string, string>)=}\n *     opt_headers Map of headers to add to the request.\n * @suppress {strictMissingProperties} Added to tighten compiler checks\n * @suppress {deprecated} Use deprecated goog.structs.forEach to allow different\n * types of parameters for opt_headers.\n */\ngoog.net.XhrIo.prototype.send = function(\n    url, opt_method, opt_content, opt_headers) {\n  'use strict';\n  if (this.xhr_) {\n    throw new Error(\n        '[goog.net.XhrIo] Object is active with another request=' +\n        this.lastUri_ + '; newUri=' + url);\n  }\n\n  const method = opt_method ? opt_method.toUpperCase() : 'GET';\n\n  this.lastUri_ = url;\n  this.lastError_ = '';\n  this.lastErrorCode_ = goog.net.ErrorCode.NO_ERROR;\n  this.lastMethod_ = method;\n  this.errorDispatched_ = false;\n  this.active_ = true;\n\n  // Use the factory to create the XHR object and options\n  this.xhr_ = this.createXhr();\n\n  // Set up the onreadystatechange callback\n  this.xhr_.onreadystatechange =\n      propagateAsyncContext(goog.bind(this.onReadyStateChange_, this));\n\n  // Set up upload/download progress events, if progress events are supported.\n  if (this.getProgressEventsEnabled() && 'onprogress' in this.xhr_) {\n    /** @suppress {strictMissingProperties} Added to tighten compiler checks */\n    this.xhr_.onprogress = propagateAsyncContext(goog.bind(function(e) {\n      'use strict';\n      this.onProgressHandler_(e, true);\n    }, this));\n    if (this.xhr_.upload) {\n      /**\n       * @suppress {strictMissingProperties} Added to tighten compiler checks\n       */\n      this.xhr_.upload.onprogress =\n          propagateAsyncContext(goog.bind(this.onProgressHandler_, this));\n    }\n  }\n\n  /**\n   * Try to open the XMLHttpRequest (always async), if an error occurs here it\n   * is generally permission denied\n   */\n  try {\n    goog.log.fine(this.logger_, this.formatMsg_('Opening Xhr'));\n    this.inOpen_ = true;\n    this.xhr_.open(method, String(url), true);  // Always async!\n    this.inOpen_ = false;\n  } catch (err) {\n    goog.log.fine(\n        this.logger_, this.formatMsg_('Error opening Xhr: ' + err.message));\n    this.error_(goog.net.ErrorCode.EXCEPTION, err);\n    return;\n  }\n\n  // We can't use null since this won't allow requests with form data to have a\n  // content length specified which will cause some proxies to return a 411\n  // error.\n  const content = opt_content || '';\n\n  const headers = new Map(this.headers);\n\n  // Add headers specific to this request\n  if (opt_headers) {\n    if (Object.getPrototypeOf(opt_headers) === Object.prototype) {\n      for (let key in opt_headers) {\n        headers.set(key, opt_headers[key]);\n      }\n    } else if (\n        typeof opt_headers.keys === 'function' &&\n        typeof opt_headers.get === 'function') {\n      for (const key of opt_headers.keys()) {\n        headers.set(key, opt_headers.get(key));\n      }\n    } else {\n      throw new Error(\n          'Unknown input type for opt_headers: ' + String(opt_headers));\n    }\n  }\n\n  // Find whether a content type header is set, ignoring case.\n  // HTTP header names are case-insensitive.  See:\n  // http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2\n  const contentTypeKey =\n      Array.from(headers.keys())\n          .find(\n              header => goog.string.caseInsensitiveEquals(\n                  goog.net.XhrIo.CONTENT_TYPE_HEADER, header));\n\n  const contentIsFormData =\n      (goog.global['FormData'] && (content instanceof goog.global['FormData']));\n  if (goog.array.contains(goog.net.XhrIo.METHODS_WITH_FORM_DATA, method) &&\n      !contentTypeKey && !contentIsFormData) {\n    // For requests typically with form data, default to the url-encoded form\n    // content type unless this is a FormData request.  For FormData,\n    // the browser will automatically add a multipart/form-data content type\n    // with an appropriate multipart boundary.\n    headers.set(\n        goog.net.XhrIo.CONTENT_TYPE_HEADER, goog.net.XhrIo.FORM_CONTENT_TYPE);\n  }\n\n  // Add the headers to the Xhr object\n  for (const [key, value] of headers) {\n    this.xhr_.setRequestHeader(key, value);\n  }\n\n  if (this.responseType_) {\n    this.xhr_.responseType = this.responseType_;\n  }\n  // Set xhr_.withCredentials only when the value is different, or else in\n  // synchronous XMLHtppRequest.open Firefox will throw an exception.\n  // https://bugzilla.mozilla.org/show_bug.cgi?id=736340\n  if ('withCredentials' in this.xhr_ &&\n      this.xhr_.withCredentials !== this.withCredentials_) {\n    /** @suppress {strictMissingProperties} Added to tighten compiler checks */\n    this.xhr_.withCredentials = this.withCredentials_;\n  }\n\n  if ('setTrustToken' in this.xhr_ && this.trustToken_) {\n    try {\n      this.xhr_.setTrustToken(this.trustToken_);\n    } catch (err) {\n      goog.log.fine(\n          this.logger_, this.formatMsg_('Error SetTrustToken: ' + err.message));\n    }\n  }\n  // MOE:begin_strip\n\n  if ('setAttributionReporting' in this.xhr_ &&\n      this.attributionReportingOptions_) {\n    try {\n      this.xhr_.setAttributionReporting(this.attributionReportingOptions_);\n    } catch (err) {\n      goog.log.fine(\n          this.logger_,\n          this.formatMsg_('Error SetAttributionReporting: ' + err.message));\n    }\n  }\n  // MOE:end_strip\n  /**\n   * Try to send the request, or other wise report an error (404 not found).\n   */\n  try {\n    this.cleanUpTimeoutTimer_();  // Paranoid, should never be running.\n    if (this.timeoutInterval_ > 0) {\n      goog.log.fine(\n          this.logger_,\n          this.formatMsg_(\n              'Will abort after ' + this.timeoutInterval_ +\n              'ms if incomplete'));\n      this.timeoutId_ =\n          setTimeout(this.timeout_.bind(this), this.timeoutInterval_);\n    }\n    goog.log.fine(this.logger_, this.formatMsg_('Sending request'));\n    this.inSend_ = true;\n    this.xhr_.send(content);\n    this.inSend_ = false;\n\n  } catch (err) {\n    goog.log.fine(this.logger_, this.formatMsg_('Send error: ' + err.message));\n    this.error_(goog.net.ErrorCode.EXCEPTION, err);\n  }\n};\n\n\n/**\n * Creates a new XHR object.\n * @return {!goog.net.XhrLike.OrNative} The newly created XHR object.\n * @protected\n */\ngoog.net.XhrIo.prototype.createXhr = function() {\n  'use strict';\n  return this.xmlHttpFactory_ ? this.xmlHttpFactory_.createInstance() :\n                                goog.net.XmlHttp();\n};\n\n\n/**\n * The request didn't complete after {@link goog.net.XhrIo#timeoutInterval_}\n * milliseconds; raises a {@link goog.net.EventType.TIMEOUT} event and aborts\n * the request.\n * @private\n */\ngoog.net.XhrIo.prototype.timeout_ = function() {\n  'use strict';\n  if (typeof goog == 'undefined') {\n    // If goog is undefined then the callback has occurred as the application\n    // is unloading and will error.  Thus we let it silently fail.\n  } else if (this.xhr_) {\n    this.lastError_ =\n        'Timed out after ' + this.timeoutInterval_ + 'ms, aborting';\n    this.lastErrorCode_ = goog.net.ErrorCode.TIMEOUT;\n    goog.log.fine(this.logger_, this.formatMsg_(this.lastError_));\n    this.dispatchEvent(goog.net.EventType.TIMEOUT);\n    this.abort(goog.net.ErrorCode.TIMEOUT);\n  }\n};\n\n\n/**\n * Something errorred, so inactivate, fire error callback and clean up\n * @param {goog.net.ErrorCode} errorCode The error code.\n * @param {Error} err The error object.\n * @private\n */\ngoog.net.XhrIo.prototype.error_ = function(errorCode, err) {\n  'use strict';\n  this.active_ = false;\n  if (this.xhr_) {\n    this.inAbort_ = true;\n    this.xhr_.abort();  // Ensures XHR isn't hung (FF)\n    this.inAbort_ = false;\n  }\n  this.lastError_ = err;\n  this.lastErrorCode_ = errorCode;\n  this.dispatchErrors_();\n  this.cleanUpXhr_();\n};\n\n\n/**\n * Dispatches COMPLETE and ERROR in case of an error. This ensures that we do\n * not dispatch multiple error events.\n * @private\n */\ngoog.net.XhrIo.prototype.dispatchErrors_ = function() {\n  'use strict';\n  if (!this.errorDispatched_) {\n    this.errorDispatched_ = true;\n    this.dispatchEvent(goog.net.EventType.COMPLETE);\n    this.dispatchEvent(goog.net.EventType.ERROR);\n  }\n};\n\n\n/**\n * Abort the current XMLHttpRequest\n * @param {goog.net.ErrorCode=} opt_failureCode Optional error code to use -\n *     defaults to ABORT.\n */\ngoog.net.XhrIo.prototype.abort = function(opt_failureCode) {\n  'use strict';\n  if (this.xhr_ && this.active_) {\n    goog.log.fine(this.logger_, this.formatMsg_('Aborting'));\n    this.active_ = false;\n    this.inAbort_ = true;\n    this.xhr_.abort();\n    this.inAbort_ = false;\n    this.lastErrorCode_ = opt_failureCode || goog.net.ErrorCode.ABORT;\n    this.dispatchEvent(goog.net.EventType.COMPLETE);\n    this.dispatchEvent(goog.net.EventType.ABORT);\n    this.cleanUpXhr_();\n  }\n};\n\n\n/**\n * Nullifies all callbacks to reduce risks of leaks.\n * @override\n * @protected\n */\ngoog.net.XhrIo.prototype.disposeInternal = function() {\n  'use strict';\n  if (this.xhr_) {\n    // We explicitly do not call xhr_.abort() unless active_ is still true.\n    // This is to avoid unnecessarily aborting a successful request when\n    // dispose() is called in a callback triggered by a complete response, but\n    // in which browser cleanup has not yet finished.\n    // (See http://b/issue?id=1684217.)\n    if (this.active_) {\n      this.active_ = false;\n      this.inAbort_ = true;\n      this.xhr_.abort();\n      this.inAbort_ = false;\n    }\n    this.cleanUpXhr_(true);\n  }\n\n  XhrIo.base(this, 'disposeInternal');\n};\n\n\n/**\n * Internal handler for the XHR object's readystatechange event.  This method\n * checks the status and the readystate and fires the correct callbacks.\n * If the request has ended, the handlers are cleaned up and the XHR object is\n * nullified.\n * @private\n */\ngoog.net.XhrIo.prototype.onReadyStateChange_ = function() {\n  'use strict';\n  if (this.isDisposed()) {\n    // This method is the target of an untracked setTimeout().\n    return;\n  }\n  if (!this.inOpen_ && !this.inSend_ && !this.inAbort_) {\n    // Were not being called from within a call to this.xhr_.send\n    // this.xhr_.abort, or this.xhr_.open, so this is an entry point\n    this.onReadyStateChangeEntryPoint_();\n  } else {\n    this.onReadyStateChangeHelper_();\n  }\n};\n\n\n/**\n * Used to protect the onreadystatechange handler entry point.  Necessary\n * as {#onReadyStateChange_} maybe called from within send or abort, this\n * method is only called when {#onReadyStateChange_} is called as an\n * entry point.\n * {@see #protectEntryPoints}\n * @private\n */\ngoog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_ = function() {\n  'use strict';\n  this.onReadyStateChangeHelper_();\n};\n\n\n/**\n * Helper for {@link #onReadyStateChange_}.  This is used so that\n * entry point calls to {@link #onReadyStateChange_} can be routed through\n * {@link #onReadyStateChangeEntryPoint_}.\n * @private\n */\ngoog.net.XhrIo.prototype.onReadyStateChangeHelper_ = function() {\n  'use strict';\n  if (!this.active_) {\n    // can get called inside abort call\n    return;\n  }\n\n  if (typeof goog == 'undefined') {\n    // NOTE(pupius): If goog is undefined then the callback has occurred as the\n    // application is unloading and will error.  Thus we let it silently fail.\n  } else {\n    // In IE when the response has been cached we sometimes get the callback\n    // from inside the send call and this usually breaks code that assumes that\n    // XhrIo is asynchronous.  If that is the case we delay the callback\n    // using a timer.\n    if (this.inSend_ &&\n        this.getReadyState() == goog.net.XmlHttp.ReadyState.COMPLETE) {\n      setTimeout(this.onReadyStateChange_.bind(this), 0);\n      return;\n    }\n\n    this.dispatchEvent(goog.net.EventType.READY_STATE_CHANGE);\n\n    // readyState indicates the transfer has finished\n    if (this.isComplete()) {\n      goog.log.fine(this.logger_, this.formatMsg_('Request complete'));\n\n      this.active_ = false;\n\n      try {\n        // Call the specific callbacks for success or failure. Only call the\n        // success if the status is 200 (HTTP_OK) or 304 (HTTP_CACHED)\n        if (this.isSuccess()) {\n          this.dispatchEvent(goog.net.EventType.COMPLETE);\n          this.dispatchEvent(goog.net.EventType.SUCCESS);\n        } else {\n          this.lastErrorCode_ = goog.net.ErrorCode.HTTP_ERROR;\n          this.lastError_ =\n              this.getStatusText() + ' [' + this.getStatus() + ']';\n          this.dispatchErrors_();\n        }\n      } finally {\n        this.cleanUpXhr_();\n      }\n    }\n  }\n};\n\n\n/**\n * Internal handler for the XHR object's onprogress event. Fires both a generic\n * PROGRESS event and either a DOWNLOAD_PROGRESS or UPLOAD_PROGRESS event to\n * allow specific binding for each XHR progress event.\n * @param {!ProgressEvent} e XHR progress event.\n * @param {boolean=} opt_isDownload Whether the current progress event is from a\n *     download. Used to determine whether DOWNLOAD_PROGRESS or UPLOAD_PROGRESS\n *     event should be dispatched.\n * @private\n */\ngoog.net.XhrIo.prototype.onProgressHandler_ = function(e, opt_isDownload) {\n  'use strict';\n  goog.asserts.assert(\n      e.type === goog.net.EventType.PROGRESS,\n      'goog.net.EventType.PROGRESS is of the same type as raw XHR progress.');\n  this.dispatchEvent(\n      goog.net.XhrIo.buildProgressEvent_(e, goog.net.EventType.PROGRESS));\n  this.dispatchEvent(goog.net.XhrIo.buildProgressEvent_(\n      e,\n      opt_isDownload ? goog.net.EventType.DOWNLOAD_PROGRESS :\n                       goog.net.EventType.UPLOAD_PROGRESS));\n};\n\n\n/**\n * Creates a representation of the native ProgressEvent. IE doesn't support\n * constructing ProgressEvent via \"new\", and the alternatives (e.g.,\n * ProgressEvent.initProgressEvent) are non-standard or deprecated.\n * @param {!ProgressEvent} e XHR progress event.\n * @param {!goog.net.EventType} eventType The type of the event.\n * @return {!ProgressEvent} The progress event.\n * @private\n */\ngoog.net.XhrIo.buildProgressEvent_ = function(e, eventType) {\n  'use strict';\n  return /** @type {!ProgressEvent} */ ({\n    type: eventType,\n    lengthComputable: e.lengthComputable,\n    loaded: e.loaded,\n    total: e.total,\n  });\n};\n\n\n/**\n * Remove the listener to protect against leaks, and nullify the XMLHttpRequest\n * object.\n * @param {boolean=} opt_fromDispose If this is from the dispose (don't want to\n *     fire any events).\n * @private\n */\ngoog.net.XhrIo.prototype.cleanUpXhr_ = function(opt_fromDispose) {\n  'use strict';\n  if (this.xhr_) {\n    // Cancel any pending timeout event handler.\n    this.cleanUpTimeoutTimer_();\n\n    // Save reference so we can mark it as closed after the READY event.  The\n    // READY event may trigger another request, thus we must nullify this.xhr_\n    const xhr = this.xhr_;\n    const clearedOnReadyStateChange = null;\n    this.xhr_ = null;\n\n    if (!opt_fromDispose) {\n      this.dispatchEvent(goog.net.EventType.READY);\n    }\n\n    try {\n      // NOTE(pupius): Not nullifying in FireFox can still leak if the callbacks\n      // are defined in the same scope as the instance of XhrIo. But, IE doesn't\n      // allow you to set the onreadystatechange to NULL so nullFunction is\n      // used.\n      xhr.onreadystatechange = clearedOnReadyStateChange;\n    } catch (e) {\n      // This seems to occur with a Gears HTTP request. Delayed the setting of\n      // this onreadystatechange until after READY is sent out and catching the\n      // error to see if we can track down the problem.\n      goog.log.error(\n          this.logger_,\n          'Problem encountered resetting onreadystatechange: ' + e.message);\n    }\n  }\n};\n\n\n/**\n * Make sure the timeout timer isn't running.\n * @private\n */\ngoog.net.XhrIo.prototype.cleanUpTimeoutTimer_ = function() {\n  'use strict';\n  if (this.timeoutId_) {\n    clearTimeout(this.timeoutId_);\n    this.timeoutId_ = null;\n  }\n};\n\n\n/**\n * @return {boolean} Whether there is an active request.\n */\ngoog.net.XhrIo.prototype.isActive = function() {\n  'use strict';\n  return !!this.xhr_;\n};\n\n\n/**\n * @return {boolean} Whether the request has completed.\n */\ngoog.net.XhrIo.prototype.isComplete = function() {\n  'use strict';\n  return this.getReadyState() == goog.net.XmlHttp.ReadyState.COMPLETE;\n};\n\n\n/**\n * @return {boolean} Whether the request completed with a success.\n */\ngoog.net.XhrIo.prototype.isSuccess = function() {\n  'use strict';\n  const status = this.getStatus();\n  // A zero status code is considered successful for local files.\n  return goog.net.HttpStatus.isSuccess(status) ||\n      status === 0 && !this.isLastUriEffectiveSchemeHttp_();\n};\n\n\n/**\n * @return {boolean} whether the effective scheme of the last URI that was\n *     fetched was 'http' or 'https'.\n * @private\n */\ngoog.net.XhrIo.prototype.isLastUriEffectiveSchemeHttp_ = function() {\n  'use strict';\n  const scheme = goog.uri.utils.getEffectiveScheme(String(this.lastUri_));\n  return HTTP_SCHEME_PATTERN.test(scheme);\n};\n\n\n/**\n * Get the readystate from the Xhr object\n * Will only return correct result when called from the context of a callback\n * @return {goog.net.XmlHttp.ReadyState} goog.net.XmlHttp.ReadyState.*.\n */\ngoog.net.XhrIo.prototype.getReadyState = function() {\n  'use strict';\n  return this.xhr_ ?\n      /** @type {goog.net.XmlHttp.ReadyState} */ (this.xhr_.readyState) :\n      goog.net.XmlHttp.ReadyState.UNINITIALIZED;\n};\n\n\n/**\n * Get the status from the Xhr object\n * Will only return correct result when called from the context of a callback\n * @return {number} Http status.\n */\ngoog.net.XhrIo.prototype.getStatus = function() {\n  'use strict';\n  /**\n   * IE doesn't like you checking status until the readystate is greater than 2\n   * (i.e. it is receiving or complete).  The try/catch is used for when the\n   * page is unloading and an ERROR_NOT_AVAILABLE may occur when accessing xhr_.\n   */\n  try {\n    return this.getReadyState() > goog.net.XmlHttp.ReadyState.LOADED ?\n        this.xhr_.status :\n        -1;\n  } catch (e) {\n    return -1;\n  }\n};\n\n\n/**\n * Get the status text from the Xhr object\n * Will only return correct result when called from the context of a callback\n * @return {string} Status text.\n */\ngoog.net.XhrIo.prototype.getStatusText = function() {\n  'use strict';\n  /**\n   * IE doesn't like you checking status until the readystate is greater than 2\n   * (i.e. it is receiving or complete).  The try/catch is used for when the\n   * page is unloading and an ERROR_NOT_AVAILABLE may occur when accessing xhr_.\n   */\n  try {\n    return this.getReadyState() > goog.net.XmlHttp.ReadyState.LOADED ?\n        this.xhr_.statusText :\n        '';\n  } catch (e) {\n    goog.log.fine(this.logger_, 'Can not get status: ' + e.message);\n    return '';\n  }\n};\n\n\n/**\n * Get the last Uri that was requested\n * @return {string} Last Uri.\n */\ngoog.net.XhrIo.prototype.getLastUri = function() {\n  'use strict';\n  return String(this.lastUri_);\n};\n\n\n/**\n * Get the response text from the Xhr object\n * Will only return correct result when called from the context of a callback.\n * @return {string} Result from the server, or '' if no result available.\n */\ngoog.net.XhrIo.prototype.getResponseText = function() {\n  'use strict';\n  try {\n    return this.xhr_ ? this.xhr_.responseText : '';\n  } catch (e) {\n    // http://www.w3.org/TR/XMLHttpRequest/#the-responsetext-attribute\n    // states that responseText should return '' (and responseXML null)\n    // when the state is not LOADING or DONE. Instead, IE can\n    // throw unexpected exceptions, for example when a request is aborted\n    // or no data is available yet.\n    goog.log.fine(this.logger_, 'Can not get responseText: ' + e.message);\n    return '';\n  }\n};\n\n\n/**\n * Get the response body from the Xhr object. This property is only available\n * in IE since version 7 according to MSDN:\n * http://msdn.microsoft.com/en-us/library/ie/ms534368(v=vs.85).aspx\n * Will only return correct result when called from the context of a callback.\n *\n * One option is to construct a VBArray from the returned object and convert\n * it to a JavaScript array using the toArray method:\n * `(new window['VBArray'](xhrIo.getResponseBody())).toArray()`\n * This will result in an array of numbers in the range of [0..255]\n *\n * Another option is to use the VBScript CStr method to convert it into a\n * string as outlined in http://stackoverflow.com/questions/1919972\n *\n * @return {Object} Binary result from the server or null if not available.\n */\ngoog.net.XhrIo.prototype.getResponseBody = function() {\n  'use strict';\n  try {\n    if (this.xhr_ && 'responseBody' in this.xhr_) {\n      return this.xhr_['responseBody'];\n    }\n  } catch (e) {\n    // IE can throw unexpected exceptions, for example when a request is aborted\n    // or no data is yet available.\n    goog.log.fine(this.logger_, 'Can not get responseBody: ' + e.message);\n  }\n  return null;\n};\n\n\n/**\n * Get the response XML from the Xhr object\n * Will only return correct result when called from the context of a callback.\n * @return {Document} The DOM Document representing the XML file, or null\n * if no result available.\n */\ngoog.net.XhrIo.prototype.getResponseXml = function() {\n  'use strict';\n  try {\n    return this.xhr_ ? this.xhr_.responseXML : null;\n  } catch (e) {\n    goog.log.fine(this.logger_, 'Can not get responseXML: ' + e.message);\n    return null;\n  }\n};\n\n\n/**\n * Get the response and evaluates it as JSON from the Xhr object\n * Will only return correct result when called from the context of a callback\n * @param {string=} opt_xssiPrefix Optional XSSI prefix string to use for\n *     stripping of the response before parsing. This needs to be set only if\n *     your backend server prepends the same prefix string to the JSON response.\n * @throws Error if the response text is invalid JSON.\n * @return {Object|undefined} JavaScript object.\n */\ngoog.net.XhrIo.prototype.getResponseJson = function(opt_xssiPrefix) {\n  'use strict';\n  if (!this.xhr_) {\n    return undefined;\n  }\n\n  let responseText = this.xhr_.responseText;\n  if (opt_xssiPrefix && responseText.indexOf(opt_xssiPrefix) == 0) {\n    responseText = responseText.substring(opt_xssiPrefix.length);\n  }\n\n  return goog.json.hybrid.parse(responseText);\n};\n\n\n/**\n * Get the response as the type specified by {@link #setResponseType}. At time\n * of writing, this is only directly supported in very recent versions of WebKit\n * (10.0.612.1 dev and later). If the field is not supported directly, we will\n * try to emulate it.\n *\n * Emulating the response means following the rules laid out at\n * http://www.w3.org/TR/XMLHttpRequest/#the-response-attribute\n *\n * On browsers with no support for this (Chrome < 10, Firefox < 4, etc), only\n * response types of DEFAULT or TEXT may be used, and the response returned will\n * be the text response.\n *\n * On browsers with Mozilla's draft support for array buffers (Firefox 4, 5),\n * only response types of DEFAULT, TEXT, and ARRAY_BUFFER may be used, and the\n * response returned will be either the text response or the Mozilla\n * implementation of the array buffer response.\n *\n * On browsers will full support, any valid response type supported by the\n * browser may be used, and the response provided by the browser will be\n * returned.\n *\n * @return {*} The response.\n * @suppress {strictMissingProperties} Added to tighten compiler checks\n */\ngoog.net.XhrIo.prototype.getResponse = function() {\n  'use strict';\n  try {\n    if (!this.xhr_) {\n      return null;\n    }\n    if ('response' in this.xhr_) {\n      return this.xhr_.response;\n    }\n    switch (this.responseType_) {\n      case ResponseType.DEFAULT:\n      case ResponseType.TEXT:\n        return this.xhr_.responseText;\n      // DOCUMENT and BLOB don't need to be handled here because they are\n      // introduced in the same spec that adds the .response field, and would\n      // have been caught above.\n      // ARRAY_BUFFER needs an implementation for Firefox 4, where it was\n      // implemented using a draft spec rather than the final spec.\n      case ResponseType.ARRAY_BUFFER:\n        if ('mozResponseArrayBuffer' in this.xhr_) {\n          return this.xhr_.mozResponseArrayBuffer;\n        }\n    }\n    // Fell through to a response type that is not supported on this browser.\n    goog.log.error(\n        this.logger_,\n        'Response type ' + this.responseType_ + ' is not ' +\n            'supported on this browser');\n    return null;\n  } catch (e) {\n    goog.log.fine(this.logger_, 'Can not get response: ' + e.message);\n    return null;\n  }\n};\n\n\n/**\n * Get the value of the response-header with the given name from the Xhr object\n * Will only return correct result when called from the context of a callback\n * and the request has completed\n * @param {string} key The name of the response-header to retrieve.\n * @return {string|undefined} The value of the response-header named key.\n */\ngoog.net.XhrIo.prototype.getResponseHeader = function(key) {\n  'use strict';\n  if (!this.xhr_ || !this.isComplete()) {\n    return undefined;\n  }\n\n  const value = this.xhr_.getResponseHeader(key);\n  return value === null ? undefined : value;\n};\n\n\n/**\n * Gets the text of all the headers in the response.\n * Will only return correct result after ready state reaches `LOADED` (i.e.\n * `HEADERS_RECEIVED` as per MDN).\n * @return {string} The value of the response headers or empty string.\n */\ngoog.net.XhrIo.prototype.getAllResponseHeaders = function() {\n  'use strict';\n  // getAllResponseHeaders can return null if no response has been received,\n  // ensure we always return an empty string.\n  return this.xhr_ &&\n          this.getReadyState() >= goog.net.XmlHttp.ReadyState.LOADED ?\n      (this.xhr_.getAllResponseHeaders() || '') :\n      '';\n};\n\n\n/**\n * Returns all response headers as a key-value map.\n * Multiple values for the same header key can be combined into one,\n * separated by a comma and a space.\n * Note that the native getResponseHeader method for retrieving a single header\n * does a case insensitive match on the header name. This method does not\n * include any case normalization logic, it will just return a key-value\n * representation of the headers.\n * See: http://www.w3.org/TR/XMLHttpRequest/#the-getresponseheader()-method\n * @return {!Object<string, string>} An object with the header keys as keys\n *     and header values as values.\n */\ngoog.net.XhrIo.prototype.getResponseHeaders = function() {\n  'use strict';\n  // TODO(b/120371595): Make this function parse headers as per the spec\n  // (https://tools.ietf.org/html/rfc2616#section-4.2).\n\n  const headersObject = {};\n  const headersArray = this.getAllResponseHeaders().split('\\r\\n');\n  for (let i = 0; i < headersArray.length; i++) {\n    if (goog.string.isEmptyOrWhitespace(headersArray[i])) {\n      continue;\n    }\n    const keyValue =\n        goog.string.splitLimit(headersArray[i], ':', /* maxSplitCount= */ 1);\n    const key = keyValue[0];\n    let value = keyValue[1];\n\n    if (typeof value !== 'string') {\n      // There must be a value but it can be the empty string.\n      continue;\n    }\n\n    // Whitespace at the start and end of the value is meaningless.\n    value = value.trim();\n    // The key should not contain whitespace but we currently ignore that.\n\n    const values = headersObject[key] || [];\n    headersObject[key] = values;\n    values.push(value);\n  }\n\n  return goog.object.map(headersObject, function(values) {\n    'use strict';\n    return values.join(', ');\n  });\n};\n\n\n/**\n * Get the value of the response-header with the given name from the Xhr object.\n * As opposed to {@link #getResponseHeader}, this method does not require that\n * the request has completed.\n * @param {string} key The name of the response-header to retrieve.\n * @return {?string} The value of the response-header, or null if it is\n *     unavailable.\n */\ngoog.net.XhrIo.prototype.getStreamingResponseHeader = function(key) {\n  'use strict';\n  return this.xhr_ ? this.xhr_.getResponseHeader(key) : null;\n};\n\n\n/**\n * Gets the text of all the headers in the response. As opposed to\n * {@link #getAllResponseHeaders}, this method does not require that the request\n * has completed.\n * @return {string} The value of the response headers or empty string.\n */\ngoog.net.XhrIo.prototype.getAllStreamingResponseHeaders = function() {\n  'use strict';\n  return this.xhr_ ? this.xhr_.getAllResponseHeaders() : '';\n};\n\n\n/**\n * Get the last error message\n * @return {!goog.net.ErrorCode} Last error code.\n */\ngoog.net.XhrIo.prototype.getLastErrorCode = function() {\n  'use strict';\n  return this.lastErrorCode_;\n};\n\n\n/**\n * Get the last error message\n * @return {string} Last error message.\n */\ngoog.net.XhrIo.prototype.getLastError = function() {\n  'use strict';\n  return typeof this.lastError_ === 'string' ? this.lastError_ :\n                                               String(this.lastError_);\n};\n\n\n/**\n * Adds the last method, status and URI to the message.  This is used to add\n * this information to the logging calls.\n * @param {string} msg The message text that we want to add the extra text to.\n * @return {string} The message with the extra text appended.\n * @private\n */\ngoog.net.XhrIo.prototype.formatMsg_ = function(msg) {\n  'use strict';\n  return msg + ' [' + this.lastMethod_ + ' ' + this.lastUri_ + ' ' +\n      this.getStatus() + ']';\n};\n\n\n// Register the xhr handler as an entry point, so that\n// it can be monitored for exception handling, etc.\ngoog.debug.entryPointRegistry.register(\n    /**\n     * @param {function(!Function): !Function} transformer The transforming\n     *     function.\n     */\n    function(transformer) {\n      'use strict';\n      goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_ =\n          transformer(goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_);\n    });\n});  // goog.scope\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Provides a function to throw an error without interrupting\n * the current execution context.\n */\n\ngoog.module('goog.async.throwException');\ngoog.module.declareLegacyNamespace();\n\n/**\n * Throw an item without interrupting the current execution context.  For\n * example, if processing a group of items in a loop, sometimes it is useful\n * to report an error while still allowing the rest of the batch to be\n * processed.\n * @param {*} exception\n */\nfunction throwException(exception) {\n  // Each throw needs to be in its own context.\n  goog.global.setTimeout(() => {\n    throw exception;\n  }, 0);\n}\nexports = throwException;\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n","// DO NOT OPENSOURCE\ngoog.module('goog.flags');\ngoog.module.declareLegacyNamespace();\n\nconst toggles = goog.require('google3.third_party.javascript.closure.flags.flags$2etoggles');\n\n// NOTE: STAGING defaults to true unless overridden by command-line flag.\n/** @type {boolean} */\nconst STAGING = goog.readFlagInternalDoNotUseOrElse(1, goog.FLAGS_STAGING_DEFAULT);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bUSE_USER_AGENT_CLIENT_HINTS\\b\n */\nexports.USE_USER_AGENT_CLIENT_HINTS = toggles.TOGGLE_GoogFlags__use_toggles ? toggles.TOGGLE_GoogFlags__use_user_agent_client_hints__enable :\n    goog.readFlagInternalDoNotUseOrElse(610401301, false);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bASYNC_THROW_ON_UNICODE_TO_BYTE\\b\n */\nexports.ASYNC_THROW_ON_UNICODE_TO_BYTE = toggles.TOGGLE_GoogFlags__use_toggles ? toggles.TOGGLE_GoogFlags__async_throw_on_unicode_to_byte__enable :\n    goog.readFlagInternalDoNotUseOrElse(899588437, false);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bCLIENT_ONLY_WIZ_QUEUE_EFFECT_AND_ON_INIT_INITIAL_RUNS\\b\n */\nexports.CLIENT_ONLY_WIZ_QUEUE_EFFECT_AND_ON_INIT_INITIAL_RUNS = toggles.TOGGLE_GoogFlags__use_toggles ? toggles.TOGGLE_GoogFlags__override_disable_toggles || !toggles.TOGGLE_GoogFlags__client_only_wiz_queue_effect_and_on_init_initial_runs__disable :\n    goog.readFlagInternalDoNotUseOrElse(772657768, true);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bCLIENT_ONLY_WIZ_CONTEXT_PER_COMPONENT\\b\n */\nexports.CLIENT_ONLY_WIZ_CONTEXT_PER_COMPONENT = toggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || toggles.TOGGLE_GoogFlags__client_only_wiz_context_per_component__enable :\n    goog.readFlagInternalDoNotUseOrElse(513659523, goog.DEBUG);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bCLIENT_ONLY_WIZ_LAZY_TSX\\b\n */\nexports.CLIENT_ONLY_WIZ_LAZY_TSX = toggles.TOGGLE_GoogFlags__use_toggles ? toggles.TOGGLE_GoogFlags__override_disable_toggles || !toggles.TOGGLE_GoogFlags__client_only_wiz_lazy_tsx__disable :\n    goog.readFlagInternalDoNotUseOrElse(568333945, true);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bFIXED_NOOPENER_BEHAVIOR\\b\n */\nexports.FIXED_NOOPENER_BEHAVIOR = toggles.TOGGLE_GoogFlags__use_toggles ? toggles.TOGGLE_GoogFlags__fixed_noopener_behavior__enable :\n    goog.readFlagInternalDoNotUseOrElse(1331761403, false);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bWIZ_ENABLE_NATIVE_PROMISE\\b\n */\nexports.WIZ_ENABLE_NATIVE_PROMISE = toggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || toggles.TOGGLE_GoogFlags__wiz_enable_native_promise__enable :\n    goog.readFlagInternalDoNotUseOrElse(651175828, goog.DEBUG);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bJSPB_DISALLOW_MESSAGE_TOJSON\\b\n */\nexports.JSPB_DISALLOW_MESSAGE_TOJSON = toggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || toggles.TOGGLE_GoogFlags__jspb_disallow_message_tojson__enable :\n    goog.readFlagInternalDoNotUseOrElse(722764542, goog.DEBUG);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bJSPB_USE_CONSTANT_DEFAULT_PIVOT\\b\n */\nexports.JSPB_USE_CONSTANT_DEFAULT_PIVOT = toggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || toggles.TOGGLE_GoogFlags__jspb_use_constant_default_pivot__enable :\n    goog.readFlagInternalDoNotUseOrElse(748402145, goog.DEBUG);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bJSPB_SERIALIZE_WITH_DYNAMIC_PIVOT_SELECTOR\\b\n */\nexports.JSPB_SERIALIZE_WITH_DYNAMIC_PIVOT_SELECTOR = toggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || toggles.TOGGLE_GoogFlags__jspb_serialize_with_dynamic_pivot_selector__enable :\n    goog.readFlagInternalDoNotUseOrElse(748402146, goog.DEBUG);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bJSPB_THROW_IN_ARRAY_CONSTRUCTOR_IF_ARRAY_IS_ALREADY_CONSTRUCTED\\b\n */\nexports.JSPB_THROW_IN_ARRAY_CONSTRUCTOR_IF_ARRAY_IS_ALREADY_CONSTRUCTED = toggles.TOGGLE_GoogFlags__use_toggles ? toggles.TOGGLE_GoogFlags__override_disable_toggles || !toggles.TOGGLE_GoogFlags__jspb_throw_in_array_constructor_if_array_is_already_constructed__disable :\n    goog.readFlagInternalDoNotUseOrElse(748402147, true);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bJSPB_DESERIALIZE_BINARY_INT64S_AS_GBIGINT\\b\n */\nexports.JSPB_DESERIALIZE_BINARY_INT64S_AS_GBIGINT = toggles.TOGGLE_GoogFlags__use_toggles ? goog.FLAGS_STAGING_DEFAULT && (toggles.TOGGLE_GoogFlags__override_disable_toggles || !toggles.TOGGLE_GoogFlags__jspb_deserialize_binary_int64s_as_gbigint__disable) :\n    goog.readFlagInternalDoNotUseOrElse(824648567, STAGING);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bJSPB_WRITE_BACK_BIGINT\\b\n */\nexports.JSPB_WRITE_BACK_BIGINT = toggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || toggles.TOGGLE_GoogFlags__jspb_write_back_bigint__enable :\n    goog.readFlagInternalDoNotUseOrElse(824656860, goog.DEBUG);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bOPTIMIZE_GET_EI_FROM_VED\\b\n */\nexports.OPTIMIZE_GET_EI_FROM_VED = toggles.TOGGLE_GoogFlags__use_toggles ? toggles.TOGGLE_GoogFlags__optimize_get_ei_from_ved__enable :\n    goog.readFlagInternalDoNotUseOrElse(333098724, false);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bTESTONLY_DISABLED_FLAG\\b\n */\nexports.TESTONLY_DISABLED_FLAG = toggles.TOGGLE_GoogFlags__use_toggles ? toggles.TOGGLE_GoogFlags__testonly_disabled_flag__enable :\n    goog.readFlagInternalDoNotUseOrElse(2147483644, false);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bTESTONLY_DEBUG_FLAG\\b\n */\nexports.TESTONLY_DEBUG_FLAG = toggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || toggles.TOGGLE_GoogFlags__testonly_debug_flag__enable :\n    goog.readFlagInternalDoNotUseOrElse(2147483645, goog.DEBUG);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bTESTONLY_STAGING_FLAG\\b\n */\nexports.TESTONLY_STAGING_FLAG = toggles.TOGGLE_GoogFlags__use_toggles ? goog.FLAGS_STAGING_DEFAULT && (toggles.TOGGLE_GoogFlags__override_disable_toggles || !toggles.TOGGLE_GoogFlags__testonly_staging_flag__disable) :\n    goog.readFlagInternalDoNotUseOrElse(2147483646, STAGING);\n/**\n * @const {boolean}\n * @see google3/third_party/javascript/closure/flags/flags.proto?q=symbol:\\bTESTONLY_STABLE_FLAG\\b\n */\nexports.TESTONLY_STABLE_FLAG = toggles.TOGGLE_GoogFlags__use_toggles ? toggles.TOGGLE_GoogFlags__override_disable_toggles || !toggles.TOGGLE_GoogFlags__testonly_stable_flag__disable :\n    goog.readFlagInternalDoNotUseOrElse(2147483647, true);\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Utilities used by goog.labs.userAgent tools. These functions\n * should not be used outside of goog.labs.userAgent.*.\n *\n */\n\ngoog.module('goog.labs.userAgent.util');\ngoog.module.declareLegacyNamespace();\n\nconst {caseInsensitiveContains, contains} = goog.require('goog.string.internal');\nconst {useClientHints} = goog.require('goog.labs.userAgent');\n\n/**\n * @const {boolean} If true, use navigator.userAgentData without check.\n * TODO(b/335248598): FEATURESET_YEAR >= 2025 if it supports mobile and all the\n * brands we need.  See https://caniuse.com/mdn-api_navigator_useragentdata.\n */\nconst ASSUME_CLIENT_HINTS_SUPPORT = false;\n\n/**\n * Gets the native userAgent string from navigator if it exists.\n * If navigator or navigator.userAgent string is missing, returns an empty\n * string.\n * @return {string}\n */\nfunction getNativeUserAgentString() {\n  const navigator = getNavigator();\n  if (navigator) {\n    const userAgent = navigator.userAgent;\n    if (userAgent) {\n      return userAgent;\n    }\n  }\n  return '';\n}\n\n/**\n * Gets the native userAgentData object from navigator if it exists.\n * If navigator.userAgentData object is missing returns null.\n * @return {?NavigatorUAData}\n */\nfunction getNativeUserAgentData() {\n  const navigator = getNavigator();\n  // TODO(b/195343593): Use navigator?.userAgent ?? null once it's supported.\n  if (navigator) {\n    return navigator.userAgentData || null;\n  }\n  return null;\n}\n\n/**\n * Getter for the native navigator.\n * @return {!Navigator}\n */\nfunction getNavigator() {\n  return goog.global.navigator;\n}\n\n/**\n * A possible override for applications which wish to not check\n * navigator.userAgent but use a specified value for detection instead.\n * @type {?string}\n */\nlet userAgentInternal = null;\n\n/**\n * A possible override for applications which wish to not check\n * navigator.userAgentData but use a specified value for detection instead.\n * @type {?NavigatorUAData}\n */\nlet userAgentDataInternal = getNativeUserAgentData();\n\n/**\n * Override the user agent string with the given value.\n * This should only be used for testing within the goog.labs.userAgent\n * namespace.\n * Pass `null` to use the native browser object instead.\n * @param {?string=} userAgent The userAgent override.\n * @return {void}\n */\nfunction setUserAgent(userAgent = undefined) {\n  userAgentInternal =\n      typeof userAgent === 'string' ? userAgent : getNativeUserAgentString();\n}\n\n/** @return {string} The user agent string. */\nfunction getUserAgent() {\n  return userAgentInternal == null ? getNativeUserAgentString() :\n                                     userAgentInternal;\n}\n\n/**\n * Override the user agent data object with the given value.\n * This should only be used for testing within the goog.labs.userAgent\n * namespace.\n * Pass `null` to specify the absence of userAgentData. Note that this behavior\n * is different from setUserAgent.\n * @param {?NavigatorUAData} userAgentData The userAgentData override.\n */\nfunction setUserAgentData(userAgentData) {\n  userAgentDataInternal = userAgentData;\n}\n\n/**\n * If the user agent data object was overridden using setUserAgentData,\n * reset it so that it uses the native browser object instead, if it exists.\n */\nfunction resetUserAgentData() {\n  userAgentDataInternal = getNativeUserAgentData();\n}\n\n/** @return {?NavigatorUAData} Navigator.userAgentData if exist */\nfunction getUserAgentData() {\n  return userAgentDataInternal;\n}\n\n/**\n * Checks if any string in userAgentData.brands matches str.\n * Returns false if userAgentData is not supported.\n * @param {string} str\n * @return {boolean} Whether any brand string from userAgentData contains the\n *     given string.\n */\nfunction matchUserAgentDataBrand(str) {\n  if (!useClientHints()) return false;\n  const data = getUserAgentData();\n  if (!data) return false;\n  // This must be written as a loop instead of helpers like Array.some to\n  // avoid side-effects. This way, user agent detection can be\n  // dead-code-eliminated. Note that a `for..of` loop will also prevent the\n  // optimization, so it must not be used either.\n  for (let i = 0; i < data.brands.length; i++) {\n    const {brand} = data.brands[i];\n    if (brand && contains(brand, str)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * @param {string} str\n * @return {boolean} Whether the user agent contains the given string.\n */\nfunction matchUserAgent(str) {\n  const userAgent = getUserAgent();\n  return contains(userAgent, str);\n}\n\n/**\n * @param {string} str\n * @return {boolean} Whether the user agent contains the given string, ignoring\n *     case.\n */\nfunction matchUserAgentIgnoreCase(str) {\n  const userAgent = getUserAgent();\n  return caseInsensitiveContains(userAgent, str);\n}\n\n/**\n * Parses the user agent into tuples for each section.\n * @param {string} userAgent\n * @return {!Array<!Array<string>>} Tuples of key, version, and the contents of\n *     the parenthetical.\n */\nfunction extractVersionTuples(userAgent) {\n  // Matches each section of a user agent string.\n  // Example UA:\n  // Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)\n  // AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405\n  // This has three version tuples: Mozilla, AppleWebKit, and Mobile.\n\n  const versionRegExp = new RegExp(\n      // Key. Note that a key may have a space.\n      // (i.e. 'Mobile Safari' in 'Mobile Safari/5.0')\n      '([A-Z][\\\\w ]+)' +\n\n          '/' +                // slash\n          '([^\\\\s]+)' +        // version (i.e. '5.0b')\n          '\\\\s*' +             // whitespace\n          '(?:\\\\((.*?)\\\\))?',  // parenthetical info. parentheses not matched.\n      'g');\n\n  const data = [];\n  let match;\n\n  // Iterate and collect the version tuples.  Each iteration will be the\n  // next regex match.\n  while (match = versionRegExp.exec(userAgent)) {\n    data.push([\n      match[1],  // key\n      match[2],  // value\n      // || undefined as this is not undefined in IE7 and IE8\n      match[3] || undefined  // info\n    ]);\n  }\n\n  return data;\n}\n\nexports = {\n  ASSUME_CLIENT_HINTS_SUPPORT,\n  extractVersionTuples,\n  getNativeUserAgentString,\n  getUserAgent,\n  getUserAgentData,\n  matchUserAgent,\n  matchUserAgentDataBrand,\n  matchUserAgentIgnoreCase,\n  resetUserAgentData,\n  setUserAgent,\n  setUserAgentData,\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Rendering engine detection.\n * @see <a href=\"http://www.useragentstring.com/\">User agent strings</a>\n * For information on the browser brand (such as Safari versus Chrome), see\n * goog.userAgent.product.\n */\n\ngoog.provide('goog.userAgent');\n\ngoog.require('goog.labs.userAgent.browser');\ngoog.require('goog.labs.userAgent.engine');\ngoog.require('goog.labs.userAgent.platform');\ngoog.require('goog.labs.userAgent.util');\ngoog.require('goog.reflect');\ngoog.require('goog.string.internal');\n\n\n/**\n * @define {boolean} Whether we know at compile-time that the browser is IE.\n */\ngoog.userAgent.ASSUME_IE = goog.define('goog.userAgent.ASSUME_IE', false);\n\n\n/**\n * @define {boolean} Whether we know at compile-time that the browser is EDGE,\n * referring to EdgeHTML based Edge.\n */\ngoog.userAgent.ASSUME_EDGE = goog.define('goog.userAgent.ASSUME_EDGE', false);\n\n\n/**\n * @define {boolean} Whether we know at compile-time that the browser is GECKO.\n */\ngoog.userAgent.ASSUME_GECKO = goog.define('goog.userAgent.ASSUME_GECKO', false);\n\n\n/**\n * @define {boolean} Whether we know at compile-time that the browser is WEBKIT.\n */\ngoog.userAgent.ASSUME_WEBKIT =\n    goog.define('goog.userAgent.ASSUME_WEBKIT', false);\n\n\n/**\n * @define {boolean} Whether we know at compile-time that the browser is a\n *     mobile device running WebKit e.g. iPhone or Android.\n */\ngoog.userAgent.ASSUME_MOBILE_WEBKIT =\n    goog.define('goog.userAgent.ASSUME_MOBILE_WEBKIT', false);\n\n\n/**\n * @define {boolean} Whether we know at compile-time that the browser is OPERA,\n * referring to Presto-based Opera.\n */\ngoog.userAgent.ASSUME_OPERA = goog.define('goog.userAgent.ASSUME_OPERA', false);\n\n\n/**\n * @define {boolean} Whether the\n *     `goog.userAgent.isVersionOrHigher`\n *     function will return true for any version.\n */\ngoog.userAgent.ASSUME_ANY_VERSION =\n    goog.define('goog.userAgent.ASSUME_ANY_VERSION', false);\n\n\n/**\n * Whether we know the browser engine at compile-time.\n * @type {boolean}\n * @private\n */\ngoog.userAgent.BROWSER_KNOWN_ = goog.userAgent.ASSUME_IE ||\n    goog.userAgent.ASSUME_EDGE || goog.userAgent.ASSUME_GECKO ||\n    goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.ASSUME_WEBKIT ||\n    goog.userAgent.ASSUME_OPERA;\n\n\n/**\n * Returns the userAgent string for the current browser.\n *\n * @return {string} The userAgent string.\n */\ngoog.userAgent.getUserAgentString = function() {\n  'use strict';\n  return goog.labs.userAgent.util.getUserAgent();\n};\n\n\n/**\n * @return {?Navigator} The native navigator object.\n */\ngoog.userAgent.getNavigatorTyped = function() {\n  'use strict';\n  // Need a local navigator reference instead of using the global one,\n  // to avoid the rare case where they reference different objects.\n  // (in a WorkerPool, for example).\n  return goog.global['navigator'] || null;\n};\n\n\n/**\n * TODO(nnaze): Change type to \"Navigator\" and update compilation targets.\n * @return {?Object} The native navigator object.\n */\ngoog.userAgent.getNavigator = function() {\n  'use strict';\n  return goog.userAgent.getNavigatorTyped();\n};\n\n\n/**\n * Whether the user agent is Presto-based Opera.\n * @type {boolean}\n */\ngoog.userAgent.OPERA = goog.userAgent.BROWSER_KNOWN_ ?\n    goog.userAgent.ASSUME_OPERA :\n    goog.labs.userAgent.browser.isOpera();\n\n\n/**\n * Whether the user agent is Internet Explorer.\n * @type {boolean}\n */\ngoog.userAgent.IE = goog.userAgent.BROWSER_KNOWN_ ?\n    goog.userAgent.ASSUME_IE :\n    goog.labs.userAgent.browser.isIE();\n\n\n/**\n * Whether the user agent is Microsoft Edge (EdgeHTML based).\n * @type {boolean}\n */\ngoog.userAgent.EDGE = goog.userAgent.BROWSER_KNOWN_ ?\n    goog.userAgent.ASSUME_EDGE :\n    goog.labs.userAgent.engine.isEdge();\n\n\n/**\n * Whether the user agent is MS Internet Explorer or MS Edge (EdgeHTML based).\n * @type {boolean}\n */\ngoog.userAgent.EDGE_OR_IE = goog.userAgent.EDGE || goog.userAgent.IE;\n\n\n/**\n * Whether the user agent is Gecko. Gecko is the rendering engine used by\n * Mozilla, Firefox, and others.\n * @type {boolean}\n */\ngoog.userAgent.GECKO = goog.userAgent.BROWSER_KNOWN_ ?\n    goog.userAgent.ASSUME_GECKO :\n    goog.labs.userAgent.engine.isGecko();\n\n\n/**\n * Whether the user agent is WebKit. WebKit is the rendering engine that\n * Safari, Edge Chromium, Opera Chromium, Android and others use.\n * @type {boolean}\n */\ngoog.userAgent.WEBKIT = goog.userAgent.BROWSER_KNOWN_ ?\n    goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_MOBILE_WEBKIT :\n    goog.labs.userAgent.engine.isWebKit();\n\n\n/**\n * Whether the user agent is running on a mobile device.\n *\n * This is a separate function so that the logic can be tested.\n *\n * TODO(nnaze): Investigate swapping in goog.labs.userAgent.device.isMobile().\n *\n * @return {boolean} Whether the user agent is running on a mobile device.\n * @private\n */\ngoog.userAgent.isMobile_ = function() {\n  'use strict';\n  return goog.userAgent.WEBKIT &&\n      goog.labs.userAgent.util.matchUserAgent('Mobile');\n};\n\n\n/**\n * Whether the user agent is running on a mobile device.\n *\n * TODO(nnaze): Consider deprecating MOBILE when labs.userAgent\n *   is promoted as the gecko/webkit logic is likely inaccurate.\n *\n * @type {boolean}\n */\ngoog.userAgent.MOBILE =\n    goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.isMobile_();\n\n\n/**\n * Used while transitioning code to use WEBKIT instead.\n * @type {boolean}\n * @deprecated Use {@link goog.userAgent.product.SAFARI} instead.\n * TODO(nicksantos): Delete this from goog.userAgent.\n */\ngoog.userAgent.SAFARI = goog.userAgent.WEBKIT;\n\n\n/**\n * @return {string} the platform (operating system) the user agent is running\n *     on. Default to empty string because navigator.platform may not be defined\n *     (on Rhino, for example).\n * @private\n */\ngoog.userAgent.determinePlatform_ = function() {\n  'use strict';\n  const navigator = goog.userAgent.getNavigatorTyped();\n  return navigator && navigator.platform || '';\n};\n\n\n/**\n * The platform (operating system) the user agent is running on. Default to\n * empty string because navigator.platform may not be defined (on Rhino, for\n * example).\n * @type {string}\n */\ngoog.userAgent.PLATFORM = goog.userAgent.determinePlatform_();\n\n\n/**\n * @define {boolean} Whether the user agent is running on a Macintosh operating\n *     system.\n */\ngoog.userAgent.ASSUME_MAC = goog.define('goog.userAgent.ASSUME_MAC', false);\n\n\n/**\n * @define {boolean} Whether the user agent is running on a Windows operating\n *     system.\n */\ngoog.userAgent.ASSUME_WINDOWS =\n    goog.define('goog.userAgent.ASSUME_WINDOWS', false);\n\n\n/**\n * @define {boolean} Whether the user agent is running on a Linux operating\n *     system.\n */\ngoog.userAgent.ASSUME_LINUX = goog.define('goog.userAgent.ASSUME_LINUX', false);\n\n\n/**\n * @define {boolean} Whether the user agent is running on Android.\n */\ngoog.userAgent.ASSUME_ANDROID =\n    goog.define('goog.userAgent.ASSUME_ANDROID', false);\n\n\n/**\n * @define {boolean} Whether the user agent is running on an iPhone.\n */\ngoog.userAgent.ASSUME_IPHONE =\n    goog.define('goog.userAgent.ASSUME_IPHONE', false);\n\n\n/**\n * @define {boolean} Whether the user agent is running on an iPad.\n */\ngoog.userAgent.ASSUME_IPAD = goog.define('goog.userAgent.ASSUME_IPAD', false);\n\n\n/**\n * @define {boolean} Whether the user agent is running on an iPod.\n */\ngoog.userAgent.ASSUME_IPOD = goog.define('goog.userAgent.ASSUME_IPOD', false);\n\n\n/**\n * @define {boolean} Whether the user agent is running on KaiOS.\n */\ngoog.userAgent.ASSUME_KAIOS = goog.define('goog.userAgent.ASSUME_KAIOS', false);\n\n\n/**\n * @type {boolean}\n * @private\n */\ngoog.userAgent.PLATFORM_KNOWN_ = goog.userAgent.ASSUME_MAC ||\n    goog.userAgent.ASSUME_WINDOWS || goog.userAgent.ASSUME_LINUX ||\n    goog.userAgent.ASSUME_ANDROID || goog.userAgent.ASSUME_IPHONE ||\n    goog.userAgent.ASSUME_IPAD || goog.userAgent.ASSUME_IPOD;\n\n\n/**\n * Whether the user agent is running on a Macintosh operating system.\n * @type {boolean}\n */\ngoog.userAgent.MAC = goog.userAgent.PLATFORM_KNOWN_ ?\n    goog.userAgent.ASSUME_MAC :\n    goog.labs.userAgent.platform.isMacintosh();\n\n\n/**\n * Whether the user agent is running on a Windows operating system.\n * @type {boolean}\n */\ngoog.userAgent.WINDOWS = goog.userAgent.PLATFORM_KNOWN_ ?\n    goog.userAgent.ASSUME_WINDOWS :\n    goog.labs.userAgent.platform.isWindows();\n\n\n/**\n * Whether the user agent is Linux per the legacy behavior of\n * goog.userAgent.LINUX, which considered ChromeOS to also be\n * Linux.\n * @return {boolean}\n * @private\n */\ngoog.userAgent.isLegacyLinux_ = function() {\n  'use strict';\n  return goog.labs.userAgent.platform.isLinux() ||\n      goog.labs.userAgent.platform.isChromeOS();\n};\n\n\n/**\n * Whether the user agent is running on a Linux operating system.\n *\n * Note that goog.userAgent.LINUX considers ChromeOS to be Linux,\n * while goog.labs.userAgent.platform considers ChromeOS and\n * Linux to be different OSes.\n *\n * @type {boolean}\n */\ngoog.userAgent.LINUX = goog.userAgent.PLATFORM_KNOWN_ ?\n    goog.userAgent.ASSUME_LINUX :\n    goog.userAgent.isLegacyLinux_();\n\n\n/**\n * Whether the user agent is running on Android.\n * @type {boolean}\n */\ngoog.userAgent.ANDROID = goog.userAgent.PLATFORM_KNOWN_ ?\n    goog.userAgent.ASSUME_ANDROID :\n    goog.labs.userAgent.platform.isAndroid();\n\n\n/**\n * Whether the user agent is running on an iPhone.\n * @type {boolean}\n */\ngoog.userAgent.IPHONE = goog.userAgent.PLATFORM_KNOWN_ ?\n    goog.userAgent.ASSUME_IPHONE :\n    goog.labs.userAgent.platform.isIphone();\n\n\n/**\n * Whether the user agent is running on an iPad.\n * @type {boolean}\n */\ngoog.userAgent.IPAD = goog.userAgent.PLATFORM_KNOWN_ ?\n    goog.userAgent.ASSUME_IPAD :\n    goog.labs.userAgent.platform.isIpad();\n\n\n/**\n * Whether the user agent is running on an iPod.\n * @type {boolean}\n */\ngoog.userAgent.IPOD = goog.userAgent.PLATFORM_KNOWN_ ?\n    goog.userAgent.ASSUME_IPOD :\n    goog.labs.userAgent.platform.isIpod();\n\n\n/**\n * Whether the user agent is running on iOS.\n * @type {boolean}\n */\ngoog.userAgent.IOS = goog.userAgent.PLATFORM_KNOWN_ ?\n    (goog.userAgent.ASSUME_IPHONE || goog.userAgent.ASSUME_IPAD ||\n     goog.userAgent.ASSUME_IPOD) :\n    goog.labs.userAgent.platform.isIos();\n\n/**\n * Whether the user agent is running on KaiOS.\n * @type {boolean}\n */\ngoog.userAgent.KAIOS = goog.userAgent.PLATFORM_KNOWN_ ?\n    goog.userAgent.ASSUME_KAIOS :\n    goog.labs.userAgent.platform.isKaiOS();\n\n\n/**\n * @return {string} The string that describes the version number of the user\n *     agent.\n * @private\n */\ngoog.userAgent.determineVersion_ = function() {\n  'use strict';\n  // All browsers have different ways to detect the version and they all have\n  // different naming schemes.\n  // version is a string rather than a number because it may contain 'b', 'a',\n  // and so on.\n  let version = '';\n  const arr = goog.userAgent.getVersionRegexResult_();\n  if (arr) {\n    version = arr ? arr[1] : '';\n  }\n\n  if (goog.userAgent.IE) {\n    // IE9 can be in document mode 9 but be reporting an inconsistent user agent\n    // version.  If it is identifying as a version lower than 9 we take the\n    // documentMode as the version instead.  IE8 has similar behavior.\n    // It is recommended to set the X-UA-Compatible header to ensure that IE9\n    // uses documentMode 9.\n    const docMode = goog.userAgent.getDocumentMode_();\n    if (docMode != null && docMode > parseFloat(version)) {\n      return String(docMode);\n    }\n  }\n\n  return version;\n};\n\n\n/**\n * @return {?IArrayLike<string>|undefined} The version regex matches from\n *     parsing the user\n *     agent string. These regex statements must be executed inline so they can\n *     be compiled out by the closure compiler with the rest of the useragent\n *     detection logic when ASSUME_* is specified.\n * @private\n */\ngoog.userAgent.getVersionRegexResult_ = function() {\n  'use strict';\n  const userAgent = goog.userAgent.getUserAgentString();\n  if (goog.userAgent.GECKO) {\n    return /rv\\:([^\\);]+)(\\)|;)/.exec(userAgent);\n  }\n  if (goog.userAgent.EDGE) {\n    return /Edge\\/([\\d\\.]+)/.exec(userAgent);\n  }\n  if (goog.userAgent.IE) {\n    return /\\b(?:MSIE|rv)[: ]([^\\);]+)(\\)|;)/.exec(userAgent);\n  }\n  if (goog.userAgent.WEBKIT) {\n    // WebKit/125.4\n    return /WebKit\\/(\\S+)/.exec(userAgent);\n  }\n  if (goog.userAgent.OPERA) {\n    // If none of the above browsers were detected but the browser is Opera, the\n    // only string that is of interest is 'Version/<number>'.\n    return /(?:Version)[ \\/]?(\\S+)/.exec(userAgent);\n  }\n  return undefined;\n};\n\n\n/**\n * @return {number|undefined} Returns the document mode (for testing).\n * @private\n */\ngoog.userAgent.getDocumentMode_ = function() {\n  'use strict';\n  // NOTE(pupius): goog.userAgent may be used in context where there is no DOM.\n  const doc = goog.global['document'];\n  return doc ? doc['documentMode'] : undefined;\n};\n\n\n/**\n * The version of the user agent. This is a string because it might contain\n * 'b' (as in beta) as well as multiple dots.\n * @type {string}\n */\ngoog.userAgent.VERSION = goog.userAgent.determineVersion_();\n\n\n/**\n * Compares two version numbers.\n *\n * @param {string} v1 Version of first item.\n * @param {string} v2 Version of second item.\n *\n * @return {number}  1 if first argument is higher\n *                   0 if arguments are equal\n *                  -1 if second argument is higher.\n * @deprecated Use goog.string.compareVersions.\n */\ngoog.userAgent.compare = function(v1, v2) {\n  'use strict';\n  return goog.string.internal.compareVersions(v1, v2);\n};\n\n\n/**\n * Cache for {@link goog.userAgent.isVersionOrHigher}.\n * Calls to compareVersions are surprisingly expensive and, as a browser's\n * version number is unlikely to change during a session, we cache the results.\n * @const\n * @private\n */\ngoog.userAgent.isVersionOrHigherCache_ = {};\n\n\n/**\n * Whether the user agent version is higher or the same as the given version.\n * NOTE: When checking the version numbers for Firefox and Safari, be sure to\n * use the engine's version, not the browser's version number.  For example,\n * Firefox 3.0 corresponds to Gecko 1.9 and Safari 3.0 to Webkit 522.11.\n * Opera and Internet Explorer versions match the product release number.<br>\n * @see <a href=\"http://en.wikipedia.org/wiki/Safari_version_history\">\n *     Webkit</a>\n * @see <a href=\"http://en.wikipedia.org/wiki/Gecko_engine\">Gecko</a>\n *\n * @param {string|number} version The version to check.\n * @return {boolean} Whether the user agent version is higher or the same as\n *     the given version.\n */\ngoog.userAgent.isVersionOrHigher = function(version) {\n  'use strict';\n  return goog.userAgent.ASSUME_ANY_VERSION ||\n      goog.reflect.cache(\n          goog.userAgent.isVersionOrHigherCache_, version, function() {\n            'use strict';\n            return goog.string.internal.compareVersions(\n                       goog.userAgent.VERSION, version) >= 0;\n          });\n};\n\n\n/**\n * Whether the IE effective document mode is higher or the same as the given\n * document mode version.\n * NOTE: Only for IE, return false for another browser.\n *\n * @param {number} documentMode The document mode version to check.\n * @return {boolean} Whether the IE effective document mode is higher or the\n *     same as the given version.\n */\ngoog.userAgent.isDocumentModeOrHigher = function(documentMode) {\n  'use strict';\n  return Number(goog.userAgent.DOCUMENT_MODE) >= documentMode;\n};\n\n\n/**\n * For IE version < 7, documentMode is undefined, so attempt to use the\n * CSS1Compat property to see if we are in standards mode. If we are in\n * standards mode, treat the browser version as the document mode. Otherwise,\n * IE is emulating version 5.\n *\n * NOTE(2019/05/31): Support for IE < 7 is long gone, so this is now simplified.\n * It returns document.documentMode for IE and undefined for everything else.\n *\n * @type {number|undefined}\n * @const\n */\ngoog.userAgent.DOCUMENT_MODE = (function() {\n  'use strict';\n  const doc = goog.global['document'];\n  if (!doc || !goog.userAgent.IE) return undefined;\n  // This must be an IE user agent.\n  const documentMode = goog.userAgent.getDocumentMode_();\n  if (documentMode) return documentMode;\n  // The user agent version string begins with the major version.\n  // Parse the major version and truncate anything following.\n  const ieVersion = parseInt(goog.userAgent.VERSION, 10);\n  return ieVersion || undefined;\n})();\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Closure user agent detection.\n * @see http://en.wikipedia.org/wiki/User_agent\n * For more information on browser brand, platform, or device see the other\n * sub-namespaces in goog.labs.userAgent (browser, platform, and device).\n */\n\ngoog.module('goog.labs.userAgent.engine');\ngoog.module.declareLegacyNamespace();\n\nconst googArray = goog.require('goog.array');\nconst googString = goog.require('goog.string.internal');\nconst util = goog.require('goog.labs.userAgent.util');\n\n/**\n * @return {boolean} Whether the rendering engine is Presto.\n */\nfunction isPresto() {\n  return util.matchUserAgent('Presto');\n}\n\n/**\n * @return {boolean} Whether the rendering engine is Trident.\n */\nfunction isTrident() {\n  // IE only started including the Trident token in IE8.\n  return util.matchUserAgent('Trident') || util.matchUserAgent('MSIE');\n}\n\n/**\n * @return {boolean} Whether the rendering engine is EdgeHTML.\n */\nfunction isEdge() {\n  return util.matchUserAgent('Edge');\n}\n\n/**\n * @return {boolean} Whether the rendering engine is WebKit. This will return\n * true for Chrome, Blink-based Opera (15+), Edge Chromium and Safari.\n */\nfunction isWebKit() {\n  return util.matchUserAgentIgnoreCase('WebKit') && !isEdge();\n}\n\n/**\n * @return {boolean} Whether the rendering engine is Gecko.\n */\nfunction isGecko() {\n  return util.matchUserAgent('Gecko') && !isWebKit() && !isTrident() &&\n      !isEdge();\n}\n\n/**\n * @return {string} The rendering engine's version or empty string if version\n *     can't be determined.\n */\nfunction getVersion() {\n  const userAgentString = util.getUserAgent();\n  if (userAgentString) {\n    const tuples = util.extractVersionTuples(userAgentString);\n\n    const engineTuple = getEngineTuple(tuples);\n    if (engineTuple) {\n      // In Gecko, the version string is either in the browser info or the\n      // Firefox version.  See Gecko user agent string reference:\n      // http://goo.gl/mULqa\n      if (engineTuple[0] == 'Gecko') {\n        return getVersionForKey(tuples, 'Firefox');\n      }\n\n      return engineTuple[1];\n    }\n\n    // MSIE has only one version identifier, and the Trident version is\n    // specified in the parenthetical. IE Edge is covered in the engine tuple\n    // detection.\n    const browserTuple = tuples[0];\n    let info;\n    if (browserTuple && (info = browserTuple[2])) {\n      const match = /Trident\\/([^\\s;]+)/.exec(info);\n      if (match) {\n        return match[1];\n      }\n    }\n  }\n  return '';\n}\n\n/**\n * @param {!Array<!Array<string>>} tuples Extracted version tuples.\n * @return {!Array<string>|undefined} The engine tuple or undefined if not\n *     found.\n */\nfunction getEngineTuple(tuples) {\n  if (!isEdge()) {\n    return tuples[1];\n  }\n  for (let i = 0; i < tuples.length; i++) {\n    const tuple = tuples[i];\n    if (tuple[0] == 'Edge') {\n      return tuple;\n    }\n  }\n}\n\n/**\n * @param {string|number} version The version to check.\n * @return {boolean} Whether the rendering engine version is higher or the same\n *     as the given version.\n */\nfunction isVersionOrHigher(version) {\n  return googString.compareVersions(getVersion(), version) >= 0;\n}\n\n/**\n * @param {!Array<!Array<string>>} tuples Version tuples.\n * @param {string} key The key to look for.\n * @return {string} The version string of the given key, if present.\n *     Otherwise, the empty string.\n */\nfunction getVersionForKey(tuples, key) {\n  // TODO(nnaze): Move to util if useful elsewhere.\n\n  const pair = googArray.find(tuples, function(pair) {\n    return key == pair[0];\n  });\n\n  return pair && pair[1] || '';\n}\n\nexports = {\n  getVersion,\n  isEdge,\n  isGecko,\n  isPresto,\n  isTrident,\n  isVersionOrHigher,\n  isWebKit,\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Base64 en/decoding. Not much to say here except that we\n * work with decoded values in arrays of bytes. By \"byte\" I mean a number\n * in [0, 255].\n */\n\ngoog.module('goog.crypt.base64');\ngoog.module.declareLegacyNamespace();\n\nconst asserts = goog.require('goog.asserts');\nconst crypt = goog.require('goog.crypt');\nconst internal = goog.require('goog.string.internal');\nconst product = goog.require('goog.userAgent.product');\nconst userAgent = goog.require('goog.userAgent');\n\n/**\n * Default alphabet, shared between alphabets. Only 62 characters.\n * @type {string}\n */\nconst DEFAULT_ALPHABET_COMMON = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' +\n    'abcdefghijklmnopqrstuvwxyz' +\n    '0123456789';\n\n/**\n * Alphabet characters for Alphabet.DEFAULT encoding.\n * For characters without padding, please consider using\n * `crypt.baseN.BASE_64` instead.\n *\n * @type {string}\n */\nconst ENCODED_VALS = DEFAULT_ALPHABET_COMMON + '+/=';\n\n/**\n * Alphabet characters for Alphabet.WEBSAFE_DOT_PADDING encoding.\n * The dot padding is no Internet Standard, according to RFC 4686.\n * https://tools.ietf.org/html/rfc4648\n * For characters without padding, please consider using\n * `crypt.baseN.BASE_64_URL_SAFE` instead.\n *\n * @type {string}\n */\nconst ENCODED_VALS_WEBSAFE = DEFAULT_ALPHABET_COMMON + '-_.';\n\n/**\n * Alphabets for Base64 encoding\n * Alphabets with no padding character are for encoding without padding.\n * About the alphabets, please refer to RFC 4686.\n * https://tools.ietf.org/html/rfc4648\n * @enum {number}\n */\nconst Alphabet = {\n  /** Section 4 \"base64\". */\n  DEFAULT: 0,\n  /** Section 4 \"base64\", omitting padding per Section 3.2. */\n  NO_PADDING: 1,\n  /** Section 5 \"base64url\". */\n  WEBSAFE: 2,\n  /** Like WEBSAFE, but with non-standard '.' padding character. */\n  WEBSAFE_DOT_PADDING: 3,\n  /** Section 5 \"base64url\", omitting padding per Section 3.2. */\n  WEBSAFE_NO_PADDING: 4,\n};\n\n/**\n * Padding chars for Base64 encoding\n * @const {string}\n */\nconst paddingChars = '=.';\n\n/**\n * Check if a character is a padding character\n * @param {string} char\n * @return {boolean}\n */\nfunction isPadding(char) {\n  return internal.contains(paddingChars, char);\n}\n\n// Static lookup maps, lazily populated by init_()\n\n/**\n * For each `Alphabet`, maps from bytes to characters.\n * @see https://jsperf.com/char-lookups\n * @type {!Object<!Alphabet, !Array<string>>}\n */\nconst byteToCharMaps = {};\n\n/**\n * Maps characters to bytes.\n * This map is used for all alphabets since, across alphabets, common chars\n * always map to the same byte.\n * `null` indicates `init` has not yet been called.\n * @type {?Object<string, number>}\n */\nlet charToByteMap = null;\n\n/**\n * White list of implementations with known-good native atob and btoa functions.\n * Listing these explicitly (via the ASSUME_* wrappers) benefits dead-code\n * removal in per-browser compilations.\n * @type {boolean}\n */\nconst ASSUME_NATIVE_SUPPORT = userAgent.GECKO || userAgent.WEBKIT;\n\n/**\n * Does this browser have a working btoa function?\n * @type {boolean}\n */\nconst HAS_NATIVE_ENCODE = goog.FEATURESET_YEAR >= 2018 ||\n    ASSUME_NATIVE_SUPPORT || typeof (goog.global.btoa) == 'function';\n\n/**\n * Does this browser have a working atob function?\n * We blacklist known-bad implementations:\n *  - IE (10+) added atob() but it does not tolerate whitespace on the input.\n * @type {boolean}\n */\nconst HAS_NATIVE_DECODE = goog.FEATURESET_YEAR >= 2018 ||\n    ASSUME_NATIVE_SUPPORT ||\n    (!product.SAFARI && typeof (goog.global.atob) == 'function');\n\n/**\n * Base64-encode an array of bytes.\n *\n * @param {Array<number>|Uint8Array} input An array of bytes (numbers with\n *     value in [0, 255]) to encode.\n * @param {!Alphabet=} alphabet Base 64 alphabet to\n *     use in encoding. Alphabet.DEFAULT is used by default.\n * @return {string} The base64 encoded string.\n */\nfunction encodeByteArray(input, alphabet) {\n  // Assert avoids runtime dependency on goog.isArrayLike, which helps reduce\n  // size of jscompiler output, and which yields slight performance increase.\n  asserts.assert(\n      goog.isArrayLike(input), 'encodeByteArray takes an array as a parameter');\n\n  if (alphabet === undefined) {\n    alphabet = Alphabet.DEFAULT;\n  }\n  init();\n\n  const byteToCharMap = byteToCharMaps[alphabet];\n  const output = new Array(Math.floor(input.length / 3));\n  const paddingChar = byteToCharMap[64] || '';\n\n  // Add all blocks for which we have four output bytes.\n  let inputIdx = 0;\n  let outputIdx = 0;\n  for (; inputIdx < input.length - 2; inputIdx += 3) {\n    const byte1 = input[inputIdx];\n    const byte2 = input[inputIdx + 1];\n    const byte3 = input[inputIdx + 2];\n\n    const outChar1 = byteToCharMap[byte1 >> 2];\n    const outChar2 = byteToCharMap[((byte1 & 0x03) << 4) | (byte2 >> 4)];\n    const outChar3 = byteToCharMap[((byte2 & 0x0F) << 2) | (byte3 >> 6)];\n    const outChar4 = byteToCharMap[byte3 & 0x3F];\n\n    output[outputIdx++] = ((('' + outChar1) + outChar2) + outChar3) + outChar4;\n  }\n\n  // Add our trailing block, in which case we can skip computations relating to\n  // byte3/outByte4.\n  let byte2 = 0;\n  let outChar3 = paddingChar;\n  switch (input.length - inputIdx) {\n    case 2:\n      byte2 = input[inputIdx + 1];\n      outChar3 = byteToCharMap[(byte2 & 0x0F) << 2] || paddingChar;\n      // fall through.\n    case 1:\n      const byte1 = input[inputIdx];\n      const outChar1 = byteToCharMap[byte1 >> 2];\n      const outChar2 = byteToCharMap[((byte1 & 0x03) << 4) | (byte2 >> 4)];\n\n      output[outputIdx] =\n          ((('' + outChar1) + outChar2) + outChar3) + paddingChar;\n      // fall through.\n    default:\n      // We've ended on a block, so we have no more bytes to encode.\n  }\n\n  return output.join('');\n}\n\n/**\n * Base64-encode a binary string.  Note that binary strings are discouraged now\n * that Uint8Array is available on all supported browsers.  Users are encouraged\n * to strongly consider `encodeByteArray`.  This method is likely to be\n * deprecated at some point in favor of the Uint8Array version.\n *\n * @param {string} input A string to encode.  Must not contain characters\n *     outside of the Latin-1 range (i.e. charCode > 255).\n * @param {!Alphabet=} alphabet Base 64 alphabet to\n *     use in encoding. Alphabet.DEFAULT is used by default.\n * @return {string} The base64 encoded string.\n */\nfunction encodeBinaryString(input, alphabet) {\n  return encodeString(input, alphabet, true);\n}\n\n/**\n * Base64-encode a binary string.\n *\n * @param {string} input A string to encode.  Must not contain characters\n *     outside of the Latin-1 range (i.e. charCode > 255).\n * @param {!Alphabet=} alphabet Base 64 alphabet to\n *     use in encoding. Alphabet.DEFAULT is used by default.\n * @param {boolean=} throwSync Whether to throw synchronously on unicode.  Note\n *     that if not using a custom alphabet, the throw will always be sync.\n * @return {string} The base64 encoded string.\n */\nfunction encodeString(input, alphabet, throwSync) {\n  // Shortcut for browsers that implement\n  // a native base64 encoder in the form of \"btoa/atob\"\n  if (HAS_NATIVE_ENCODE && !alphabet) {\n    return goog.global.btoa(input);\n  }\n  return encodeByteArray(crypt.stringToByteArray(input, throwSync), alphabet);\n}\n\n/**\n * Base64-encode a text string.  Non-ASCII characters (charCode > 127) will be\n * encoded as UTF-8.\n *\n * @param {string} input A string to encode.\n * @param {!Alphabet=} alphabet Base 64 alphabet to\n *     use in encoding. Alphabet.DEFAULT is used by default.\n * @return {string} The base64 encoded string.\n */\nfunction encodeStringUtf8(input, alphabet) {\n  return encodeText(input, alphabet);\n}\n\n/**\n * Base64-encode a text string.  Non-ASCII characters (charCode > 127) will be\n * encoded as UTF-8.\n *\n * @param {string} input A string to encode.\n * @param {!Alphabet=} alphabet Base 64 alphabet to\n *     use in encoding. Alphabet.DEFAULT is used by default.\n * @return {string} The base64 encoded string.\n */\nfunction encodeText(input, alphabet) {\n  // Shortcut for browsers that implement\n  // a native base64 encoder in the form of \"btoa/atob\"\n  if (HAS_NATIVE_ENCODE && !alphabet) {\n    return goog.global.btoa(unescape(encodeURIComponent(input)));\n  }\n  return encodeByteArray(crypt.stringToUtf8ByteArray(input), alphabet);\n}\n\n/**\n * Base64-decode a string into a binary bytestring.  Note that binary strings\n * are discouraged now that Uint8Array is available on all supported browsers.\n * Users are encouraged to strongly consider `decodeStringToUint8Array`.  This\n * method is likely to be deprecated at some point in favor of the Uint8Array\n * version.\n *\n * @param {string} input Input to decode. Any whitespace is ignored, and the\n *     input maybe encoded with either supported alphabet (or a mix thereof).\n * @param {boolean=} useCustomDecoder True indicates the custom decoder is used,\n *     which supports alternative alphabets. Note that passing false may still\n *     use the custom decoder on browsers without native support.\n * @return {string} string representing the decoded value.\n */\nfunction decodeToBinaryString(input, useCustomDecoder) {\n  // Shortcut for browsers that implement\n  // a native base64 encoder in the form of \"btoa/atob\"\n  if (HAS_NATIVE_DECODE && !useCustomDecoder) {\n    return goog.global.atob(input);\n  }\n  let output = '';\n  function pushByte(b) {\n    output += String.fromCharCode(b);\n  }\n\n  decodeStringInternal(input, pushByte);\n\n  return output;\n}\n\n/**\n * Base64-decode a string into a binary bytestring.\n *\n * @param {string} input Input to decode. Any whitespace is ignored, and the\n *     input maybe encoded with either supported alphabet (or a mix thereof).\n * @param {boolean=} useCustomDecoder True indicates the custom decoder is used,\n *     which supports alternative alphabets. Note that passing false may still\n *     use the custom decoder on browsers without native support.\n * @return {string} string representing the decoded value.\n */\nconst decodeString = decodeToBinaryString;\n\n/**\n * Base64-decode a string.  The input should be the result of a double-encoding\n * a unicode string: first the unicode characters (>127) are encoded as UTF-8\n * bytes, and then the resulting bytes are base64-encoded.\n *\n * @param {string} input Input to decode. Any whitespace is ignored, and the\n *     input maybe encoded with either supported alphabet (or a mix thereof).\n * @param {boolean=} useCustomDecoder True indicates the custom decoder is used,\n *     which supports alternative alphabets. Note that passing false may still\n *     use the custom decoder on browsers without native support.\n * @return {string} string representing the decoded value.\n */\nfunction decodeStringUtf8(input, useCustomDecoder) {\n  return decodeToText(input, useCustomDecoder);\n}\n\n/**\n * Base64-decode a string.  The input should be the result of a double-encoding\n * a unicode string: first the unicode characters (>127) are encoded as UTF-8\n * bytes, and then the resulting bytes are base64-encoded.\n *\n * @param {string} input Input to decode. Any whitespace is ignored, and the\n *     input maybe encoded with either supported alphabet (or a mix thereof).\n * @param {boolean=} useCustomDecoder True indicates the custom decoder is used,\n *     which supports alternative alphabets. Note that passing false may still\n *     use the custom decoder on browsers without native support.\n * @return {string} string representing the decoded value.\n */\nfunction decodeToText(input, useCustomDecoder) {\n  return decodeURIComponent(escape(decodeString(input, useCustomDecoder)));\n}\n\n/**\n * Base64-decode a string to an Array of numbers.\n *\n * In base-64 decoding, groups of four characters are converted into three\n * bytes.  If the encoder did not apply padding, the input length may not\n * be a multiple of 4.\n *\n * In this case, the last group will have fewer than 4 characters, and\n * padding will be inferred.  If the group has one or two characters, it decodes\n * to one byte.  If the group has three characters, it decodes to two bytes.\n *\n * TODO(sdh): We may want to consider renaming this to `decodeToByteArray` for\n * consistency with `decodeToText`/`decodeToBinaryString`.\n *\n * @param {string} input Input to decode. Any whitespace is ignored, and the\n *     input maybe encoded with either supported alphabet (or a mix thereof).\n * @param {boolean=} opt_ignored Unused parameter, retained for compatibility.\n * @return {!Array<number>} bytes representing the decoded value.\n */\nfunction decodeStringToByteArray(input, opt_ignored) {\n  const output = [];\n  function pushByte(b) {\n    output.push(b);\n  }\n\n  decodeStringInternal(input, pushByte);\n\n  return output;\n}\n\n/**\n * Base64-decode a string to a Uint8Array.\n *\n * Note that Uint8Array is not supported on older browsers, e.g. IE < 10.\n * @see http://caniuse.com/uint8array\n *\n * In base-64 decoding, groups of four characters are converted into three\n * bytes.  If the encoder did not apply padding, the input length may not\n * be a multiple of 4.\n *\n * In this case, the last group will have fewer than 4 characters, and\n * padding will be inferred.  If the group has one or two characters, it decodes\n * to one byte.  If the group has three characters, it decodes to two bytes.\n *\n * TODO(sdh): We may want to consider renaming this to `decodeToUint8Array` for\n * consistency with `decodeToText`/`decodeToBinaryString`.\n *\n * @param {string} input Input to decode. Any whitespace is ignored, and the\n *     input maybe encoded with either supported alphabet (or a mix thereof).\n * @return {!Uint8Array} bytes representing the decoded value.\n */\nfunction decodeStringToUint8Array(input) {\n  // TODO(b/384553364): leverage Uint8Array.fromBase64()\n  const len = input.length;\n  // Approximate the length of the array needed for output.\n  // Our method varies according to the format of the input, which we can\n  // consider in three categories:\n  //   A) well-formed with proper padding\n  //   B) well-formed without any padding\n  //   C) not-well-formed, either with extra whitespace in the middle or with\n  //      extra padding characters.\n  //\n  //  In the case of (A), (length * 3 / 4) will result in an integer number of\n  //  bytes evenly divisible by 3, and we need only subtract bytes according to\n  //  the padding observed.\n  //\n  //  In the case of (B), (length * 3 / 4) will result in a non-integer number\n  //  of bytes, or not evenly divisible by 3. (If the result is evenly divisible\n  //  by 3, it's well-formed with the proper amount of padding [0 padding]).\n  //  This approximation can become exact by rounding down.\n  //\n  //  In the case of (C), the only way to get the length is to walk the full\n  //  length of the string to consider each character. This is handled by\n  //  tracking the number of bytes added to the array and using subarray to\n  //  trim the array back down to size.\n  let approxByteLength = len * 3 / 4;\n  if (approxByteLength % 3) {\n    // The string isn't complete, either because it didn't include padding, or\n    // because it has extra white space.\n    // In either case, we won't generate more bytes than are completely encoded,\n    // so rounding down is appropriate to have a buffer at least as large as\n    // output.\n    approxByteLength = Math.floor(approxByteLength);\n  } else if (isPadding(input[len - 1])) {\n    // The string has a round length, and has some padding.\n    // Reduce the byte length according to the quantity of padding.\n    if (isPadding(input[len - 2])) {\n      approxByteLength -= 2;\n    } else {\n      approxByteLength -= 1;\n    }\n  }\n  const output = new Uint8Array(approxByteLength);\n  let outLen = 0;\n  function pushByte(b) {\n    output[outLen++] = b;\n  }\n\n  decodeStringInternal(input, pushByte);\n\n  // Trim unused trailing bytes if necessary, this only happens if the input\n  // included extra whitespace or extra padding that caused our estimate to be\n  // too large (this is uncommon).\n  //\n  // It would be correct to simply always call subarray, but we avoid doing so\n  // to avoid potential poor performance from chrome.\n  // See https://bugs.chromium.org/p/v8/issues/detail?id=7161\n  return outLen !== approxByteLength ? output.subarray(0, outLen) : output;\n}\n\n/**\n * @param {string} input Input to decode.\n * @param {function(number):void} pushByte result accumulator.\n */\nfunction decodeStringInternal(input, pushByte) {\n  init();\n\n  let nextCharIndex = 0;\n  /**\n   * @param {number} default_val Used for end-of-input.\n   * @return {number} The next 6-bit value, or the default for end-of-input.\n   */\n  function getByte(default_val) {\n    while (nextCharIndex < input.length) {\n      const ch = input.charAt(nextCharIndex++);\n      const b = charToByteMap[ch];\n      if (b != null) {\n        return b;  // Common case: decoded the char.\n      }\n      if (!internal.isEmptyOrWhitespace(ch)) {\n        throw new Error('Unknown base64 encoding at char: ' + ch);\n      }\n      // We encountered whitespace: loop around to the next input char.\n    }\n    return default_val;  // No more input remaining.\n  }\n\n  while (true) {\n    const byte1 = getByte(-1);\n    const byte2 = getByte(0);\n    const byte3 = getByte(64);\n    const byte4 = getByte(64);\n\n    // The common case is that all four bytes are present, so if we have byte4\n    // we can skip over the truncated input special case handling.\n    if (byte4 === 64) {\n      if (byte1 === -1) {\n        return;  // Terminal case: no input left to decode.\n      }\n      // Here we know an intermediate number of bytes are missing.\n      // The defaults for byte2, byte3 and byte4 apply the inferred padding\n      // rules per the public API documentation. i.e: 1 byte\n      // missing should yield 2 bytes of output, but 2 or 3 missing bytes yield\n      // a single byte of output. (Recall that 64 corresponds the padding char).\n    }\n\n    const outByte1 = (byte1 << 2) | (byte2 >> 4);\n    pushByte(outByte1);\n\n    if (byte3 != 64) {\n      const outByte2 = ((byte2 << 4) & 0xF0) | (byte3 >> 2);\n      pushByte(outByte2);\n\n      if (byte4 != 64) {\n        const outByte3 = ((byte3 << 6) & 0xC0) | byte4;\n        pushByte(outByte3);\n      }\n    }\n  }\n}\n\n/**\n * Lazy static initialization function. Called before\n * accessing any of the static map variables.\n */\nfunction init() {\n  if (charToByteMap) {\n    return;\n  }\n  charToByteMap = {};\n\n  // We want quick mappings back and forth, so we precompute encoding maps.\n\n  /** @type {!Array<string>} */\n  const commonChars = DEFAULT_ALPHABET_COMMON.split('');\n  const specialChars = [\n    '+/=',  // DEFAULT\n    '+/',   // NO_PADDING\n    '-_=',  // WEBSAFE\n    '-_.',  // WEBSAFE_DOT_PADDING\n    '-_',   // WEBSAFE_NO_PADDING\n  ];\n\n  for (let i = 0; i < 5; i++) {\n    // `i` is each value of the `goog.crypt.base64.Alphabet` enum\n    const chars = commonChars.concat(specialChars[i].split(''));\n\n    // Sets byte-to-char map\n    byteToCharMaps[/** @type {!Alphabet} */ (i)] = chars;\n\n    // Sets char-to-byte map\n    for (let j = 0; j < chars.length; j++) {\n      const char = chars[j];\n\n      const existingByte = charToByteMap[char];\n      if (existingByte === undefined) {\n        charToByteMap[char] = j;\n      } else {\n        asserts.assert(existingByte === j);\n      }\n    }\n  }\n}\n\nexports = {\n  Alphabet,\n  ENCODED_VALS,\n  ENCODED_VALS_WEBSAFE,\n  decodeString,\n  decodeStringToByteArray,\n  decodeStringToUint8Array,\n  decodeStringUtf8,\n  decodeToBinaryString,\n  decodeToText,\n  encodeBinaryString,\n  encodeByteArray,\n  encodeString,\n  encodeStringUtf8,\n  encodeText,\n};\n","/**\n * @fileoverview Internal runtime functions related to bytes data.\n *\n * DO NOT USE THIS OUTSIDE OF javascript/apps/jspb\n */\ngoog.module('jspb.internal_bytes');\n\nconst base64 = goog.require('goog.crypt.base64');\nconst userAgent = goog.require('goog.userAgent');\nconst {fail} = goog.require('goog.asserts');\n\n/**\n * Does this JavaScript environment support Uint8Array typed arrays?\n *\n * NOTE: this really should be `typeof Uint8Array === 'function'` but in\n * go/cobalt browsers `typeof Uint8Array === 'object'` so we need a looser check\n * here.\n * We assume availability if featureset year is >=2018. Any number > 2012 would\n * probably suffice but those years aren't defined, so we pick the ealiest\n * defined year.\n *\n * @const {boolean}\n */\nconst SUPPORTS_UINT8ARRAY =\n    goog.FEATURESET_YEAR >= 2018 || (typeof Uint8Array !== 'undefined');\n\n/**\n * @define {boolean} Indicates that we should look for WEBSAFE encodings before\n *     using atob/btoa for base64 encoding. This incurs some walltime cost but\n *     is required for backcompat.\n */\nconst HANDLE_WEB_SAFE_ENCODINGS_WITH_ATOB_AND_BTOA =\n    goog.define('jspb.HANDLE_WEB_SAFE_ENCODINGS_WITH_ATOB_AND_BTOA', true);\n\n/**\n * @define {boolean} If set, use atob/btoa when available.\n *\n * More specifically, if enabled and 'goog.FEATURESET_YEAR >= 2018', sets\n * USE_ATOB_BTOA without feature detection. Using featureset years >= 2018\n * which is conservative but excluded IE and no one is picking numbers less that\n * that anyway. If disabled, the slower JS implementation is always used; this\n * is appropriate for non-Web environments where 'atob' and 'btoa' are not\n * available.\n */\nconst CAN_USE_ATOB_AND_BTOA = goog.define('jspb.USE_ATOB_AND_BTOA', true);\n\nconst /** boolean */ ASSUME_ATOB_AND_BTOA_AVAILABLE =\n    goog.FEATURESET_YEAR >= 2018;\n\n/**\n * Whether this application has native support for `atob` and `btoa`.\n *\n * IE has a broken implementation; and we would be able to fast-track WEBKIT\n * if it weren't for cobalt.\n *\n * @const {boolean}\n */\nconst USE_ATOB_BTOA = CAN_USE_ATOB_AND_BTOA &&\n    (ASSUME_ATOB_AND_BTOA_AVAILABLE ||\n     (!userAgent.IE && typeof btoa === 'function'));\n\n/**\n * Maximum arg spread for String.fromCharCode.\n *\n * Chrome's maximum stack size is of the order of 100k so here we conservatively\n * set this to 10k.\n */\nconst UINT8ARRAY_MAX_SIZE_FOR_SPREAD = 10240;\n\n/**\n * Encodes a Uint8Array as base64.\n *\n * Note that we can always use btoa/atob if we can use Uint8Array because\n * every browser that supports Uint8Array also supports them: see\n * https://caniuse.com/?search=Uint8Array and https://caniuse.com/atob-btoa\n *\n * @param {!Uint8Array} u8\n * @return {string}\n */\nfunction encodeByteArray(u8) {\n  if (!USE_ATOB_BTOA) {\n    return base64.encodeByteArray(u8);\n  }\n\n  /** @type {string} */\n  let binary = '';\n  let offset = 0;\n  const limit = u8.length - UINT8ARRAY_MAX_SIZE_FOR_SPREAD;\n  while (offset < limit) {\n    binary += String.fromCharCode.apply(\n        null, u8.subarray(offset, offset += UINT8ARRAY_MAX_SIZE_FOR_SPREAD));\n  }\n  binary += String.fromCharCode.apply(null, offset ? u8.subarray(offset) : u8);\n  return btoa(binary);\n}\n\n/**\n * Websafe padding characters for replacement.\n * @const {!RegExp}\n */\nconst WEBSAFE_BASE64_CHARS = /** @pureOrBreakMyCode */ (/[-_.]/g);\n\n/** @const {!Object<string,string>} */\nconst websafeReplacer =\n    /** @pureOrBreakMyCode */ ({'-': '+', '_': '/', '.': '='});\n\n/**\n * Replaces websafe characters with default alphabet characters.\n * @param {string} char\n * @return {string}\n */\nfunction replaceWebsafe(char) {\n  return websafeReplacer[char] || '';\n}\n\n/**\n * Replaces websafe characters in a string with default alphabet characters.\n * @param {string} str\n * @return {string}\n */\nfunction replaceWebsafeString(str) {\n  if (WEBSAFE_BASE64_CHARS.test(str)) {\n    return str.replace(WEBSAFE_BASE64_CHARS, replaceWebsafe);\n  }\n  return str;\n}\n\n/**\n * Decodes base64 into a Uint8Array.\n *\n * Note that we can always use btoa/atob if we can use Uint8Array because\n * every browser that supports Uint8Array also supports them: see\n * https://caniuse.com/?search=Uint8Array and https://caniuse.com/atob-btoa\n *\n * @param {string} b64\n * @return {!Uint8Array}\n */\nfunction decodeByteArray(b64) {\n  // Without our flag, fall back to Closure's implementation.\n  if (!USE_ATOB_BTOA) {\n    return base64.decodeStringToUint8Array(b64);\n  }\n\n  // If this encoding used the websafe alphabet, we must convert it for atob\n  // to work. This is rare so we condition any replace operation on a regex\n  // match. One also presumes this will happen exclusively for URL mappings\n  // so they should also be relatively short.\n  //\n  // Note that atob natively handles missing padding so we do not need to\n  // handle that here.\n  let encoded = b64;\n  if (HANDLE_WEB_SAFE_ENCODINGS_WITH_ATOB_AND_BTOA) {\n    encoded = replaceWebsafeString(encoded);\n  }\n\n  // Convert b64 to binary string.\n  let /** string|undefined */ binary;\n  if (goog.DEBUG) {\n    try {\n      binary = atob(encoded);\n    } catch (e) {\n      throw new Error(`invalid encoding '${b64}': ${e}`);\n    }\n  } else /* if (!goog.DEBUG) */ {\n    binary = atob(encoded);\n  }\n\n  // Convert back from binary string to Uint8Array.\n  const u8 = new Uint8Array(binary.length);\n  for (let i = 0; i < binary.length; i++) {\n    u8[i] = binary.charCodeAt(i);\n  }\n  return u8;\n}\n\n\n/**\n * Coerce data of a 'bytes' field to a Uint8Array byte buffer.\n * Note that Uint8Array is not supported on IE versions before 10 nor on Opera\n * Mini. @see http://caniuse.com/Uint8Array\n * @param {string|!Uint8Array|null} value\n * @return {?Uint8Array} The field's coerced value.\n */\nfunction dataAsU8(value) {\n  if (value == null || isU8(value)) {\n    return /** @type {?Uint8Array} */ (value);\n  }\n  if (typeof value === 'string') {\n    return decodeByteArray(value);\n  }\n  fail('Cannot coerce to Uint8Array: ' + goog.typeOf(value));\n  return null;\n}\n\n/**\n * Returns whether the given value is a Uint8Array.\n * @param {*} value\n * @return {boolean}\n */\nfunction isU8(value) {\n  return SUPPORTS_UINT8ARRAY && value != null && value instanceof Uint8Array;\n}\n\n/** @return {boolean} */\nfunction uint8ArrayEquals(/** !Uint8Array */ a, /** !Uint8Array */ b) {\n  // Compare byte-by-byte.\n  //\n  // Note that we do not technically need to length-check since out-of-range\n  // subscripts will simply yield `undefined`; but that may result in some\n  // deoptimization.\n  const aLength = a.length;\n  if (aLength !== b.length) {\n    return false;\n  }\n  for (let i = 0; i < aLength; i++) {\n    if (a[i] !== b[i]) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * A token to check that internal only bytestring functions are only called by\n * internal functions.\n * @const\n */\nconst I_AM_INTERNAL = {};\n\n/** @define {boolean} */\nconst DISABLE_STRUCTURED_CLONE_FOR_TESTING =\n    goog.define('jspb.DISABLE_STRUCTURED_CLONE_FOR_TESTING', false);\n\n/**\n * Whether structuredClone is supported.\n * @const {boolean}\n */\nconst SUPPORTS_STRUCTURED_CLONE = !DISABLE_STRUCTURED_CLONE_FOR_TESTING &&\n    (goog.FEATURESET_YEAR > 2022 || typeof structuredClone != 'undefined');\n\nexports = {\n  I_AM_INTERNAL,\n  SUPPORTS_UINT8ARRAY,\n  SUPPORTS_STRUCTURED_CLONE,\n  encodeByteArray,\n  decodeByteArray,\n  dataAsU8,\n  isU8,\n  replaceWebsafeString,\n  uint8ArrayEquals,\n  USE_ATOB_BTOA,  // exported for tests.\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Defines for goog.labs.userAgent.\n */\n\ngoog.module('goog.labs.userAgent');\ngoog.module.declareLegacyNamespace();\n\nconst flags = goog.require('goog.flags');\n\n/**\n * @define {string} Optional runtime override for the USE_CLIENT_HINTS flag.\n * If this is set (for example, to 'foo.bar') then any value of USE_CLIENT_HINTS\n * will be overridden by `globalThis.foo.bar` if it is non-null.\n * This flag will be removed in December 2021.\n */\nconst USE_CLIENT_HINTS_OVERRIDE =\n    goog.define('goog.labs.userAgent.USE_CLIENT_HINTS_OVERRIDE', '');\n\n/**\n * @define {boolean} If true, use navigator.userAgentData.  Note: this overrides\n * the `USE_USER_AGENT_CLIENT_HINTS` runtime flag.  Please prefer the flag when\n * possible.\n */\nconst USE_CLIENT_HINTS =\n    goog.define('goog.labs.userAgent.USE_CLIENT_HINTS', false);\n\n/**\n * @define {boolean} If true, the flag USE_USER_AGENT_CLIENT_HINTS will be\n * ignored. The intent is to allow the unused code to be removed while\n * still allowing other projects to experiment via flags.  The defines\n * that control ClientHints usage should be simplified once ClientHints is\n * normalized or turned down in `goog.userAgent`.\n */\nconst IGNORE_CLIENT_HINTS_FLAG =\n    goog.define('goog.labs.userAgent.IGNORE_CLIENT_HINTS_FLAG', false);\n\nlet forceClientHintsInTests = false;\n\n/**\n * Sets whether to use client hints APIs in tests for codepaths that\n *  - were originally implemented as checks against the navigator.userAgent\n *    string.\n *  - have an alternative implementation that uses Client Hints APIs.\n *\n * See the jsdoc on useClientHints for cases where this flag will be\n * ineffective, and the Client Hints APIs would be used regardless.\n * DO NOT call this function in production code - it will cause de-optimization.\n * @param {boolean} use Whether or not to use Client Hints API codepaths in\n *     goog.labs.useragent.* modules.\n */\nexports.setUseClientHintsForTesting = (use) => {\n  forceClientHintsInTests = use;\n};\n\n/** @const {boolean} */\nconst useClientHintsRuntimeOverride = USE_CLIENT_HINTS_OVERRIDE ?\n    !!goog.getObjectByName(USE_CLIENT_HINTS_OVERRIDE) :\n    false;\n\n/**\n * Whether to use UserAgent-Client Hints API surfaces in parts of the\n * labs.userAgent package that previously only relied on the navigator.userAgent\n * string. Newer labs.userAgent API surfaces may ignore the result of this\n * function as they are considered opt-in API surfaces.\n * @const {function():boolean}\n */\nexports.useClientHints = () => {\n  return (!IGNORE_CLIENT_HINTS_FLAG && flags.USE_USER_AGENT_CLIENT_HINTS) ||\n      USE_CLIENT_HINTS || useClientHintsRuntimeOverride ||\n      forceClientHintsInTests;\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Closure user agent detection (Browser).\n * @see <a href=\"http://www.useragentstring.com/\">User agent strings</a>\n * For more information on rendering engine, platform, or device see the other\n * sub-namespaces in goog.labs.userAgent, goog.labs.userAgent.platform,\n * goog.labs.userAgent.device respectively.)\n */\n\ngoog.module('goog.labs.userAgent.browser');\ngoog.module.declareLegacyNamespace();\n\nconst util = goog.require('goog.labs.userAgent.util');\nconst {AsyncValue, Version} = goog.require('goog.labs.userAgent.highEntropy.highEntropyValue');\nconst {ChromiumRebrand} = goog.require('goog.labs.userAgent.chromiumRebrands');\nconst {assert, assertExists} = goog.require('goog.asserts');\nconst {compareVersions} = goog.require('goog.string.internal');\nconst {fullVersionList} = goog.require('goog.labs.userAgent.highEntropy.highEntropyData');\nconst {useClientHints} = goog.require('goog.labs.userAgent');\n\n// TODO(nnaze): Refactor to remove excessive exclusion logic in matching\n// functions.\n\n/**\n * A browser brand represents an opaque string that is used for making\n * brand-specific version checks in userAgentData.\n * @enum {string}\n */\nconst Brand = {\n  /**\n   * The browser brand for Android Browser.\n   * Do not depend on the value of this string. Because Android Browser has not\n   * implemented userAgentData yet, the value of this string is not guaranteed\n   * to stay the same in future revisions.\n   */\n  ANDROID_BROWSER: 'Android Browser',\n  /**\n   * The browser brand for Chromium, including Chromium-based Edge and Opera.\n   */\n  CHROMIUM: 'Chromium',\n  /**\n   * The browser brand for Edge.\n   * This brand can be used to get the version of both EdgeHTML and\n   * Chromium-based Edge.\n   */\n  EDGE: 'Microsoft Edge',\n  /**\n   * The browser brand for Firefox.\n   * Do not depend on the value of this string. Because Firefox has not\n   * implemented userAgentData yet, the value of this string is not guaranteed\n   * to stay the same in future revisions.\n   */\n  FIREFOX: 'Firefox',\n  /**\n   * The browser brand for Internet Explorer.\n   * Do not depend on the value of this string. Because IE will never support\n   * userAgentData, the value of this string should be treated as opaque (it's\n   * used internally for legacy-userAgent fallback).\n   */\n  IE: 'Internet Explorer',\n  /**\n   * The browser brand for Opera.\n   * This brand can be used to get the version of both Presto- and\n   * Chromium-based Opera.\n   */\n  OPERA: 'Opera',\n  /**\n   * The browser brand for Safari.\n   * Do not depend on the value of this string. Because Safari has not\n   * implemented userAgentData yet, the value of this string is not guaranteed\n   * to stay the same in future revisions.\n   */\n  SAFARI: 'Safari',\n  /**\n   * The browser brand for Silk.\n   * See\n   * https://docs.aws.amazon.com/silk/latest/developerguide/what-is-silk.html\n   * Do not depend on the value of this string. Because Silk does not\n   * identify itself in userAgentData yet, the value of this string is not\n   * guaranteed to stay the same in future revisions.\n   */\n  SILK: 'Silk',\n};\nexports.Brand = Brand;\n\n/** @typedef {(!Brand|!ChromiumRebrand)} */\nlet AllBrandsInternal;\n\n/**\n * All possible valid values to pass to various UACH Brand-accepting functions.\n * @typedef {(!Brand|!ChromiumRebrand)}\n */\nexports.AllBrands;\n\n/**\n * @param {boolean=} ignoreClientHintsFlag Iff truthy, the `useClientHints`\n *     function will not be called when evaluating if User-Agent Client Hints\n *     Brand data can be used. For existing labs.userAgent API surfaces with\n *     widespread use, this should be a falsy value so that usage of the Client\n *     Hints APIs can be gated behind flags / experiment rollouts.\n * @return {boolean} Whether to use navigator.userAgentData to determine\n * browser's brand.\n */\nfunction useUserAgentDataBrand(ignoreClientHintsFlag = false) {\n  if (util.ASSUME_CLIENT_HINTS_SUPPORT) return true;\n  // High-entropy API surfaces should not be gated behind the useClientHints\n  // check (as in production it is gated behind a define).\n  if (!ignoreClientHintsFlag && !useClientHints()) return false;\n  const userAgentData = util.getUserAgentData();\n  return !!userAgentData && userAgentData.brands.length > 0;\n}\n\n/**\n * @return {boolean} Whether this browser is likely to have the fullVersionList\n * high-entropy Client Hint.\n */\nfunction hasFullVersionList() {\n  // https://chromiumdash.appspot.com/commits?commit=1eb643c3057e64ff4d22468432ad16c4cab12879&platform=Linux\n  // indicates that for all platforms Chromium 98 shipped this feature.\n  // See also\n  // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-UA-Full-Version-List#browser_compatibility\n  return isAtLeast(Brand.CHROMIUM, 98);\n}\n\n/**\n * @return {boolean} Whether the user's browser is Opera. Note: Chromium based\n *     Opera (Opera 15+) is detected as Chrome to avoid unnecessary special\n *     casing.\n */\nfunction matchOpera() {\n  if (useUserAgentDataBrand()) {\n    // Pre-Chromium Edge doesn't support navigator.userAgentData.\n    return false;\n  }\n  return util.matchUserAgent('Opera');\n}\n\n/** @return {boolean} Whether the user's browser is IE. */\nfunction matchIE() {\n  if (useUserAgentDataBrand()) {\n    // IE doesn't support navigator.userAgentData.\n    return false;\n  }\n  return util.matchUserAgent('Trident') || util.matchUserAgent('MSIE');\n}\n\n/**\n * @return {boolean} Whether the user's browser is Edge. This refers to\n *     EdgeHTML based Edge.\n */\nfunction matchEdgeHtml() {\n  if (useUserAgentDataBrand()) {\n    // Pre-Chromium Edge doesn't support navigator.userAgentData.\n    return false;\n  }\n  return util.matchUserAgent('Edge');\n}\n\n/** @return {boolean} Whether the user's browser is Chromium based Edge. */\nfunction matchEdgeChromium() {\n  if (useUserAgentDataBrand()) {\n    return util.matchUserAgentDataBrand(Brand.EDGE);\n  }\n  return util.matchUserAgent('Edg/');\n}\n\n/** @return {boolean} Whether the user's browser is Chromium based Opera. */\nfunction matchOperaChromium() {\n  if (useUserAgentDataBrand()) {\n    return util.matchUserAgentDataBrand(Brand.OPERA);\n  }\n  return util.matchUserAgent('OPR');\n}\n\n/** @return {boolean} Whether the user's browser is Firefox. */\nfunction matchFirefox() {\n  // Firefox doesn't support navigator.userAgentData yet, so use\n  // navigator.userAgent.\n  return util.matchUserAgent('Firefox') || util.matchUserAgent('FxiOS');\n}\n\n/** @return {boolean} Whether the user's browser is Safari. */\nfunction matchSafari() {\n  // Apple-based browsers don't support navigator.userAgentData yet, so use\n  // navigator.userAgent.\n  return util.matchUserAgent('Safari') &&\n      !(matchChrome() || matchCoast() || matchOpera() || matchEdgeHtml() ||\n        matchEdgeChromium() || matchOperaChromium() || matchFirefox() ||\n        isSilk() || util.matchUserAgent('Android'));\n}\n\n/**\n * @return {boolean} Whether the user's browser is Coast (Opera's Webkit-based\n *     iOS browser).\n */\nfunction matchCoast() {\n  if (useUserAgentDataBrand()) {\n    // Coast doesn't support navigator.userAgentData.\n    return false;\n  }\n  return util.matchUserAgent('Coast');\n}\n\n/** @return {boolean} Whether the user's browser is iOS Webview. */\nfunction matchIosWebview() {\n  // Apple-based browsers don't support navigator.userAgentData yet, so use\n  // navigator.userAgent.\n  // iOS Webview does not show up as Chrome or Safari.\n  return (util.matchUserAgent('iPad') || util.matchUserAgent('iPhone')) &&\n      !matchSafari() && !matchChrome() && !matchCoast() && !matchFirefox() &&\n      util.matchUserAgent('AppleWebKit');\n}\n\n/**\n * @return {boolean} Whether the user's browser is any Chromium browser. This\n *     returns true for Chrome, Opera 15+, and Edge Chromium.\n */\nfunction matchChrome() {\n  if (useUserAgentDataBrand()) {\n    return util.matchUserAgentDataBrand(Brand.CHROMIUM);\n  }\n  return ((util.matchUserAgent('Chrome') || util.matchUserAgent('CriOS')) &&\n          !matchEdgeHtml()) ||\n      isSilk();\n}\n\n/** @return {boolean} Whether the user's browser is the Android browser. */\nfunction matchAndroidBrowser() {\n  // Android can appear in the user agent string for Chrome on Android.\n  // This is not the Android standalone browser if it does.\n  return util.matchUserAgent('Android') &&\n      !(isChrome() || isFirefox() || isOpera() || isSilk());\n}\n\n/** @return {boolean} Whether the user's browser is Opera. */\nconst isOpera = matchOpera;\nexports.isOpera = isOpera;\n\n/** @return {boolean} Whether the user's browser is IE. */\nconst isIE = matchIE;\nexports.isIE = isIE;\n\n/** @return {boolean} Whether the user's browser is EdgeHTML based Edge. */\nconst isEdge = matchEdgeHtml;\nexports.isEdge = isEdge;\n\n/** @return {boolean} Whether the user's browser is Chromium based Edge. */\nconst isEdgeChromium = matchEdgeChromium;\nexports.isEdgeChromium = isEdgeChromium;\n\n/** @return {boolean} Whether the user's browser is Chromium based Opera. */\nconst isOperaChromium = matchOperaChromium;\nexports.isOperaChromium = isOperaChromium;\n\n/** @return {boolean} Whether the user's browser is Firefox. */\nconst isFirefox = matchFirefox;\nexports.isFirefox = isFirefox;\n\n/** @return {boolean} Whether the user's browser is Safari. */\nconst isSafari = matchSafari;\nexports.isSafari = isSafari;\n\n/**\n * @return {boolean} Whether the user's browser is Coast (Opera's Webkit-based\n *     iOS browser).\n */\nconst isCoast = matchCoast;\nexports.isCoast = isCoast;\n\n/** @return {boolean} Whether the user's browser is iOS Webview. */\nconst isIosWebview = matchIosWebview;\nexports.isIosWebview = isIosWebview;\n\n/**\n * @return {boolean} Whether the user's browser is any Chromium based browser (\n *     Chrome, Blink-based Opera (15+) and Edge Chromium).\n */\nconst isChrome = matchChrome;\nexports.isChrome = isChrome;\n\n/** @return {boolean} Whether the user's browser is the Android browser. */\nconst isAndroidBrowser = matchAndroidBrowser;\nexports.isAndroidBrowser = isAndroidBrowser;\n\n/**\n * For more information, see:\n * http://docs.aws.amazon.com/silk/latest/developerguide/user-agent.html\n * @return {boolean} Whether the user's browser is Silk.\n */\nfunction isSilk() {\n  // As of Silk 93, Silk does not identify itself in userAgentData.brands.\n  // When Silk changes this behavior, update this method to call\n  // matchUserAgentDataBrand (akin to isChrome, etc.)\n  return util.matchUserAgent('Silk');\n}\nexports.isSilk = isSilk;\n\n/**\n * A helper function that returns a function mapping a list of candidate\n * version tuple keys to the first version string present under a key.\n * Ex:\n * <code>\n * // Arg extracted from \"Foo/1.2.3 Bar/0.2021\"\n * const mapVersion = createVersionMap([[\"Foo\", \"1.2.3\"], [\"Bar\", \"0.2021\"]]);\n * mapVersion([\"Bar\", \"Foo\"]); // returns \"0.2021\"\n * mapVersion([\"Baz\", \"Foo\"]); // returns \"1.2.3\"\n * mapVersion([\"Baz\", \"???\"]); // returns \"\"\n * </code>\n * @param {!Array<!Array<string>>} versionTuples Version tuples pre-extracted\n *     from a user agent string.\n * @return {function(!Array<string>): string} The version string, or empty\n * string if it doesn't exist under the given key.\n */\nfunction createVersionMap(versionTuples) {\n  // Construct a map for easy lookup.\n  const versionMap = {};\n  versionTuples.forEach((tuple) => {\n    // Note that the tuple is of length three, but we only care about the\n    // first two.\n    const key = tuple[0];\n    const value = tuple[1];\n    versionMap[key] = value;\n  });\n\n  // Gives the value with the first key it finds, otherwise empty string.\n  return (keys) => versionMap[keys.find((key) => key in versionMap)] || '';\n}\n\n/**\n * Returns the browser version.\n *\n * Note that for browsers with multiple brands, this function assumes a primary\n * brand and returns the version for that brand.\n *\n * Additionally, this function is not userAgentData-aware and will return\n * incorrect values when the User Agent string is frozen. The current status of\n * User Agent string freezing is available here:\n * https://www.chromestatus.com/feature/5704553745874944\n *\n * To mitigate both of these potential issues, use\n * getVersionStringForLogging() or fullVersionOf() instead.\n *\n * @return {string} The browser version or empty string if version cannot be\n *     determined. Note that for Internet Explorer, this returns the version of\n *     the browser, not the version of the rendering engine. (IE 8 in\n *     compatibility mode will return 8.0 rather than 7.0. To determine the\n *     rendering engine version, look at document.documentMode instead. See\n *     http://msdn.microsoft.com/en-us/library/cc196988(v=vs.85).aspx for more\n *     details.)\n */\nfunction getVersion() {\n  const userAgentString = util.getUserAgent();\n\n  // Special case IE since IE's version is inside the parenthesis and\n  // without the '/'.\n  if (isIE()) {\n    return getIEVersion(userAgentString);\n  }\n\n  const versionTuples = util.extractVersionTuples(userAgentString);\n  const lookUpValueWithKeys = createVersionMap(versionTuples);\n\n  // Check Opera before Chrome since Opera 15+ has \"Chrome\" in the string.\n  // See\n  // http://my.opera.com/ODIN/blog/2013/07/15/opera-user-agent-strings-opera-15-and-beyond\n  if (isOpera()) {\n    // Opera 10 has Version/10.0 but Opera/9.8, so look for \"Version\" first.\n    // Opera uses 'OPR' for more recent UAs.\n    return lookUpValueWithKeys(['Version', 'Opera']);\n  }\n\n  // Check Edge before Chrome since it has Chrome in the string.\n  if (isEdge()) {\n    return lookUpValueWithKeys(['Edge']);\n  }\n\n  // Check Chromium Edge before Chrome since it has Chrome in the string.\n  if (isEdgeChromium()) {\n    return lookUpValueWithKeys(['Edg']);\n  }\n\n  // Check Silk before Chrome since it may have Chrome in its string and be\n  // treated as Chrome.\n  if (isSilk()) {\n    return lookUpValueWithKeys(['Silk']);\n  }\n\n  if (isChrome()) {\n    return lookUpValueWithKeys(['Chrome', 'CriOS', 'HeadlessChrome']);\n  }\n\n  // Usually products browser versions are in the third tuple after \"Mozilla\"\n  // and the engine.\n  const tuple = versionTuples[2];\n  return tuple && tuple[1] || '';\n}\nexports.getVersion = getVersion;\n\n/**\n * Returns whether the current browser's version is at least as high as the\n * given one.\n *\n * Note that for browsers with multiple brands, this function assumes a primary\n * brand and checks the version for that brand.\n *\n * Additionally, this function is not userAgentData-aware and will return\n * incorrect values when the User Agent string is frozen. The current status of\n * User Agent string freezing is available here:\n * https://www.chromestatus.com/feature/5704553745874944\n *\n * To mitigate both of these potential issues, use isAtLeast()/isAtMost() or\n * fullVersionOf() instead.\n *\n * @param {string|number} version The version to check.\n * @return {boolean} Whether the browser version is higher or the same as the\n *     given version.\n * @deprecated Use isAtLeast()/isAtMost() instead.\n */\nfunction isVersionOrHigher(version) {\n  return compareVersions(getVersion(), version) >= 0;\n}\nexports.isVersionOrHigher = isVersionOrHigher;\n\n/**\n * A helper function to determine IE version. More information:\n * http://msdn.microsoft.com/en-us/library/ie/bg182625(v=vs.85).aspx#uaString\n * http://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx\n * http://blogs.msdn.com/b/ie/archive/2010/03/23/introducing-ie9-s-user-agent-string.aspx\n * http://blogs.msdn.com/b/ie/archive/2009/01/09/the-internet-explorer-8-user-agent-string-updated-edition.aspx\n * @param {string} userAgent the User-Agent.\n * @return {string}\n */\nfunction getIEVersion(userAgent) {\n  // IE11 may identify itself as MSIE 9.0 or MSIE 10.0 due to an IE 11 upgrade\n  // bug. Example UA:\n  // Mozilla/5.0 (MSIE 9.0; Windows NT 6.1; WOW64; Trident/7.0; rv:11.0)\n  // like Gecko.\n  // See http://www.whatismybrowser.com/developers/unknown-user-agent-fragments.\n  const rv = /rv: *([\\d\\.]*)/.exec(userAgent);\n  if (rv && rv[1]) {\n    return rv[1];\n  }\n\n  let version = '';\n  const msie = /MSIE +([\\d\\.]+)/.exec(userAgent);\n  if (msie && msie[1]) {\n    // IE in compatibility mode usually identifies itself as MSIE 7.0; in this\n    // case, use the Trident version to determine the version of IE. For more\n    // details, see the links above.\n    const tridentVersion = /Trident\\/(\\d.\\d)/.exec(userAgent);\n    if (msie[1] == '7.0') {\n      if (tridentVersion && tridentVersion[1]) {\n        switch (tridentVersion[1]) {\n          case '4.0':\n            version = '8.0';\n            break;\n          case '5.0':\n            version = '9.0';\n            break;\n          case '6.0':\n            version = '10.0';\n            break;\n          case '7.0':\n            version = '11.0';\n            break;\n        }\n      } else {\n        version = '7.0';\n      }\n    } else {\n      version = msie[1];\n    }\n  }\n  return version;\n}\n\n/**\n * A helper function to return the navigator.userAgent-supplied full version\n * number of the current browser or an empty string, based on whether the\n * current browser is the one specified.\n * @param {string} browser The brand whose version should be returned.\n * @return {string}\n */\nfunction getFullVersionFromUserAgentString(browser) {\n  const userAgentString = util.getUserAgent();\n  // Special case IE since IE's version is inside the parenthesis and\n  // without the '/'.\n  if (browser === Brand.IE) {\n    return isIE() ? getIEVersion(userAgentString) : '';\n  }\n\n  const versionTuples = util.extractVersionTuples(userAgentString);\n  const lookUpValueWithKeys = createVersionMap(versionTuples);\n  switch (browser) {\n    case Brand.OPERA:\n      // Opera 10 has Version/10.0 but Opera/9.8, so look for \"Version\"\n      // first. Opera uses 'OPR' for more recent UAs.\n      if (isOpera()) {\n        return lookUpValueWithKeys(['Version', 'Opera']);\n      } else if (isOperaChromium()) {\n        return lookUpValueWithKeys(['OPR']);\n      }\n      break;\n    case Brand.EDGE:\n      if (isEdge()) {\n        return lookUpValueWithKeys(['Edge']);\n      } else if (isEdgeChromium()) {\n        return lookUpValueWithKeys(['Edg']);\n      }\n      break;\n    case Brand.CHROMIUM:\n      if (isChrome()) {\n        return lookUpValueWithKeys(['Chrome', 'CriOS', 'HeadlessChrome']);\n      }\n      break;\n  }\n\n  // For the following browsers, the browser version is in the third tuple after\n  // \"Mozilla\" and the engine.\n  if ((browser === Brand.FIREFOX && isFirefox()) ||\n      (browser === Brand.SAFARI && isSafari()) ||\n      (browser === Brand.ANDROID_BROWSER && isAndroidBrowser()) ||\n      (browser === Brand.SILK && isSilk())) {\n    const tuple = versionTuples[2];\n    return tuple && tuple[1] || '';\n  }\n\n  return '';\n}\n\n/**\n * Returns the major version of the given browser brand, or NaN if the current\n * browser is not the given brand.\n * Note that the major version number may be different depending on which\n * browser is specified. The returned value can be used to make browser version\n * comparisons using comparison operators.\n * @private\n * @param {!AllBrandsInternal} browser The brand whose version should be\n *     returned.\n * @return {number} The major version number associated with the current\n * browser under the given brand, or NaN if the current browser doesn't match\n * the given brand.\n */\nfunction versionOf_(browser) {\n  let versionParts;\n  // Silk currently does not identify itself in its userAgentData.brands array,\n  // so if checking its version, always fall back to the user agent string.\n  if (useUserAgentDataBrand() && browser !== Brand.SILK) {\n    const data = util.getUserAgentData();\n    const matchingBrand = data.brands.find(({brand}) => brand === browser);\n    if (!matchingBrand || !matchingBrand.version) {\n      return NaN;\n    }\n    versionParts = matchingBrand.version.split('.');\n  } else {\n    const fullVersion = getFullVersionFromUserAgentString(browser);\n    if (fullVersion === '') {\n      return NaN;\n    }\n    versionParts = fullVersion.split('.');\n  }\n  if (versionParts.length === 0) {\n    return NaN;\n  }\n  const majorVersion = versionParts[0];\n  return Number(majorVersion);  // Returns NaN if it is not parseable.\n}\n\n/**\n * Returns true if the current browser matches the given brand and is at least\n * the given major version. The major version must be a whole number (i.e.\n * decimals should not be used to represent a minor version).\n * @param {!AllBrandsInternal} brand The brand whose version should be returned.\n * @param {number} majorVersion The major version number to compare against.\n *     This must be a whole number.\n * @return {boolean} Whether the current browser both matches the given brand\n *     and is at least the given version.\n */\nfunction isAtLeast(brand, majorVersion) {\n  assert(\n      Math.floor(majorVersion) === majorVersion,\n      'Major version must be an integer');\n  return versionOf_(brand) >= majorVersion;\n}\nexports.isAtLeast = isAtLeast;\n\n/**\n * Returns true if the current browser matches the given brand and is at most\n * the given version. The major version must be a whole number (i.e. decimals\n * should not be used to represent a minor version).\n * @param {!AllBrandsInternal} brand The brand whose version should be returned.\n * @param {number} majorVersion The major version number to compare against.\n *     This must be a whole number.\n * @return {boolean} Whether the current browser both matches the given brand\n *     and is at most the given version.\n */\nfunction isAtMost(brand, majorVersion) {\n  assert(\n      Math.floor(majorVersion) === majorVersion,\n      'Major version must be an integer');\n  return versionOf_(brand) <= majorVersion;\n}\nexports.isAtMost = isAtMost;\n\n/**\n * Loads the high-entropy browser brand/version data and wraps the correct\n * version string in a Version object.\n * @implements {AsyncValue<!Version>}\n */\nclass HighEntropyBrandVersion {\n  /**\n   * @param {string} brand The brand whose version is retrieved in this\n   *     container.\n   * @param {boolean} useUach Whether to attempt to use the User-Agent Client\n   *     Hints (UACH) API surface.\n   * @param {string} fallbackVersion The fallback version derived from the\n   *     userAgent string.\n   */\n  constructor(brand, useUach, fallbackVersion) {\n    /** @private @const {string} */\n    this.brand_ = brand;\n\n    /** @private @const {!Version} */\n    this.version_ = new Version(fallbackVersion);\n\n    /** @private @const {boolean} */\n    this.useUach_ = useUach;\n  }\n\n  /**\n   * @return {!Version|undefined}\n   * @override\n   */\n  getIfLoaded() {\n    if (this.useUach_) {\n      const loadedVersionList = fullVersionList.getIfLoaded();\n      if (loadedVersionList !== undefined) {\n        const matchingBrand =\n            loadedVersionList.find(({brand}) => this.brand_ === brand);\n        // We assumed in fullVersionOf that if the fullVersionList is defined\n        // the brands must match. Double-check this here.\n        assertExists(matchingBrand);\n        return new Version(matchingBrand.version);\n      }\n      // Fallthrough to fallback on Pre-UACH implementation\n    }\n    // We want to make sure the loading semantics of the Pre-UACH implementation\n    // match those of the UACH implementation. Loading must happen before any\n    // data can be retrieved from getIfLoaded.\n    // For HighEntropyBrandVersion, loading can either be done by calling #load\n    // or by calling the module-local loadFullVersions function.\n    if (preUachHasLoaded) {\n      return this.version_;\n    }\n    return;\n  }\n\n  /**\n   * @return {!Promise<!Version>}\n   * @override\n   */\n  async load() {\n    if (this.useUach_) {\n      const loadedVersionList = await fullVersionList.load();\n      if (loadedVersionList !== undefined) {\n        const matchingBrand =\n            loadedVersionList.find(({brand}) => this.brand_ === brand);\n        assertExists(matchingBrand);\n        return new Version(matchingBrand.version);\n      }\n      // Fallthrough to fallback on Pre-UACH implementation\n    } else {\n      // Await something so that calling load with or without UACH API\n      // availability results in waiting at least one macrotask before allowing\n      // access to the cached version information.\n      await 0;\n    }\n    // Regardless of whether we are using UACH APIs, we can now allow access to\n    // the fallback case\n    preUachHasLoaded = true;\n    return this.version_;\n  }\n}\n\n/**\n * Whether full version data should be considered available when using UACH\n * fallback implementations. This is flipped to true when either\n * loadFullVersions or HighEntropyBrandVersion.prototype.load are called,\n * matching the global singleton semantics of the UACH codepaths.\n */\nlet preUachHasLoaded = false;\n\n/**\n * Requests all full browser versions to be cached.  When the returned promise\n * resolves, subsequent calls to `fullVersionOf(...).getIfLoaded()` will return\n * a value.\n *\n * This method should be avoided in favor of directly awaiting\n * `fullVersionOf(...).load()` where it is used.\n *\n * @return {!Promise<void>}\n */\nasync function loadFullVersions() {\n  if (useUserAgentDataBrand(true)) {\n    await fullVersionList.load();\n  }\n  preUachHasLoaded = true;\n}\nexports.loadFullVersions = loadFullVersions;\n\n/**\n * Resets module-local caches used by functionality in this module.\n * This is only for use by goog.labs.userAgent.testUtil.resetUserAgent (and\n * labs.userAgent tests).\n * @package\n */\nexports.resetForTesting = () => {\n  preUachHasLoaded = false;\n  fullVersionList.resetForTesting();\n};\n\n\n/**\n * Returns an object that provides access to the full version string of the\n * current browser -- or undefined, based on whether the current browser matches\n * the requested browser brand. Note that the full version string is a\n * high-entropy value, and must be asynchronously loaded before it can be\n * accessed synchronously.\n * @param {!AllBrandsInternal} browser The brand whose version should be\n *     returned.\n * @return {!AsyncValue<!Version>|undefined} An object that can be used\n *     to get or load the full version string as a high-entropy value, or\n * undefined if the current browser doesn't match the given brand.\n */\nfunction fullVersionOf(browser) {\n  let fallbackVersionString = '';\n  // If we are reasonably certain now that the browser we are on has the\n  // fullVersionList high-entropy hint, then we can skip computing the fallback\n  // value as we won't end up using it.\n  if (!hasFullVersionList()) {\n    fallbackVersionString = getFullVersionFromUserAgentString(browser);\n  }\n  // Silk has the UACH API surface, but currently does not identify itself in\n  // the userAgentData.brands array. Fallback to using userAgent string version\n  // for Silk.\n  const useUach = browser !== Brand.SILK && useUserAgentDataBrand(true);\n  if (useUach) {\n    const data = util.getUserAgentData();\n    // Operate under the assumption that the low-entropy and high-entropy lists\n    // of brand/version pairs contain an identical set of brands. Therefore, if\n    // the low-entropy list doesn't contain the given brand, return undefined.\n    if (!data.brands.find(({brand}) => brand === browser)) {\n      return undefined;\n    }\n  } else if (fallbackVersionString === '') {\n    return undefined;\n  }\n  return new HighEntropyBrandVersion(browser, useUach, fallbackVersionString);\n}\nexports.fullVersionOf = fullVersionOf;\n\n\n/**\n * Returns a version string for the current browser or undefined, based on\n * whether the current browser is the one specified.\n * This value should ONLY be used for logging/debugging purposes. Do not use it\n * to branch code paths. For comparing versions, use isAtLeast()/isAtMost() or\n * fullVersionOf() instead.\n * @param {!AllBrandsInternal} browser The brand whose version should be\n *     returned.\n * @return {string} The version as a string.\n */\nfunction getVersionStringForLogging(browser) {\n  if (useUserAgentDataBrand(true)) {\n    const fullVersionObj = fullVersionOf(browser);\n    if (fullVersionObj) {\n      const fullVersion = fullVersionObj.getIfLoaded();\n      if (fullVersion) {\n        return fullVersion.toVersionStringForLogging();\n      }\n      // No full version, return the major version instead.\n      const data = util.getUserAgentData();\n      const matchingBrand = data.brands.find(({brand}) => brand === browser);\n      // Checking for the existence of matchingBrand is not necessary because\n      // the existence of fullVersionObj implies that there is already a\n      // matching brand.\n      assertExists(matchingBrand);\n      return matchingBrand.version;\n    }\n    // If fullVersionObj is undefined, this doesn't mean that the full version\n    // is unavailable, but rather that the current browser doesn't match the\n    // input `browser` argument.\n    return '';\n  } else {\n    return getFullVersionFromUserAgentString(browser);\n  }\n}\nexports.getVersionStringForLogging = getVersionStringForLogging;\n","/**\n * @fileoverview ByteString class for encapsulating bytes fields.\n */\n\ngoog.module('jspb.bytestring');\n\nconst {I_AM_INTERNAL, SUPPORTS_STRUCTURED_CLONE, dataAsU8, encodeByteArray, uint8ArrayEquals} = goog.require('jspb.internal_bytes');\nconst {assert, assertExists, assertInstanceof, assertNumber, assertString} = goog.require('goog.asserts');\nconst {decodeUtf8, encodeUtf8} = goog.require('jspb.binary.utf8');\n\n/**\n * Encapsulation of a bytes field.\n *\n * Use the factory methods below to construct a ByteString.\n *\n * @final\n * @struct\n */\nclass ByteString {\n\n  /**\n   * Constructs a ByteString instance from a base64 string, per RFC 4648 section\n   * 4.\n   * @return {!ByteString}\n   */\n  static fromBase64(/** string */ value) {\n    assertString(value);\n    return value ? new ByteString(value, I_AM_INTERNAL) : ByteString.empty();\n  }\n\n  /**\n   * Constructs a ByteString from a Uint8Array or Array of numbers.\n   *\n   * Makes a copy of the parameter.\n   *\n   * When passed an array of numbers, values will be truncated to be integers\n   * and then their value mod 2^8 will be preserved.\n   *\n   * See https://tc39.es/ecma262/multipage/abstract-operations.html#sec-touint8\n   *\n   * @return {!ByteString}\n   */\n  static fromUint8Array(/** !Uint8Array|!Array<number> */ value) {\n    assert(value instanceof Uint8Array || Array.isArray(value));\n    return value.length ? new ByteString(new Uint8Array(value), I_AM_INTERNAL) :\n                          ByteString.empty();\n  }\n\n  /**\n   * Constructs a ByteString from an Uint8Array by transferring it.\n   *\n   * See\n   * https://developer.mozilla.org/en-US/docs/Glossary/Transferable_objects#transferring_during_a_cloning_operation\n   * for a definition.\n   *\n   * This means no copy is made, and the passed in reference will become empty.\n   *\n   * This method is `async` but should generally be quite fast with just one or\n   * two ticks for the promise to resolve.  The implementation depends on the\n   * particular browser APIs that are available so no performance guarantees can\n   * be offered, however, in general this is only valuable for 'larger' buffers\n   * (>1K).\n   *\n   * If you cannot tolerate async, consider using\n   * `transferUint8ArrayToByteString` from `transfer_uint8array.ts` instead,\n   * though note that it is not as safe against mutations of the underlying\n   * data, and its attempted destruction of the original array in DEBUG mode is\n   * not total.\n   *\n   * BROWSER COMPATIBILITY WARNING:\n   * - This function does not work in Internet Explorer (any version)\n   *    - The root issue is a failure to adhere to the MessagePort standard see\n   * https://docs.microsoft.com/en-us/openspecs/ie_standards/ms-webmsg/5ea08d27-1111-1111-8459-7772c6694439\n   * - This function does not support node versions < 15 because the\n   * MessageChannel API was not implemented\n   *\n   * @return {!Promise<!ByteString>}\n   */\n  static async fromTransferredUint8Array(/** !Uint8Array */ array) {\n    assertInstanceof(array, Uint8Array);\n    return array.length ?\n        new ByteString(\n            await structuredClonePonyfill(array, [array.buffer]),\n            I_AM_INTERNAL) :\n        ByteString.empty();\n  }\n\n  /**\n   * Encodes `text` into a sequence of UTF-8 bytes and returns the result as a\n   * `ByteString`.\n   * @return {!ByteString}\n   */\n  static fromStringUtf8(/** string */ text) {\n    assertString(text);\n    return text.length ?\n        new ByteString(\n            encodeUtf8(text, /* rejectUnpairedSurrogates=*/ true),\n            I_AM_INTERNAL) :\n        ByteString.empty();\n  }\n\n  /**\n   * Constructs a ByteString from a Blob.\n   *\n   * It is async because Blob does not provide sync access to its data.\n   *\n   * BROWSER COMPATIBILITY WARNING:\n   * This method uses Blob.arrayBuffer() to access Blob's content and therefore\n   * is compatible with browsers supporting this API, which is any release 2021\n   * and later. See http://go/mdn/API/Blob/arrayBuffer for the full\n   * compatibility list.\n   * @return {!Promise<!ByteString>}\n   */\n  static async fromBlob(/** !Blob */ blob) {\n    assertInstanceof(blob, Blob);\n    if (blob.size === 0) return ByteString.empty();\n    const data = await blob.arrayBuffer();\n    return new ByteString(new Uint8Array(data), I_AM_INTERNAL);\n  }\n\n  /**\n   * Returns the empty ByteString.\n   * @return {!ByteString}\n   */\n  static empty() {\n    return emptyByteString ||\n        (emptyByteString = new ByteString(null, I_AM_INTERNAL));\n  }\n\n  /**\n   * Returns this ByteString as a base64 encoded string, per RFC 4648 section 4.\n   * @return {string}\n   */\n  asBase64() {\n    const value = this.value_;\n    if (value == null) {\n      return '';\n    }\n    if (typeof value === 'string') {\n      return value;\n    }\n    return this.value_ = encodeByteArray(value);\n  }\n\n  /**\n   * Returns this ByteString as a Uint8Array. This makes a copy and returns a\n   * new Uint8Array.\n   * @return {!Uint8Array}\n   */\n  asUint8Array() {\n    return new Uint8Array(this.internalBytesUnsafe(I_AM_INTERNAL) || 0);\n  }\n\n  /**\n   * Returns true if the ByteString is empty.\n   * @return {boolean}\n   */\n  isEmpty() {\n    return this.value_ == null;\n  }\n\n  /**\n   * Returns the size of the byte string in bytes.\n   *\n   * If you are only interested in whether or not the ByteString is empty, call\n   * `isEmpty` which is always faster.\n   *\n   * @return {number}\n   */\n  sizeBytes() {\n    const bytes = this.internalBytesUnsafe(I_AM_INTERNAL);\n    return bytes ? bytes.length : 0;\n  }\n\n  /**\n   * Returns the numeric value of the _unsigned_ byte at the given index.\n   * @return {number}\n   */\n  unsignedByteAt(/** number */ index) {\n    assertNumber(index);\n    assert(index >= 0, 'index %s should be non-negative', index);\n    const bytes = this.internalBytesUnsafe(I_AM_INTERNAL);\n    assert(\n        index < bytes.length, 'index %s must be less than %s', index,\n        bytes.length);\n    return bytes[index];\n  }\n\n  /**\n   * Returns the numeric value of the byte at the given index as a _signed_ byte\n   * value in the range [-128,127]\n   * @return {number}\n   */\n  signedByteAt(/** number */ index) {\n    const unsignedByte = this.unsignedByteAt(index);\n    // Bit operators are 'signed 32 bit' operators by default.\n    // First left shift so the sign-bit if it exists is in the 32 bit signed\n    // location\n    // Then, right shift back into the lower 8 bits to recover the now signed\n    // value.\n    return (unsignedByte << 24) >> 24;\n  }\n\n  /**\n   * Returns a string by decoding the bytes as UTF-8.\n   * @param {{parsingErrorsAreFatal:boolean}=} opts an options bag.  The\n   *     `parsingErrorsAreFatal` option controls if invalid utf8 bytes should be\n   *     a runtime error (if `true`) or if they should be replaced with the\n   *     replacement character `\\ufffd` (if `false`), the default is to throw.\n   * @return {string}\n   */\n  asStringUtf8({parsingErrorsAreFatal = true} = {}) {\n    const bytes = this.internalBytesUnsafe(I_AM_INTERNAL);\n    return bytes ? decodeUtf8(bytes, 0, bytes.length, parsingErrorsAreFatal) :\n                   '';\n  }\n\n  /**\n   * Returns the field as a Blob. This is a copy of the internal data.\n   *\n   * @param {?BlobPropertyBag=} options An object which may specify Blob\n   *     properties.\n   * @return {!Blob}\n   */\n  asBlob(options) {\n    const bytes = this.internalBytesUnsafe(I_AM_INTERNAL);\n    return bytes ? new Blob([bytes], options) : new Blob([], options);\n  }\n\n  /**\n   * Returns the internals as a unint8array or a base64 encoded string\n   *\n   * This operation is only useful for legacy usecases and explicit typed access\n   * via `asBase64` or `asStringUtf8` or `asUint8Array` should be strongly\n   * preferred.\n   *\n   * @return {!Uint8Array|string}\n   */\n  legacyUnwrap() {\n    const v = this.value_ || '';\n    return typeof v === 'string' ? v : new Uint8Array(v);\n  }\n\n  /**\n   * Returns whether this ByteString is equivalent to another.\n   *\n   * This is called equalsByteString to make property disambiguation easier, and\n   * to support potential addition of equalsB64 and equalsU8.\n   *\n   * @param {!ByteString} other another ByteString\n   * @return {boolean} whether these ByteStrings are equivalent.\n   */\n  equalsByteString(other) {\n    assertInstanceof(other, ByteString);\n\n    // First try ===, which will be faster than other equality mechanisms.\n    if (!this.value_ || !other.value_ || this.value_ === other.value_) {\n      return this.value_ === other.value_;\n    }\n\n    // If this both are strings, we need to compare byte-by-byte. According to\n    // go/jspb-wire-format-details#bytes they must both be DEFAULT-alphabet\n    // base64 strings but may or may not have padding.\n    if (((typeof this.value_) === 'string') &&\n        ((typeof other.value_) === 'string')) {\n      let longer = this.value_;\n      let shorter = other.value_;\n      if (other.value_.length > this.value_.length) {\n        shorter = this.value_;\n        longer = other.value_;\n      }\n\n      // TODO(b/219090321): inline goog.string.startsWith once YT's force_rtl\n      // doesn't fail on a changed load order.\n      if (longer.lastIndexOf(shorter, 0) !== 0) {\n        return false;\n      }\n\n      // The remaining characters should be padding.\n      for (let i = shorter.length; i < longer.length; i++) {\n        if (longer[i] !== '=') {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    // Otherwise, we convert to Uint8Array and compare that way. It is typically\n    // faster to base64-encode; but that can significantly increase GC pressure.\n    const thisUint8Array =\n        assertExists(this.internalBytesUnsafe(I_AM_INTERNAL));\n    const otherUint8Array =\n        assertExists(other.internalBytesUnsafe(I_AM_INTERNAL));\n    return uint8ArrayEquals(thisUint8Array, otherUint8Array);\n  }\n\n  /**\n   * Internal only for access to the bytes in a zero copy fashion.\n   *\n   * See `unsafe_bytestring.js` for how to access this API.\n   * @param {*} areYouInternal\n   * @return {?Uint8Array}\n   * @package\n   */\n  internalBytesUnsafe(areYouInternal) {\n    checkAllowedCaller(areYouInternal);\n    const u8 = dataAsU8(this.value_);\n    return (u8 == null) ? u8 : (this.value_ = u8);\n  }\n\n  /**\n   * Internal only for access to the internals state of the bytestring, in a\n   * zero copy fashion.\n   *\n   * See `unsafe_bytestring.js` for how to access this API.\n   * @param {*} areYouInternal\n   * @return {string|!Uint8Array}\n   * @package\n   */\n  internalUnwrap(areYouInternal) {\n    checkAllowedCaller(areYouInternal);\n    return this.value_ || '';\n  }\n\n  /**\n   * An internal only method for comparing this bytestring with an unknown\n   * value.\n   * @private should be package but since TS doesn't support that we need to use\n   *     private\n   * @return {boolean}\n   */\n  internalCompareEqualsDoNotUse(/** ? */ value) {\n    let /**!ByteString*/ other;\n    if (typeof value === 'string') {\n      other = ByteString.fromBase64(value);\n    } else if (value instanceof Uint8Array) {\n      // zero copy is ok since this is a temporary.  If we ever start\n      // returning the bytestring we should copy\n      other = new ByteString(/** @type {!Uint8Array} */ (value), I_AM_INTERNAL);\n    } else if (value instanceof ByteString) {\n      other = value;\n    } else {\n      return false;\n    }\n    return this.equalsByteString(other);\n  }\n\n  /**\n   * INTERNAL USE ONLY: Clients should use the factory functions above.\n   * @param {!Uint8Array|string|null} value Base64 string or Uint8Array. If\n   *     null, this is an empty array.\n   * @param {*} areYouInternal\n   * @package\n   */\n  constructor(value, areYouInternal) {\n    checkAllowedCaller(areYouInternal);\n\n    /**\n     * This value is either a Uint8Array or a string, or else `null` for an\n     * empty byte string.\n     *\n     * @private {!Uint8Array|string|null}\n     */\n    this.value_ = value;\n\n    if (value != null && value.length === 0) {\n      throw new Error('ByteString should be constructed with non-empty values');\n    }\n\n    // Prevent passing ByteStrings to structured clone interfaces.\n    if (goog.DEBUG) {\n      /** @type {!Object} */ (this)['dontPassByteStringToStructuredClone'] =\n          dontPassByteStringToStructuredClone;\n    }\n  }\n}\n\n\n/** @type {!ByteString|undefined} */\nlet emptyByteString;\n\n/**\n * @param {*} areYouInternal\n */\nfunction checkAllowedCaller(areYouInternal) {\n  if (areYouInternal !== I_AM_INTERNAL) {\n    throw new Error('illegal external caller');\n  }\n}\n\n/**\n * @param {T} obj\n * @param {!Array<!Transferable>} transfer\n * @return {!Promise<T>}\n * @template T\n */\nasync function structuredCloneBasedOnMessageChannel(obj, transfer) {\n  return new Promise((resolve, reject) => {\n    const channel = new MessageChannel();\n    channel.port2.onmessage = (/** !MessageEvent<*> */ e) => {\n      resolve(e.data);\n    };\n    try {\n      channel.port1.postMessage(obj, transfer);\n    } catch (e) {\n      reject(e);\n    }\n  });\n}\n\n/**\n * @param {T} obj\n * @param {!Array<!Transferable>} transfer\n * @return {!Promise<T>}\n * @template T\n */\nconst structuredClonePonyfill =\n    // It is kind of weird to target the future, but all the browsers that we\n    // track with featureset year have already released this feature in 2022 so\n    // it should be safe to rely on come 2023.\n    SUPPORTS_STRUCTURED_CLONE ?\n    (obj, transfer) =>\n        Promise.resolve(structuredClone(obj, {'transfer': transfer})) :\n    structuredCloneBasedOnMessageChannel;\n\n\n/**\n * Indicates to J2CL that equals and hashCode should be available.\n *\n * @private will only be called via interface from j2cl\n * @const {*}\n */\nByteString.prototype.equalsAndHashCodeShouldBeAvailable = 1;\n\n/**\n * Set as a property of the ByteString to prevent passing it over a\n * structured clone interface, which will break and cannot be made to work.\n *\n * If you need to use postMessage etc. with Apps JSPB, please transmit byte\n * strings via base64 (`.asBase64`) or as a `Uint8Array` (`.asUint8Array`).\n */\nfunction dontPassByteStringToStructuredClone() {}\n\n\nexports = {ByteString};\n","/**\n * @fileoverview Exception types thrown by Apps JSPB.\n *\n * Apps JSPB throws exceptions in the following contexts:\n *\n * - Internal assertions, which are typically state consistency checks that\n *   should never be violated.\n *\n * - Ordinary state exceptions, which can happen in certain obviously invalid\n *   circumstances. These are not handled by this library.\n *\n * - Type errors in setters, which are an ordinary `throw` statement but have\n *   a severity label indicating them as warnings. This is mostly for historical\n *   reasons now.\n *\n * - Asynchronous warnings, which are asynchronously thrown errors with a\n *   severity label indicating them as not important for error reporting\n *   ('incident'). They are typically picked up by eye3 (or AfterAll failures)\n *   for a 'soft' reporting mechanism that does not interrupt program execution.\n *\n * We use asynchronous warnings extensively when we _want_ to make something\n * a failure but have some expectation that it could happen in production.\n *\n * Applications that cannot receive asynchronous warnings automatically through\n * global error handlers (e.g. because they are embedded in another page) can\n * use `registerErrorHandler` to register their own interceptor.\n *\n * See go/ws-jserror-severity-guidance for context on the usage of severity\n * labels for docs reporting.\n */\n\ngoog.module('jspb.exceptions');\n\nconst asyncThrow = goog.require('goog.async.throwException');\nconst errorcontext = goog.require('goog.debug.errorcontext');\n\n/**\n * Throttle key storage for global errors or situations where a message\n * constructor is not available.\n *\n * @private @type {!Object|undefined}\n */\nlet globalThrottles = goog.DEBUG ? {} : undefined;\n\n/**\n * The registered error handler to be called whenever JSPB will throw (or\n * async-throw) an error.\n * @private @type {(function(!Error):void)|undefined}\n */\nlet errorHandler;\n\n/**\n * Allows client teams to register a callback called whenever JSPB runtime would\n * throw or async-throw an error.\n * @param {function(!Error):void} handler\n */\nfunction registerErrorHandler(handler) {\n  if (errorHandler) {\n    throw new Error(goog.DEBUG ? 'errorHandler already set!' : '');\n  }\n  errorHandler = (warning) => {\n    goog.global.setTimeout(() => {\n      handler(warning);\n    }, 0);\n  };\n}\n\n/**\n * Allows client teams to register an **execution-interrupting** callback called\n * whenever JSPB runtime would throw or async-throw an error.\n *\n * @param {function(!Error):void} handler\n */\nfunction registerSynchronousErrorHandler(handler) {\n  if (errorHandler) {\n    throw new Error(goog.DEBUG ? 'errorHandler already set!' : '');\n  }\n  errorHandler = handler;\n}\n\n/**\n * Removes any registered error handler. Only for use in testing. JSPB clients\n * should call this via 'jspb.testing.errorhandler.removeErrorHandler()'.\n */\nfunction removeErrorHandler() {\n  if (!goog.DEBUG) throw new Error();\n  errorHandler = undefined;\n}\n\n/**\n * Runs the registered error handler (if any) on the given Error.\n * @param {!Error} err\n */\nfunction runErrorHandler(err) {\n  if (!errorHandler) return;\n  try {\n    errorHandler(err);\n  } catch (e) {\n    e.cause = err;\n    throw e;\n  }\n}\n\n/**\n * Asynchronously throw an error to flag production issues to users via systems\n * like eye3.\n *\n * @param {string=} msg\n */\nfunction asyncThrowWarning(msg) {\n  const warning = makeTypeWarning(msg);\n  if (!errorHandler) {\n    asyncThrow(warning);\n    return;\n  }\n  runErrorHandler(warning);\n}\n\n/**\n * Creates an error to be thrown from Apps JSPB type checking.\n * @return {!Error}\n */\nfunction makeTypeError(/** string= */ message) {\n  const error = new Error(message);\n  errorcontext.addErrorContext(error, 'severity', 'warning');\n  runErrorHandler(error);\n  return error;\n}\n\n/**\n * An asynchronously thrown error used to test the addition of type checks.\n * @return {!Error}\n */\nfunction makeTypeWarning(/** string= */ message) {\n  const error = goog.DEBUG ? new Error(message) : new Error();\n  errorcontext.addErrorContext(error, 'severity', 'incident');\n  return error;\n}\n\n/**\n * @param {?} msg\n * @param {symbol|string} throttleKey\n * @param {number} limit\n * @param {string=} error\n */\nfunction throttledAsyncThrowWarning(msg, throttleKey, limit, error) {\n  // Emit a warning at most limit times per type.\n  if (throttleKey == null) {\n    return;\n  }\n\n  let throttleHandle;\n  if (msg == null) {\n    throttleHandle = (globalThrottles ??= {});\n  } else {\n    throttleHandle = msg.constructor;\n  }\n\n  const count = throttleHandle[throttleKey] || 0;\n  if (count >= limit) {\n    return;\n  }\n\n  throttleHandle[throttleKey] = count + 1;\n  asyncThrowWarning(error);\n}\n\n/**\n * Test-only exports of functions in this module.\n * @const {{\n *   globalThrottles: ?,\n *   makeTypeWarning: typeof makeTypeWarning,\n *   removeErrorHandler: typeof removeErrorHandler,\n * }}\n */\nconst TESTONLY = {\n  globalThrottles,\n  makeTypeWarning,\n  removeErrorHandler,\n};\n\nexports = {\n  asyncThrowWarning,\n  makeTypeError,\n  registerErrorHandler,\n  registerSynchronousErrorHandler,\n  throttledAsyncThrowWarning,\n\n  TESTONLY,\n};","/**\n * @fileoverview Internal options for JSPB.\n *\n * DO NOT USE THIS OUTSIDE OF javascript/apps/jspb/.\n */\n\ngoog.module('jspb.internal_options');\n\nconst {JSPB_DESERIALIZE_BINARY_INT64S_AS_GBIGINT, JSPB_THROW_IN_ARRAY_CONSTRUCTOR_IF_ARRAY_IS_ALREADY_CONSTRUCTED, JSPB_WRITE_BACK_BIGINT} = goog.require('goog.flags');\nconst {assertBoolean} = goog.require('goog.asserts');\n\n/**\n * @define {boolean} Whether we should disable subclasses of native Maps\n *    for testing.\n */\nconst DISABLE_ES6_MAP_SUBCLASSES_FOR_TESTING =\n    goog.define('jspb.DISABLE_ES6_MAP_SUBCLASSES_FOR_TESTING', false);\n\n\n/**\n * @define {boolean} BigInt is part of ES2020 version, and was included in\n *     closure compiler's Feature Set Year 2021.\n * See also https://github.com/google/closure-compiler/wiki/BigInt-support\n *\n * Note: Do not use this constant directly; use isBigIntAvailable(), which\n * checks if BigInt is supported on this platform.\n */\nconst ALLOW_BIG_INT = goog.define('jspb.ALLOW_BIG_INT', true);\n\n/**\n * @return {boolean} True if BigInt is permitted for use and supported by the\n *     platform.\n * @nosideeffects\n */\nfunction isBigIntAvailable() {\n  return ALLOW_BIG_INT &&\n      (goog.FEATURESET_YEAR >= 2021 || (typeof BigInt === 'function'));\n}\n\n\n/**\n * Whether to throw in the message constructor if a data array\n *     is passed in and the array already belongs to a different proto instance.\n * @return {boolean}\n */\nfunction shouldThrowInArrayConstructorIfArrayIsAlreadyConstructed() {\n  return JSPB_THROW_IN_ARRAY_CONSTRUCTOR_IF_ARRAY_IS_ALREADY_CONSTRUCTED;\n}\n\n/**\n * @define {boolean} Whether to throw in the message constructor if a data array\n *     is passed in and the array already belongs to a different proto instance.\n */\nconst SHOULD_TRANSFER_ARRAY_IN_CONSTRUCTOR =\n    goog.define('jspb.Message.SHOULD_TRANSFER_ARRAY_IN_CONSTRUCTOR', false);\n\n/**\n * Whether to throw in the message constructor if a data array\n *     is passed in and the array already belongs to a different proto instance.\n * @return {boolean}\n */\nfunction shouldTransferArrayInConstructor() {\n  return SHOULD_TRANSFER_ARRAY_IN_CONSTRUCTOR;\n}\n\n\n\n/** @enum {number} */\nconst CheckLevel = {\n  OFF: 0,\n  ASYNC_THROW: 1,\n  THROW: 2,\n};\n\n\n/**\n * Controls whether or not we enforce that the types of 32-bit int fields\n * (int32, uint32, ...) are correct.\n *\n * @type {!CheckLevel}\n */\nlet typeCheck32BitIntFields = CheckLevel.THROW;\n\n/**\n * Returns whether a 32-bit int field (int32, uint32, ...) field type checks\n * should be skipped.\n * @return {!CheckLevel}\n */\nfunction getTypeCheck32BitIntFields() {\n  return typeCheck32BitIntFields;\n}\n\n/**\n * TODO(b/235619036): Delete this setter\n */\nfunction setTypeCheck32BitIntFields(/** !CheckLevel */ value) {\n  typeCheck32BitIntFields = value;\n}\n\n/**\n * Controls whether we coerce 64-bit int strings according to jstype.\n * Originally, number-shaped enforcement was an aspect of this flag, but it\n * has been split off into typeCheck64BitIntFieldsAreNumberShaped, which is a\n * precondition.\n *\n * @type {boolean}\n */\nlet typeCheck64BitIntFields = goog.DEBUG;\n\n/**\n * Returns 64-bit int field values should be coerced according to jstype.\n * @param {boolean} forceTypeChecking\n * @return {boolean}\n */\nfunction getTypeCheck64BitIntFields(forceTypeChecking) {\n  return forceTypeChecking || typeCheck64BitIntFields;\n}\n\n/**\n * Historically, typeCheck64BitIntFields covered both number-shaped validation\n * and type coercion according to jstype (implicit or otherwise). However, we\n * decided to separate the two and now the flag only covers the coercion aspect.\n *\n * This alias is just for code readability within the runtime. External\n * facing code will continue to use the old name since it's tied to the\n * test exemptions.\n */\nconst shouldCoerce64BitIntFieldsByJsType = getTypeCheck64BitIntFields;\nconst setShouldCoerce64BitIntFieldsByJsType = setTypeCheck64BitIntFields;\n\n/**\n * TODO(b/169076588): Delete this setter\n */\nfunction setTypeCheck64BitIntFields(/** boolean */ value) {\n  assertBoolean(value);\n  typeCheck64BitIntFields = value;\n}\n\n/**\n * Controls whether or not we range check that 64-bit int values fall\n * within the appropriate (un)signed range for their field type. Values outside\n * of the range will be truncated via two's complement.\n * @type {boolean}\n */\nlet typeCheck64BitIntFieldsAreInRange = true;\n\n/**\n * Returns whether a 64-bit int field (int64, uint64, ...) fields should\n * be range checked and truncated if necessary.\n *\n * @param {boolean} forceTypeChecking\n * @return {boolean}\n */\nfunction getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking) {\n  return forceTypeChecking || typeCheck64BitIntFieldsAreInRange;\n}\n\n/**\n * TODO(b/169076588): Delete this setter\n */\nfunction setTypeCheck64BitIntFieldsAreInRange(/** boolean*/ value) {\n  assertBoolean(value);\n  typeCheck64BitIntFieldsAreInRange = value;\n}\n\n/**\n * Controls whether to async throw when the advertised return type of a\n * 64-bit int accessor does not match the actual value's type. For example, if\n * an int64 getter is typed as returning `number`, but actual runtime value is a\n * `string`.\n *\n * This check is temporary as part of the migration to gbigint. The goal is to\n * help us identify what type getter callers actual use in their applications so\n * that we can later apply caller-side type coercions.\n */\nlet asyncThrowIf64BitIntReturnTypeMismatches = false;\n\n/**\n * Returns true if we should async throw when the advertised return type of a\n * 64-bit int accessor does not match the actual value's type.\n * @return {boolean}\n */\nfunction getAsyncThrowIf64BitIntReturnTypeMismatches() {\n  return asyncThrowIf64BitIntReturnTypeMismatches;\n}\n\n/**\n * @param {boolean} value\n */\nfunction setAsyncThrowIf64BitIntReturnTypeMismatches(value) {\n  asyncThrowIf64BitIntReturnTypeMismatches = value;\n}\n\n\n/**\n * Controls whether or not we enforce that the types of enum fields are\n * correct.\n *\n * @type {!CheckLevel}\n */\nlet typeCheckEnumFields = CheckLevel.THROW;\n\n/**\n * Returns whether enum field type checks should be skipped.\n * @return {!CheckLevel}\n */\nfunction getTypeCheckEnumFields() {\n  return typeCheckEnumFields;\n}\n\n/**\n * Enables or disables enum field type-checking.\n *\n * This should be called as little as possible, only for legacy usages.\n */\n// TODO(b/235621146): Delete this setter\nfunction setTypeCheckEnumFields(/** !CheckLevel */ value) {\n  typeCheckEnumFields = value;\n}\n\n\n/** @define {boolean} */\nconst USE_DETAILED_MESSAGE_TYPE_HIERARCHY = goog.define(\n    'jspb.Message.USE_DETAILED_MESSAGE_TYPE_HIERARCHY',\n    goog.DEBUG && !COMPILED);\n\n/** @define {boolean} */\nconst DETAILED_JSPB_ASSERTS =\n    goog.define('jspb.Message.DETAILED_JSPB_ASSERTS', false);\n\n/** @define {boolean} */\nconst UNSAFE_DISABLE_JSPB_ANY_TYPE_CHECKS =\n    goog.define('jspb.Message.UNSAFE_DISABLE_JSPB_ANY_TYPE_CHECKS', false);\n\n/**\n * Controls whether or not we enforce that the types of any fields are\n * correct.\n *\n * @type {boolean}\n */\n// TODO(b/261991676): burn down\nlet unsafeDisableJspbAnyTypeChecks = false;\n\n/**\n * Returns whether string field type checks should be skipped.\n * @return {boolean}\n */\nfunction getUnsafeDisableJspbAnyTypeChecks() {\n  return UNSAFE_DISABLE_JSPB_ANY_TYPE_CHECKS || unsafeDisableJspbAnyTypeChecks;\n}\n\n/** Sets whether we should disable any type checks. */\nfunction setUnsafeDisableJspbAnyTypeChecks(/** boolean */ value) {\n  assertBoolean(value);\n  unsafeDisableJspbAnyTypeChecks = value;\n}\n\n/** @define {boolean} */\nconst CHECK_EQUALS_CONSISTENT_WITH_HASH_CODE = goog.define(\n    'jspb.CHECK_EQUALS_CONSISTENT_WITH_HASH_CODE', goog.DEBUG && !COMPILED);\n\n/** @type {boolean} */\nlet checkEqualsConsistentWithHashCode = CHECK_EQUALS_CONSISTENT_WITH_HASH_CODE;\n\n/**\n * Returns whether we should check that `equals` is consistent with `hashCode`.\n * @return {boolean}\n */\nfunction getCheckEqualsConsistentWithHashCode() {\n  return CHECK_EQUALS_CONSISTENT_WITH_HASH_CODE &&\n      checkEqualsConsistentWithHashCode;\n}\n\n/**\n * Sets whether we should check that `equals` is consistent with `hashCode`.\n */\nfunction setCheckEqualsConsistentWithHashCode(/** boolean */ value) {\n  checkEqualsConsistentWithHashCode = value;\n}\n\n/** @define {boolean} */\nconst GENERATE_TYPE_NAME_PROPERTIES =\n    goog.define('jspb.Message.GENERATE_TYPE_NAME_PROPERTIES', goog.DEBUG);\n\n\n/** @type {boolean} */\nlet checkEqualsDoesNotChangeWithTypeInformation = goog.DEBUG;\n\n/**\n * Updates whether we should check that equality checks are not sensitive to\n * type information.\n *\n * @return {boolean}\n */\nfunction getCheckEqualsDoesNotChangeWithTypeInformation() {\n  return checkEqualsDoesNotChangeWithTypeInformation;\n}\n\n/**\n * Updates whether we should check that equality checks are not sensitive to\n * type information.\n *\n * @param {boolean} updatedCheckEqualsDoesNotChangeWithTypeInformation\n */\nfunction setCheckEqualsDoesNotChangeWithTypeInformation(\n    updatedCheckEqualsDoesNotChangeWithTypeInformation) {\n  checkEqualsDoesNotChangeWithTypeInformation =\n      updatedCheckEqualsDoesNotChangeWithTypeInformation;\n}\n\n/**\n * Runs a function without checking that equality checks are not sensitive to\n * type information.\n *\n * @param {function(): T} fn\n * @template T\n */\nfunction withoutCheckingEqualsDoesNotChangeWithTypeInformation(fn) {\n  const originalCheckEqualsDoesNotChangeWithTypeInformation =\n      checkEqualsDoesNotChangeWithTypeInformation;\n  checkEqualsDoesNotChangeWithTypeInformation = false;\n  try {\n    fn();\n  } finally {\n    checkEqualsDoesNotChangeWithTypeInformation =\n        originalCheckEqualsDoesNotChangeWithTypeInformation;\n  }\n}\n\n/** @enum {number} */\nconst LegacyNullableBehavior = {\n  LEGACY_NULLABLE: 0,\n  ALWAYS_UNDEFINED: 1,\n};\n\n/**\n * @define {boolean} Emergency switch to force behavior of legacy nullable\n *     getters to being legacy nullable. go/jspb-api-gotchas#nullability\n */\nconst LEGACY_NULLABLE_LEGACY_NULLABLE =\n    goog.define('jspb.Message.LEGACY_NULLABLE_LEGACY_NULLABLE', false);\n\n/** @type {!LegacyNullableBehavior} */\nlet legacyNullableBehavior = LEGACY_NULLABLE_LEGACY_NULLABLE ?\n    LegacyNullableBehavior.LEGACY_NULLABLE :\n    goog.DEBUG && !COMPILED && Math.random() < 0.5 ?\n    LegacyNullableBehavior.ALWAYS_UNDEFINED :\n    LegacyNullableBehavior.LEGACY_NULLABLE;\n\n/** @return {!LegacyNullableBehavior} */\nfunction getLegacyNullableBehavior() {\n  return legacyNullableBehavior;\n}\n\n/** @param {!LegacyNullableBehavior} value */\nfunction setLegacyNullableBehavior(value) {\n  legacyNullableBehavior = value;\n}\n\n/** @type {boolean} */\nlet asyncThrowIfStringTypedInt64FieldDowngrade = true;\n\n/**\n * Returns whether we should async-throw if we downgraded a STRING field to\n * LEGACY.\n *\n * @return {boolean}\n */\nfunction getAsyncThrowIfStringTypedInt64FieldDowngrade() {\n  return asyncThrowIfStringTypedInt64FieldDowngrade;\n}\n\n/**\n * Updates whether we should async-throw if we downgraded a STRING field to\n * LEGACY.\n *\n * @param {boolean} updatedAsyncThrowIfStringTypedInt64FieldDowngrade\n */\nfunction setAsyncThrowIfStringTypedInt64FieldDowngrade(\n    updatedAsyncThrowIfStringTypedInt64FieldDowngrade) {\n  asyncThrowIfStringTypedInt64FieldDowngrade =\n      updatedAsyncThrowIfStringTypedInt64FieldDowngrade;\n}\n\n/**\n * Runs the given function without potentially async-throwing if we downgraded a\n * STRING field to LEGACY.\n *\n * @param {function(): T} fn\n * @return {T}\n * @template T\n */\nfunction withoutAsyncThrowingIfStringTypedInt64FieldDowngrade(fn) {\n  const originalAsyncThrowIfStringTypedInt64FieldDowngrade =\n      asyncThrowIfStringTypedInt64FieldDowngrade;\n  try {\n    asyncThrowIfStringTypedInt64FieldDowngrade = false;\n    return fn();\n  } finally {\n    asyncThrowIfStringTypedInt64FieldDowngrade =\n        originalAsyncThrowIfStringTypedInt64FieldDowngrade;\n  }\n}\n\n/** @define {boolean} */\nconst disableRandomizeSerialization =\n    goog.define('jspb.DISABLE_RANDOMIZE_SERIALIZATION', false);\n\n/** @enum {number} */\nconst TestSerializationFormat = {\n  DEFAULT: 0,\n  RANDOMIZED: 1,\n  ALWAYS_SPARSE: 2,\n};\n\n/** @type {!TestSerializationFormat|undefined} */\nlet randomizeSerializationFormatSetting = undefined;\n\n/** @return {boolean} */\nfunction randomizationIncompatibleOrDisabledExplicitly() {\n  // Disable randomization in optimized code, if our opt out is applied, or\n  // if we are in a non-browser environment (e.g. node) in which window will\n  // be undefined (note that we use typeof as that allows the variable to be\n  // unset).\n  //\n  // Note that check against node is for build tools for which nondeterminism\n  // is problematic as it impacts forge caching.\n  return !goog.DEBUG || disableRandomizeSerialization ||\n      typeof window === 'undefined' ||\n      ((/** @type {{CLOSURE_DEFINES: !Object<string, ?>}} */\n        (globalThis))\n           ?.CLOSURE_DEFINES)\n          ?.['jspb.DISABLE_RANDOMIZE_SERIALIZATION'];\n}\n\n/** @return {!TestSerializationFormat} */\nfunction getRandomizeSerializationFormat() {\n  const randomizeSerializationFormat = randomizeSerializationFormatSetting ??\n      ((goog.DEBUG && !COMPILED && !disableRandomizeSerialization) ?\n           TestSerializationFormat.RANDOMIZED :\n           TestSerializationFormat.DEFAULT);\n  if (randomizeSerializationFormat === TestSerializationFormat.ALWAYS_SPARSE) {\n    return randomizeSerializationFormat;\n  }\n\n  if (COMPILED || randomizationIncompatibleOrDisabledExplicitly()) {\n    return TestSerializationFormat.DEFAULT;\n  }\n\n  return randomizeSerializationFormat;\n}\n\nfunction setRandomizeSerializationFormat(\n    /** !TestSerializationFormat */ format) {\n  randomizeSerializationFormatSetting = format;\n}\n\n/**\n * Override mechanism for binary 64-bit int deserialization as gbigints. This\n * setting is normally controlled via the goog.flag\n * JSPB_DESERIALIZE_BINARY_INT64S_AS_GBIGINT.\n *\n * Set this to false to force binary deserialization to use number|string\n * for 64-bit int fields.\n *\n * @define {boolean}\n */\nconst DESERIALIZE_BINARY_INT64S_AS_GBIGINT =\n    goog.define('jspb.ENABLE_DESERIALIZE_BINARY_INT64S_AS_GBIGINT', true);\n\n/**\n * Returns whether binary deserialization should yield gbigint for 64-bit\n * integer fields.\n * @return {boolean}\n */\n// TODO: b/319288438 - remove this once we've fully enabled reading gbigint\n// values in prod.\nfunction getDeserializeBinary64BitIntsAsGbigint() {\n  return DESERIALIZE_BINARY_INT64S_AS_GBIGINT &&\n      JSPB_DESERIALIZE_BINARY_INT64S_AS_GBIGINT;\n}\n\n/**\n * Whether to generate go/jspb-fields-interface devmode functions in uncompiled\n * code.\n *\n * This bit is for tests that explicitly want to exercise the goog.DEBUG=false\n * case.\n *\n * @define {boolean}\n */\nconst GENERATE_FIELDS_INTERFACE_FOR_TESTING = goog.define(\n    'jspb.Message.GENERATE_FIELDS_INTERFACE_FOR_TESTING', goog.DEBUG);\n\n/**\n * Whether to allow copy-on-write for lazy copying of mutable messages.\n *\n * @define {boolean}\n */\nconst ALLOW_COPY_ON_WRITE =\n    goog.define('jspb.Message.ALLOW_COPY_ON_WRITE', true);\n\n/** @type {boolean} */\nlet disableExtensionRegistryInBinaryDeserializationForTesting = false;\n\n/** @return {boolean} */\nfunction getDisableExtensionRegistryInBinaryDeserializationForTesting() {\n  return goog.DEBUG &&\n      disableExtensionRegistryInBinaryDeserializationForTesting;\n}\n\nfunction setDisableExtensionRegistryInBinaryDeserializationForTesting(\n    /** boolean */ shouldDisable) {\n  disableExtensionRegistryInBinaryDeserializationForTesting = shouldDisable;\n}\n\n/**\n * Testing bit to disable writing gbigint values back.\n * @define {boolean}\n */\nconst DISABLE_WRITE_BACK_BIGINT_FOR_TESTING =\n    goog.define('jspb.Message.DISABLE_WRITE_BACK_BIGINT_FOR_TESTING', false);\n\n/** @return {boolean} */\nfunction getWriteBackGbigintValues() {\n  // Coercing to gbigint requires type-checking as it must reject NaN etc.\n  if (!typeCheck64BitIntFieldsAreInRange) return false;\n\n  // TODO: b/169076588 - this should be just the defines.\n  return JSPB_WRITE_BACK_BIGINT && !DISABLE_WRITE_BACK_BIGINT_FOR_TESTING &&\n      // This excludes tests which explicitly disabled randomization.\n      !(randomizeSerializationFormatSetting ===\n        TestSerializationFormat.DEFAULT) &&\n      // This excludes tests incompatible with randomization.\n      !(goog.DEBUG && randomizationIncompatibleOrDisabledExplicitly());\n}\n\nexports = {\n  ALLOW_COPY_ON_WRITE,\n  CheckLevel,\n  DETAILED_JSPB_ASSERTS,\n  DISABLE_ES6_MAP_SUBCLASSES_FOR_TESTING,\n  GENERATE_FIELDS_INTERFACE_FOR_TESTING,\n  GENERATE_TYPE_NAME_PROPERTIES,\n  USE_DETAILED_MESSAGE_TYPE_HIERARCHY,\n  getAsyncThrowIf64BitIntReturnTypeMismatches,\n  getAsyncThrowIfStringTypedInt64FieldDowngrade,\n  getCheckEqualsDoesNotChangeWithTypeInformation,\n  setCheckEqualsDoesNotChangeWithTypeInformation,\n  getCheckEqualsConsistentWithHashCode,\n  getDeserializeBinary64BitIntsAsGbigint,\n  getDisableExtensionRegistryInBinaryDeserializationForTesting,\n  TestSerializationFormat,\n  getRandomizeSerializationFormat,\n  getTypeCheck32BitIntFields,\n  getTypeCheck64BitIntFields,\n  getTypeCheck64BitIntFieldsAreInRange,\n  getTypeCheckEnumFields,\n  getUnsafeDisableJspbAnyTypeChecks,\n  getWriteBackGbigintValues,\n  isBigIntAvailable,\n  setAsyncThrowIf64BitIntReturnTypeMismatches,\n  setAsyncThrowIfStringTypedInt64FieldDowngrade,\n  setCheckEqualsConsistentWithHashCode,\n  setDisableExtensionRegistryInBinaryDeserializationForTesting,\n  setRandomizeSerializationFormat,\n  setShouldCoerce64BitIntFieldsByJsType,\n  setTypeCheck32BitIntFields,\n  setTypeCheck64BitIntFields,\n  setTypeCheck64BitIntFieldsAreInRange,\n  setTypeCheckEnumFields,\n  setUnsafeDisableJspbAnyTypeChecks,\n  shouldCoerce64BitIntFieldsByJsType,\n  shouldThrowInArrayConstructorIfArrayIsAlreadyConstructed,\n  shouldTransferArrayInConstructor,\n  withoutAsyncThrowingIfStringTypedInt64FieldDowngrade,\n  withoutCheckingEqualsDoesNotChangeWithTypeInformation,\n  LegacyNullableBehavior,\n  getLegacyNullableBehavior,\n  setLegacyNullableBehavior,\n};\n","/**\n * @fileoverview Internal symbols and utilities for hidden state keeping.\n *\n * DO NOT USE THIS OUTSIDE OF THIS PACKAGE.\n */\n\ngoog.module('jspb.internal_symbols');\n\nconst {objectProperty} = goog.require('goog.reflect');\n\n/** @define {boolean} */\nconst DISALLOW_NATIVE_SYMBOL =\n    goog.define('jspb.DISALLOW_NATIVE_SYMBOL_FOR_TESTING', false);\n\n/** @const {boolean} */\nconst HAS_NATIVE_SYMBOL = !DISALLOW_NATIVE_SYMBOL &&\n    (goog.FEATURESET_YEAR >= 2018 ||\n     // This particular condition is structured so that the jscompiler\n     // recognizes it as feature detection and won't load the Symbol\n     // polyfill due to this code.  The first check feature detects Symbol\n     // and the second ensures that the version of Symbol that exists is\n     // the native version.\n     typeof Symbol === 'function' && typeof Symbol() === 'symbol');\n\n/**\n * @param {string|undefined} name\n * @param {T} fallbackValue\n * @param {boolean=} useSymbolFor\n * @return {symbol|T}\n * @template T\n * @nosideeffects\n */\nfunction createSymbolInternal(name, fallbackValue, useSymbolFor = false) {\n  // Explicitly test support for native Symbol because Symbol is more performant\n  // than generic properties, but we don't want to fallback to the polyfill\n  // since that creates an enumerable property which isn't desirable.\n  const symbol = !DISALLOW_NATIVE_SYMBOL &&\n          (goog.FEATURESET_YEAR >= 2018 ||\n           // This particular condition is structured so that the jscompiler\n           // recognizes it as feature detection and won't load the Symbol\n           // polyfill due to this code.  The first check feature detects Symbol\n           // and the second ensures that the version of Symbol that exists is\n           // the native version.\n           (typeof Symbol === 'function' && typeof Symbol() === 'symbol')) ?\n      ((useSymbolFor && Symbol.for && name) ?\n           Symbol.for(name) :\n           (name != null ? Symbol(name) : Symbol())) :\n      fallbackValue;\n  return symbol;\n}\n\n/**\n * @param {string} name\n * @param {T} fallbackValue\n * @return {symbol|T}\n * @template T\n * @nosideeffects\n * @requireInlining\n */\nfunction createSymbol(name, fallbackValue) {\n  return createSymbolInternal(goog.DEBUG ? name : undefined, fallbackValue);\n}\n\n/**\n * @param {string} name\n * @param {T} fallbackValue\n * @return {symbol|T}\n * @template T\n * @nosideeffects\n * @requireInlining\n */\nfunction createSymbolFor(name, fallbackValue) {\n  return createSymbolInternal(name, fallbackValue, /* useSymbolFor= */ true);\n}\n\n// Note: this uses Symbol.for to minimize issues with multiple\n// copies of the JSPB runtime (see go/jspb-freeze-and-reload).\n/** @const {symbol|undefined} */\nconst ARRAY_STATE_SYMBOL = createSymbolFor('jas', undefined);\n\n/** @const {symbol|string} */\nconst DEFAULT_IMMUTABLE_INSTANCE_SYMBOL =\n    /** @pureOrBreakMyCode */ (createSymbol('defaultInstance', '0di'));\n\n/** @const {symbol|string} */\nconst DUPLICATED_EXTENSION_SYMBOL =\n    /** @pureOrBreakMyCode */ (\n        createSymbol('DUPLICATED_EXTENSION_SYMBOL', '2ex'));\n\n/** @const {symbol|string} */\nconst ONEOF_ARRAY_SYMBOL =\n    /** @pureOrBreakMyCode */ (createSymbol('oneofCases', '1oa'));\n\n/** @const {symbol|string} */\nconst RETURNED_64BIT_INT_VALUE_MISMATCH_SYMBOL =\n    /** @pureOrBreakMyCode */ (\n        createSymbol('RETURNED_64BIT_INT_VALUE_MISMATCH', '64im'));\n\n/** @const {symbol|string} */\nconst STRING_TYPE_DOWNGRADES_SYMBOL =\n    /** @pureOrBreakMyCode */ (createSymbol('STRING_TYPE_DOWNGRADES', '0dg'));\n\n/** @const {symbol|string} */\nconst CACHED_HASH_CODE_SYMBOL =\n    /** @pureOrBreakMyCode */ (createSymbol('internalJspbHashCode', 'ijhc'));\n\n/** @const {symbol} */\nconst COMPARISON_TYPE_INFO_SYMBOL =\n    /** @pureOrBreakMyCode */ (\n        createSymbol('internalComparisonTypeInfo', Symbol()));\n\n/** @const {symbol} */\nconst UNKNOWN_BINARY_FIELDS_SYMBOL =\n    /** @pureOrBreakMyCode */ (createSymbol('unknownBinaryFields', Symbol()));\n\n/** @const {symbol|string} */\nconst UNKNOWN_BINARY_THROTTLE_KEY =\n    createSymbol('unknownBinaryThrottleKey', '0ub');\n\n/** @const {symbol|string} */\nconst UNKNOWN_BINARY_FIELD_IN_JSPB_SERIALIZE_THROTTLE_KEY =\n    createSymbol('unknownBinaryThrottleKey', '0ubs');\n\n/** @const {symbol|string} */\nconst UNKNOWN_JSPB_FIELD_IN_BINARY_SERIALIZE_THROTTLE_KEY =\n    createSymbol('unknownBinarySerializeBinaryThrottleKey', '0ubsb');\n\n/**\n * @const {symbol}\n *\n * NOTE: this cannot use Symbol.for because we depend on the value being this\n * module's Message type.\n */\nconst CACHED_JSPB_MESSAGE_ON_TRANSFERRED_ARRAY_SYMBOL =\n    /** @pureOrBreakMyCode */ (\n        createSymbol('cachedJspbMessageOnTransferredArray', Symbol()));\n\n/** @const {symbol} */\nconst GET_CLONED_JSPB_ARRAY_ON_TRANSFERRED_ARRAY_SYMBOL =\n    /** @pureOrBreakMyCode */ (createSymbolFor('_jcca', Symbol()));\n\n/** @const {symbol|string} */\nconst ARRAY_SYMBOL_WARNING_KEY =\n    /** @pureOrBreakMyCode */ (createSymbol('arraySymbolWarningKey', 'aswk'));\n\n/** @const {symbol|string} */\nconst ALREADY_CONSTRUCTED_THROTTLE_KEY =\n    /** @pureOrBreakMyCode */ (\n        createSymbol('alreadyConstructedThrottleKey', '0actk'));\n\n/** @const {symbol|string} */\nconst U8_THROTTLE_KEY =\n    /** @pureOrBreakMyCode */ (createSymbol('uint8ArrayThrottleKey', '8utk'));\n\n/** @interface */\nclass WithMessagePrototypeMarker {\n  constructor() {\n    /** @const {?} */\n    this.messagePrototypeMarker;\n  }\n}\n\n/** @const {symbol|string} */\nconst MESSAGE_PROTOTYPE_MARKER = /** @pureOrBreakMyCode */ (createSymbolFor(\n    'm_m',\n    objectProperty(\n        'messagePrototypeMarker',\n        /** @type {!WithMessagePrototypeMarker} */ (undefined))));\n\n/** @const {symbol|string} */\nconst MULTIPLE_RUNTIMES_THROTTLE_KEY =\n    /** @pureOrBreakMyCode */ (\n        createSymbol('multipleRuntimesThrottleKey', 'mrtk'));\n\n/** @const {symbol|string} */\nconst VALID_PIVOT_SELECTOR = createSymbol('validPivotSelector', 'vps');\n\n/**\n * @const {symbol|undefined}\n * @tsType unique symbol\n */\nconst LAZILY_PARSE_LATE_LOADED_EXTENSIONS_SYMBOL =\n    createSymbol('lazilyParseLateLoadedExtensions', undefined);\n\nexports = {\n  ALREADY_CONSTRUCTED_THROTTLE_KEY,\n  MESSAGE_PROTOTYPE_MARKER,\n  ARRAY_STATE_SYMBOL,\n  ARRAY_SYMBOL_WARNING_KEY,\n  CACHED_HASH_CODE_SYMBOL,\n  CACHED_JSPB_MESSAGE_ON_TRANSFERRED_ARRAY_SYMBOL,\n  COMPARISON_TYPE_INFO_SYMBOL,\n  DEFAULT_IMMUTABLE_INSTANCE_SYMBOL,\n  DUPLICATED_EXTENSION_SYMBOL,\n  GET_CLONED_JSPB_ARRAY_ON_TRANSFERRED_ARRAY_SYMBOL,\n  HAS_NATIVE_SYMBOL,\n  LAZILY_PARSE_LATE_LOADED_EXTENSIONS_SYMBOL,\n  MULTIPLE_RUNTIMES_THROTTLE_KEY,\n  ONEOF_ARRAY_SYMBOL,\n  RETURNED_64BIT_INT_VALUE_MISMATCH_SYMBOL,\n  STRING_TYPE_DOWNGRADES_SYMBOL,\n  U8_THROTTLE_KEY,\n  UNKNOWN_BINARY_FIELDS_SYMBOL,\n  UNKNOWN_BINARY_THROTTLE_KEY,\n  UNKNOWN_JSPB_FIELD_IN_BINARY_SERIALIZE_THROTTLE_KEY,\n  UNKNOWN_BINARY_FIELD_IN_JSPB_SERIALIZE_THROTTLE_KEY,\n  VALID_PIVOT_SELECTOR,\n  WithMessagePrototypeMarker,\n};","/**\n * @fileoverview Internal accessors for hidden array state.\n *\n * DO NOT USE THIS OUTSIDE OF THIS PACKAGE.\n */\n\ngoog.module('jspb.internal_array_state');\n\nconst asserts = goog.require('goog.asserts');\nconst {ARRAY_STATE_SYMBOL, HAS_NATIVE_SYMBOL} = goog.require('jspb.internal_symbols');\nconst {getWriteBackGbigintValues} = goog.require('jspb.internal_options');\nconst {objectProperty} = goog.require('goog.reflect');\n\nconst /** number */ DEFAULT_ARRAY_STATE = 0;\n\n/** @enum {number} */\nconst ArrayStateFlags = {\n  /**\n   * If set, this value is a repeated field. Never set for map fields.\n   *\n   * If unset AND another array bit is set AND there was not a schema mismatch,\n   * then this is not a repeated field.\n   */\n  IS_REPEATED_FIELD: 1 << 0,\n\n  /**\n   * If set on a message array, repeated field array, or map (array), this value\n   * cannot be mutated and contains only immutable values.\n   *\n   * Apps JSPB attempts to make state as immutable as possible so that it may\n   * be shared safely across message instances:\n   *\n   * - A message array which is immutable may be shared by any number of\n   *   wrappers. A message array which is mutable and owned may be referenced by\n   *   exactly one wrapper. A message array which is not owned may be shared by\n   *   only one wrapper in addition to external references.\n   *\n   * - A map array or object which is immutable may be shared by any number of\n   *   parent messages. A map array or object which is mutable may be shared\n   *   by only one parent message (except via external references).\n   *\n   * - A repeated field array which is immutable may be shared by any number\n   *   of mutable or immutable parents. A marked mutable repeated field array\n   *   may be shared by any number of mutable parents. An unmarked repeated\n   *   field array may not be shared.\n   *\n   * If set with IS_API_FORMATTED, a repeated field array must be frozen.\n   */\n  IS_IMMUTABLE_ARRAY: 1 << 1,\n\n  /**\n   * If set on a repeated field array, this field has been coerced from wire\n   * types to API types and does not need to be coerced again (though any\n   * new values will).\n   *\n   * This is only set on repeated fields.\n   *\n   * This bit only ensures that values obtained _from the wire_ have been\n   * converted: it's possible for an external mutation from the user to have\n   * added invalid data to this array. As a result, we may clear this bit\n   * in certain circumstances to be totally sure we are protected against\n   * invalid values.\n   *\n   * If set with IS_IMMUTABLE_ARRAY, a repeated field array must be frozen.\n   */\n  IS_API_FORMATTED: 1 << 2,\n\n  /**\n   * If this array has not been externally mutated, this array is a repeated\n   * submessage field and contains only constructed mutable messages. An array\n   * is known to not have been externally mutated if parent message has\n   * MUTABLE_REFERENCES_ARE_OWNED and this array doesn't have UNFROZEN_SHARED.\n   *\n   * We maintain this bit for mutable repeated submessage access on mutable\n   * parents, where it avoids our having to perform a linear traversal on each\n   * access to ensure values have the appropriate mutabilities.\n   *\n   * Only meaningful if IS_REPEATED_FIELD and IS_API_FORMATTED and\n   * not IS_IMMUTABLE_ARRAY.\n   */\n  ONLY_MUTABLE_VALUES: 1 << 3,\n\n  /**\n   * Indicates a repeated field array that has been shared without being frozen.\n   *\n   * Specifically, this means DO_NOT_FREEZE__LEGACY_OPTION has been used on the\n   * array.\n   */\n  UNFROZEN_SHARED: 1 << 4,\n\n  /**\n   * For mutable message arrays, indicates that there can be no references to\n   * this array outside of the runtime. Only meaningful if not\n   * IS_IMMUTABLE_ARRAY.\n   *\n   * A natural consequence is that any un-accessed child message, map, or\n   * repeated fields are not referenced except by this array. Once fields are\n   * first accessed, see IS_IMMUTABLE_ARRAY for invariants concerning sharing of\n   * their references.\n   *\n   * If the value is immutable, this bit is irrelevant and may or may not be\n   * set. It further does _not_ indicate whether references to the array are\n   * shared by multiple messages.\n   *\n   * Note: This bit is only meaningfully set on message arrays. For (unwrapped)\n   * map and repeated field arrays, this bit conceptually always has the same\n   * value as the parent message. Various copying routines that are agnostic to\n   * what the array represents may propagate this bit to map/repeated arrays,\n   * but there's otherwise no guarantee that they are maintained on map/repeated\n   * arrays. Code working with map/repeated arrays should always read this bit\n   * from the parent message if needed.\n   */\n  MUTABLE_REFERENCES_ARE_OWNED: 1 << 5,\n\n  /**\n   * This indicates that the pivot and HAS_MESSAGE_ID bits have reliable values.\n   *\n   * Those bits are always accurate if they are non-zero. However, if they are\n   * zero, then that value is only accurate if this bit is also set.\n   */\n  CONSTRUCTED: 1 << 6,\n\n  /**\n   * Marks the message array as having a message_id object.\n   *\n   * This is used to calculate the array index offset. It is always consistent\n   * for CONSTRUCTED arrays.\n   */\n  HAS_MESSAGE_ID: 1 << 7,\n\n  /**\n   * Indicates that this array is frozen. An array may also be frozen if\n   * (IS_IMMUTABLE_ARRAY && IS_API_FORMATTED) without this bit.\n   *\n   * This bit may be set when we freeze arrays internally to avoid checking\n   * Object.isFrozen.\n   *\n   * We may do this for 'message' arrays that we would like to prevent being\n   * passed to a constructor since FROZEN_ARRAY will cause constructMessageArray\n   * to throw.\n   *\n   * We may also set this bit for repeated submessage fields when some of those\n   * submessages might be mutable. If all of the submessages in the array are\n   * known to be immutable, or it's an owned primitive repeated field, the\n   * IS_IMMUTABLE_ARRAY and IS_API_FORMATTED bits should be set instead of this\n   * one.\n   */\n  FROZEN_ARRAY: 1 << 8,\n\n  // IS_API_FORMATTED subtypes for 64-bit integer repeated fields.\n  //\n  // Note: The absence of any subtype indicates \"legacy\" formatted values that\n  // have been coerced to number|string. We can move freely between\n  // STRING_FORMATTED and GBIGINT_FORMATTED. Legacy formatting is permanently\n  // lost after conversion to GBIGINT_|STRING_FORMATTED since we cannot get the\n  // legacy value back.\n\n  /**\n   * Indicates that valid 64-bit integer values that have been coerced to\n   * string.\n   *\n   * Only meaningful for repeated [u]int64 fields. Should not be set otherwise.\n   */\n  STRING_FORMATTED: 1 << 9,\n\n  /**\n   * Indicates that valid 64-bit integer values that have been coerced to\n   * gbigint.\n   *\n   * Only meaningful for repeated [u]int64 fields. Should not be set otherwise.\n   */\n  GBIGINT_FORMATTED: 1 << 10,\n\n  /** Indicates whether a wrapper has been made for this message array. */\n  HAS_WRAPPER: 1 << 11,\n\n  /**\n   * This is set to true whenever a message or repeated field array contains a\n   * substructure that isn't immutable and cannot be upgraded in place to\n   * immutable.\n   *\n   * Namely, the mutable substructures that cannot be upgraded are:\n   * - Mutable wrapped submessages.\n   * - Repeated fields that are unfrozen shared or contain mutable wrapped\n   * submessages.\n   *\n   * This allows for a special case where we can construct a zero copy immutable\n   * message.\n   */\n  MUTABLE_SUBSTRUCTURES: 1 << 12,\n\n  /**\n   * This is set when we know that the value is semantically a map.\n   *\n   * Code should not assume that the non presence of this bit means that the\n   * array is not a map.\n   *\n   * As an example, this is used in `equals` so that equality tests know to\n   * ignore value ordering.\n   */\n  KNOWN_MAP_ARRAY: 1 << 13,\n};\n\nconst PIVOT_OFFSET = 14;\n// Some implementations (Rhino) may incorrectly implement Math.log2 and produce\n// a non-integer answer, which is in violation of the spec.\nasserts.assert(\n    Math.round(Math.log2(Math.max(...Object.values(ArrayStateFlags)))) ===\n    PIVOT_OFFSET - 1);\nconst PIVOT_BITS = 10;\nconst PIVOT_LIMIT = (1 << PIVOT_BITS);\nconst PIVOT_MASK = PIVOT_LIMIT - 1;\nconst /** number */ ALL_FLAGS = ArrayStateFlags.IS_REPEATED_FIELD |\n    ArrayStateFlags.IS_IMMUTABLE_ARRAY | ArrayStateFlags.IS_API_FORMATTED |\n    ArrayStateFlags.ONLY_MUTABLE_VALUES | ArrayStateFlags.UNFROZEN_SHARED |\n    ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED | ArrayStateFlags.CONSTRUCTED |\n    ArrayStateFlags.HAS_MESSAGE_ID | ArrayStateFlags.STRING_FORMATTED |\n    ArrayStateFlags.GBIGINT_FORMATTED | ArrayStateFlags.FROZEN_ARRAY |\n    ArrayStateFlags.HAS_WRAPPER | ArrayStateFlags.MUTABLE_SUBSTRUCTURES |\n    ArrayStateFlags.KNOWN_MAP_ARRAY | (PIVOT_MASK << PIVOT_OFFSET);\n\n/** @requireInlining */\nfunction assertValidFlags(/** number */ flags) {\n  asserts.assert((flags & ALL_FLAGS) === flags);\n}\n\nconst /** !ArrayStateHolder */ ZERO_ARRAY_STATE_PROPERTY = {\n  internalArrayState: {\n    value: 0,\n    configurable: true,\n    writable: true,\n    enumerable: false,\n  },\n};\n\nconst OBJECT_DEFINE_PROPERTIES = Object.defineProperties;\n\n/** @typedef {{internalArrayState: ?}} */\nlet ArrayStateHolder;\n\n/** @const {boolean} */\nconst USE_SYMBOL_ARRAY_STATE = HAS_NATIVE_SYMBOL;\n\nconst /** symbol|string */ ARRAY_STATE_PROPERTY = /** @pureOrBreakMyCode */ (\n    USE_SYMBOL_ARRAY_STATE ? asserts.assertExists(ARRAY_STATE_SYMBOL) :\n                             objectProperty(\n                                 'internalArrayState',\n                                 /** @type {!ArrayStateHolder} */ (undefined)));\n\n/** const {!ArrayState} */\nconst EMPTY_LIST_SENTINEL_STATE = ArrayStateFlags.IS_IMMUTABLE_ARRAY |\n    ArrayStateFlags.IS_REPEATED_FIELD | ArrayStateFlags.IS_API_FORMATTED;\n\n/**\n * Used to mark empty repeated fields.\n *\n * This value will be replaced by null when serializing to JSON.\n *\n * When reading a repeated field readers must check the return value against\n * this value and return and replace it with a new empty array if it is\n * present.\n *\n * The initializer 'launders' the value through `valueOf` which tricks the\n * compiler into thinking that this is side-effect free, even though\n * `Object.freeze` doesn't normally qualify.  This will allow this declaration\n * to get moved or DCE'd when necessary.\n *\n * @const {!Array<?>}\n */\nconst EMPTY_LIST_SENTINEL = /** @type{!Array<?>} */ ({\n  valueOf: () => {\n    // This is a valid immutable array, so if we mark it as such we can avoid\n    // copies.\n    // Similarly empty arrays are always API_FORMATTED, so we can pre-mark it to\n    // avoid checks elsewhere.\n    const array = [];\n    setArrayState(array, EMPTY_LIST_SENTINEL_STATE);\n    return Object.freeze(array);\n  }\n}.valueOf());\n\n/**\n * Returns the array state value\n * @param {!Array<?>|!ReadonlyArray<?>} arr\n * @return {!ArrayState}\n * @requireInlining\n * @nosideeffects\n */\nfunction getArrayStateInline(arr) {\n  return /** @type {?} */ (asserts.assertArray(\n             arr,\n             'state is only maintained on arrays.'))[ARRAY_STATE_PROPERTY] |\n      0;\n}\n\n/**\n * Returns the array state value\n * @param {!Array<?>|!ReadonlyArray<?>} arr\n * @return {!ArrayState}\n * @nosideeffects\n */\nfunction getArrayState(arr) {\n  return getArrayStateInline(arr);\n}\n\n/**\n * Adds a flag value into the given array's state value.\n *\n * @param {!Array<?>} arr\n * @param {!ArrayState} flags\n * @return {!ArrayState}\n */\nfunction addFlags(arr, flags) {\n  assertValidFlags(flags);\n  asserts.assertArray(arr, 'state is only maintained on arrays.');\n  if (!USE_SYMBOL_ARRAY_STATE && !(ARRAY_STATE_PROPERTY in arr)) {\n    OBJECT_DEFINE_PROPERTIES(arr, ZERO_ARRAY_STATE_PROPERTY);\n  }\n  return /** @type {?} */ (arr)[ARRAY_STATE_PROPERTY] |= flags;\n}\n\n/**\n * Sets the current array state\n * @param {!Array<?>} arr\n * @param {!ArrayState} flags\n * @return {!ArrayState} flags\n */\nfunction setArrayState(arr, flags) {\n  assertValidFlags(flags);\n  asserts.assertArray(arr, 'state is only maintained on arrays.');\n  if (!USE_SYMBOL_ARRAY_STATE && !(ARRAY_STATE_PROPERTY in arr)) {\n    OBJECT_DEFINE_PROPERTIES(arr, ZERO_ARRAY_STATE_PROPERTY);\n  }\n  /** @type {?} */ (arr)[ARRAY_STATE_PROPERTY] = flags;\n  return flags;\n}\n\n/**\n * Clears the array mask's given state value.\n *\n * @param {!Array<?>} arr\n * @param {!ArrayState} flags\n * @return {!ArrayState} the new state\n */\nfunction clearFlags(arr, flags) {\n  assertValidFlags(flags);\n  asserts.assert(ARRAY_STATE_PROPERTY in arr);\n  asserts.assertArray(arr, 'state is only maintained on arrays.');\n  return /** @type {?} */ (arr)[ARRAY_STATE_PROPERTY] &= ~flags;\n}\n\n/**\n * Returns whether or not at least one of the flag bit(s) is set on the given\n * array state.\n * @param {!ArrayState} stateValue The array's state value.\n * @param {!ArrayState} flag The flag bit(s) to check.\n * @return {boolean}\n * @requireInlining\n */\nfunction hasFlagBit(stateValue, flag) {\n  return !!(flag & stateValue);\n}\n\n/**\n * Sets the flag bit(s) on the given array state. If isEnabled, sets the flag\n * bit(s) to '1'. Otherwise, clears the flag bit(s) by setting it to '0'.\n * @param {!ArrayState} stateValue The array's state value.\n * @param {!ArrayState} flag The flag bit(s) to toggle.\n * @param {boolean} isEnabled Whether to enable or disable the flag bit(s).\n * @return {!ArrayState} The new state value.\n * @requireInlining\n */\nfunction setFlagBitTo(stateValue, flag, isEnabled) {\n  return isEnabled ? setFlagBit(stateValue, flag) :\n                     clearFlagBit(stateValue, flag);\n}\n\n/**\n * Sets the flag bit(s) on the given array state to 1.\n * @param {!ArrayState} stateValue The array's state value.\n * @param {!ArrayState} flag The flag bit(s) to set.\n * @return {!ArrayState} The new state value.\n * @requireInlining\n */\nfunction setFlagBit(stateValue, flag) {\n  return stateValue | flag;\n}\n\n/**\n * Clears the flag bit(s) on the given array state.\n * @param {!ArrayState} stateValue The array's state value.\n * @param {!ArrayState} flag The flag bit(s) to clear.\n * @return {!ArrayState} The new state value.\n * @requireInlining\n */\nfunction clearFlagBit(stateValue, flag) {\n  return stateValue & ~flag;\n}\n\nfunction checkMessageStateInvariants(\n    /** !Array */ array, /** !ArrayState */ arrayState,\n    /** boolean= */ allowUnconstructed = false) {\n  // Invariant checking for message states\n\n  // Messages always set CONSTRUCTED unless we are in binary serialization\n  // or deserialization, in which case we only partially 'construct' the message\n  // array to handle message_id and pivot state.\n  //\n  // But if HAS_WRAPPER is set, we must always be constructed.\n  if (!allowUnconstructed || arrayState & ArrayStateFlags.HAS_WRAPPER) {\n    asserts.assert(\n        arrayState & ArrayStateFlags.CONSTRUCTED,\n        'state for messages must be constructed');\n  }\n\n  asserts.assert(\n      (arrayState &\n       (ArrayStateFlags.IS_REPEATED_FIELD |\n        ArrayStateFlags.IS_API_FORMATTED)) === 0,\n      'state for messages should not contain repeated field state');\n\n  asserts.assert(\n      (arrayState & (ArrayStateFlags.KNOWN_MAP_ARRAY)) === 0,\n      'state for messages should not contain map field state');\n\n  // HAS_SPARSE_OBJECT, HAS_MESSAGE_ID, and the pivot are only consistently set\n  // for constructed messages.\n  if (arrayState & ArrayStateFlags.CONSTRUCTED) {\n    // Fields like pivot and arrayIndexOffset should be in\n    // sync with the array structure\n    const pivot = getPivot(arrayState);\n    const arrayIndexOffset = getArrayIndexOffset(arrayState);\n    const arrayLength = array.length;\n    asserts.assert(\n        pivot + arrayIndexOffset >= arrayLength - 1,\n        'pivot %s is pointing at an index earlier than the last index of the array, length: %s',\n        pivot, arrayLength);\n    if (arrayState & ArrayStateFlags.HAS_MESSAGE_ID) {\n      asserts.assert(\n          typeof array[0] === 'string',\n          'arrays with a message_id bit must have a string in the first position, got: %s',\n          array[0]);\n    }\n  }\n}\n\n/**\n * Returns the array state value for a constructed message\n *\n * This is identical to getArrayStateInline but adds some extra development time\n * checks.\n * @param {!Array<?>} arr\n * @param {boolean=} allowUnconstructed\n * @return {!ArrayState}\n * @requireInlining\n * @nosideeffects\n */\nfunction getMessageArrayStateInline(arr, allowUnconstructed) {\n  const state = getArrayStateInline(arr);\n  if (asserts.ENABLE_ASSERTS) {\n    checkMessageStateInvariants(arr, state, allowUnconstructed);\n  }\n  return state;\n}\n\n/**\n * @param {!Array<?>} arr\n * @return {!ArrayState}\n * @nosideeffects\n */\nfunction getMessageArrayState(arr) {\n  return getMessageArrayStateInline(arr);\n}\n\n/**\n * @param {!Array<?>} arr\n * @return {!ArrayState}\n * @requireInlining\n * @nosideeffects\n */\n// TODO: b/436254718 - remove this in favor of a getMessageArrayState that\n// does not assert.\nfunction getPossiblyUnconstructedMessageArrayStateInline(arr) {\n  return getMessageArrayStateInline(arr, /* allowUnconstructed= */ true);\n}\n\n/**\n * @param {!Array<?>} arr\n * @return {!ArrayState}\n * @nosideeffects\n */\n// TODO: b/436254718 - remove this in favor of a getMessageArrayState that\n// does not assert.\nfunction getPossiblyUnconstructedMessageArrayState(arr) {\n  return getPossiblyUnconstructedMessageArrayStateInline(arr);\n}\n\n/**\n * Returns the array state value of a repeated field.\n * @param {!Array<?>|!ReadonlyArray<?>} arr\n * @return {!ArrayState}\n * @requireInlining\n */\nfunction getRepeatedArrayState(arr) {\n  return arr === EMPTY_LIST_SENTINEL ? EMPTY_LIST_SENTINEL_STATE :\n                                       getArrayStateInline(arr);\n}\n\n/**\n * Array API formatting states for 64-bit integer fields.\n * @enum {number}\n */\nconst TypeSpecificApiFormat = {\n  LEGACY: 0,\n  STRING: ArrayStateFlags.STRING_FORMATTED,\n  GBIGINT: ArrayStateFlags.GBIGINT_FORMATTED,\n};\n\n/**\n * Returns the current TypeSpecificApiFormat of the provided array or undefined\n * if the array lacks IS_API_FORMATTED.\n * @param {!ArrayState} state\n * @return {!TypeSpecificApiFormat|undefined}\n */\nfunction getTypeSpecificApiFormat(state) {\n  if (hasFlagBit(state, ArrayStateFlags.IS_API_FORMATTED)) {\n    if (hasFlagBit(state, ArrayStateFlags.STRING_FORMATTED)) {\n      return TypeSpecificApiFormat.STRING;\n    } else if (hasFlagBit(state, ArrayStateFlags.GBIGINT_FORMATTED)) {\n      return TypeSpecificApiFormat.GBIGINT;\n    }\n    return TypeSpecificApiFormat.LEGACY;\n  }\n\n  return undefined;\n}\n\n/** @return {!TypeSpecificApiFormat} */\nfunction getDefaultTypeSpecificApiFormat() {\n  return getWriteBackGbigintValues() ? TypeSpecificApiFormat.GBIGINT :\n                                       TypeSpecificApiFormat.LEGACY;\n}\n\n/**\n * @param {!ArrayState} state\n * @return {!ArrayState}\n */\nfunction clearTypeSpecificFormattedFlagBits(state) {\n  state = clearFlagBit(state, ArrayStateFlags.STRING_FORMATTED);\n  state = clearFlagBit(state, ArrayStateFlags.GBIGINT_FORMATTED);\n\n  return state;\n}\n\n/**\n * Tests whether or not the given array has been tagged with\n * `markApiFormattedField`.\n *\n * @param {!Array<?>} arr\n * @return {boolean}\n */\nfunction isApiFormattedField(arr) {\n  const state = getArrayStateInline(arr);\n  return Boolean(state & ArrayStateFlags.IS_API_FORMATTED);\n}\n\n/**\n * Returns whether arr is an immutable array.\n * @param {!Array<?>} arr\n * @return {boolean}\n */\nfunction isImmutableArray(arr) {\n  const state = getArrayStateInline(arr);\n  return Boolean(state & ArrayStateFlags.IS_IMMUTABLE_ARRAY);\n}\n\n/**\n * Marks arr as an immutable array.\n *\n * @param {!Array<T>} arr\n * @return {!Array<T>} arr\n * @template T\n */\nfunction markArrayImmutable(arr) {\n  addFlags(\n      arr,\n      ArrayStateFlags.IS_IMMUTABLE_ARRAY |\n          ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED);\n  return arr;\n}\n\n/**\n * Marks arr as a known map array.\n *\n * @param {!Array<T>} arr\n * @return {!Array<T>} arr\n * @template T\n */\nfunction markKnownMapArray(arr) {\n  addFlags(arr, ArrayStateFlags.KNOWN_MAP_ARRAY);\n  return arr;\n}\n\n/**\n * Marks arr as having owned references.\n *\n * @param {!Array<T>} arr\n * @return {!Array<T>}\n * @template T\n */\nfunction markMutableReferencesAreOwned(arr) {\n  addFlags(arr, ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED);\n  return arr;\n}\n\n\n\n/**\n * Marks arr as shared, unsetting the owned bit.\n *\n * @param {!Array<T>} arr\n * @return {!Array<T>} arr\n * @template T\n */\nfunction markShared(arr) {\n  clearFlags(arr, ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED);\n  return arr;\n}\n\n/**\n * Returns whether we know arr to only have owned references.\n *\n * @param {!ReadonlyArray<?>} arr\n * @return {boolean}\n */\nfunction areMutableReferencesOwned(arr) {\n  const state = getArrayStateInline(arr);\n  return Boolean(state & ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED);\n}\n\n/**\n * Marks arr as having been used to construct a message or map.\n *\n * @param {!Array<T>} arr\n * @return {!Array<T>} arr\n * @template T\n */\nfunction markConstructed(arr) {\n  addFlags(arr, ArrayStateFlags.CONSTRUCTED);\n  return arr;\n}\n\n\n/** @typedef {number} */\nlet ArrayState;\n\n\n/**\n * @param {!ArrayState} fromState\n * @param {boolean=} markImmutable\n * @return {!ArrayState}\n */\nfunction copyArrayBitsClone(fromState, markImmutable) {\n  // Preserve the following bits:\n  // - IS_REPEATED_FIELD: this makes certain comparisons easier.\n  // - HAS_MESSAGE_ID: This is important for pivot selection logic\n  // - CONSTRUCTED: this bit lets us know we can trust the pivot value.\n  // - PIVOT: Copy the pivot value if present\n  //\n  // We do not copy the following bits:\n  // - IS_API_FORMATTED: For some repeated fields we could maintain this bit but\n  //   there are subtleties with repeated messages that make this tricky. For\n  //   now we drop it.\n  //     - The same goes for many other repeated field bits.  There is an\n  //       opportunity to improve this in the future.\n  let flagsToAdd = ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED;\n  if (markImmutable) {\n    flagsToAdd |= ArrayStateFlags.IS_IMMUTABLE_ARRAY;\n  }\n  const flagsToKeep = ArrayStateFlags.IS_REPEATED_FIELD |\n      ArrayStateFlags.KNOWN_MAP_ARRAY | ArrayStateFlags.HAS_MESSAGE_ID |\n      ArrayStateFlags.CONSTRUCTED | (PIVOT_MASK << PIVOT_OFFSET);\n  return (fromState & flagsToKeep) | flagsToAdd;\n}\n\n// This value is higher than all field numbers but it is still small enough to\n// be a SMI\nconst /** number */ NO_PIVOT = 1 << 29;\n\n/** @return {number} */\nfunction setPivot(/** !ArrayState */ arrayState, /** number */ pivot) {\n  asserts.assertNumber(pivot);\n  asserts.assert(\n      pivot > 0 && pivot <= PIVOT_MASK || NO_PIVOT === pivot,\n      'pivot must be in the range [1, 1024) or NO_PIVOT got %s', pivot);\n  // clear old and set new\n  // by masking pivot with PIVOT_MASK we implicitly turn NO_PIVOT into zero.\n  return (arrayState & ~(PIVOT_MASK << PIVOT_OFFSET)) |\n      ((pivot & PIVOT_MASK) << PIVOT_OFFSET);\n}\n\n/**\n * Returns the pivot where a sparse object should be written.\n *\n *\n * @return {number} @requireInlining\n */\nfunction getPivot(/** !ArrayState */ arrayState) {\n  asserts.assert(arrayState & ArrayStateFlags.CONSTRUCTED);\n  return (arrayState >> PIVOT_OFFSET) & PIVOT_MASK || NO_PIVOT;\n}\n\n/** @return {number} @requireInlining */\nfunction getArrayIndexOffsetInline(/** !ArrayState */ arrayState) {\n  // If there is a message id it is 0 otherwise -1.\n  //\n  // NOTE: by making this a single expression we can keep this as an inlining\n  // candidate\n  asserts.assert(arrayState & ArrayStateFlags.CONSTRUCTED);\n  return arrayState & ArrayStateFlags.HAS_MESSAGE_ID ? 0 : -1;\n}\n\n/**\n * @return {number}\n * @nosideeffects\n */\nfunction getArrayIndexOffset(\n    /** !ArrayState */ arrayState) {\n  return getArrayIndexOffsetInline(arrayState);\n}\n\nif (goog.DEBUG) {\n  // Capture the previous version of this property if any, this will happen if\n  // there are multiple copies of this code loaded in the same window.\n  const prev = Object.getOwnPropertyDescriptor(\n      Array.prototype, objectProperty('jspbArrayState', Array.prototype));\n  // Add a debug property to aid developer usecases in the console.\n  Object.defineProperties(Array.prototype, {\n    jspbArrayState: {\n      /**\n       * @this {!Array<?>}\n       * @return {string}\n       */\n      get() {\n        const formatted = prettyPrintArrayState(this);\n        if (prev) {\n          // compose with prior version if any.\n          return prev.get.call(this) + '|' + formatted;\n        }\n        return formatted;\n      },\n      // Allow this property to be defined multiple times in case multiple\n      // binaries are loaded onto the same page with this code.\n      configurable: true,\n      enumerable: false,\n    },\n  });\n}\n\n/** @return {string} */\nfunction prettyPrintArrayState(/** !Array<?> */ array) {\n  const arrayState = getArrayState(array);\n  const bits = [];\n  function maybeAddFlag(/** !ArrayStateFlags */ bit, /** string */ s) {\n    if (bit & arrayState) {\n      bits.push(s);\n    }\n  }\n  maybeAddFlag(ArrayStateFlags.IS_REPEATED_FIELD, 'IS_REPEATED_FIELD');\n  maybeAddFlag(ArrayStateFlags.IS_IMMUTABLE_ARRAY, 'IS_IMMUTABLE_ARRAY');\n  maybeAddFlag(ArrayStateFlags.IS_API_FORMATTED, 'IS_API_FORMATTED');\n  maybeAddFlag(ArrayStateFlags.STRING_FORMATTED, 'STRING_FORMATTED');\n  maybeAddFlag(ArrayStateFlags.GBIGINT_FORMATTED, 'GBIGINT_FORMATTED');\n  maybeAddFlag(ArrayStateFlags.GBIGINT_FORMATTED, 'BINARY');\n  maybeAddFlag(ArrayStateFlags.ONLY_MUTABLE_VALUES, 'ONLY_MUTABLE_VALUES');\n  maybeAddFlag(ArrayStateFlags.UNFROZEN_SHARED, 'UNFROZEN_SHARED');\n  maybeAddFlag(\n      ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED,\n      'MUTABLE_REFERENCES_ARE_OWNED');\n  maybeAddFlag(ArrayStateFlags.CONSTRUCTED, 'CONSTRUCTED');\n  maybeAddFlag(ArrayStateFlags.HAS_MESSAGE_ID, 'HAS_MESSAGE_ID');\n  maybeAddFlag(ArrayStateFlags.FROZEN_ARRAY, 'FROZEN_ARRAY');\n  maybeAddFlag(ArrayStateFlags.HAS_WRAPPER, 'HAS_WRAPPER');\n  maybeAddFlag(ArrayStateFlags.MUTABLE_SUBSTRUCTURES, 'MUTABLE_SUBSTRUCTURES');\n  maybeAddFlag(ArrayStateFlags.KNOWN_MAP_ARRAY, 'KNOWN_MAP_ARRAY');\n  if (arrayState & ArrayStateFlags.CONSTRUCTED) {\n    const pivot = getPivot(arrayState);\n    if (pivot !== NO_PIVOT) {\n      bits.push(`pivot: ${pivot}`);\n    }\n  }\n  return bits.join(',');\n}\n\nexports = {\n  ArrayState,\n  ArrayStateFlags,\n  DEFAULT_ARRAY_STATE,\n  EMPTY_LIST_SENTINEL,\n  NO_PIVOT,\n  PIVOT_LIMIT,\n  TypeSpecificApiFormat,\n  addArrayStateFlags: addFlags,\n  areMutableReferencesOwned,\n  checkMessageStateInvariants,\n  clearFlagBit,\n  clearFlags,\n  clearTypeSpecificFormattedFlagBits,\n  copyArrayBitsClone,\n  getArrayIndexOffsetInline,\n  getArrayIndexOffset,\n  getArrayState,\n  getArrayStateInline,\n  getDefaultTypeSpecificApiFormat,\n  getMessageArrayState,\n  getMessageArrayStateInline,\n  getPivot,\n  getPossiblyUnconstructedMessageArrayState,\n  getPossiblyUnconstructedMessageArrayStateInline,\n  getRepeatedArrayState,\n  getTypeSpecificApiFormat,\n  hasFlagBit,\n  isApiFormattedField,\n  isImmutableArray,\n  markArrayImmutable,\n  markConstructed,\n  markKnownMapArray,\n  markMutableReferencesAreOwned,\n  markShared,\n  prettyPrintArrayState,\n  setArrayState,\n  setFlagBit,\n  setFlagBitTo,\n  setPivot,\n};\n","/**\n * @fileoverview Common low level runtime utilities.\n */\ngoog.module('jspb.internal');\n\nconst {ArrayState, ArrayStateFlags, addArrayStateFlags, getArrayIndexOffset, getArrayState, getMessageArrayState, hasFlagBit, setArrayState} = goog.require('jspb.internal_array_state');\nconst {ByteString} = goog.require('jspb.bytestring');\nconst {DETAILED_JSPB_ASSERTS} = goog.require('jspb.internal_options');\nconst {ENABLE_ASSERTS, assert, assertArray, assertExists, assertInstanceof, assertNumber, fail} = goog.require('goog.asserts');\nconst {HAS_NATIVE_SYMBOL, MESSAGE_PROTOTYPE_MARKER, WithMessagePrototypeMarker} = goog.require('jspb.internal_symbols');\nconst {dataAsU8, isU8} = goog.require('jspb.internal_bytes');\nconst {unsafeUnwrapByteString} = goog.require('jspb.unsafe_bytestring');\n\n/**\n * Inner interface of the structure of a Message.\n *\n * <p>This can contain whatever we need in order to move functionality into this\n * file and out of message.js.  Because of the `exports` in message.js all\n * functionality needs to be exposed as properties on `Message`, as such it will\n * be inherited by es6 subclasses due to static-side inheritance.  To avoid that\n * internal functionality should be moved here.\n *\n * @interface\n * @extends {WithMessagePrototypeMarker}\n */\nclass InternalMessage {\n  constructor() {\n    /**\n     * @private {!Array<*>}\n     */\n    this.internalArrayDoNotAccessOrElseMightBeUndefinedWhoKnows;\n\n    /**\n     * This flag indicates that the message is mutable but the array is\n     * immutable and we should copy it if we need to mutate.\n     *\n     * @private {!PrivateOptionToken|undefined}\n     */\n    this.copyOnWrite;\n\n    /**\n     * This flag indicates getters should always return `undefined` instead of\n     * `null`. We use this to preserve behavior of messages that are the result\n     * of copies when we take the copy-on-write path. Without copy-on-write,\n     * the copy routine always turns `null` into `undefined`.\n     *\n     * @private {!PrivateOptionToken|undefined}\n     */\n    this.noLegacyNull;\n  }\n\n  /** @return {boolean} */\n  isImmutable() {}\n\n  /** @return {!Array<?>} */\n  toJsonValue() {}\n\n  /** @return {string|undefined} */\n  getJsPbMessageId() {}\n\n  /** @return {?} */\n  getExtension(/** ? */ extensionFieldInfo) {}\n\n  /** @return {number} */\n  getExtensionCount(/** ? */ extensionFieldInfo) {}\n\n  /** @return {boolean} */\n  hasExtension(/** ? */ extensionFieldInfo) {}\n\n  /** @return {?} */\n  getReadonlyExtension(/** ? */ extensionFieldInfo) {}\n\n  /** @return {?} */\n  getExtensionAtIndex(/** ? */ extensionFieldInfo, /** number */ index) {}\n}\n\nconst /** boolean */ USE_SYMBOL_FOR_INTERNAL_ARRAY =\n    goog.DEBUG && HAS_NATIVE_SYMBOL && (Math.random() < 0.5);\n\nconst /** symbol|undefined */ INTERNAL_ARRAY_SYMBOL =\n    USE_SYMBOL_FOR_INTERNAL_ARRAY ? Symbol() : undefined;\n\n/**\n *\n * @param {!InternalMessage} msg The message to get the internal array from.\n * @return {!Array<*>} The internal array of the message.\n * @nosideeffects\n * @requireInlining\n */\nfunction getInternalArrayInline(msg) {\n  assert(isMessage(msg));\n  if (USE_SYMBOL_FOR_INTERNAL_ARRAY) {\n    return msg[assertExists(INTERNAL_ARRAY_SYMBOL)];\n  } else {\n    return msg.internalArrayDoNotAccessOrElseMightBeUndefinedWhoKnows;\n  }\n}\n\n/**\n *\n * @param {!InternalMessage} msg The message to get the internal array from.\n * @return {!Array<*>} The internal array of the message.\n * @nosideeffects\n */\nfunction getInternalArray(msg) {\n  return getInternalArrayInline(msg);\n}\n\n/**\n * Sets the internal array of the message.\n * @param {!InternalMessage} msg\n * @param {!Array<*>} array\n * @requireInlining\n */\nfunction setInternalArrayForNewMessage(msg, array) {\n  assert(isMessage(msg));\n  assertArray(array);\n  if (USE_SYMBOL_FOR_INTERNAL_ARRAY) {\n    msg[assertExists(INTERNAL_ARRAY_SYMBOL)] = array;\n  } else {\n    msg.internalArrayDoNotAccessOrElseMightBeUndefinedWhoKnows = array;\n  }\n}\n\n/**\n * Sets the internal array of the message and clears copyOnWrite.\n * @param {!InternalMessage} msg\n * @param {!Array<*>} array\n * @requireInlining\n */\nfunction setInternalArray(msg, array) {\n  addArrayStateFlags(array, ArrayStateFlags.HAS_WRAPPER);\n  setInternalArrayForNewMessage(msg, array);\n  setCopyOnWrite(msg, false);\n  setNoLegacyNull(msg, false);\n}\n\n/**\n * This exists only to define toMutable somewhere, so that internal_map can call\n * toMutable. Nothing actually references this interface. The use of toMutable\n * in internal_map is on a 'loose type', but if toMutable isn't defined anywhere\n * in the internal modules, the compiler thinks toMutable definitely doesn't\n * exist.\n *\n * We can't put toMutable in InternalMessage because in TS it would be treated\n * as public (even if marked protected), but Message wants to make toMutable\n * protected. TS would consider Message to not be assignable to InternalMessage\n * due to the visibility difference of toMutable.\n *\n * @interface\n */\nclass InternalImmutableMessage {\n  /** @return {*} */\n  toMutable() {}\n}\n\n/**\n * Inner interface of the structure of an ExtensionFieldInfo.\n *\n * @interface\n */\nclass InternalExtensionFieldInfo {\n  constructor() {\n    /** @const {number} */\n    this.fieldIndex;\n\n    /** @const {function(new: InternalMessage, ?Array=)|undefined} */\n    this.extendeeCtor;\n\n    /** @const {?function(new: InternalMessage, ?Array=)} */\n    this.ctor;\n\n    /** @const {number} */\n    this.isRepeated;\n  }\n}\n\n/** @type {?} */\nlet messageCtor;\n\nfunction setMessageCtorInDebug(/** !Function */ ctor) {\n  if (!goog.DEBUG) return;\n  messageCtor = ctor;\n}\n\n/** @const {boolean} */\nconst MESSAGE_PROTOTYPE_MARKER_IS_SYMBOL =\n    typeof MESSAGE_PROTOTYPE_MARKER === 'symbol';\n\n/** @const {!Object} */\nconst MESSAGE_PROTOTYPE_MARKER_VALUE = {};\n\n/**\n * Returns whether or not the object is a Message subtype.  This is intended to\n * be used for values found in the array/sparseObject of a jspb.Message.\n *\n * @param {!Object} v The value, callers should have already checked that it is\n *     non-null.\n * @return {boolean}\n * @tsType (v: Object): v is InternalMessage\n */\nfunction isMessage(v) {\n  const value = v[MESSAGE_PROTOTYPE_MARKER];\n  const result = value === MESSAGE_PROTOTYPE_MARKER_VALUE;\n  assert(!messageCtor || result === (v instanceof messageCtor));\n  if (MESSAGE_PROTOTYPE_MARKER_IS_SYMBOL && value && !result) {\n    if (goog.DEBUG) throw new Error('multiple jspb runtimes detected');\n  }\n  return result;\n}\n\n/**\n * Returns whether or not the value is a Message. Unlike isMessage, accepts all\n * inputs and doesn't throw on nullish values.\n *\n * @param {*} v\n * @return {boolean}\n * @tsType (v: unknown): v is InternalMessage\n */\nfunction isInternalMessage(v) {\n  return v != null && isMessage(/** @type {!Object} */ (v));\n}\n\n/** @const {!Object} */\nconst ANY_PROTOTYPE_MARKER_VALUE = {};\n\n/**\n * Returns whether or not the object is an Any.\n *\n * This is defined to break dep cycles with our generated code.\n *\n * @param {!Object} v The value, callers should have already checked that it is\n *     non-null.\n * @return {boolean}\n */\nfunction isAny(v) {\n  const fn = /** @type {{jspbInternalDoNotUseAnyMarker: !Function}} */ (v)\n                 .jspbInternalDoNotUseAnyMarker;\n  if (typeof fn === 'function') {\n    return fn() === ANY_PROTOTYPE_MARKER_VALUE;\n  }\n  return false;\n}\n\n\n/**\n * Inner interface of the structure of a Map.\n *\n * @interface\n */\nclass InternalMap {\n  constructor() {\n    /**\n     * @private\n     * @const {number}\n     */\n    this.arrayState;\n\n    /**\n     * @private\n     * @const {!Object}\n     */\n    this.mapPrototypeMarker;\n  }\n}\n\n/**\n * Interface used to define the serializeBinaryFnForAnyProto_ property used by\n * packAnyValueJspb.\n *\n * @interface\n */\nclass SerializeBinaryFnHolder {\n  constructor() {\n    /**\n     * If this is an Any proto, this can store the serializeBinary function to\n     * serialize the value to binary. See implementation of packAnyValueJspb.\n     *\n     * @type {(function(?):!Uint8Array)|undefined}\n     */\n    this.serializeBinaryFnForAnyProto_;\n  }\n}\n\n/** @const {!Object} */\nconst MAP_PROTOTYPE_MARKER_VALUE = {};\n\n/**\n * Returns whether or not the object is a JspbMap.\n *\n * Note that this is a property test instead of an `instanceof` check because\n * that is, curiously, about twice as fast.\n *\n * @param {!Object} v The value, callers should have already checked that it is\n *     non-null.\n * @return {boolean}\n * @suppress {visibility} access to map internals\n */\nfunction isMap(v) {\n  const result =\n      !!(v && (typeof v === 'object') &&\n         (/** @type {!InternalMap} */ (v).mapPrototypeMarker ===\n          MAP_PROTOTYPE_MARKER_VALUE));\n  assert(result === (v instanceof Map));\n  return result;\n}\n\n/**\n * Returns whether or not the object is an empty JSPB map.\n *\n * This method is designed to avoid pinning the polyfill for maps.\n *\n * @param {!Object} v The value\n * @return {boolean}\n */\nfunction isEmptyMap(v) {\n  return isMap(v) && assertInstanceof(v, Map).size === 0;\n}\n\n/**\n * Returns the index into `internalArray_` at which the proto field with tag\n * number fieldNumber will be located.\n * @return {number}\n */\nfunction indexFromFieldNumber(\n    /** number */ fieldNumber, /** number */ arrayIndexOffset) {\n  assertNumber(fieldNumber);\n  assert(fieldNumber > 0);\n  assert(arrayIndexOffset === 0 || arrayIndexOffset === -1);\n  return fieldNumber + arrayIndexOffset;\n}\n\n/**\n * Returns the index into the array at which the proto field with tag\n * number fieldNumber will be located.\n * @return {number}\n */\nfunction indexFromFieldNumberAndHasMessageId(\n    /** number */ fieldNumber, /** !HasMessageId|undefined */ hasMessageId) {\n  assert(hasMessageId === HAS_MESSAGE_ID || hasMessageId === NO_MESSAGE_ID);\n  return fieldNumber + (hasMessageId ? 0 : -1);\n}\n\n/**\n * Returns the tag number based on the index in msg.array.\n * @return {number}\n */\nfunction fieldNumberFromIndex(\n    /** number */ index, /** number */ arrayIndexOffset) {\n  assertNumber(index);\n  assert(index >= 0);\n  assert(arrayIndexOffset === 0 || arrayIndexOffset === -1);\n  return index - arrayIndexOffset;\n}\n\n/**\n * Returns true if the provided message immutable.\n *\n * A message is immutable if and only if its array is immutable and it is not\n * copy-on-write.\n * @param {!InternalMessage} msg Message to check.\n * @param {!ArrayState=} arrayState message array state\n * @return {boolean}\n * @package\n */\nfunction isImmutableMessage(msg, arrayState) {\n  // use least expensive path based on already-read data\n  if (arrayState === undefined) {\n    return !isCopyOnWrite(msg) &&\n        hasFlagBit(\n            getMessageArrayState(getInternalArray(msg)),\n            ArrayStateFlags.IS_IMMUTABLE_ARRAY);\n  } else {\n    assert(arrayState === getMessageArrayState(getInternalArray(msg)));\n    return hasFlagBit(arrayState, ArrayStateFlags.IS_IMMUTABLE_ARRAY) &&\n        !isCopyOnWrite(msg);\n  }\n}\n\nclass PrivateOptionToken {}\n\n/** @const {!PrivateOptionToken} */\nconst PRIVATE_OPTION_TOKEN = /** @type {!PrivateOptionToken} */ ({});\n\n/**\n * @param {!InternalMessage} msg\n * @return {boolean}\n */\nfunction isCopyOnWrite(msg) {\n  const value = msg.copyOnWrite;\n  assert(\n      !value ||\n      hasFlagBit(\n          getMessageArrayState(getInternalArray(msg)),\n          ArrayStateFlags.IS_IMMUTABLE_ARRAY));\n  assert(value === undefined || value === PRIVATE_OPTION_TOKEN);\n  return value === PRIVATE_OPTION_TOKEN;\n}\n\n/**\n * @param {!InternalMessage} msg\n * @param {boolean} value\n */\nfunction setCopyOnWrite(msg, value) {\n  assert(\n      value ===\n      hasFlagBit(\n          getMessageArrayState(getInternalArray(msg)),\n          ArrayStateFlags.IS_IMMUTABLE_ARRAY));\n  msg.copyOnWrite = value ? PRIVATE_OPTION_TOKEN : undefined;\n}\n\n/**\n * @param {!InternalMessage} msg\n * @return {boolean}\n */\nfunction isNoLegacyNull(msg) {\n  const value = msg.noLegacyNull;\n  assert(value === undefined || value === PRIVATE_OPTION_TOKEN);\n  return value === PRIVATE_OPTION_TOKEN;\n}\n\n/**\n * @param {!InternalMessage} msg\n * @param {boolean} value\n */\nfunction setNoLegacyNull(msg, value) {\n  msg.noLegacyNull = value ? PRIVATE_OPTION_TOKEN : undefined;\n}\n\n/**\n * Returns true if the provided argument is an extension object.\n *\n * Prior to calling this you should check that the element is the last item of\n * the owning array and that the array is the internalArray_ of a message\n * instance.\n *\n * @param {*} o The object to classify as array or not.\n * @return {boolean} True if the provided object is an extension object.\n * @requireInlining\n */\nfunction isSparseObjectInline(o) {\n  // Normal fields are never plain objects, so we can be sure that if we find an\n  // object here, then it is the extension object.\n  return o != null && typeof o === 'object' &&\n      /** @type {!Object} */ (o).constructor === Object;\n}\n\n/**\n * Returns true if the provided argument is an extension object.\n *\n * Prior to calling this you should check that the element is the last item of\n * the owning array and that the array is the internalArray_ of a message\n * instance.\n *\n * @param {*} o The object to classify as array or not.\n * @return {boolean} True if the provided object is an extension object.\n */\nfunction isSparseObject(o) {\n  return isSparseObjectInline(o);\n}\n\n/**\n * Helper method to ensure that properties iterated with for-in loop come from\n * the object. If JS runs on a pages with other 3rd party code it's possible\n * that that code (e.g. prototype.js) patches native Object.prototype. Without\n * hasOwnProperty JSPB code might get broken by that. Most google code runs on\n * owned pages and it's very unlikely to get patched native prototype. So by\n * default this check always returns true. The check is only enabled when\n * goog.TRUSTED_SITE is set to false.\n *\n * @param {!Object} obj\n * @param {string} property\n * @return {boolean}\n */\nfunction hasOwnPropertyIfNotTrusted(obj, property) {\n  return goog.TRUSTED_SITE ||\n      // Per http://jsben.ch/RIBNc this is the fastest way to call and is, as of\n      // 2023 faster than Object.hasOwn.\n      Object.prototype.hasOwnProperty.call(obj, property);\n}\n\n\n/**\n * A marker for JSPB subclasses which have been explicitly exempted from runtime\n * enforcement. See javascript/apps/jspb/exemptions/unsupported_subclass.js and\n * its callers.\n * @const {symbol|undefined}\n * @public because it is accessed by the 'exemptions' subpackage.\n */\nconst EXEMPTED_SUBCLASS_MARKER = ENABLE_ASSERTS ?\n    Symbol(goog.DEBUG ? 'exempted jspb subclass' : undefined) :\n    undefined;\n\n/**\n * A marker added to all generated JSPB subclasses so the runtime can verify\n * expected subclasses.\n *  @const {symbol|undefined}\n */\nconst GENERATED_SUBCLASS_MARKER = ENABLE_ASSERTS ?\n    Symbol(goog.DEBUG ? 'generated by jspb' : undefined) :\n    undefined;\n\n\n/**\n * Coerce a 'bytes' field to a Uint8Array byte buffer.\n * Note that Uint8Array is not supported on IE versions before 10 nor on Opera\n * Mini. @see http://caniuse.com/Uint8Array\n * @param {string|!Uint8Array|!ByteString|null} value\n * @return {?Uint8Array} The field's coerced value.\n */\nfunction bytesAsU8(value) {\n  return dataAsU8(\n      /** @type {string|?Uint8Array} */ (maybeUnsafeUnwrapByteString(value)));\n}\n\n/** @return {!ByteString} lies */\nfunction invalidBytes(/** ? */ value) {\n  throw goog.DEBUG ?\n      new Error(\n          'cannot coerce ' + value +\n          ' to a ByteString, expected a uint8Array, a base64 encoded string or a ByteString') :\n      new Error();\n}\n/**\n * Wraps a 'bytes' field into a ByteString.\n * @param {string|!Uint8Array|!ByteString|null|undefined} value\n * @param {boolean} invalidIsMissing\n * @param {boolean} allowNullishValues\n * @return {!ByteString|null|undefined} The field's wrapped value.\n */\nfunction bytesAsByteString(value, invalidIsMissing, allowNullishValues) {\n  if (value == null) {\n    if (allowNullishValues) {\n      return value;\n    }\n    return invalidBytes(value);\n  }\n  if (typeof value === 'string') {\n    return ByteString.fromBase64(value);\n  }\n  if (value.constructor === ByteString) {\n    return /** @type {!ByteString} */ (value);\n  }\n  // Even though Uint8Array is not supported on the wire, this is still\n  // called by setters.\n  if (isU8(value)) {\n    return ByteString.fromUint8Array(/** @type {!Uint8Array} */ (value));\n  }\n  // If we get here then the value is invalid, so we either treat it as absent\n  // or fall through and throw.\n  return invalidIsMissing ? undefined : invalidBytes(value);\n}\n\n\n/**\n * @param {*} field\n * @return {*}\n */\nfunction maybeUnsafeUnwrapByteString(field) {\n  if (field instanceof ByteString) {\n    return unsafeUnwrapByteString(field);\n  }\n  return field;\n}\n\n/**\n * @param {!ReadonlyArray<number>|!Set<number>|undefined} repeatedFields\n * @param {number} fieldNumber\n * @return {boolean}\n */\nfunction isRepeatedFieldInSet(repeatedFields, fieldNumber) {\n  return !!repeatedFields &&\n      (Array.isArray(repeatedFields) ?\n           repeatedFields.includes(fieldNumber) :\n           /** @type {!Set<number>} */ (repeatedFields).has(fieldNumber));\n}\n\n/**\n * Checks whether the given value is an empty repeated field. It must be either\n * marked or in the given repeated field array.\n *\n * @param {?} value\n * @param {!ReadonlyArray<number>|!Set<number>|undefined} repeatedFields\n * @param {number} fieldNumber\n * @return {boolean}\n */\nfunction isEmptyRepeatedField(value, repeatedFields, fieldNumber) {\n  if (!Array.isArray(value) || value.length) {\n    return false;\n  }\n\n  // We could be marked with a repeated field bit.\n  const arrayState = getArrayState(value);\n  if (arrayState & ArrayStateFlags.IS_REPEATED_FIELD) {\n    return true;\n  }\n\n  // Or we could know this is a repeated field without having marked it.\n  if (!isRepeatedFieldInSet(repeatedFields, fieldNumber)) {\n    return false;\n  }\n\n  // Write back the bit so we don't have to check the array again.\n  setArrayState(value, arrayState | ArrayStateFlags.IS_REPEATED_FIELD);\n  return true;\n}\n\n/**\n * Throws an error if the given state indicates a frozen parent.\n * @param {!ArrayState} state The parent's array state, if any.\n * @suppress {visibility} access to message internals.\n */\nfunction checkNotImmutableState(state) {\n  if (state & ArrayStateFlags.IS_IMMUTABLE_ARRAY) {\n    if (goog.DEBUG) {\n      throw new Error('Cannot mutate an immutable Message');\n    } else {\n      throw new Error();\n    }\n  }\n}\n\n/**\n * @param {!InternalMessage} msg\n * @param {!ArrayState=} arrayState\n */\nfunction checkMutableMessage(msg, arrayState) {\n  if (isImmutableMessage(msg, arrayState)) {\n    if (goog.DEBUG) {\n      throw new Error('Cannot mutate an immutable Message');\n    } else {\n      throw new Error();\n    }\n  }\n}\n\n/**\n * Throws if `index` is out of range to read from `array`\n * @param {!ReadonlyArray<*>} array\n * @param {number} index\n */\nfunction checkRepeatedIndexInRangeForGet(array, index) {\n  if (typeof index !== 'number' || index < 0 || index >= array.length) {\n    if (goog.DEBUG) {\n      throw new Error(\n          `Index ${index} out of range for field of length ${array.length}.`);\n    } else {\n      throw new Error();\n    }\n  }\n}\n\n/**\n * Throws if `index` is out of range to write to `array`. Allowed to equal the\n * length, since writing would not create holes.\n * @param {!Array<*>} array\n * @param {number|undefined} index\n */\nfunction checkRepeatedIndexInRangeForSet(array, index) {\n  if (typeof index !== 'number' || index < 0 || index > array.length) {\n    if (goog.DEBUG) {\n      throw new Error(\n          `Index ${index} out of range for field of length ${array.length}.`);\n    } else {\n      throw new Error();\n    }\n  }\n}\n\n/** @const {boolean} Whether we support Symbol.hasInstance. */\nconst SUPPORTS_HAS_INSTANCE = goog.FEATURESET_YEAR >= 2018 ||\n    (typeof Symbol != 'undefined' && typeof Symbol.hasInstance != 'undefined');\n\n/**\n * @param {*} value\n * @return {!ObjectPropertyDescriptor}\n * @tsType (value: any): PropertyDescriptor\n */\n// NOTE: the JS externs call it ObjectPropertyDescriptor but the TS externs\n// call the type PropertyDescriptor.\nfunction invisiblePropValue(value) {\n  return {\n    value,\n    configurable: false,\n    writable: false,\n    enumerable: false,\n  };\n}\n\n/**\n * Prevents the given value from being passed to structuredClone interfaces.\n * @param {!Object} obj\n */\nfunction disallowPassingToStructuredClone(obj) {\n  if (goog.DEBUG) {\n    obj['preventPassingToStructuredClone'] = dontPassJspbTypeToStructuredClone;\n  }\n}\n\n/**\n * Set as a property of a JSPB object to prevent passing it over a structured\n * clone interface, which will break and cannot be made to work.\n *\n * If you need to use postMessage etc. with Apps JSPB, please call\n * `.toJsonValue` on the message then pass that value to a\n * message constructor on the other side.\n */\nfunction dontPassJspbTypeToStructuredClone() {}\n\n\n/**\n * An IteratorIterable that transforms the values of another iterable.\n *\n * <p>Like map IteratorIterables, this is lazy and one-shot.\n * @implements {IteratorIterable<B>}\n * @template A, B, THIS_ARG\n * @final\n */\nclass TransformingIteratorIterable {\n  /**\n   * @param {!IteratorIterable<A>} iterable the source iterable.\n   * @param {(function(this: THIS_ARG, A): B)} mapper\n   * @param {THIS_ARG} thisArg\n   */\n  constructor(iterable, mapper, thisArg) {\n    /** @private @const */\n    this.iterable = iterable;\n\n    /** @private @const {function(A): B} */\n    this.mapper = mapper;\n\n    /** @private @const {THIS_ARG} */\n    this.thisArg = thisArg;\n  }\n\n  /**\n   * @override\n   * @return {!IIterableResult<B>}\n   */\n  next() {\n    const r = this.iterable.next();\n    if (!r.done) {\n      r.value = this.mapper.call(this.thisArg, r.value);\n    }\n    return r;\n  }\n\n  /**\n   * @override\n   * @return {!Iterator<B>}\n   */\n  [Symbol.iterator]() {\n    return this;\n  }\n}\n\n\n/**\n * @param {!IteratorIterable<A>} iterable\n * @param {function(A): B} mapper\n * @param {THIS_ARG} thisArg\n * @return {!IteratorIterable<B>}\n * @template A, B, THIS_ARG\n */\nfunction newTransformingIteratorIterable(iterable, mapper, thisArg) {\n  return new TransformingIteratorIterable(iterable, mapper, thisArg);\n}\n\n/**\n * Type information required for performing accurate comparisons.\n *\n * This type encapsulates best-effort information about which fields are either\n * repeated or maps, to be used during comparisons.\n * @interface\n */\nclass ComparisonTypeInfo {\n  constructor() {\n    /** @type {!Set<number>|undefined} */\n    this.repeatedFields;\n\n    /** @type {!Set<number>|undefined} */\n    this.mapFields;\n  }\n\n  /**\n   * @return {!ComparisonTypeInfo|undefined}\n   */\n  getFieldComparisonTypeInfo(/** number */ fieldNumber) {}\n\n  /**\n   * @return {!Set<number>}\n   */\n  getRepeatedFields() {}\n\n  /**\n   * @return {!Set<number>}\n   */\n  getMapFields() {}\n}\n\n/**\n * Asserts state invariants on the given array.\n *\n * Note that it's safe to skip the frozenness check _only_ when calling from\n * ImmutableJS, when we know that the ImmutableJS accessors will freeze after\n * potentially caching a coerced array on this one.\n */\nfunction assertArrayInvariants(\n    /** !Array */ arr, /** boolean= */ skipFrozennessCheck) {\n  if (!goog.DEBUG) return;\n\n  // Assert that we're always marked as repeated\n  const state = getArrayState(assertArray(arr));\n\n  // If a repeated field array is marked with the frozen bit, or the immutable\n  // and api formatted bits, then assert that the array is actually frozen.\n  // array is always frozen.\n  if (!skipFrozennessCheck) {\n    const shouldBeFrozen = ((state & ArrayStateFlags.IS_IMMUTABLE_ARRAY) &&\n                            (state & ArrayStateFlags.IS_API_FORMATTED)) ||\n        (state & ArrayStateFlags.FROZEN_ARRAY);\n    assert(!shouldBeFrozen || Object.isFrozen(arr));\n  }\n\n  if (DETAILED_JSPB_ASSERTS && !(state & ArrayStateFlags.UNFROZEN_SHARED)) {\n    // Don't bother checking value mutabilities unless we might assert on them.\n    const onlyMutableValues = !!(state & ArrayStateFlags.ONLY_MUTABLE_VALUES);\n    const onlyImmutableValues =\n        !(state & ArrayStateFlags.MUTABLE_SUBSTRUCTURES);\n    if (onlyMutableValues || onlyImmutableValues) {\n      let hasMutableMessage, hasImmutableMessage, hasInlineArray;\n      for (const v of arr) {\n        if (Array.isArray(v)) {\n          hasInlineArray = true;\n        } else if (isInternalMessage(v)) {\n          if (isImmutableMessage(v)) {\n            hasImmutableMessage = true;\n          } else {\n            hasMutableMessage = true;\n          }\n        }\n      }\n\n      // If we had an inlined array, we can't say formatted.\n      if (hasInlineArray) {\n        assert(!(state & ArrayStateFlags.IS_API_FORMATTED));\n      }\n\n      // We cannot have a mutable message without MUTABLE_SUBSTRUCTURES.\n      if (onlyImmutableValues) {\n        assert(!hasMutableMessage);\n      }\n\n      // We cannot have an inlined immutable message with ONLY_MUTABLE_VALUES.\n      if (onlyMutableValues) {\n        assert(!hasInlineArray && !hasImmutableMessage);\n      }\n    }\n  }\n  assertRepeated64BitIntegerFieldApiFormattingInvariants(arr);\n}\n\n/**\n * Verifies that a string-formatted [u]int64 field contains only string\n * elements.\n *\n * @param {!Array<?>} arr\n */\nfunction assertStringFormattedInvariant(arr) {\n  if (!DETAILED_JSPB_ASSERTS) return;\n\n  const state = getArrayState(arr);\n\n  if (!hasFlagBit(state, ArrayStateFlags.STRING_FORMATTED)) {\n    return;\n  }\n\n  for (let i = 0; i < arr.length; i++) {\n    if (typeof arr[i] !== 'string') {\n      fail(`Unexpected element of type ${\n          typeof arr[i]} in string formatted repeated 64-bit int field`);\n    }\n  }\n}\n\n/**\n * Verifies that a 64-bit int repeated field has the correct API formatting\n * array state flags.\n *\n * - There is at most 1 type-specific flag (may be 0 if not already API\n * formatted or is the empty list sentinel)\n * - If string formatted, all elements are strings\n *\n * @param {!Array<?>} arr\n */\nfunction assertRepeated64BitIntegerFieldApiFormattingInvariants(arr) {\n  if (!ENABLE_ASSERTS) return;\n\n  const state = getArrayState(arr);\n  const isApiFormatted = state & ArrayStateFlags.IS_API_FORMATTED;\n\n  const typeFormattedSetCount =\n      (hasFlagBit(state, ArrayStateFlags.STRING_FORMATTED) ? 1 : 0) +\n      (hasFlagBit(state, ArrayStateFlags.GBIGINT_FORMATTED) ? 1 : 0);\n\n  assert(\n      (isApiFormatted && typeFormattedSetCount <= 1) ||\n          (!isApiFormatted && typeFormattedSetCount === 0),\n      `Expected at most 1 type-specific formatting bit, but got ${\n          typeFormattedSetCount} with state: ${state}`);\n\n  assertStringFormattedInvariant(arr);\n}\n\n/**\n * @nosideeffects\n * @return {?}\n */\nfunction makeToken() {\n  return Object.freeze({});\n}\n\n// Do not export these. Do not mark @private\n// The intent is just to be types that are not externally instantiable.\nclass InternalDoNotFreezeToken {}\n\n/** @typedef {!InternalDoNotFreezeToken} */\nlet DoNotFreezeToken;\n\n/** @type {!DoNotFreezeToken} */\nconst DO_NOT_FREEZE__LEGACY_OPTION = makeToken();\n\n/** @template T */\nclass OrUndefinedToken {}\n\n// type param is for closure type inference.\n/** @type {!OrUndefinedToken<undefined>} */\nconst OR_UNDEFINED = makeToken();\n\n/**\n * A private key to guard methods on DescriptorTypeReferenceImpl.\n * @const {!Object}\n */\nconst DESCRIPTOR_TYPE_REFERENCE_INTERNAL_ARG = {};\n\n/** @const {symbol|undefined} */\nconst DEBUG_EXTENSIONS = goog.DEBUG ? Symbol('debugExtensions') : undefined;\n\n/** @return {!Object<!Object<string, !InternalExtensionFieldInfo>>|undefined} */\nfunction getExtensionRegistryForDebugging(/** !Function */ parentCtor) {\n  return parentCtor[DEBUG_EXTENSIONS];\n}\n\n/**\n * Registers extensions for debugging;\n */\nfunction registerExtensionsForDebugging(\n    /** !Function */ ctor, /** ? */ extensions) {\n  ctor[DEBUG_EXTENSIONS] = extensions;\n}\n\n/** @return {boolean} */\nfunction startsWith(/** string */ str, /** string */ prefix) {\n  return str.indexOf(prefix) === 0;\n}\n\n/** @return {boolean} */\nfunction endsWith(/** string */ str, /** string */ suffix) {\n  return str.lastIndexOf(suffix) === Math.max(0, str.length - suffix.length);\n}\n\n/**\n * Iterates over all fields in a message array with a callback\n *\n * @param {!Array} internalArray to iterate the fields of.\n * @param {!ArrayState} messageArrayState array state.\n * @param {function (number, *)} callback to call on each fields.\n *     The arguments are the value and the field number.\n */\nfunction iterateFields(internalArray, messageArrayState, callback) {\n  // Our iteration is not correct unless we have a consistent HAS_MESSAGE_ID.\n  assert(messageArrayState & ArrayStateFlags.CONSTRUCTED);\n  const arrayIndexOffset = getArrayIndexOffset(messageArrayState);\n  const arrayLength = internalArray.length;\n  const hasSparseObject =\n      !!arrayLength && isSparseObjectInline(internalArray[arrayLength - 1]);\n  const end = arrayLength + (hasSparseObject ? -1 : 0);\n  assert(!!hasSparseObject === isSparseObject(internalArray[arrayLength - 1]));\n  for (let i = (messageArrayState & ArrayStateFlags.HAS_MESSAGE_ID) ? 1 : 0;\n       i < end; i++) {\n    const value = internalArray[i];\n    callback(fieldNumberFromIndex(i, arrayIndexOffset), value);\n  }\n\n  if (hasSparseObject) {\n    const sparseObject = internalArray[arrayLength - 1];\n    for (const k in sparseObject) {\n      if (!hasOwnPropertyIfNotTrusted(sparseObject, k) || isNaN(k)) {\n        continue;\n      }\n      callback(+k, sparseObject[k]);\n    }\n  }\n}\n\n/**\n * Opaque type that indicates that a message has a messageId field.\n * @abstract\n */\nclass HasMessageId {\n  constructor() {\n    throw new Error('not instantiable');\n  }\n}\n\nconst /** !HasMessageId */ HAS_MESSAGE_ID =\n    /** @type {!HasMessageId} */ (/** @type {?} */ ({}));\n\nconst /** !HasMessageId|undefined */ NO_MESSAGE_ID = undefined;\n\nfunction assertValidHasMessageIdOrUndefined(\n    /** !Array */ messageArray, /** !HasMessageId|undefined */ hasMessageId) {\n  if (!ENABLE_ASSERTS) return;\n  const arrayState = getArrayState(messageArray);\n  // The HAS_MESSAGE_ID bit is not consistent unless CONSTRUCTED is set.\n  assert(arrayState & ArrayStateFlags.CONSTRUCTED);\n  if (arrayState & ArrayStateFlags.HAS_MESSAGE_ID) {\n    assert(hasMessageId === HAS_MESSAGE_ID);\n  } else {\n    assert(hasMessageId === NO_MESSAGE_ID);\n  }\n}\n\n/** @return {!HasMessageId|undefined} */\nfunction getHasMessageId(/** number */ arrayState) {\n  assert(arrayState & ArrayStateFlags.CONSTRUCTED);\n  return arrayState & ArrayStateFlags.HAS_MESSAGE_ID ? HAS_MESSAGE_ID :\n                                                       NO_MESSAGE_ID;\n}\n\nexports = {\n  ANY_PROTOTYPE_MARKER_VALUE,\n  ComparisonTypeInfo,\n  DESCRIPTOR_TYPE_REFERENCE_INTERNAL_ARG,\n  DO_NOT_FREEZE__LEGACY_OPTION,\n  DoNotFreezeToken,\n  EXEMPTED_SUBCLASS_MARKER,\n  GENERATED_SUBCLASS_MARKER,\n  HAS_MESSAGE_ID,\n  HasMessageId,\n  InternalExtensionFieldInfo,\n  InternalImmutableMessage,\n  InternalMap,\n  InternalMessage,\n  MAP_PROTOTYPE_MARKER_VALUE,\n  MESSAGE_PROTOTYPE_MARKER_VALUE,\n  NO_MESSAGE_ID,\n  OR_UNDEFINED,\n  OrUndefinedToken,\n  SUPPORTS_HAS_INSTANCE,\n  SerializeBinaryFnHolder,\n  assertArrayInvariants,\n  assertRepeated64BitIntegerFieldApiFormattingInvariants,\n  assertValidHasMessageIdOrUndefined,\n  bytesAsByteString,\n  bytesAsU8,\n  checkMutableMessage,\n  checkNotImmutableState,\n  checkRepeatedIndexInRangeForGet,\n  checkRepeatedIndexInRangeForSet,\n  disallowPassingToStructuredClone,\n  endsWith,\n  fieldNumberFromIndex,\n  getExtensionRegistryForDebugging,\n  getHasMessageId,\n  hasOwnPropertyIfNotTrusted,\n  indexFromFieldNumber,\n  indexFromFieldNumberAndHasMessageId,\n  invisiblePropValue,\n  isAny,\n  isEmptyMap,\n  isEmptyRepeatedField,\n  isImmutableMessage,\n  isInternalMessage,\n  isMap,\n  isMessage,\n  isRepeatedFieldInSet,\n  isSparseObject,\n  isSparseObjectInline,\n  iterateFields,\n  maybeUnsafeUnwrapByteString,\n  newTransformingIteratorIterable,\n  registerExtensionsForDebugging,\n  setMessageCtorInDebug,\n  startsWith,\n  getInternalArray,\n  getInternalArrayInline,\n  setInternalArray,\n  setInternalArrayForNewMessage,\n  isCopyOnWrite,\n  setCopyOnWrite,\n  isNoLegacyNull,\n  setNoLegacyNull,\n};\n","/**\n * @fileoverview The asserts module provides various top-level functions to make\n * complex type assertions and type casts easier in TypeScript.\n */\n\nimport {\n  AnyGuard,\n  BrandedGuard,\n  Context,\n  DebugContext,\n  DebugGuard,\n  ENABLE_ASSERTS,\n  StateGuard,\n  TypeGuard,\n  basicPrettyPrint,\n} from './internal';\n\nexport {type Context, type StateGuard, type TypeGuard};\n\n/**\n * A `LazyMsg` is a custom error message as either a string or a `LazyMsgFunc`.\n */\nexport type LazyMsg = string | LazyMsgFunc;\n\n/**\n * A function that returns a custom error message. Called only when the message\n * is needed (the assertion has failed).\n */\nexport type LazyMsgFunc = () => string;\n\n/**\n * A ProdLazyMsg is similar to a LazyMsg, but also allows passing in the return\n * values from the `keepInProd` function. This type is only accepted by the\n * prod* top-level functions.\n *\n * See the documentation on `keepInProd` for more information.\n */\nexport type ProdLazyMsg = LazyMsg | RetainedMessage;\n\n/**\n * `keepInProd` stashes the provided `LazyMsg` to later produce custom error\n * messages when throwing assertion errors. Ensures the custom error message is\n * not removed by the compiler.\n *\n * This function is intentionally limited in its capability: the only intended\n * use-case is to **directly** pass the value returned into a prod* variant\n * function call. Do not store and pass around these returned values. See\n * go/guards-and-assertions#custom-error-messages-in-production for more\n * information.\n */\nexport function keepInProd(leakedString: LazyMsg): RetainedMessage {\n  prodAssertTruthy(\n    !keepInProdMsg,\n    'keepInProd must only be called directly as the `msg` param in `prod*` functions',\n  );\n  keepInProdMsg = new RetainedMessage(leakedString);\n  return undefined as unknown as RetainedMessage;\n}\n\n/**\n * Assert executes the given guard against the given argument, and will throw an\n * error if the argument does not satisfy the guard.\n *\n * When called with a type guard, in the function scope after the `assert`, the\n * type of `arg` will be intersected with `T` from `TypeGuard<T>`. For example,\n * if `arg` is a `Foo` and `isBar` is a `TypeGuard<Bar>`, calling\n * `assert(arg, isBar);` will afterwards cause `arg` to be typed as `Foo & Bar`.\n *\n * The assertion is compiled out when `ENABLE_ASSERTS` is false.\n * @param arg The argument to assert on.\n * @param guard The guard to execute.\n * @param msg An optional custom error message used in debug builds.\n */\nexport function assert<T>(\n  arg: unknown,\n  guard: TypeGuard<T>,\n  msg?: LazyMsg,\n): asserts arg is T;\nexport function assert<A>(arg: A, guard: StateGuard<A>, msg?: LazyMsg): void;\nexport function assert(arg: unknown, guard: AnyGuard, msg?: LazyMsg): void {\n  if (ENABLE_ASSERTS) prodAssert(arg, guard, msg);\n}\n\n/**\n * See `assert`. The assertion is NOT compiled out (when `ENABLE_ASSERTS` is\n * false). Use with caution.\n * @param msg Unless wrapped in `keepInProd`, compiled out entirely in\n *     production builds.\n */\nexport function prodAssert<T>(\n  arg: unknown,\n  guard: TypeGuard<T>,\n  msg?: ProdLazyMsg,\n): asserts arg is T;\nexport function prodAssert<A>(\n  arg: A,\n  guard: StateGuard<A>,\n  msg?: ProdLazyMsg,\n): void;\nexport function prodAssert(\n  arg: unknown,\n  guard: AnyGuard,\n  msg?: ProdLazyMsg,\n): void {\n  // Note: This has side-effects and _must_ be called every time.\n  const keepInProdMsgFunc = maybeGetKeepInProdMsgFunc();\n\n  /// Compiled & optimized codepath.\n  if (!goog.DEBUG) {\n    // \"Happy path\". `guard` is satisfied with `arg` so bail.\n    if (guard(arg)) return;\n\n    const extraMsg = formatLazyMsg(keepInProdMsgFunc)?.concat('\\n') ?? '';\n    throw new Error(extraMsg + String(arg));\n  }\n\n  /// Debug codepath.\n  const context = ([] as string[] as DebugContext)!;\n\n  // \"Happy path\". `guard` is satisfied with `arg` so bail.\n  if (executeNestedGuard(guard, arg, context)) return;\n\n  throwGuardFailure(\n    msg,\n    keepInProdMsgFunc,\n    `Guard ${guardName(guard)} failed:`,\n    ...context.reverse(),\n  );\n}\n\n/**\n * Cast executes the given guard against the given argument and then returns the\n * argument. Will throw an error if the argument does not satisfy the given\n * guard.\n *\n * When called with a type guard, the returned value will be the type of `arg`\n * intersected with `T` from `TypeGuard<T>`. For example, if `arg` is a `Foo`\n * and `isBar` is a `TypeGuard<Bar>`, the returned value of `cast(arg, isBar)`\n * will be typed as `Foo & Bar`.\n *\n * Note, at present, `cast` intentionally does not support state guards. If you\n * need an inline assertion with state guard support, add your use case to\n * b/322206036, thumbs-up an existing use case, or +1 the bug.\n *\n * The assertion is compiled out when `ENABLE_ASSERTS` is false.\n * @param arg The argument to assert on.\n * @param guard The type guard to execute.\n * @param msg An optional custom error message used in debug builds.\n * @checkReturnValue\n */\n// This overload makes `cast(arg, isFoo)`, where `arg` is typed `any`, return a\n// `Foo` instead of `any`. Needed because `any & Foo` is `any`, not `Foo`.\nexport function cast<A extends PrivateAnySymbolIsolator, T>(\n  arg: A,\n  guard: TypeGuard<T>,\n  msg?: LazyMsg,\n): T;\nexport function cast<A, T>(arg: A, guard: TypeGuard<T>, msg?: LazyMsg): A & T;\nexport function cast<T>(arg: unknown, guard: TypeGuard<T>, msg?: LazyMsg): T {\n  assert(arg, guard, msg);\n  return arg;\n}\n\n/**\n * See `cast`. The assertion is NOT compiled out even if `ENABLE_ASSERTS` is\n * false. Use with caution.\n * @param msg Unless wrapped in `keepInProd`, compiled out entirely in\n *     production builds.\n * @checkReturnValue\n */\n// See the comment above the corresponding `cast` overload for more info.\nexport function prodCast<A extends PrivateAnySymbolIsolator, T>(\n  arg: A,\n  guard: TypeGuard<T>,\n  msg?: ProdLazyMsg,\n): T;\nexport function prodCast<A, T>(\n  arg: A,\n  guard: TypeGuard<T>,\n  msg?: ProdLazyMsg,\n): A & T;\nexport function prodCast<T>(\n  arg: unknown,\n  guard: TypeGuard<T>,\n  msg?: ProdLazyMsg,\n): T {\n  prodAssert(arg, guard, msg);\n  return arg;\n}\n\n// The following symbol and type are used to isolate cast calls whose input\n// argument is the `any` type and provide specific overloads to prevent the\n// returned type from always being `any`.\ndeclare const privateSymbolToIsolateAnyTypes: unique symbol;\ntype PrivateAnySymbolIsolator = typeof privateSymbolToIsolateAnyTypes;\n\n/**\n * Asserts the given argument. If the argument is falsy, an error is thrown.\n *\n * The assertion is compiled out when `ENABLE_ASSERTS` is false.\n * @param arg The argument to assert on.\n * @param msg An optional custom error message used in debug builds.\n */\nexport function assertTruthy(arg: unknown, msg?: LazyMsg): asserts arg {\n  if (ENABLE_ASSERTS) prodAssertTruthy(arg, msg);\n}\n\n/**\n * See `assertTruthy`. The assertion is NOT compiled out even if\n * `ENABLE_ASSERTS` is false. Use with caution.\n * @param arg The argument to assert on.\n * @param msg Unless wrapped in `keepInProd`, compiled out entirely in\n *     production builds.\n */\nexport function prodAssertTruthy(arg: unknown, msg?: ProdLazyMsg): asserts arg {\n  // Note: This has side-effects and _must_ be called every time.\n  const keepInProdMsgFunc = maybeGetKeepInProdMsgFunc();\n\n  /// \"Happy path\". `arg` is truthy so bail.\n  if (arg) return;\n\n  /// Compiled & optimized codepath.\n  if (!goog.DEBUG) {\n    throw new Error(formatLazyMsg(keepInProdMsgFunc) || String(arg));\n  }\n\n  /// Debug codepath.\n  throwGuardFailure(\n    'Guard truthy failed:',\n    msg || keepInProdMsgFunc || `Expected truthy, got ${basicPrettyPrint(arg)}`,\n  );\n}\n\n/**\n * `castTruthy` will throw an error if the argument is falsy and otherwise\n * return the argument given with the return value's type narrowed as\n * non-nullable. Explicitly, an error will be thrown if the argument is `null`,\n * `undefined`, `0`, `-0`, `NaN`, or the empty string.\n *\n * Only use `castTruthy` when you need to treat a falsy primitive as invalid and\n * directly use the non-nullable arg result in an expression. `castExists` and\n * `assertTruthy` are preferred otherwise.\n *\n * The assertion is compiled out when `ENABLE_ASSERTS` is false.\n * @param msg An optional custom error message used in debug builds.\n * @checkReturnValue\n */\nexport function castTruthy<\n  A extends number | string | boolean | null | undefined,\n>(arg: A, msg?: LazyMsg): A extends 0 | '' | false ? never : NonNullable<A> {\n  assertTruthy(arg, msg);\n  return arg as A extends 0 | '' | false ? never : NonNullable<A>;\n}\n\n/**\n * See `castTruthy`. The assertion is NOT compiled out (when `ENABLE_ASSERTS` is\n * false). Use with caution.\n * @param msg Unless wrapped in `keepInProd`, compiled out entirely in\n *     production builds.\n * @checkReturnValue\n */\nexport function prodCastTruthy<\n  A extends number | string | boolean | null | undefined,\n>(\n  arg: A,\n  msg?: ProdLazyMsg,\n): A extends 0 | '' | false ? never : NonNullable<A> {\n  prodAssertTruthy(arg, msg);\n  return arg as A extends 0 | '' | false ? never : NonNullable<A>;\n}\n\n/**\n * `assertExists` asserts the argument is neither null nor undefined.\n *\n * The assertion is compiled out when `ENABLE_ASSERTS` is false.\n * @param arg The argument to assert on.\n * @param msg An optional custom error message used in debug builds.\n */\nexport function assertExists<A>(\n  arg: A,\n  msg?: LazyMsg,\n): asserts arg is NonNullable<A> {\n  assert(arg, exists, msg);\n}\n\n/**\n * See `assertExists`. The assertion is NOT compiled out (when `ENABLE_ASSERTS`\n * is false). Use with caution.\n * @param arg The argument to assert on.\n * @param msg Unless wrapped in `keepInProd`, compiled out entirely in\n *     production builds.\n */\nexport function prodAssertExists<A>(\n  arg: A,\n  msg?: ProdLazyMsg,\n): asserts arg is NonNullable<A> {\n  prodAssert(arg, exists, msg);\n}\n\n/**\n * `castExists` will throw an error if the argument is either null or undefined,\n * and otherwise return the argument given.\n *\n * Note that this will _not_ throw an error if falsy values are provided (e.g.,\n * 0 and the empty string). For that behavior, use `castTruthy`.\n *\n * The assertion is compiled out when `ENABLE_ASSERTS` is false.\n * @param arg\n * @param msg An optional custom error message used in debug builds.\n * @checkReturnValue\n */\nexport function castExists<A>(arg: A, msg?: LazyMsg): NonNullable<A> {\n  return cast(arg, exists, msg) as NonNullable<A>;\n}\n\n/**\n * See `castExists`. The assertion is NOT compiled out (when `ENABLE_ASSERTS` is\n * false). Use with caution.\n *\n * Note that this will _not_ throw an error if falsy values are provided (e.g.,\n * empty strings and `0`). For that behavior, use `prodCastTruthy`.\n * @param arg The argument to assert on.\n * @param msg Unless wrapped in `keepInProd`, compiled out entirely in\n *     production builds.\n * @checkReturnValue\n */\nexport function prodCastExists<A>(arg: A, msg?: ProdLazyMsg): NonNullable<A> {\n  return prodCast(arg, exists, msg) as NonNullable<A>;\n}\n\n/**\n * In debug builds, throws an error with an optional custom error message. Call\n * this when your code has entered a code branch which \"should never happen\"\u2122.\n *\n * The assertion is compiled out when `ENABLE_ASSERTS` is false. In other words,\n * by default in production builds, this will _not_ throw an exception! Use\n * `prodFail` if you need to guarantee a thrown exception in prod builds.\n * @param msg An optional custom error message used in debug builds.\n */\nexport function fail(msg?: LazyMsg): never {\n  if (ENABLE_ASSERTS) prodFail(msg);\n  return undefined!;\n}\n\n/**\n * See `fail`. The assertion is NOT compiled out even if `ENABLE_ASSERTS` is\n * false. Use with caution.\n * @param msg Unless wrapped in `keepInProd`, compiled out entirely in\n *     production builds.\n */\nexport function prodFail(msg?: ProdLazyMsg): never {\n  // Note: This has side-effects and _must_ be called every time.\n  const keepInProdMsgFunc = maybeGetKeepInProdMsgFunc();\n\n  /// Compiled & optimized codepath.\n  if (!goog.DEBUG) {\n    throw new Error(formatLazyMsg(keepInProdMsgFunc));\n  }\n\n  /// Debug codepath.\n  throwGuardFailure('Assertion fail:', msg || keepInProdMsgFunc);\n}\n\n/**\n * StateGuardFn implements a runtime check to verify the state of an arg.\n * The StateGuardFn is also passed a Context, created and managed by the\n * assertion framework, used for recording debug information. This information\n * (and the parameter) is removed in production builds.\n */\ntype StateGuardFn<A> = (arg: A, context: Context) => boolean;\n\n/**\n * defineStateGuard is a factory function that constructs new StateGuards from\n * the given StateGuardFn and other debugging information. Where possible, avoid\n * using this and instead use the pre-defined guards in ./guards.\n * @param stateGuardFn The guard's runtime verification function.\n * @param guardName A string or a function that returns a name for this guard.\n *     For StateGuards, the general convention is to just use the variable name:\n *     `const isAdjective = defineStateGuard(..., 'isAdjective');`\n *     Used ONLY in debug mode for human-readable error messages and will be\n *     compiled away when `ENABLE_ASSERTS` is false.\n */\nexport function defineStateGuard<A>(\n  stateGuardFn: StateGuardFn<A>,\n  guardName: string | (() => string),\n): StateGuard<A> {\n  // Marks a `stateGuardFn` as being a guard to enable `isGuard`.\n  (\n    stateGuardFn as unknown as BrandedGuard\n  ).isGuard_doNotManuallySetPrettyPlease = true;\n  if (!goog.DEBUG) return stateGuardFn as StateGuard<A>;\n  const debugGuard = stateGuardFn as DebugGuard;\n  debugGuard.guardName =\n    typeof guardName === 'function' ? guardName : () => guardName;\n  return debugGuard;\n}\n\n/**\n * TypeGuardFn implements the exact runtime checks to determine if arg is really\n * of type T.\n * The TypeGuardFn is also passed a Context, created and managed by the\n * assertion framework, used for recording debug information. This information\n * (and the parameter) is removed in production builds.\n */\ntype TypeGuardFn<T> = (arg: unknown, context: Context) => arg is T;\n\n/**\n * defineTypeGuard is a factory function that constructs new TypeGuards from the\n * given TypeGuardFn and other debugging information. Where possible, avoid\n * using this and instead use the pre-defined guards in ./guards.\n * @param typeGuardFn The guard's runtime type-checking function. This function\n *     MUST assert exact membership in `T`.\n * @param guardedTypeName A string or a function that returns the type `T` in\n *     string form as the TypeScript compiler would display it:\n *     `const isXyz = defineTypeGuard((arg: unknown): arg is Xyz {...}, 'Xyz');`\n *     Used ONLY in debug mode for human-readable error messages and will be\n *     compiled away when `ENABLE_ASSERTS` is false.\n */\n// Note: We completely re-use defineStateGuard rather than inline a call to it\n// to ensure complete dead-code elimination in prod builds.\nexport const defineTypeGuard = defineStateGuard as unknown as <T>(\n  typeGuardFn: TypeGuardFn<T>,\n  guardedTypeName: string | (() => string),\n) => TypeGuard<T>;\n\n/**\n * Describes a guard, useful when naming custom higher-order guards. In\n * production builds, this function returns an empty string.\n *\n * For type guards, this is the guarded type (e.g. for `TypeGuard<Foo>`, the\n * guard's name would be \"Foo\").\n *\n * For state guards, this describes the performed check (e.g. for a\n * `StateGuard<number>` that checks for prime numbers, the guard's name could be\n * \"prime\").\n * @param guard The guard to describe.\n */\n// Because StateGuard is contravariant, to accept all guards, we cannot use\n// StateGuard<unknown>. We _could_ use StateGuard<never> but that is arguably\n// more confusing than StateGuard<any>.\n// tslint:disable-next-line:no-any\nexport function guardName(guard: StateGuard<any>): string {\n  if (!goog.DEBUG) return '';\n  return (guard as DebugGuard).guardName().trim();\n}\n\n/**\n * `executeNestedGuard` is a helper function intended only to be used inside the\n * implementation function of a guard so that the debugging context (in debug\n * mode) is propagated for that nested guard execution.\n * @param guard The guard to execute.\n * @param arg The argument to test using the guard.\n * @param context A testing context. This is created by the assertion framework\n *     and passed to a guard and must be passed along to ensure accurate\n *     debugging information.\n * @param contextMsg An optional string (or function that will be called) to add\n *     more context to the guard's failure only in debug mode. For example,\n *     array guards use this to provide the index that was being checked, and\n *     map guards might use this to provide the key for the value being checked.\n * @return The result of `guard(arg)`.\n */\nexport function executeNestedGuard<T>(\n  guard: TypeGuard<T>,\n  arg: unknown,\n  context: Context,\n  contextMsg?: string | (() => string),\n): arg is T;\nexport function executeNestedGuard<A>(\n  guard: StateGuard<A>,\n  arg: A,\n  context: Context,\n  contextMsg?: string | (() => string),\n): boolean;\nexport function executeNestedGuard(\n  guard: AnyGuard,\n  arg: unknown,\n  context: Context,\n  contextMsg?: string | (() => string),\n): boolean {\n  if (!goog.DEBUG) return guard(arg);\n  const debugGuard = guard as DebugGuard;\n  const guardPassed = debugGuard(arg, context as DebugContext);\n  if (!guardPassed) {\n    addMessageToContext(context, () => {\n      let additionalContext = contextMsg\n        ? (typeof contextMsg === 'function' ? contextMsg() : contextMsg).trim()\n        : '';\n      if (additionalContext.length > 0) additionalContext += ': ';\n      return `${additionalContext}Expected ${guardName(\n        guard,\n      )}, got ${basicPrettyPrint(arg)}`;\n    });\n  }\n  return guardPassed;\n}\n\n/**\n * `addMessageToContext` is a helper function (intended only to be used inside\n * the implementation function of a guard) that adds the given `contextMsg` to\n * the context.\n *\n * Prefer calling `executeNestedGuard` instead where feasible.\n * @param context A testing context. This is created by the assertion framework\n *     and passed to a guard and must be passed along to ensure accurate\n *     debugging information.\n * @param contextMsg An optional string (or function that will be called) to add\n *     more context to the guard's failure only in debug mode.\n */\nexport function addMessageToContext(\n  context: Context,\n  contextMsg: string | (() => string),\n): void {\n  if (!goog.DEBUG) return;\n  (context as DebugContext)?.push(\n    (typeof contextMsg === 'function' ? contextMsg() : contextMsg).trim(),\n  );\n}\n\n// Note to maintainers: this type is not exported to discourage incorrect usage\n// of the keepInProd function (by storing the returned value into a variable,\n// instead of passing it directly into a prod* variant).\nclass RetainedMessage {\n  constructor(readonly msg: LazyMsg) {}\n}\n\n/**\n * This module local variable stores a function wrapping the value passed to the\n * most recently executed keepInProd function call, and is checked whenever the\n * framework is expected to produce error messages.\n *\n * DO NOT DIRECTLY ACCESS. Use `maybeGetKeepInProdMsgFunc`.\n */\nlet keepInProdMsg: RetainedMessage | undefined = undefined;\n\n/**\n * If `keepInProd` was called immediately before calling this function, returns\n * a function that, when called, evaluates the most recent `leakedString` passed\n * to a `keepInProd` call. Otherwise, returns undefined.\n *\n * Note: This function purposefully has side effects as it clears\n * `keepInProdMsgFunc` when called.\n */\nfunction maybeGetKeepInProdMsgFunc(): RetainedMessage | undefined {\n  const localKeepInProdMsg = keepInProdMsg;\n  // This is a hack to tell the js compiler that this assignment is dead if\n  // `keepInProd` is never called.\n  if (localKeepInProdMsg instanceof RetainedMessage) {\n    keepInProdMsg = undefined;\n  }\n  return localKeepInProdMsg;\n}\n\nfunction formatLazyMsg(msg: ProdLazyMsg | undefined): string | undefined {\n  if (msg instanceof RetainedMessage) {\n    msg = msg.msg;\n  }\n  return typeof msg === 'function' ? msg() : msg;\n}\n/**\n * Constructs and throws an `Error`. `LazyMsgFunc` parts are called to get the\n * message string. Parts are concatenated with newlines.\n */\nfunction throwGuardFailure(\n  ...errorMsgParts: Array<ProdLazyMsg | undefined>\n): never {\n  throw new Error(\n    errorMsgParts\n      .map(formatLazyMsg)\n      .filter(Boolean)\n      .join('\\n')\n      .trim()\n      .replace(/:$/, ''),\n  );\n}\n\n/**\n * The exists type guard is an internal guard that checks whether the given\n * argument is neither null nor undefined.\n */\nconst exists = defineTypeGuard(\n  (arg: unknown): arg is {} => arg !== null && arg !== undefined,\n  'exists',\n);\n","/**\n * @fileoverview The Guards module provides various core TypeGuards and\n * StateGuards, to be used with the asserts module (see ./asserts).\n *\n * The TypeGuards are not intended to be exhaustive of the TypeScript type\n * system, but rather to address the most common types that users tend to want\n * to have some form of runtime checking for.\n *\n * The set of library-provided StateGuards is currently limited. In general, we\n * expect most users to author their own state guards. For instructions on\n * creating state guards, see: go/guards-and-assertions#custom-state-guards\n */\n\nimport {Simplify, TupleToUnion, UnionToIntersection} from 'type-fest';\n\nimport {\n  addMessageToContext,\n  assert,\n  defineStateGuard,\n  defineTypeGuard,\n  executeNestedGuard,\n  guardName,\n} from './asserts';\nimport {\n  AnyGuard,\n  AnyTypeGuard,\n  BrandedGuard,\n  Context,\n  DebugContext,\n  DebugGuard,\n  IsExactlyNumber,\n  IsExactlyString,\n  IsUnion,\n  IsValidLiteral,\n  OptionalTypeGuard,\n  Result,\n  StateGuard,\n  TypeGuard,\n  basicPrettyPrint,\n  functionName,\n  isOptionalGuard,\n} from './internal';\n\n/** isNumber is a TypeGuard for the number type. */\nexport const isNumber: TypeGuard<number> = defineTypeGuard(\n  (arg: unknown, context: Context): arg is number => {\n    return typeof arg === 'number';\n  },\n  'number',\n);\n\n/** isZero is a TypeGuard for 0. */\nexport const isZero: TypeGuard<0> = isLiteral(0);\n\n/** isSafeInteger checks if a number is a safe integer. */\nexport const isSafeInteger: StateGuard<number> = defineStateGuard(\n  (arg: number, context: Context) => Number.isSafeInteger(arg),\n  'isSafeInteger',\n);\n\n/** isInteger checks if a number is an integer. */\nexport const isInteger: StateGuard<number> = defineStateGuard(\n  (arg: number, context: Context) => Number.isInteger(arg),\n  'isInteger',\n);\n\n/** isFinite checks if a number is finite. */\nexport const isFinite: StateGuard<number> = defineStateGuard(\n  (arg: number, context: Context) => Number.isFinite(arg),\n  'isFinite',\n);\n\n/** isGreaterThan returns a StateGuard for `arg > min`. */\nexport function isGreaterThan(min: number): StateGuard<number> {\n  return defineStateGuard(\n    (arg: number) => arg > min,\n    () => `isGreaterThan(${basicPrettyPrint(min)})`,\n  );\n}\n\n/** isAtLeast returns a StateGuard for `arg >= min`. */\nexport const isAtLeast: typeof isGte = isGte;\n\n/** isGreaterThanOrEqualTo returns a StateGuard for `arg >= min`. */\nexport const isGreaterThanOrEqualTo: typeof isGte = isGte;\n\nfunction isGte(min: number): StateGuard<number> {\n  return defineStateGuard(\n    (arg: number) => arg >= min,\n    () => `isGreaterThanOrEqualTo(${basicPrettyPrint(min)})`,\n  );\n}\n\n/** isLessThan returns a StateGuard for `arg < max`. */\nexport function isLessThan(max: number): StateGuard<number> {\n  return defineStateGuard(\n    (arg: number) => arg < max,\n    () => `isLessThan(${basicPrettyPrint(max)})`,\n  );\n}\n\n/** isLessThanOrEqualTo returns a StateGuard for `arg <= max`. */\nexport const isLessThanOrEqualTo: typeof isLte = isLte;\n\n/** isAtMost returns a StateGuard for `arg <= max`. */\nexport const isAtMost: typeof isLte = isLte;\n\nfunction isLte(max: number): StateGuard<number> {\n  return defineStateGuard(\n    (arg: number) => arg <= max,\n    () => `isLessThanOrEqualTo(${basicPrettyPrint(max)})`,\n  );\n}\n\n// NOTE: For range checks, write:\n// [0, 1]: isAllOf(isAtLeast(0), isAtMost(1))\n// [0, 1): isAllOf(isGreaterThanOrEqualTo(0), isLessThan(1))\n// (0, 1): isAllOf(isGreaterThan(0), isLessThan(1))\n// (0, 1]: isAllOf(isGreaterThan(0), isLessThanOrEqualTo(1))\n//\n// Alternatively, write two assertions:\n// [0, 1]: assert(arg, isAtLeast(0)); assert(arg, isAtMost(1));\n\n/**\n * isString is a TypeGuard for the string type. Note that this says nothing\n * about the length of strings (e.g. '' is still a string).\n */\nexport const isString: TypeGuard<string> = defineTypeGuard(\n  (arg: unknown, context: Context): arg is string => typeof arg === 'string',\n  'string',\n);\n\n/** isEmptyString is a TypeGuard for the empty string. */\nexport const isEmptyString: TypeGuard<''> = isLiteral('');\n\n/**\n * isNotBlank ensures a string is neither the empty string or all whitespace.\n */\nexport const isNotBlank: StateGuard<string> = defineStateGuard(\n  (arg: string, context: Context) => arg.trim() !== '',\n  'isNotBlank',\n);\n\n/** isBlank checks if a string is blank (empty or all whitespace). */\nexport const isBlank: StateGuard<string> = defineStateGuard(\n  (arg: string, context: Context) => arg.trim() === '',\n  'isBlank',\n);\n\n/**\n * startsWith returns a StateGuard that checks if a string starts with `prefix`.\n *\n * @checkReturnValue\n */\nexport function startsWith(prefix: string): StateGuard<string> {\n  return defineStateGuard(\n    (arg: string, context: Context) => arg.startsWith(prefix),\n    () => `startsWith(${basicPrettyPrint(prefix)})`,\n  );\n}\n\n/**\n * endsWith returns a StateGuard that checks if a string ends with `suffix`.\n *\n * @checkReturnValue\n */\nexport function endsWith(suffix: string): StateGuard<string> {\n  return defineStateGuard(\n    (arg: string, context: Context) => arg.endsWith(suffix),\n    () => `endsWith(${basicPrettyPrint(suffix)})`,\n  );\n}\n\n/**\n * stringIncludes returns a StateGuard that checks if a string includes\n * `subString`.\n * @checkReturnValue\n */\nexport function stringIncludes(subString: string): StateGuard<string> {\n  return defineStateGuard(\n    (arg: string, context: Context) => arg.includes(subString),\n    () => `stringIncludes(${basicPrettyPrint(subString)})`,\n  );\n}\n\n/**\n * stringMatches returns a StateGuard that checks if a string matches `regExp`.\n *\n * The passed-in `regExp` may not be global (flag 'g') nor sticky (flag 'y') as\n * they can make the returned state guard behave inconsistently.\n * @checkReturnValue\n */\nexport function stringMatches(regExp: RegExp): StateGuard<string> {\n  assert(\n    regExp,\n    isAllOf(isNot(isGlobalRegExp), isNot(isStickyRegExp)),\n    'stringMatches does not support global nor sticky regular expressions as they can make the returned state guard behave inconsistently',\n  );\n\n  return defineStateGuard(\n    (arg: string, context: Context) => regExp.test(arg),\n    () => `stringMatches(${regExp})`,\n  );\n}\n\n/**\n * isBoolean is a TypeGuard for the boolean type. Note that this is different\n * from truthiness - see the `exists` guard in ./asserts for the closest\n * equivalent.\n */\nexport const isBoolean: TypeGuard<boolean> = defineTypeGuard(\n  (arg: unknown, context: Context): arg is boolean => typeof arg === 'boolean',\n  'boolean',\n);\n\n/**\n * isBigInt is a TypeGuard for the native bigint values. Note that bigint is not\n * universally supported in all browsers. See go/bigint for guidance on working\n * with big integer values.\n *\n * Related guards:\n * - isGbigint google3/javascript/common/bigint/index.ts?q=symbol:isGbigint\n * - isJSbi\n * google3/third_party/javascript/jsbi/g3_wrapper/bigint_helpers.ts?q=symbol:isJsbi\n */\nexport const isBigInt: TypeGuard<bigint> = defineTypeGuard(\n  (arg: unknown): arg is bigint => typeof arg === 'bigint',\n  'bigint',\n);\n\n/** isNull is a TypeGuard for the null primitive. */\nexport const isNull: TypeGuard<null> = defineTypeGuard(\n  (arg: unknown, context: Context): arg is null => arg === null,\n  'null',\n);\n\n/** isUndefined is a TypeGuard for the undefined primitive. */\nexport const isUndefined: TypeGuard<undefined> = defineTypeGuard(\n  (arg: unknown, context: Context): arg is undefined => arg === undefined,\n  'undefined',\n);\n\n/**\n * isNullish is a TypeGuard for null or undefined.\n *\n * For more info, see go/mdn-glossary/Nullish.\n */\nexport const isNullish: TypeGuard<null | undefined> = defineTypeGuard(\n  (arg: unknown): arg is null | undefined => arg == null,\n  'null | undefined',\n);\n\n/**\n * isLiteral returns a TypeGuard for literal values. The passed-in arg may only\n * be a single distinct literal value. Works with string and numeric enum values\n * as well.\n *\n * Notes:\n * - To guard a union of literals, use `isAnyLiteralOf`.\n * - To guard all values of an enum, use `isEnumMemberOf`.\n * - To guard null or undefined, use `isNull` or `isUndefined`.\n * - DO NOT use with string template types (e.g., `a${number}`).\n * @checkReturnValue\n */\nexport function isLiteral<\n  E extends number | string | boolean | bigint | symbol,\n>(literal: LiteralArg<E>): TypeGuard<E> {\n  return defineTypeGuard(\n    (arg: unknown, context: Context): arg is E => arg === literal,\n    // basicPrettyPrint() is more readable than String() for several types.\n    () => basicPrettyPrint(literal),\n  );\n}\n\n/**\n * Validates that the arg for `isLiteral` is valid. Resolves to `never` if\n * invalid.\n */\ntype LiteralArg<E> = IsValidLiteral<E, {Y: E; N: never}>;\n\n/**\n * isAnyLiteralOf returns a TypeGuard for a union of literal values. The same\n * restrictions and caveats of `isLiteral` apply here.\n * @checkReturnValue\n */\nexport function isAnyLiteralOf<\n  T extends ReadonlyArray<number | string | boolean | bigint | symbol>,\n>(...literals: AnyLiteralOfArgs<T>): TypeGuard<TupleToUnion<T>> {\n  const literalSet = new Set<unknown>(literals);\n  return defineTypeGuard(\n    (arg: unknown, context: Context): arg is TupleToUnion<T> =>\n      literalSet.has(arg),\n    // basicPrettyPrint() is more readable than String() for several types.\n    () => literals.map((l) => basicPrettyPrint(l)).join('|'),\n  );\n}\n\n/**\n * Validates that the args for `isAnyLiteralOf` are valid and positionally sets\n * the type of invalid params to `never`.\n */\ntype AnyLiteralOfArgs<T> = {\n  [E in keyof T]: IsValidLiteral<T[E], {Y: T[E]; N: never}>;\n};\n\n/**\n * isEnumMemberOf returns a TypeGuard for elements of an enum. The passed-in\n * enum must be either a string enum or a numeric enum (mixing strings and\n * numbers is not supported).\n *\n * WARNING: This can be an expensive check in production code with large enums.\n * See go/guards-and-assertions#runtime-cost-considerations\n *\n * @param enumContainer The enum container object (e.g. for `enum Foo {...}`,\n *     the `Foo` object itself must be passed as the first argument.\n * @param name A human-readable name for the enum, to be formatted in messages.\n *     This provides nicer debugging because there is no way to access the enum\n *     name from the container object at runtime.\n * @checkReturnValue\n */\nexport function isEnumMemberOf<T>(\n  enumContainer: T,\n  name?: string,\n): EnumGuard<T> {\n  return defineTypeGuard<T[keyof T]>(\n    (arg: unknown): arg is T[keyof T] => {\n      const enumAsDict = enumContainer as {[key: string]: unknown};\n      for (const key in enumAsDict) {\n        if (arg === enumAsDict[key] && !/^[0-9]+$/.test(key)) {\n          return true;\n        }\n      }\n      return false;\n    },\n    () => name ?? 'unknown enum',\n  ) as unknown as EnumGuard<T>;\n}\n\n/**\n * Return type for `isEnum`.\n *\n * When `T` is an enum container, `EnumGuard<T>` is the element type.\n * Otherwise, it's `NotAnEnum<T>`, which is not assignable to `Guard`.\n *\n * `E` is the union of the enum elements.\n */\ntype EnumGuard<T, E = T[keyof T]> = AreValidEnumValues<\n  E,\n  {Y: TypeGuard<E>; N: NotAnEnum<T>}\n>;\n\n/**\n * Determines whether the union types in E are a valid set of enum values.\n *\n * The singleton tuples `[E]` prevent TypeScript from distributing over unions.\n */\ntype AreValidEnumValues<E, R extends Result> = [E] extends [string] // //\n  ? IsExactlyString<E, {Y: R['N']; N: R['Y']}> //\n  : [E] extends [number] //\n    ? IsExactlyNumber<E, {Y: R['N']; N: R['Y']}> //\n    : R['N'];\n\n/** Internal symbol for declaring a unique \"error\" type. */\ndeclare const isEnumMemberOfParameterMustBeAnEnum: unique symbol;\n\n/** Type returned from `isEnum()` when its argument is invalid. */\ninterface NotAnEnum<T> {\n  [isEnumMemberOfParameterMustBeAnEnum]: T;\n}\n\n/**\n * Checks whether a value is any kind of Thenable object.\n *\n * This includes native Promises, goog.Promise, and Deferred.\n */\nexport const isThenable: TypeGuard<PromiseLike<unknown>> = defineTypeGuard(\n  (arg: unknown, context: Context): arg is PromiseLike<unknown> =>\n    arg != null &&\n    typeof arg === 'object' &&\n    typeof (arg as Promise<unknown>).then === 'function',\n  'Thenable',\n);\n\n/** isFunction is a TypeGuard for functions. */\nexport const isFunction: TypeGuard<Function> = defineTypeGuard(\n  (arg: unknown, context: Context): arg is Function =>\n    typeof arg === 'function',\n  'Function',\n);\n\n/**\n * isGuard is a StateGuard for TypeGuards and StateGuards.\n *\n * Note: This is not a TypeGuard because there would be no way to detect if the\n * given arg is a TypeGuard or a StateGuard. Even if we could distinguish, the\n * resulting guarded type would need to be TypeGuard<any> or StateGuard<any> as\n * there is no way, at runtime, to identify the guarded type.\n */\nexport const isGuard: StateGuard<unknown> = defineStateGuard(\n  (arg: unknown, context: Context): boolean => {\n    if (!executeNestedGuard(isFunction, arg, context)) return false;\n    return (\n      (arg as unknown as BrandedGuard).isGuard_doNotManuallySetPrettyPlease ===\n      true\n    );\n  },\n  'isGuard',\n);\n\n/**\n * Convenience type guard for Date.\n *\n * This guard does no verification of valid dates as invalid dates are still\n * instances of `Date`. Use in conjunction with `isValidDate` for validation.\n *\n * For more on invalid dates, see:\n * go/mdn/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date\n */\nexport const isDate: TypeGuard<Date> = isInstanceOf(Date);\n\n/**\n * isValidDate checks if a Date is valid.\n *\n * For more on invalid dates, see:\n * go/mdn/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date\n */\nexport const isValidDate: StateGuard<Date> = defineStateGuard(\n  (arg: Date) => !isNaN(arg as unknown as number),\n  'isValidDate',\n);\n\n/**\n * isGlobalRegExp checks if a RegExp is global (has the `g` flag).\n *\n * Note: this guard is internal-only at the moment. If you would like to use it,\n * DON'T COPY IT! Ask us about it via tsjs-libraries-eng@ or just send a CL.\n */\nconst isGlobalRegExp = defineStateGuard(\n  (arg: RegExp) => arg.global,\n  'isGlobalRegExp',\n);\n\n/**\n * isStickyRegExp checks if a RegExp is sticky (has the `y` flag).\n *\n * Note: this guard is internal-only at the moment. If you would like to use it,\n * DON'T COPY IT! Ask us about it via tsjs-libraries-eng@ or just send a CL.\n */\nconst isStickyRegExp = defineStateGuard(\n  (arg: RegExp) => arg.sticky,\n  'isStickyRegExp',\n);\n\n/** isObject is a TypeGuard for Objects. */\nexport const isObject: TypeGuard<object> = defineTypeGuard(\n  (arg: unknown, context: Context): arg is object =>\n    !!arg && (typeof arg === 'object' || typeof arg === 'function'),\n  'object',\n);\n\n/**\n * isInstanceOf is a TypeGuard for instanceof checks, both for concrete and\n * abstract classes.\n * @checkReturnValue\n */\nexport function isInstanceOf<T>(c: Constructor<T>): TypeGuard<T> {\n  return defineTypeGuard(\n    (arg: unknown, context: Context): arg is T => {\n      return arg instanceof c;\n    },\n    () => functionName(c),\n  );\n}\n\ntype Constructor<T> = Function & {prototype: T};\n\n/**\n * isStruct is a TypeGuard that verifies that the structure of an object adheres\n * to an interface.\n *\n * This function **must** be called with exactly one type parameter explicitly\n * specified (i.e. `isStruct<Foo>(...)`). The second parameter is present only\n * to provide a type error when the first parameter is missing; it should never\n * be explicitly specified.\n *\n * Unsupported types:\n * - Concrete classes (use `isInstanceOf`)\n * - Interfaces with index signatures\n * - Interfaces with type recursion (i.e., only DAGs of types are supported). If\n *   you need this feature, +1 b/265962324 and provide details of your use case.\n * - Union of multiple interfaces (use `isAnyOf` with `isStruct`)\n * - Empty interfaces\n *\n * Note: interface methods are only guarded via `isFunction`. If you need to\n * verify function types at runtime, +1 b/265962339 and provide details of your\n * use case.\n *\n * WARNING: Be aware of property renaming and the key names of the guarded `arg`\n * (which could _not_ be renamed) and the `guardSpec`. Do NOT quote property\n * keys in your `guardSpec`.\n * See go/typescript-g3patterns#property-renaming\n *\n * WARNING: This can be an expensive check in production code if your object has\n * many properties or nested values.\n * See go/guards-and-assertions#runtime-cost-considerations\n *\n * @param guardSpec An object literal formed by taking T and replacing its\n *     property types with guards. Guards for optional properties need to be\n *     wrapped in the `isOptional` guard.\n * @param typeName A human-readable name for the type, to be formatted in\n *     messages. This provides nicer debugging because there is no way to access\n *     the type name of `T` as a string at runtime.\n * @checkReturnValue\n */\nexport function isStruct<T = never, U extends T = T>(\n  guardSpec: StructGuardSpec<U>,\n  typeName: string,\n): TypeGuard<T> {\n  return defineTypeGuard((arg: unknown, context: Context): arg is T => {\n    // executeNestedGuard not used as the extra error is not useful here.\n    if (!isObject(arg)) return false;\n\n    for (const [key, guard] of Object.entries(\n      guardSpec as Record<string, TypeGuard<unknown>>,\n    )) {\n      if (!(key in arg)) {\n        // Object properties may be absent for optional guards.\n        if (isOptionalGuard(guard)) continue;\n\n        addMessageToContext(context, `Missing required property ${key}`);\n        return false;\n      }\n\n      const value = (arg as Record<string, unknown>)[key];\n      if (!executeNestedGuard(guard, value, context, `For property ${key}`)) {\n        return false;\n      }\n    }\n    return true;\n  }, typeName);\n}\n\n/**\n * The type for the `guardSpec` param of `isStruct`. Converts an interface to\n * have required readonly properties with Guards as values.\n *\n * In the event of an unsupported type, resolves to `never`.\n *\n * This type can be useful on its own when creating guards of interfaces which\n * extend another interface. Specs can be merged into an isStruct call.\n */\nexport type StructGuardSpec<T> = IsSupportedStruct<\n  T,\n  {\n    Y: {\n      readonly [P in keyof T]-?: IsOptionalProp<\n        T,\n        P,\n        {\n          Y: OptionalTypeGuard<SimplifyFunction<ExcludeUndefined<T[P]>>>;\n          N: TypeGuard<SimplifyFunction<T[P]>>;\n        }\n      >;\n    };\n    N: never;\n  }\n>;\n\n/** Checks if the given type is supported by `StructGuardSpec`. */\ntype IsSupportedStruct<T, R extends Result> = IsUnion<\n  T,\n  {\n    Y: R['N'];\n    N: HasNonPublicProperties<\n      T,\n      {\n        Y: R['N'];\n        N: HasIndexSignature<\n          T,\n          {\n            Y: R['N'];\n            N: IsEmpty<T, {Y: R['N']; N: R['Y']}>;\n          }\n        >;\n      }\n    >;\n  }\n>;\n\n/** Checks if the given type has non-public properties. */\ntype HasNonPublicProperties<T, R extends Result> =\n  Simplify<T> extends T ? R['N'] : R['Y'];\n\n/** Checks if the given type has an index signature. */\ntype HasIndexSignature<T, R extends Result> = string extends keyof T\n  ? R['Y']\n  : number extends keyof T\n    ? R['Y']\n    : symbol extends keyof T\n      ? R['Y']\n      : R['N'];\n\n/** Checks if the given type is empty. */\ntype IsEmpty<T, R extends Result> = keyof T extends never ? R['Y'] : R['N'];\n\n/** Checks whether key P of T is optional. */\ntype IsOptionalProp<T, P extends keyof T, R extends Result> =\n  {} extends Pick<T, P> ? R['Y'] : R['N'];\n\n/** For any function or method, simplifies the guard type to `Function`. */\ntype SimplifyFunction<T> = T extends Function ? Function : T;\n\n/** Excludes undefined from a union type. */\ntype ExcludeUndefined<T> = T extends undefined ? never : T;\n\n/**\n * Takes any guard and creates a variant of it that can be `T` or `undefined`.\n *\n * Also tells `isStruct` that its OK if an associated property is absent.\n *\n * @param innerGuard The inner guard for optional guard.\n * @checkReturnValue\n */\nexport function isOptional<T>(innerGuard: TypeGuard<T>): OptionalTypeGuard<T> {\n  return markOptional(\n    defineTypeGuard(\n      (arg: unknown, context: Context): arg is T | undefined => {\n        if (arg === undefined) return true;\n        // We don't use executeNestedGuard as the error message is repetitive\n        // though we do pass along the context.\n        return (innerGuard as DebugGuard)(arg, context as DebugContext);\n      },\n      () => `optional ${guardName(innerGuard)}`,\n    ),\n  );\n}\n\n/**\n * Extracted to eliminate a class of dead-code-elimination bugs that cropped up\n * with isOptional.\n * @nosideeffects\n */\nfunction markOptional<T>(\n  guard: TypeGuard<T | undefined>,\n): OptionalTypeGuard<T> {\n  (guard as OptionalTypeGuard<T>).isOptionalGuard_doNotManuallySetPrettyPlease =\n    true;\n  return guard as OptionalTypeGuard<T>;\n}\n\n/**\n * `isUnknown` is a TypeGuard for the `unknown` type.\n *\n * This is a fairly pointless guard on its own as, when used with assertions, it\n * does not refine types because `T & unknown` is just `T`.\n *\n * The main application for `isUnknown` is with `isStruct` when guarding a\n * property typed as `unknown`.\n */\nexport const isUnknown: TypeGuard<unknown> = defineTypeGuard(\n  (arg: unknown, context: Context): arg is unknown => true,\n  'unknown',\n);\n\n/**\n * isArray is a TypeGuard for readonly arrays that does not validate the type of\n * the array's contents.\n *\n * Note that this guard is not able to know at runtime that an array is\n * readonly - this differentiation is only for compile-time checks (e.g. to\n * ensure that you don't mutate the array).\n */\nexport const isArray: TypeGuard<readonly unknown[]> =\n  arrayGuardBase<readonly unknown[]>();\n\n/**\n * isMutableArray is a TypeGuard for mutable arrays that does not validate the\n * type of the array's contents.\n *\n * Note that using this guard on a readonly array will widen the type and make\n * the array mutable.\n */\nexport const isMutableArray: TypeGuard<unknown[]> = arrayGuardBase<unknown[]>();\n\n// return-only generics is safer in this case than casts because it restricts\n// the type to be rooted at ReadonlyArray<unknown> instead of anything.\n// tslint:disable-next-line:no-return-only-generics\nfunction arrayGuardBase<R extends readonly unknown[]>(): TypeGuard<R> {\n  return defineTypeGuard(\n    (arg: unknown, context: Context): arg is R => Array.isArray(arg),\n    'Array<unknown>',\n  );\n}\n\n/**\n * isArrayOf returns a guard for readonly arrays.\n *\n * Note, as a TypeGuard, this guard is not able to know at runtime that an\n * array is readonly - this differentiation is only for compile-time checks\n * (e.g. to ensure that you don't mutate the array).\n *\n * When called with an `itemGuard` of type `StateGuard`, the returned guard will\n * be typed as broadly as possible (i.e. only as narrowly as necessary).\n *\n * WARNING: This can be an expensive check in production code with large arrays.\n * See go/guards-and-assertions#runtime-cost-considerations\n *\n * @param itemGuard The guard for each item in the array. This guard must pass\n *     for all items in the array for the overall guard to pass.\n * @checkReturnValue\n */\nexport function isArrayOf<T>(itemGuard: TypeGuard<T>): TypeGuard<readonly T[]>;\nexport function isArrayOf(itemGuard: StateGuard<unknown>): StateGuard<unknown>;\nexport function isArrayOf<A>(\n  itemGuard: StateGuard<A>,\n): StateGuard<readonly A[]>;\nexport function isArrayOf(itemGuard: AnyGuard): AnyGuard {\n  return mutableArrayGuard(itemGuard);\n}\n\n/**\n * isMutableArrayOf returns a guard for mutable arrays.\n *\n * Note, as a TypeGuard, using this guard on a readonly array will widen the\n * type and make the array mutable.\n *\n * WARNING: This can be an expensive check in production code with large arrays.\n * See go/guards-and-assertions#runtime-cost-considerations\n *\n * @param itemGuard The guard for each item in the array. This guard must pass\n *     for all items in the array for the overall guard to pass.\n * @checkReturnValue\n */\nexport function isMutableArrayOf<T>(itemGuard: TypeGuard<T>): TypeGuard<T[]> {\n  return mutableArrayGuard(itemGuard) as TypeGuard<T[]>;\n}\n\nfunction mutableArrayGuard(itemGuard: AnyGuard): AnyGuard {\n  return defineStateGuard(\n    (arg: unknown, context: Context): boolean => {\n      if (!executeNestedGuard(isMutableArray, arg, context)) {\n        return false;\n      }\n      return arg.every((value: unknown, i: number) =>\n        executeNestedGuard(itemGuard, value, context, `At index ${i}`),\n      );\n    },\n    () => `Array<${guardName(itemGuard)}>`,\n  );\n}\n\n/**\n * isTupleOf returns a guard asserting a given argument is a readonly tuple\n * whose elements satisfy each guard.\n *\n * Note, as a TypeGuard, this guard is not able to know at runtime that a tuple\n * is readonly - this differentiation is only for compile-time checks (e.g. to\n * ensure that you don't mutate the tuple).\n *\n * Note: Does not support optional or rest elements. If you need these features,\n * please +1 b/265950491 and/or b/265950848 and provide details of your use\n * case.\n *\n * WARNING: This can be an expensive check in production code for large tuples.\n * See go/guards-and-assertions#runtime-cost-considerations\n * @checkReturnValue\n */\nexport function isTupleOf<T extends AnyTypeGuard[]>(\n  ...guards: T\n): TypeGuard<Readonly<TupleTypeGuardArgsToTuple<T>>>;\nexport function isTupleOf(\n  ...guards: Array<StateGuard<unknown>>\n): StateGuard<unknown>;\nexport function isTupleOf<T extends AnyGuard[]>(\n  ...guards: T\n): StateGuard<Readonly<TupleStateGuardArgsToTuple<T>>>;\nexport function isTupleOf(...guards: AnyGuard[]): AnyGuard {\n  return mutableTupleGuard(guards);\n}\n\n/**\n * isMutableTupleOf returns a guard asserting a given argument is a mutable\n * tuple whose elements satisfy each guard.\n *\n * Note, as a TypeGuard, using this guard on a readonly tuple will widen the\n * type and make the tuple mutable.\n *\n * Note: Does not support optional or rest elements. If you need these features,\n * please +1 b/265950491 and/or b/265950848 and provide details of your use\n * case.\n *\n * WARNING: This can be an expensive check in production code for large tuples.\n * See go/guards-and-assertions#runtime-cost-considerations\n * @checkReturnValue\n */\nexport function isMutableTupleOf<T extends AnyTypeGuard[]>(\n  ...guards: T\n): TypeGuard<TupleTypeGuardArgsToTuple<T>> {\n  return mutableTupleGuard(guards) as TypeGuard<TupleTypeGuardArgsToTuple<T>>;\n}\n\ntype TupleTypeGuardArgsToTuple<T extends AnyTypeGuard[]> = {\n  [K in keyof T]: T[K] extends TypeGuard<infer U> ? U : never;\n};\n\ntype TupleStateGuardArgsToTuple<T extends AnyGuard[]> = {\n  [K in keyof T]: T[K] extends StateGuard<infer A> ? A : never;\n};\n\nfunction mutableTupleGuard(guards: AnyGuard[]): AnyGuard {\n  return defineStateGuard(\n    (arg: unknown, context: Context): boolean => {\n      if (!executeNestedGuard(isArray, arg, context)) {\n        return false;\n      }\n\n      if (arg.length !== guards.length) {\n        addMessageToContext(\n          context,\n          `Expected ${guards.length} elements; got ${arg.length} elements`,\n        );\n        return false;\n      }\n\n      for (let i = 0; i < arg.length; ++i) {\n        if (!executeNestedGuard(guards[i], arg[i], context, `At index ${i}`)) {\n          return false;\n        }\n      }\n\n      return true;\n    },\n    () => `[${guards.map(guardName).join(', ')}]`,\n  );\n}\n\n/**\n * isSet is a TypeGuard for readonly Sets that does not validate the type of the\n * set's entries.\n *\n * Note that this guard is not able to know at runtime that a Set is readonly -\n * this differentiation is only for compile-time checks (e.g. to ensure that you\n * don't mutate the Set).\n */\nexport const isSet: TypeGuard<ReadonlySet<unknown>> =\n  setGuardBase<ReadonlySet<unknown>>();\n\n/**\n * isMutableSet is a TypeGuard for mutable Sets that does not validate the type\n * of the set's entries.\n *\n * Note that using this guard on a readonly Set will widen the type and make the\n * Set mutable.\n */\nexport const isMutableSet: TypeGuard<Set<unknown>> =\n  setGuardBase<Set<unknown>>();\n\n// return-only generics is safer in this case than casts because it restricts\n// the type to be rooted at ReadonlySet<unknown> instead of anything.\n// tslint:disable-next-line:no-return-only-generics\nfunction setGuardBase<R extends ReadonlySet<unknown>>(): TypeGuard<R> {\n  return defineTypeGuard((arg: unknown, context: Context): arg is R => {\n    return arg instanceof Set;\n  }, 'Set<unknown>');\n}\n\n/**\n * isSetOf returns a guard for readonly Sets.\n *\n * Note that, as a TypeGuard, this guard is not able to know at runtime that a\n * Set is readonly - this differentiation is only for compile-time checks (e.g.\n * to ensure that you don't mutate the Set).\n *\n * When called with an `itemGuard` of type `StateGuard`, the returned guard will\n * be typed as broadly as possible (i.e. only as narrowly as necessary).\n *\n * WARNING: This can be an expensive check in production code with large sets.\n * See go/guards-and-assertions#runtime-cost-considerations\n *\n * @param itemGuard The guard for each item in the Set. This guard must pass\n *     for all items in the Set for the overall guard to pass.\n * @checkReturnValue\n */\nexport function isSetOf<T>(itemGuard: TypeGuard<T>): TypeGuard<ReadonlySet<T>>;\nexport function isSetOf(itemGuard: StateGuard<unknown>): StateGuard<unknown>;\nexport function isSetOf<A>(\n  itemGuard: StateGuard<A>,\n): StateGuard<ReadonlySet<A>>;\nexport function isSetOf(itemGuard: AnyGuard): AnyGuard {\n  return mutableSetGuard(itemGuard);\n}\n\n/**\n * isMutableSetOf returns a guard for mutable Sets.\n *\n * Note that, as a TypeGuard, using this guard on a readonly Set will widen the\n * type and make the Set mutable.\n *\n * WARNING: This can be an expensive check in production code with large sets.\n * See go/guards-and-assertions#runtime-cost-considerations\n *\n * @param itemGuard The guard for each item in the Set. This guard must pass\n *     for all items in the Set for the overall guard to pass.\n * @checkReturnValue\n */\nexport function isMutableSetOf<T>(itemGuard: TypeGuard<T>): TypeGuard<Set<T>> {\n  return mutableSetGuard(itemGuard) as TypeGuard<Set<T>>;\n}\n\nfunction mutableSetGuard(itemGuard: AnyGuard): AnyGuard {\n  return defineStateGuard(\n    (arg: unknown, context: Context): boolean => {\n      if (!executeNestedGuard(isMutableSet, arg, context)) {\n        return false;\n      }\n      for (const kV of arg.entries()) {\n        const item = kV[1];\n        const guarded = executeNestedGuard(itemGuard, item, context);\n        if (!guarded) return false;\n      }\n      return true;\n    },\n    () => `Set<${guardName(itemGuard)}>`,\n  );\n}\n\n/**\n * isMap is a TypeGuard for readonly Maps that does not validate the types of\n * the map's keys nor values.\n *\n * Note that this guard is not able to know at runtime that a map is readonly -\n * this differentiation is only for compile-time checks (e.g. to ensure that you\n * don't mutate the map after having type-guarded it).\n */\nexport const isMap: TypeGuard<ReadonlyMap<unknown, unknown>> =\n  mapGuardBase<ReadonlyMap<unknown, unknown>>();\n\n/**\n * isMutableMap is a TypeGuard for mutable Maps that does not validate types of\n * the map's keys nor values.\n *\n * Note that using this guard on a readonly Map will widen the type and make the\n * Map mutable.\n */\nexport const isMutableMap: TypeGuard<Map<unknown, unknown>> =\n  mapGuardBase<Map<unknown, unknown>>();\n\n// return-only generics is safer in this case than casts because it restricts\n// the type to be rooted at ReadonlyMap<unknown,unknown> instead of anything.\n// tslint:disable-next-line:no-return-only-generics\nfunction mapGuardBase<R extends ReadonlyMap<unknown, unknown>>(): TypeGuard<R> {\n  return defineTypeGuard((arg: unknown, context: Context): arg is R => {\n    return arg instanceof Map;\n  }, 'Map<unknown, unknown>');\n}\n\n/**\n * isMapOf returns a guard for a Map with keys and values of particular types.\n *\n * Note that, as a TypeGuard, this guard is not able to know at runtime that a\n * map is readonly - this differentiation is only for compile-time checks (e.g.\n * to ensure that you don't mutate the map after having type-guarded it).\n *\n * When called with an `itemGuard` of type `StateGuard`, the returned guard will\n * be typed as broadly as possible (i.e. only as narrowly as necessary).\n *\n * WARNING: This can be an expensive check in production code with large maps.\n * See go/guards-and-assertions#runtime-cost-considerations\n *\n * @param keyGuard The Guard for the keys of the map. If you only want to guard\n *     values, pass in `isUnknown`.\n * @param valueGuard The Guard for the values of the map. If you only want to\n *     guard keys, pass in `isUnknown`.\n * @checkReturnValue\n */\nexport function isMapOf<K, V>(\n  keyGuard: TypeGuard<K>,\n  valueGuard: TypeGuard<V>,\n): TypeGuard<ReadonlyMap<K, V>>;\nexport function isMapOf(\n  keyGuard: StateGuard<unknown>,\n  valueGuard: StateGuard<unknown>,\n): StateGuard<unknown>;\nexport function isMapOf<K, V>(\n  keyGuard: StateGuard<K>,\n  valueGuard: StateGuard<V>,\n): StateGuard<ReadonlyMap<K, V>>;\nexport function isMapOf(keyGuard: AnyGuard, valueGuard: AnyGuard): AnyGuard {\n  return mutableMapGuard(keyGuard, valueGuard);\n}\n\n/**\n * isMutableMapOf returns a guard for a mutable Map with keys and values of\n * particular types.\n *\n * Note that, as a TypeGuard, using this guard on a readonly Map will widen the\n * type and make the Map mutable.\n *\n * WARNING: This can be an expensive check in production code with large maps.\n * See go/guards-and-assertions#runtime-cost-considerations\n *\n * @param keyGuard The Guard for the keys of the map. If you only want to guard\n *     values, pass in `isUnknown`.\n * @param valueGuard The Guard for the values of the map. If you only want to\n *     guard keys, pass in `isUnknown`.\n * @checkReturnValue\n */\nexport function isMutableMapOf<K, V>(\n  keyGuard: TypeGuard<K>,\n  valueGuard: TypeGuard<V>,\n): TypeGuard<Map<K, V>>;\nexport function isMutableMapOf(\n  keyGuard: AnyGuard,\n  valueGuard: AnyGuard,\n): AnyGuard {\n  return mutableMapGuard(keyGuard, valueGuard);\n}\n\nfunction mutableMapGuard(keyGuard: AnyGuard, valueGuard: AnyGuard): AnyGuard {\n  return defineStateGuard(\n    (arg: unknown, context: Context): boolean => {\n      if (!executeNestedGuard(isMutableMap, arg, context)) {\n        return false;\n      }\n\n      for (const [key, val] of arg.entries()) {\n        const isValidKey = executeNestedGuard(\n          keyGuard,\n          key,\n          context,\n          () => `For key ${key}`,\n        );\n        if (!isValidKey) return false;\n\n        const isValidValue = executeNestedGuard(\n          valueGuard,\n          val,\n          context,\n          () => `For key ${key}, checking value`,\n        );\n        if (!isValidValue) return false;\n      }\n      return true;\n    },\n    () => `Map<${guardName(keyGuard)}, ${guardName(valueGuard)}>`,\n  );\n}\n\n/**\n * isAnyOf returns a guard asserting a given argument satisfies any one of the\n * guards given.\n * @checkReturnValue\n */\n// Note: splitting this up as 2 separate overloads causes an overload mismatch\n// for `isAnyOf(isLiteral(42), isString)`. We still use an overload though to\n// simplify the implementation.\nexport function isAnyOf<T extends AnyGuard[]>(\n  ...guards: T\n): T extends AnyTypeGuard[]\n  ? TypeGuard<UnionGuardedTypes<T>>\n  : StateGuard<IntersectStateGuardArgTypes<T>>;\nexport function isAnyOf(...guards: AnyGuard[]): AnyGuard {\n  return defineStateGuard(\n    (arg: unknown, context: Context): boolean => {\n      // We intentionally do not use `executeNestedGuard` here as the resulting\n      // debugging messages are overly verbose and confusing.\n      return guards.some((guard) => guard(arg));\n    },\n    () => `${guards.map((guard) => guardName(guard)).join(' | ')}`,\n  );\n}\n\n/** Converts [TypeGuard<A>, TypeGuard<B>, \u2026] to the type `A | B | \u2026`. */\ntype UnionGuardedTypes<T extends AnyTypeGuard[]> = TupleToUnion<\n  TypeGuardTupleToTuple<T>\n>;\n\n/** Converts [StateGuard<A>, StateGuard<B>, \u2026] to the type `A & B & \u2026`. */\ntype IntersectStateGuardArgTypes<T extends AnyGuard[]> = TupleToIntersection<\n  StateGuardTupleToTuple<T>\n>;\n\n/** Converts `[TypeGuard<A>, TypeGuard<B>, \u2026]` to `[A, B, \u2026]`. */\ntype TypeGuardTupleToTuple<T extends AnyTypeGuard[]> = {\n  [K in keyof T]: T[K] extends TypeGuard<infer U> ? U : never;\n};\n\n/** Converts `[StateGuard<A>, StateGuard<B>, \u2026]` to `[A, B, \u2026]`. */\ntype StateGuardTupleToTuple<T extends AnyGuard[]> = {\n  [K in keyof T]: T[K] extends StateGuard<infer A> ? A : never;\n};\n\n/**\n * isAllOf returns a guard asserting a given argument satisfies all guards\n * given.\n * @checkReturnValue\n */\nexport function isAllOf<T extends AnyTypeGuard[]>(\n  ...guards: T\n): TypeGuard<IntersectGuardedTypes<T>>;\nexport function isAllOf<T extends AnyGuard[]>(\n  ...guards: T\n): StateGuard<IsAllOfStateGuardArg<T>>;\nexport function isAllOf(...guards: AnyGuard[]): AnyGuard {\n  return defineStateGuard(\n    (arg: unknown, context: Context): boolean =>\n      guards.every((guard: AnyGuard, i: number) =>\n        executeNestedGuard(guard, arg, context, () => `At Guards index ${i}`),\n      ),\n    () => `${guards.map((g) => guardName(g)).join(' & ')}`,\n  );\n}\n\n/** Converts [TypeGuard<A>, TypeGuard<B>, \u2026] to the type `A & B & \u2026`. */\ntype IntersectGuardedTypes<T extends AnyTypeGuard[]> = TupleToIntersection<\n  TypeGuardTupleToTuple<T>\n>;\n\n/**\n * Calculates the loosest StateGuard type based on the guards passed to isAllOf.\n * Designed so that while `isAllOf(isPositive, isInteger)` returns a\n * `StateGuard<number>`, `isAllOf(isNumber, isPositive, isInteger)` returns a\n * `StateGuard<unknown>` allowing any arg type instead of just number because\n * `isNumber` is a `TypeGuard` that accepts `unknown` args, and so the arg will\n * be guaranteed to be a number before isPositive and isInteger are called.\n */\ntype IsAllOfStateGuardArg<\n  Guards extends AnyGuard[],\n  StateGuardArgType = unknown,\n  GuardedTypes = unknown,\n> = Guards extends [infer Head, ...infer Tail extends AnyGuard[]]\n  ? Head extends TypeGuard<infer HeadGuardedType>\n    ? // Head is a TypeGuard.\n      IsAllOfStateGuardArg<\n        Tail,\n        StateGuardArgType,\n        // Add HeadGuardedType to GuardedTypes.\n        HeadGuardedType & GuardedTypes\n      >\n    : // Head is a StateGuard.\n      IsAllOfStateGuardArg<\n        Tail,\n        // If Head is a StateGuard of GuardedTypes, do NOT add HeadCheckType to\n        // StateGuardArgType. If Head is not, DO.\n        Head extends StateGuard<GuardedTypes>\n          ? StateGuardArgType\n          : Head extends StateGuard<infer HeadCheckType>\n            ? StateGuardArgType & HeadCheckType\n            : never,\n        GuardedTypes\n      >\n  : StateGuardArgType;\n\n/** Converts `[A,B,\u2026]` to `A&B&\u2026` */\n// The type conversion sequence is [A,B] \u2192 [[A],[B]] \u2192 [A]|[B] \u2192 [A]&[B] \u2192 A&B.\n// Wrapping each element in its own tuple is needed to ensure that [A, A|B, C]\n// becomes A & (A|B) & C rather than A & B & C. Prepending unknown ensures that\n// empty tuple case is handled properly.\ntype TupleToIntersection<T extends unknown[]> = UnwrapTuple<\n  UnionToIntersection<TupleToUnion<WrapTupleElements<[unknown, ...T]>>>\n>;\n\n/** Converts `[A,B,\u2026]` to `[[A],[B],\u2026]`. */\ntype WrapTupleElements<T extends unknown[]> = {\n  [K in keyof T]: [T[K]];\n};\n\n/** Converts `[A]` to `A`, `[A]|[B]|\u2026` to `A|B|\u2026`, and `[A]&[B]&\u2026` to `A&B&\u2026` */\n// Some extra care is needed for intersections: using `{0: infer U}` instead of\n// the more obvious `[infer U]` is needed to force TypeScript to look inside the\n// intersected tuple. With `[infer U]`, `[A]&[B]` would just become `B`.\n// Additionally, an explicit check for never is needed for cases such as\n// [boolean]&[string], where TypeScript will reduce the type to never prior to\n// unwrapping. Without special handling, that never would be erroneously changed\n// to an unknown.\ntype UnwrapTuple<T> = T extends never\n  ? never\n  : T extends {0: infer U}\n    ? U\n    : never;\n\n/**\n * Negates the result of a `StateGuard`.\n *\n * Note that the returned guard cannot support descriptive debug error messages\n * because the passed-in `innerGuard` does not have the capacity to add error\n * messages to `context` indicating why it _passed_.\n * @checkReturnValue\n */\nexport function isNot<A>(innerGuard: StateGuard<A>): StateGuard<A> {\n  return defineStateGuard(\n    (arg: A, context: Context) =>\n      // We intentionally do not use `executeNestedGuard` here as `innerGuard`\n      // would only add debugging messages if it failed but our guard _expects_\n      // it to fail so the error message would be incorrect.\n      !innerGuard(arg),\n    `isNot(${guardName(innerGuard)})`,\n  );\n}\n","/**\n * @fileoverview Platform definitions for bigint usage in google3.\n *\n * Direct access to the exported constants in this file are restricted to\n * web platform code.\n */\n\n/**\n * Indicates that all browsers or platforms used in the JS binary natively\n * support `BigInt`. This permits removing `BigInt` related fallback code from\n * binaries.\n *\n * Prefer setting go/browser_featureset_year. If infeasible, you can exclusively\n * set this define for code-size improvements. For more info, see\n * go/typescript-g3patterns#closure-compile-time-defines\n *\n * For library authors, it is discouraged to set this to true in debug or\n * testing as this assumption may prove false for some binaries.\n *\n * @define\n */\nconst ASSUME_NATIVE_BIGINT: boolean = goog.define(\n  'javascript.common.bigint.ASSUME_NATIVE_BIGINT',\n  goog.FEATURESET_YEAR >= 2021,\n);\n\n/**\n * Indicates that BigInt is natively supported on the current platform.\n *\n * If `ASSUME_NATIVE_BIGINT` is `true`, this is a compile-time `true `constant.\n * Otherwise this will either be `true` or `false` at runtime depending on the\n * platform availability of `BigInt`\n *\n * In general, code authors should not need to use this. If you are an\n * application and `ASSUME_NATIVE_BIGINT` is true, just use the `BigInt()`\n * constructor directly. Otherwise, use `JSBI.BigInt()`.\n *\n * Core libraries that need to support `BigInt` related fallback code may use\n * this.\n */\nexport const NATIVE_BIGINT_AVAILABLE: boolean =\n  ASSUME_NATIVE_BIGINT ||\n  (typeof goog.global.BigInt === 'function' &&\n    typeof goog.global.BigInt(0) === 'bigint');\n\n/**\n * In DEBUG builds, makes `gbigintForcedAsStringHalfTheTime` and\n * `isGbigintForcedAsStringHalfTheTime` represent `gbigint` values as `string`\n * _always_ on odd numbers instead of session-random.\n *\n * Set this if, for debug builds, you need to ensure consistent `gbigint` value\n * representation across multiple JS VMs (e.g., a web app with a worker thread).\n *\n * @define\n */\nexport const ODD_FORCED_STRING_IN_DEBUG: boolean = goog.define(\n  'javascript.common.bigint.ODD_FORCED_STRING_IN_DEBUG',\n  false,\n);\n","import {\n  StateGuard,\n  TypeGuard,\n  assert,\n  assertTruthy,\n  cast,\n  defineStateGuard,\n  defineTypeGuard,\n  fail,\n} from 'google3/javascript/common/asserts/asserts';\nimport {\n  isAnyOf,\n  isBigInt,\n  isBoolean,\n  isNumber,\n  isString,\n} from 'google3/javascript/common/asserts/guards';\nimport {DebugBoxedBigInt} from 'google3/third_party/javascript/jsbi/g3_wrapper/debug_boxed_bigint';\nimport type JSBI from 'jsbi';\n\nimport {NATIVE_BIGINT_AVAILABLE, ODD_FORCED_STRING_IN_DEBUG} from './platform';\n\n// tslint:disable:gbigint-usage The common bigint library needs to break these\n// rules.\n\n// Capture in a local alias to mitigate against the risk of users mutating the\n// global `goog.DEBUG` value.  If it changes half way through a session,\n// comparisons between `gbigint` values will start failing.\nconst forcedAsStringHalfTheTime: boolean = goog.DEBUG;\n\n/**\n * Converts the given value to a `gbigint`.\n *\n * Throws exceptions on invalid values! Even in production! This mirrors the\n * behavior of the `BigInt()` constructor.\n *\n * See go/bigint#creating-gbigint-values for examples of valid and invalid\n * values.\n *\n * In debug builds with native `BigInt` support, `gbigint` values will either be\n * a `bigint` or `string` reference split on even and odd values. For more info,\n * see go/bigint#debug-gbigint-representation\n * @nosideeffects\n */\nexport function toGbigint(\n  value: number | string | boolean | bigint | JSBI,\n): gbigint {\n  validateToGbigintValue(value);\n\n  if (NATIVE_BIGINT_AVAILABLE) {\n    if (forcedAsStringHalfTheTime) {\n      return gbigintForcedAsStringHalfTheTime(value);\n    }\n\n    // Note: Native bigint is available and we're not in debug so JSBI instances\n    // ARE bigint already so we can safely exclude the JSBI type.\n    return castToGbigint(BigInt(value as Exclude<typeof value, JSBI>));\n  }\n\n  if (isBoolean(value)) {\n    // Convert boolean values to 1 or 0.\n    value = value ? '1' : '0';\n  } else if (isString(value)) {\n    // Strings that are pure whitespace resolve to '0'.\n    value = value.trim() || '0';\n  } else {\n    value = String(value);\n  }\n  return castToGbigint(value);\n}\n\n/** TypeGuard for `gbigint`. See go/guards-and-assertions */\nexport const isGbigint: TypeGuard<gbigint> = defineTypeGuard(\n  (arg: unknown): arg is gbigint => {\n    if (NATIVE_BIGINT_AVAILABLE) {\n      if (forcedAsStringHalfTheTime) {\n        return isGbigintForcedAsStringHalfTheTime(arg);\n      }\n\n      return isBigInt(arg);\n    }\n\n    return isString(arg) && isValidGbigintDecimalString(arg);\n  },\n  'gbigint',\n);\n\n/**\n * Returns whether `Number(value)` losslessly converts to a `number`. Equivalent\n * to the check performed by `Number.isSafeInteger()`.\n *\n * Note: This is _not_ a check for a valid two's complement 52-bit integer.\n */\nexport const isSafeInt52: StateGuard<gbigint | bigint> = defineStateGuard(\n  (value: gbigint | bigint): boolean => {\n    if (NATIVE_BIGINT_AVAILABLE) {\n      assert(MIN_SAFE_INT52_BIGINT, isBigInt);\n      assert(MAX_SAFE_INT52_BIGINT, isBigInt);\n\n      const valueAsBigInt = forcedAsStringHalfTheTime\n        ? BigInt(value)\n        : cast(value, isBigInt);\n      return (\n        valueAsBigInt >= MIN_SAFE_INT52_BIGINT &&\n        valueAsBigInt <= MAX_SAFE_INT52_BIGINT\n      );\n    }\n\n    const valueAsString = cast(value, isString);\n    if (valueAsString[0] === '-') {\n      return isInRange(valueAsString, MIN_SAFE_INT52_STR);\n    }\n\n    return isInRange(valueAsString, MAX_SAFE_INT52_STR);\n  },\n  'isSafeInt52',\n);\n\nconst MIN_SAFE_INT52_STR = Number.MIN_SAFE_INTEGER.toString();\nconst MIN_SAFE_INT52_BIGINT = NATIVE_BIGINT_AVAILABLE\n  ? BigInt(Number.MIN_SAFE_INTEGER)\n  : undefined;\n\nconst MAX_SAFE_INT52_STR = Number.MAX_SAFE_INTEGER.toString();\nconst MAX_SAFE_INT52_BIGINT = NATIVE_BIGINT_AVAILABLE\n  ? BigInt(Number.MAX_SAFE_INTEGER)\n  : undefined;\n\n/** Returns whether `value` is in the `int64` range. */\nexport const isValidSignedInt64: StateGuard<gbigint | bigint> =\n  defineStateGuard((value: gbigint | bigint): boolean => {\n    if (NATIVE_BIGINT_AVAILABLE) {\n      assert(MIN_SIGNED_INT64_BIGINT, isBigInt);\n      assert(MAX_SIGNED_INT64_BIGINT, isBigInt);\n\n      const valueAsBigInt = forcedAsStringHalfTheTime\n        ? BigInt(value)\n        : cast(value, isBigInt);\n      return (\n        valueAsBigInt >= MIN_SIGNED_INT64_BIGINT &&\n        valueAsBigInt <= MAX_SIGNED_INT64_BIGINT\n      );\n    }\n\n    const valueAsString = cast(value, isString);\n    if (valueAsString[0] === '-') {\n      return isInRange(valueAsString, MIN_SIGNED_INT64_STR);\n    }\n\n    return isInRange(valueAsString, MAX_SIGNED_INT64_STR);\n  }, 'isValidSignedInt64');\n\nconst MIN_SIGNED_INT64_STR = '-9223372036854775808';\nconst MIN_SIGNED_INT64_BIGINT = NATIVE_BIGINT_AVAILABLE\n  ? BigInt(MIN_SIGNED_INT64_STR)\n  : undefined;\n\nconst MAX_SIGNED_INT64_STR = '9223372036854775807';\nconst MAX_SIGNED_INT64_BIGINT = NATIVE_BIGINT_AVAILABLE\n  ? BigInt(MAX_SIGNED_INT64_STR)\n  : undefined;\n\n/** Returns whether `value` is in the `uint64` range. */\nexport const isValidUnsignedInt64: StateGuard<gbigint | bigint> =\n  defineStateGuard((value: gbigint | bigint): boolean => {\n    if (NATIVE_BIGINT_AVAILABLE) {\n      assert(MIN_UNSIGNED_INT64_BIGINT, isBigInt);\n      assert(MAX_UNSIGNED_INT64_BIGINT, isBigInt);\n\n      const valueAsBigInt = forcedAsStringHalfTheTime\n        ? BigInt(value)\n        : cast(value, isBigInt);\n      return (\n        valueAsBigInt >= MIN_UNSIGNED_INT64_BIGINT &&\n        valueAsBigInt <= MAX_UNSIGNED_INT64_BIGINT\n      );\n    }\n\n    const valueAsString = cast(value, isString);\n    if (valueAsString[0] === '-') return false;\n\n    assert(MAX_UNSIGNED_INT64_STR, isString);\n    return isInRange(valueAsString, MAX_UNSIGNED_INT64_STR);\n  }, 'isValidUnsignedInt64');\n\nconst MIN_UNSIGNED_INT64_BIGINT = NATIVE_BIGINT_AVAILABLE\n  ? BigInt(0)\n  : undefined;\n\nconst MAX_UNSIGNED_INT64_STR = '18446744073709551615';\nconst MAX_UNSIGNED_INT64_BIGINT = NATIVE_BIGINT_AVAILABLE\n  ? BigInt(MAX_UNSIGNED_INT64_STR)\n  : undefined;\n\n/**\n * Safely converts a `gbigint` value to a `boolean`.\n *\n * This function is necessary because `Boolean('0') !== Boolean(0n)`.\n */\nexport function gbigintToBoolean(value: gbigint): boolean {\n  if (NATIVE_BIGINT_AVAILABLE) {\n    assert(ZERO_BIGINT, isBigInt);\n\n    const valueAsBigInt = forcedAsStringHalfTheTime\n      ? BigInt(value)\n      : cast(value, isBigInt);\n    return valueAsBigInt !== ZERO_BIGINT;\n  }\n\n  const valueAsString = cast(value, isString);\n  return valueAsString !== ZERO_STR;\n}\n\n/**\n * Compares two gbigint or bigint values numerically. Compatible with\n * `Array.sort`.\n */\nexport function compareBigInt(\n  a: gbigint | bigint,\n  b: gbigint | bigint,\n): number {\n  if (NATIVE_BIGINT_AVAILABLE) {\n    const aAsBigInt = forcedAsStringHalfTheTime ? BigInt(a) : cast(a, isBigInt);\n    const bAsBigInt = forcedAsStringHalfTheTime ? BigInt(b) : cast(b, isBigInt);\n    return aAsBigInt > bAsBigInt ? 1 : aAsBigInt === bAsBigInt ? 0 : -1;\n  }\n\n  const aAsString = cast(a, isString);\n  const bAsString = cast(b, isString);\n\n  // String.startsWith is prohibted by GWS conformance: go/gws-inline-js-conformance#string-methods\n  const aIsNegative = aAsString.length && aAsString[0] === '-';\n  const bIsNegative = bAsString.length && bAsString[0] === '-';\n\n  const aSign = aIsNegative ? -1 : 1;\n\n  // The sign of a and b are different.\n  if (aIsNegative !== bIsNegative) return aSign;\n\n  // With equal sign, a and b have different lengths.\n  if (aAsString.length !== bAsString.length) {\n    return aAsString.length > bAsString.length ? aSign : -aSign;\n  }\n\n  // With equal sign and same length.\n  return aSign * aAsString.localeCompare(bAsString);\n}\n\n/// Internal implementation details. Not part of the API.\n\n/** Ensures `value` is valid input for `toGbigint`. ALWAYS throws if invalid. */\nfunction validateToGbigintValue(\n  value: number | string | boolean | bigint | JSBI,\n) {\n  if (isString(value)) {\n    if (!isValidGbigintInputString(value)) {\n      throw new Error(\n        goog.DEBUG ? `Invalid string for toGbigint: ${value}` : String(value),\n      );\n    }\n  } else if (isNumber(value)) {\n    if (!isValidGbigintInputNumber(value)) {\n      throw new Error(\n        goog.DEBUG ? `Invalid number for toGbigint: ${value}` : String(value),\n      );\n    }\n  }\n}\n\n/**\n * Returns whether `value` is a valid string **input** for `toGbigint()`.\n *\n * Valid values: `'0', '-12', '900719925474099175178', '  42  ', '\\t'`, ''\n *\n * Invalid values: `'12.34', '-0', '0x1a7e', 'one', 'not a number'`\n */\nfunction isValidGbigintInputString(value: string): boolean {\n  return /^\\s*(?:-?[1-9]\\d*|0)?\\s*$/.test(value);\n}\n\n/**\n * Returns whether `value` is a valid number input for `toGbigint()`.\n *\n * Valid values: `0, -12, 9007199254740991`\n *\n * Invalid values: `9007199254740992, 12.34, NaN, Infinity`\n */\nfunction isValidGbigintInputNumber(value: number): boolean {\n  return Number.isSafeInteger(value);\n}\n\n/**\n * Returns whether `value` is a valid `gbigint` string value. Equivalent to the\n * set of all `bigint` values converted to string with `.toString()`.\n *\n * Valid values: `'0', '-12', '900719925474099175178'`\n *\n * Invalid values: `'12.34', '-0', '  42  ', '0x1a7e', 'one', 'not a number'`\n */\nfunction isValidGbigintDecimalString(value: string): boolean {\n  return /^(?:-?[1-9]\\d*|0)$/.test(value);\n}\n\n/**\n * Casts the given value to a `gbigint`.\n *\n * Note to Googlers reading through this code... DON'T REPLICATE THIS CAST! :)\n * Call `toGbigint()` instead to guarantee runtime consistency and input\n * validation.\n */\nfunction castToGbigint(value: string | bigint): gbigint {\n  return value as unknown as gbigint;\n}\n\nfunction isInRange(value: string, boundary: string): boolean {\n  // Fast comparisons.\n  if (value.length > boundary.length) return false;\n  if (value.length < boundary.length) return true;\n  if (value === boundary) return true;\n\n  // Compare two strings conforming to isValidGbigintDecimalString char by char.\n  // At this point, both `value` and `boundary` are the same length and, if\n  // negative, both start with `-`.\n  for (let i = 0; i < value.length; i++) {\n    const valueChar = value[i];\n    const boundaryChar = boundary[i];\n    // Numeric chars compare the same as numbers.\n    if (valueChar > boundaryChar) return false;\n    if (valueChar < boundaryChar) return true;\n  }\n  fail(`isInRange weird case. Value was: ${value}. Boundary was: ${boundary}.`);\n}\n\nconst ZERO_STR = '0';\nconst ZERO_BIGINT = NATIVE_BIGINT_AVAILABLE ? BigInt(0) : undefined;\n\n/**\n * In DEBUG builds with native `BigInt` support, forces `gbigint` to be a\n * `string` half the time and a `bigint` otherwise in a consistent manner.\n *\n * The main sharp edge of `gbigint` is that a `gbigint` instance is itself a\n * `string` or a `bigint` at runtime. This can cause problems if a `gbigint`\n * value's type is unioned with `string` or `bigint` or is checked with\n * something like `isString()`. For example, this could result in a behavior\n * issue that only occurs on older browsers in production.\n *\n * This DEBUG-only behavior aims at helping developers detect these unexpected\n * edge cases earlier.\n */\nfunction gbigintForcedAsStringHalfTheTime(\n  value: number | string | boolean | bigint | JSBI,\n): gbigint {\n  let valueAsBigInt: bigint;\n  // In development builds, JSBI references are instances of DebugBoxedBigInt.\n  // This indirection avoids a full dependency on the large OSS JSBI sources.\n  if (value instanceof DebugBoxedBigInt) {\n    valueAsBigInt = value.val;\n  } else if (isBigInt(value)) {\n    valueAsBigInt = value;\n  } else {\n    assert(value, isAnyOf(isString, isBoolean, isNumber));\n    valueAsBigInt = BigInt(value);\n  }\n  if (\n    valueAsBigInt % BigInt(2) ===\n    BigInt(getGBigIntUseStrInDebugToggleVal())\n  ) {\n    return castToGbigint(valueAsBigInt.toString());\n  }\n  return castToGbigint(valueAsBigInt);\n}\n\nfunction isGbigintForcedAsStringHalfTheTime(arg: unknown): boolean {\n  if (typeof arg === 'bigint') {\n    if (arg % BigInt(2) === BigInt(getGBigIntUseStrInDebugToggleVal())) {\n      console.error(\n        'isGbigint: got a `bigint` when we were expecting a `string`. Make sure to call `toGbigint()` when creating `gbigint` instances!',\n      );\n      return false;\n    }\n    return true;\n  }\n\n  if (isString(arg)) {\n    if (!isValidGbigintDecimalString(arg)) return false;\n\n    if (\n      Number(arg[arg.length - 1]) % 2 ===\n      getGBigIntUseStrInDebugToggleVal()\n    ) {\n      return true;\n    }\n    console.error(\n      'isGbigint: got a `string` when we were expecting a `bigint`. Make sure to call `toGbigint()` when creating `gbigint` instances!',\n    );\n    return false;\n  }\n\n  return false;\n}\n\n// NOTE: This is a function rather than a module-local variable to ensure the\n// compiler can dead-code-eliminate it when compiled.\nfunction getGBigIntUseStrInDebugToggleVal(): 0 | 1 {\n  assertTruthy(forcedAsStringHalfTheTime);\n  if (ODD_FORCED_STRING_IN_DEBUG) {\n    return 1;\n  }\n\n  // In an iframe-compatible manner, determines whether odd or even gbigint\n  // values should be strings.\n  return (() => {\n    const container = (\n      typeof Window === 'function' && globalThis.top instanceof Window\n        ? globalThis.top\n        : globalThis\n    ) as GlobalThisWithDebugModResultAsString;\n    if (container.gbigintUseStrInDebugToggleVal == null) {\n      // Define it as readonly to prevent it from being mutated. If this value\n      // changes half way through a session, comparisons will start failing.\n      Object.defineProperties(container, {\n        // The types on defineProperties confuse the linter.\n        // tslint:disable-next-line:no-implicit-dictionary-conversion\n        gbigintUseStrInDebugToggleVal: {\n          value: Math.round(Math.random()) as 0 | 1,\n        },\n      });\n    }\n    return container.gbigintUseStrInDebugToggleVal!;\n  })();\n}\n\n// Declared so that binaries compiled with `goog.DEBUG` don't collide this\n// renamed property with some other top-level var of the same renamed name.\ndeclare interface GlobalThisWithDebugModResultAsString extends GlobalThis {\n  gbigintUseStrInDebugToggleVal: 0 | 1 | undefined;\n}\n","/**\n * @fileoverview This file contains helper code used by BinaryReader\n * and BinaryWriter.\n *\n * DO NOT USE THIS OUTSIDE OF javascript/apps/jspb.\n *\n * @author aappleby@google.com (Austin Appleby)\n */\n\ngoog.module('jspb.utils');\n\nconst BinaryConstants = goog.require('jspb.BinaryConstants');\nconst {assert} = goog.require('goog.asserts');\nconst {isBigIntAvailable} = goog.require('jspb.internal_options');\nconst {toGbigint} = goog.require('google3.javascript.common.bigint.index');\n\n/**\n * Flag for browser support of Uint8Array slicing.\n *\n * This isn't available in every browser that supports Uint8Array\n *\n * See https://caniuse.com/mdn-javascript_builtins_typedarray_slice and\n * go/jscompiler-flags#browser-featureset-year-options\n * @const {boolean}\n */\nconst SUPPORTS_UINT8ARRAY_SLICING = goog.FEATURESET_YEAR >= 2018 ||\n    (typeof Uint8Array.prototype.slice === 'function');\n\n\n/** @const {number} */\nconst MAX_SCRATCHPAD_BYTES = 8;\n\n/**\n * Returns a copy of a slice of a Uint8Array.\n *\n * @param {!Uint8Array} arr the input array to slice.\n * @param {number} startIdx The starting index of the slice.\n * @param {number} endIdx The ending index of the slice.\n * @return {!Uint8Array} the array slice.\n */\nfunction sliceUint8Array(arr, startIdx, endIdx) {\n  // See https://jsbench.me/ysl0kb8y54/1\n  // This test is significantly faster than native slice performance for an\n  // empty slice, and empty slices are not uncommon.\n  if (startIdx === endIdx) {\n    return new Uint8Array(0);\n  }\n  return SUPPORTS_UINT8ARRAY_SLICING ?\n      arr.slice(startIdx, endIdx) :\n      new Uint8Array(arr.subarray(startIdx, endIdx));\n}\n\n/**\n * Javascript can't natively handle 64-bit data types, so to manipulate them we\n * have to split them into two 32-bit halves and do the math manually.\n *\n * Instead of instantiating and passing small structures around to do this, we\n * instead just use two global temporary values. This one stores the low 32\n * bits of a split value - for example, if the original value was a 64-bit\n * integer, this temporary value will contain the low 32 bits of that integer.\n * If the original value was a double, this temporary value will contain the\n * low 32 bits of the binary representation of that double, etcetera.\n *\n * This value may be signed or unsigned for the same bit pattern. Coerce to a\n * specific interpretation before use if needed.\n * @type {number}\n */\nlet split64Low = 0;\n\n\n/**\n * And correspondingly, this temporary variable will contain the high 32 bits\n * of whatever value was split.\n * @type {number}\n */\nlet split64High = 0;\n\n/** @type {!DataView|undefined} */\nlet scratchpad;\n\n/**\n * Splits an unsigned Javascript integer into two 32-bit halves and stores it\n * in the temp values above.\n * @param {number} value The number to split.\n */\nfunction splitUint64(value) {\n  // Extract low 32 bits and high 32 bits as unsigned integers.\n  const lowBits = value >>> 0;\n  const highBits = ((value - lowBits) / BinaryConstants.TWO_TO_32) >>> 0;\n\n  split64Low = lowBits;\n  split64High = highBits;\n}\n\n/**\n * Splits an unsigned Javascript integer into two 32-bit halves and stores it\n * in the temp values above.\n * @param {bigint} value The number to split.\n */\nfunction splitUint64BigInt(value) {\n  const as64 = BigInt.asUintN(64, value);\n\n  // Extract low 32 bits and high 32 bits as unsigned integers.\n  const lowBits = BigInt.asUintN(32, as64);\n  const highBits = (as64 - lowBits) >> BigInt(32);\n\n  split64Low = Number(lowBits);\n  split64High = Number(highBits);\n}\n\n\n/**\n * Splits a signed Javascript integer into two 32-bit halves and stores it in\n * the temp values above.\n * @param {number} value The number to split.\n */\nfunction splitInt64(value) {\n  // Perform two's complement conversion if the sign bit was set.\n  if (value < 0) {\n    // Convert to sign-magnitude representation.\n    splitUint64(0 - value);\n    const [negLow, negHigh] = negate(split64Low, split64High);\n    split64Low = negLow >>> 0;\n    split64High = negHigh >>> 0;\n  } else {\n    splitUint64(value);\n  }\n}\n\n\n/**\n * Converts a signed Javascript integer into zigzag format, splits it into two\n * 32-bit halves, and stores it in the temp values above.\n * @param {number} value The number to split.\n */\nfunction splitZigzag64(value) {\n  // Convert to sign-magnitude and scale by 2 before we split the value.\n  const sign = (value < 0);\n  value = Math.abs(value) * 2;\n\n  splitUint64(value);\n  let lowBits = split64Low;\n  let highBits = split64High;\n\n  // If the value is negative, subtract 1 from the split representation so we\n  // don't lose the sign bit due to precision issues.\n  if (sign) {\n    if (lowBits == 0) {\n      if (highBits == 0) {\n        lowBits = 0xFFFFFFFF;\n        highBits = 0xFFFFFFFF;\n      } else {\n        highBits--;\n        lowBits = 0xFFFFFFFF;\n      }\n    } else {\n      lowBits--;\n    }\n  }\n\n  split64Low = lowBits;\n  split64High = highBits;\n}\n\n/**\n * Converts a signed Javascript integer into zigzag format, splits it into two\n * 32-bit halves, and stores it in the temp values above.\n * @param {bigint} value The number to split.\n */\nfunction splitZigzag64BigInt(value) {\n  assert(value === BigInt.asIntN(64, value));\n\n  const zigzag = (value << BigInt(1)) ^ (value >> BigInt(63));\n\n  split64Low = Number(BigInt.asUintN(32, zigzag));\n  split64High = Number(BigInt.asUintN(32, zigzag >> BigInt(32)));\n}\n\n/**\n * Initialize the scratchpad `DataView` to the given number of bytes and\n * returns scratchpad.\n * @param {number} numBytes\n * @return {!DataView}\n */\nfunction getScratchpad(numBytes) {\n  assert(numBytes <= MAX_SCRATCHPAD_BYTES);\n  return scratchpad ||\n      (scratchpad = new DataView(new ArrayBuffer(MAX_SCRATCHPAD_BYTES)));\n}\n\n/**\n * Converts a floating-point number into 32-bit IEEE representation and stores\n * it in the temp values above.\n * @param {number|string} value to split. Accepts 'Infinity'/'-Infinity'/'NaN'\n *     for JSPB wire format compatibility.\n */\nfunction splitFloat32(value) {\n  const scratch = getScratchpad(/* numBytes= */ 4);\n  //  See go/proto-encoding#cheat-sheet re: little endian.\n  scratch.setFloat32(0, +value, /* littleEndian= */ true);\n  split64High = 0;\n  split64Low = scratch.getUint32(0, /* littleEndian = */ true);\n}\n\n\n/**\n * Converts a floating-point number into 64-bit IEEE representation and stores\n * it in the temp values above.\n * @param {number|string} value to split. Accepts 'Infinity'/'-Infinity'/'NaN'\n *     for JSPB wire format compatibility.\n */\nfunction splitFloat64(value) {\n  const scratch = getScratchpad(/* numBytes= */ 8);\n  //  See go/proto-encoding#cheat-sheet re: little endian.\n  scratch.setFloat64(0, +value, /* littleEndian= */ true);\n  split64Low = scratch.getUint32(0, /* littleEndian = */ true);\n  split64High = scratch.getUint32(4, /* littleEndian = */ true);\n}\n\n\n/**\n * Converts an 8-byte array into two 32-bit numbers and stores them in the temp\n * values above.\n * @param {!Array<number>} bytes\n */\nfunction splitBytes64(bytes) {\n  const [a, b, c, d, e, f, g, h] = bytes;\n\n  split64Low = (a + (b << 8) + (c << 16) + (d << 24)) >>> 0;\n  split64High = (e + (f << 8) + (g << 16) + (h << 24)) >>> 0;\n}\n\n\n/**\n * Joins two 32-bit values into a 64-bit unsigned integer. Value will be\n * returned as a string if it is greater than 2^52 to avoid precision loss.\n * @param {number} bitsLow\n * @param {number} bitsHigh\n * @return {number}\n */\nfunction joinUint64(bitsLow, bitsHigh) {\n  const maybeUnsafeValue =\n      bitsHigh * BinaryConstants.TWO_TO_32 + (bitsLow >>> 0);\n  return Number.isSafeInteger(maybeUnsafeValue) ?\n      maybeUnsafeValue : /** @type {number} */\n      (/** @type {*} */ (joinUnsignedDecimalString(bitsLow, bitsHigh)));\n}\n\n/**\n * Joins two 32-bit values into a 64-bit unsigned integer.\n * @param {number} bitsLow\n * @param {number} bitsHigh\n * @return {bigint}\n */\nfunction joinUint64BigInt(bitsLow, bitsHigh) {\n  return BigInt.asUintN(\n      64, (BigInt(bitsHigh >>> 0) << BigInt(32)) + BigInt(bitsLow >>> 0));\n}\n\n/**\n * Joins two 32-bit values into a 64-bit unsigned integer.\n * @param {number} bitsLow\n * @param {number} bitsHigh\n * @return {!gbigint}\n */\nfunction joinUint64Gbigint(bitsLow, bitsHigh) {\n  return toGbigint(\n      isBigIntAvailable() ? joinUint64BigInt(bitsLow, bitsHigh) :\n                            joinUnsignedDecimalString(bitsLow, bitsHigh));\n}\n\n\n/**\n * Joins two 32-bit values into a 64-bit signed integer. Value will be\n * returned as a string if it outside of the safe integer range.\n * @param {number} bitsLow\n * @param {number} bitsHigh\n * @return {number}\n */\nfunction joinInt64(bitsLow, bitsHigh) {\n  // If the high bit is set, do a manual two's complement conversion.\n  const sign = (bitsHigh & 0x80000000);\n  if (sign) {\n    bitsLow = (~bitsLow + 1) >>> 0;\n    bitsHigh = ~bitsHigh >>> 0;\n    if (bitsLow == 0) {\n      bitsHigh = (bitsHigh + 1) >>> 0;\n    }\n  }\n\n  const result = joinUint64(bitsLow, bitsHigh);\n  if (typeof result === 'number') {\n    return sign ? -result : result;\n  }\n\n  return sign ? /** @type {number} */ (/** @type {*} */ ('-' + result)) :\n                result;\n}\n\n/**\n * Joins two 32-bit values into a 64-bit signed integer.\n * @param {number} bitsLow\n * @param {number} bitsHigh\n * @return {!gbigint}\n */\nfunction joinInt64Gbigint(bitsLow, bitsHigh) {\n  if (!isBigIntAvailable()) {\n    return toGbigint(joinSignedDecimalString(bitsLow, bitsHigh));\n  }\n\n  const bitsLowBig = BigInt.asUintN(32, BigInt(bitsLow));\n  const bitsHighBig = BigInt.asUintN(32, BigInt(bitsHigh));\n  return toGbigint(BigInt.asIntN(64, (bitsHighBig << BigInt(32)) + bitsLowBig));\n}\n\n/**\n * Converts 32-bit values from standard two's complement encoding to zig-zag\n * encoding.\n *\n * @param {number} value\n * @return {number}\n */\nfunction toZigzag32(value) {\n  return ((value << 1) ^ (value >> 31)) >>> 0;\n}\n\n/**\n * Converts split 64-bit values from standard two's complement encoding to\n * zig-zag encoding. Invokes the provided function to produce final result.\n *\n * @param {number} bitsLow\n * @param {number} bitsHigh\n * @param {function(number, number): T} convert Conversion function to produce\n *     the result value, takes parameters (lowBits, highBits).\n * @return {T}\n * @template T\n */\nfunction toZigzag64(bitsLow, bitsHigh, convert) {\n  // See\n  // https://engdoc.corp.google.com/eng/howto/protocolbuffers/developerguide/encoding.shtml?cl=head#types\n  // 64-bit math is: (n << 1) ^ (n >> 63)\n  //\n  // To do this in 32 bits, we can get a 32-bit sign-flipping mask from the\n  // high word.\n  // Then we can operate on each word individually, with the addition of the\n  // \"carry\" to get the most significant bit from the low word into the high\n  // word.\n  const signFlipMask = bitsHigh >> 31;\n  bitsHigh = (bitsHigh << 1 | bitsLow >>> 31) ^ signFlipMask;\n  bitsLow = (bitsLow << 1) ^ signFlipMask;\n  return convert(bitsLow, bitsHigh);\n}\n\n\n/**\n * Joins two 32-bit values into a 64-bit unsigned integer and applies zigzag\n * decoding. Precision will be lost if the result is greater than 2^52.\n * @param {number} bitsLow\n * @param {number} bitsHigh\n * @return {number}\n */\nfunction joinZigzag64(bitsLow, bitsHigh) {\n  return fromZigzag64(bitsLow, bitsHigh, joinInt64);\n}\n\n/**\n * Converts 32-bit value from zigzag encoding to standard two's\n * complement encoding.\n * @param {number} zigzag\n * @return {number}\n */\nfunction fromZigzag32(zigzag) {\n  const signFlipMask = -(zigzag & 1);\n  return (zigzag >>> 1) ^ signFlipMask;\n}\n\n/**\n * Converts split 64-bit values from zigzag encoding to standard two's\n * complement encoding. Invokes the provided function to produce final result.\n *\n * @param {number} bitsLow\n * @param {number} bitsHigh\n * @param {function(number, number): T} convert Conversion function to produce\n *     the result value, takes parameters (lowBits, highBits).\n * @return {T}\n * @template T\n */\nfunction fromZigzag64(bitsLow, bitsHigh, convert) {\n  // 64 bit math is:\n  //   signmask = (zigzag & 1) ? -1 : 0;\n  //   twosComplement = (zigzag >> 1) ^ signmask;\n  //\n  // To work with 32 bit, we can operate on both but \"carry\" the lowest bit\n  // from the high word by shifting it up 31 bits to be the most significant bit\n  // of the low word.\n  const signFlipMask = -(bitsLow & 1);\n  bitsLow = ((bitsLow >>> 1) | (bitsHigh << 31)) ^ signFlipMask;\n  bitsHigh = (bitsHigh >>> 1) ^ signFlipMask;\n  return convert(bitsLow, bitsHigh);\n}\n\n\n/**\n * Joins two 32-bit values into a 32-bit IEEE floating point number and\n * converts it back into a Javascript number.\n * @param {number} bitsLow The low 32 bits of the binary number;\n * @param {number} bitsHigh The high 32 bits of the binary number.\n * @return {number}\n */\nfunction joinFloat32(bitsLow, bitsHigh) {\n  const sign = ((bitsLow >> 31) * 2 + 1);\n  const exp = (bitsLow >>> 23) & 0xFF;\n  const mant = bitsLow & 0x7FFFFF;\n\n  if (exp == 0xFF) {\n    if (mant) {\n      return NaN;\n    } else {\n      return sign * Infinity;\n    }\n  }\n\n  if (exp == 0) {\n    // Denormal.\n    return sign * Math.pow(2, -149) * mant;\n  } else {\n    return sign * Math.pow(2, exp - 150) * (mant + Math.pow(2, 23));\n  }\n}\n\n\n/**\n * Joins two 32-bit values into a 64-bit IEEE floating point number and\n * converts it back into a Javascript number.\n * @param {number} bitsLow The low 32 bits of the binary number;\n * @param {number} bitsHigh The high 32 bits of the binary number.\n * @return {number}\n */\nfunction joinFloat64(bitsLow, bitsHigh) {\n  const sign = ((bitsHigh >> 31) * 2 + 1);\n  const exp = (bitsHigh >>> 20) & 0x7FF;\n  const mant = BinaryConstants.TWO_TO_32 * (bitsHigh & 0xFFFFF) + bitsLow;\n\n  if (exp == 0x7FF) {\n    if (mant) {\n      return NaN;\n    } else {\n      return sign * Infinity;\n    }\n  }\n\n  if (exp == 0) {\n    // Denormal.\n    return sign * Math.pow(2, -1074) * mant;\n  } else {\n    return sign * Math.pow(2, exp - 1075) * (mant + BinaryConstants.TWO_TO_52);\n  }\n}\n\n/**\n * Losslessly converts a 64-bit unsigned integer in 32:32 split representation\n * into a decimal string.\n * @param {number} bitsLow The low 32 bits of the binary number;\n * @param {number} bitsHigh The high 32 bits of the binary number.\n * @return {string} The binary number represented as a string.\n */\nfunction joinUnsignedDecimalString(bitsLow, bitsHigh) {\n  // Must ensure the values are handled as unsigned, any bitwise operations\n  // on the input arguments would have turned them into signed values (e.g.\n  // zigzag decoding).\n  bitsHigh = bitsHigh >>> 0;\n  bitsLow = bitsLow >>> 0;\n  // Skip the expensive conversion if the number is small enough to use the\n  // built-in conversions.\n  // Number.MAX_SAFE_INTEGER = 0x001FFFFF FFFFFFFF, thus any number with\n  // bitsHigh <= 0x1FFFFF can be safely expressed with a double and retain\n  // integer precision.\n  // Proven by: Number.isSafeInteger(0x1FFFFF * 2**32 + 0xFFFFFFFF) == true.\n  // Even when BigInt is supported, it's faster to avoid the conversion to\n  // bigint and back.\n  if (bitsHigh <= 0x1FFFFF) {\n    return '' + (BinaryConstants.TWO_TO_32 * bitsHigh + bitsLow);\n  } else if (isBigIntAvailable()) {\n    return '' + (BigInt(bitsHigh) << BigInt(32) | BigInt(bitsLow));\n  }\n  return joinUnsignedDecimalStringFallback(bitsLow, bitsHigh);\n}\n\n/**\n * Losslessly converts a 64-bit unsigned integer in 32:32 split representation\n * into a decimal string without using BigInt.\n * @param {number} bitsLow The unsigned low 32 bits of the binary number;\n * @param {number} bitsHigh The unsigned high 32 bits of the binary number.\n * @return {string} The binary number represented as a string.\n * @package For Testing only.\n */\nfunction joinUnsignedDecimalStringFallback(bitsLow, bitsHigh) {\n  // What this code is doing is essentially converting the input number from\n  // base-2 to base-1e7, which allows us to represent the 64-bit range with\n  // only 3 (very large) digits. Those digits are then trivial to convert to\n  // a base-10 string.\n\n  // Split 32:32 representation into 16:24:24 representation so our\n  // intermediate digits don't overflow.\n  const low = bitsLow & LOW_24_BITS;\n  const mid = ((bitsLow >>> 24) | (bitsHigh << 8)) & LOW_24_BITS;\n  const high = (bitsHigh >> 16) & LOW_16_BITS;\n\n  // Assemble our three base-1e7 digits, ignoring carries. The maximum\n  // value in a digit at this step is representable as a 48-bit integer, which\n  // can be stored in a 64-bit floating point number.\n\n  // The magic numbers used here are -\n  // 2^24 = 16777216 = (1,6777216) in base-1e7.\n  // 2^48 = 281474976710656 = (2,8147497,6710656) in base-1e7.\n  let digitA = low + (mid * 6777216) + (high * 6710656);\n  let digitB = mid + (high * 8147497);\n  let digitC = (high * 2);\n\n  // Apply carries from A to B and from B to C.\n  const base = 10000000;\n  if (digitA >= base) {\n    digitB += (digitA / base) >>> 0;\n    digitA %= base;\n  }\n\n  if (digitB >= base) {\n    digitC += (digitB / base) >>> 0;\n    digitB %= base;\n  }\n\n  // If digitC is 0, then we should have returned in the trivial code path\n  // at the top for non-safe integers. Given this, we can assume both digitB\n  // and digitA need leading zeros.\n  assert(digitC);\n  return digitC + decimalFrom1e7WithLeadingZeros(digitB) +\n      decimalFrom1e7WithLeadingZeros(digitA);\n}\n\n/**\n * @param {number} digit1e7 Number < 1e7\n * @return {string} Decimal representation of digit1e7 with leading zeros.\n */\nfunction decimalFrom1e7WithLeadingZeros(digit1e7) {\n  const partial = String(digit1e7);\n  return '0000000'.slice(partial.length) + partial;\n}\n\n/**\n * Losslessly converts a 64-bit signed integer in 32:32 split representation\n * into a decimal string.\n * @param {number} bitsLow The low 32 bits of the binary number;\n * @param {number} bitsHigh The high 32 bits of the binary number.\n * @return {string} The binary number represented as a string.\n */\nfunction joinSignedDecimalString(bitsLow, bitsHigh) {\n  const negative = (bitsHigh & 0x80000000);\n  if (negative) {\n    if (isBigIntAvailable()) {\n      return '' +\n          ((BigInt(bitsHigh | 0) << BigInt(32)) | BigInt(bitsLow >>> 0));\n    }\n    return joinNegativeDecimalStringFallback(bitsLow, bitsHigh);\n  } else {\n    return joinUnsignedDecimalString(bitsLow, bitsHigh);\n  }\n}\n\n/**\n * Losslessly converts a 64-bit signed integer in 32:32 split representation\n * into a number or decimal string, using a number when the value is between\n * [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], or decimal string\n * otherwise.\n *\n * @param {number} bitsLow The low 32 bits of the binary number;\n * @param {number} bitsHigh The high 32 bits of the binary number.\n * @return {number|string} The number represented as a number or string.\n */\nfunction joinSignedNumberOrDecimalString(bitsLow, bitsHigh) {\n  const possiblyUnsafe = joinInt64(bitsLow, bitsHigh);\n  if (Number.isSafeInteger(possiblyUnsafe)) {\n    return possiblyUnsafe;\n  }\n  return joinSignedDecimalString(bitsLow, bitsHigh);\n}\n\n/**\n * Losslessly converts a 64-bit unsigned integer in 32:32 split representation\n * into a number or decimal string, using a number when the value is between\n * [0, Number.MAX_SAFE_INTEGER], or decimal string otherwise.\n *\n * @param {number} bitsLow The low 32 bits of the binary number;\n * @param {number} bitsHigh The high 32 bits of the binary number.\n * @return {number|string} The number represented as a number or string.\n */\nfunction joinUnsignedNumberOrDecimalString(bitsLow, bitsHigh) {\n  bitsHigh >>>= 0;\n  const possiblyUnsafe = joinUint64(bitsLow, bitsHigh);\n  if (Number.isSafeInteger(possiblyUnsafe)) {\n    return possiblyUnsafe;\n  }\n  return joinUnsignedDecimalString(bitsLow, bitsHigh);\n}\n\n/**\n * Losslessly converts a 64-bit signed integer in 32:32 split representation\n * into a decimal string.\n * @param {number} bitsLow The low 32 bits of the binary number;\n * @param {number} bitsHigh The high 32 bits of the binary number.\n * @return {string} The binary number represented as a string.\n * @package For Testing only.\n */\nfunction joinNegativeDecimalStringFallback(bitsLow, bitsHigh) {\n  // Do a manual two's complement conversion before the decimal conversion.\n  const [negLow, negHigh] = negate(bitsLow, bitsHigh);\n  bitsLow = negLow;\n  bitsHigh = negHigh;\n\n  return '-' + joinUnsignedDecimalString(bitsLow, bitsHigh);\n}\n\n/**\n * Converts a signed or unsigned decimal string into two 32-bit halves, and\n * stores them in the temp variables listed above. Only the lower 64 bits of the\n * value are kept.\n * @param {string} value The decimal string to convert.\n */\nfunction splitDecimalString(value) {\n  assert(value.length > 0);\n\n  // Strings that are shorter than MAX_SAFE_INTEGER are sure to be safe\n  // to parse directly to a double for conversion with Int64.fromNumber.\n  if (value.length < MAX_SAFE_INTEGER_DECIMAL_LENGTH) {\n    splitInt64(Number(value));\n    return;\n  }\n\n  if (isBigIntAvailable()) {\n    const bigInt = BigInt(value);\n    split64Low = Number(bigInt & BigInt(ALL_32_BITS)) >>> 0;\n    split64High = Number((bigInt >> BigInt(32)) & BigInt(ALL_32_BITS));\n  } else {\n    splitDecimalStringFallback(value);\n  }\n}\n\n/**\n * Converts a signed or unsigned decimal string into two 32-bit halves, and\n * stores them in the temp variables listed above. Only the lower 64 bits of the\n * value are kept.\n * @param {string} value The decimal string to convert.\n * @package For Testing only.\n */\nfunction splitDecimalStringFallback(value) {\n  assert(value.length > 0);\n  // Check for minus sign.\n  const firstDigitIndex = +(value[0] === '-');\n  split64Low = 0;\n  split64High = 0;\n  const end = value.length;\n  // Work 6 decimal digits at a time, acting like we're converting base 1e6\n  // digits to binary. This is safe to do with floating point math because\n  // Number.isSafeInteger(ALL_32_BITS * 1e6) == true.\n  const base = 1e6;\n  for (let sliceStart = 0 + firstDigitIndex,\n           sliceEnd = (end - firstDigitIndex) % 6 + firstDigitIndex;\n       sliceEnd <= end; sliceStart = sliceEnd, sliceEnd += 6) {\n    const digit1e6 = Number(value.slice(sliceStart, sliceEnd));\n    split64High *= base;\n    split64Low = split64Low * base + digit1e6;\n    // Carry bits from split64Low to\n    if (split64Low >= BinaryConstants.TWO_TO_32) {\n      split64High += Math.trunc(split64Low / BinaryConstants.TWO_TO_32);\n      // Drop any bits higher than 64 as we accumulate\n      split64High = split64High >>> 0;\n      split64Low = split64Low >>> 0;\n    }\n  }\n\n  if (firstDigitIndex /* != 0 */) {\n    const [negLow, negHigh] = negate(split64Low, split64High);\n    split64Low = negLow;\n    split64High = negHigh;\n  }\n}\n\n/**\n * @param {number} lowBits\n * @param {number} highBits\n * @return {!Array<number>} [low, high] words of the result.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#Signed_32-bit_integers\n */\nfunction negate(lowBits, highBits) {\n  highBits = ~highBits;\n  if (lowBits) {\n    lowBits = ~lowBits + 1;\n  } else {\n    // If lowBits is 0, then bitwise-not is 0xFFFFFFFF,\n    // adding 1 to that, results in 0x100000000, which leaves\n    // the low bits 0x0 and simply adds one to the high bits.\n    highBits += 1;\n  }\n  return [lowBits, highBits];\n}\n\n\n/**\n * Counts the number of contiguous varints in a buffer.\n * @param {!Uint8Array} buffer The buffer to scan.\n * @param {number} start The starting point in the buffer to scan.\n * @param {number} end The end point in the buffer to scan.\n * @return {number} The number of varints in the buffer.\n */\nfunction countVarints(buffer, start, end) {\n  // Count how many high bits of each byte were set in the buffer.\n  let count = 0;\n  for (let i = start; i < end; i++) {\n    count += buffer[i] >> 7;\n  }\n\n  // The number of varints in the buffer equals the size of the buffer minus\n  // the number of non-terminal bytes in the buffer (those with the high bit\n  // set).\n  return (end - start) - count;\n}\n\n\n/**\n * Counts the number of contiguous varint fields with the given field number in\n * the buffer.\n * @param {!Uint8Array} buffer The buffer to scan.\n * @param {number} start The starting point in the buffer to scan.\n * @param {number} end The end point in the buffer to scan.\n * @param {number} field The field number to count.\n * @return {number} The number of matching fields in the buffer.\n */\nfunction countVarintFields(buffer, start, end, field) {\n  let count = 0;\n  let cursor = start;\n  const tag = field * 8 + BinaryConstants.WireType.VARINT;\n\n  if (tag < 128) {\n    // Single-byte field tag, we can use a slightly quicker count.\n    while (cursor < end) {\n      // Skip the field tag, or exit if we find a non-matching tag.\n      if (buffer[cursor++] != tag) return count;\n\n      // Field tag matches, we've found a valid field.\n      count++;\n\n      // Skip the varint.\n      while (1) {\n        const x = buffer[cursor++];\n        if ((x & 0x80) == 0) break;\n      }\n    }\n  } else {\n    while (cursor < end) {\n      // Skip the field tag, or exit if we find a non-matching tag.\n      let temp = tag;\n      while (temp > 128) {\n        if (buffer[cursor] != ((temp & 0x7F) | 0x80)) return count;\n        cursor++;\n        temp >>= 7;\n      }\n      if (buffer[cursor++] != temp) return count;\n\n      // Field tag matches, we've found a valid field.\n      count++;\n\n      // Skip the varint.\n      while (1) {\n        const x = buffer[cursor++];\n        if ((x & 0x80) == 0) break;\n      }\n    }\n  }\n  return count;\n}\n\n\n/**\n * Counts the number of contiguous fixed32 fields with the given tag in the\n * buffer.\n * @param {!Uint8Array} buffer The buffer to scan.\n * @param {number} start The starting point in the buffer to scan.\n * @param {number} end The end point in the buffer to scan.\n * @param {number} tag The tag value to count.\n * @param {number} stride The number of bytes to skip per field.\n * @return {number} The number of fields with a matching tag in the buffer.\n * @private\n */\nfunction countFixedFields_(buffer, start, end, tag, stride) {\n  let count = 0;\n  let cursor = start;\n\n  if (tag < 128) {\n    // Single-byte field tag, we can use a slightly quicker count.\n    while (cursor < end) {\n      // Skip the field tag, or exit if we find a non-matching tag.\n      if (buffer[cursor++] != tag) return count;\n\n      // Field tag matches, we've found a valid field.\n      count++;\n\n      // Skip the value.\n      cursor += stride;\n    }\n  } else {\n    while (cursor < end) {\n      // Skip the field tag, or exit if we find a non-matching tag.\n      let temp = tag;\n      while (temp > 128) {\n        if (buffer[cursor++] != ((temp & 0x7F) | 0x80)) return count;\n        temp >>= 7;\n      }\n      if (buffer[cursor++] != temp) return count;\n\n      // Field tag matches, we've found a valid field.\n      count++;\n\n      // Skip the value.\n      cursor += stride;\n    }\n  }\n  return count;\n}\n\n\n/**\n * Counts the number of contiguous fixed32 fields with the given field number\n * in the buffer.\n * @param {!Uint8Array} buffer The buffer to scan.\n * @param {number} start The starting point in the buffer to scan.\n * @param {number} end The end point in the buffer to scan.\n * @param {number} field The field number to count.\n * @return {number} The number of matching fields in the buffer.\n */\nfunction countFixed32Fields(buffer, start, end, field) {\n  const tag = field * 8 + BinaryConstants.WireType.FIXED32;\n  return countFixedFields_(buffer, start, end, tag, 4);\n}\n\n\n/**\n * Counts the number of contiguous fixed64 fields with the given field number\n * in the buffer.\n * @param {!Uint8Array} buffer The buffer to scan.\n * @param {number} start The starting point in the buffer to scan.\n * @param {number} end The end point in the buffer to scan.\n * @param {number} field The field number to count\n * @return {number} The number of matching fields in the buffer.\n */\nfunction countFixed64Fields(buffer, start, end, field) {\n  const tag = field * 8 + BinaryConstants.WireType.FIXED64;\n  return countFixedFields_(buffer, start, end, tag, 8);\n}\n\n\n/**\n * Counts the number of contiguous delimited fields with the given field number\n * in the buffer.\n * @param {!Uint8Array} buffer The buffer to scan.\n * @param {number} start The starting point in the buffer to scan.\n * @param {number} end The end point in the buffer to scan.\n * @param {number} field The field number to count.\n * @return {number} The number of matching fields in the buffer.\n */\nfunction countDelimitedFields(buffer, start, end, field) {\n  let count = 0;\n  let cursor = start;\n  const tag = field * 8 + BinaryConstants.WireType.DELIMITED;\n\n  while (cursor < end) {\n    // Skip the field tag, or exit if we find a non-matching tag.\n    let temp = tag;\n    while (temp > 128) {\n      if (buffer[cursor++] != ((temp & 0x7F) | 0x80)) return count;\n      temp >>= 7;\n    }\n    if (buffer[cursor++] != temp) return count;\n\n    // Field tag matches, we've found a valid field.\n    count++;\n\n    // Decode the length prefix.\n    let length = 0;\n    let shift = 1;\n    while (1) {\n      temp = buffer[cursor++];\n      length += (temp & 0x7f) * shift;\n      shift *= 128;\n      if ((temp & 0x80) == 0) break;\n    }\n\n    // Advance the cursor past the blob.\n    cursor += length;\n  }\n  return count;\n}\n\n/** @return {number} */\nfunction getSplit64Low() {\n  return split64Low;\n}\n/** @return {number} */\nfunction getSplit64High() {\n  return split64High;\n}\n\n/**\n * Makes a wire tag\n * @return {number}\n */\nfunction makeTag(\n    /** number */ fieldNumber,\n    /** !BinaryConstants.WireType */ wireType) {\n  // N.B. can't use << 3 because that enforces 2s complement 32 bit math and we\n  // want unsigned math. Consider that `(2**29 -1) << 3 === -8` but\n  // `(2**29 -1) * 8 === 4294967288`\n  return fieldNumber * 8 + wireType;\n}\n\n/** @const {number} */\nconst LOW_16_BITS = 0xFFFF;\n\n/** @const {number} */\nconst LOW_24_BITS = 0xFFFFFF;\n\n/** @const {number} */\nconst ALL_32_BITS = 0xFFFFFFFF;\n\n/** @const {number} String(Number.MAX_SAFE_INTEGER).length */\nconst MAX_SAFE_INTEGER_DECIMAL_LENGTH = 16;\n\nexports = {\n  countDelimitedFields,\n  countFixed32Fields,\n  countFixed64Fields,\n  countVarintFields,\n  countVarints,\n  fromZigzag32,\n  fromZigzag64,\n  getSplit64High,\n  getSplit64Low,\n  joinFloat32,\n  joinFloat64,\n  joinInt64,\n  joinInt64Gbigint,\n  joinNegativeDecimalStringFallback,\n  joinSignedDecimalString,\n  joinSignedNumberOrDecimalString,\n  joinUint64,\n  joinUint64Gbigint,\n  joinUnsignedDecimalString,\n  joinUnsignedDecimalStringFallback,\n  joinUnsignedNumberOrDecimalString,\n  joinZigzag64,\n  makeTag,\n  sliceUint8Array,\n  splitDecimalString,\n  splitDecimalStringFallback,\n  splitFloat32,\n  splitFloat64,\n  splitInt64,\n  splitUint64,\n  splitZigzag64,\n  splitZigzag64BigInt,\n  toZigzag32,\n  toZigzag64,\n};\n","goog.module('jspb.BinaryConstants');\n\n/**\n * Field type codes, taken from proto2/public/wire_format_lite.h.\n * @enum {number}\n * @package\n */\nconst FieldType = {\n  INVALID: -1,\n  DOUBLE: 1,\n  FLOAT: 2,\n  INT64: 3,\n  UINT64: 4,\n  INT32: 5,\n  FIXED64: 6,\n  FIXED32: 7,\n  BOOL: 8,\n  STRING: 9,\n  GROUP: 10,\n  MESSAGE: 11,\n  BYTES: 12,\n  UINT32: 13,\n  ENUM: 14,\n  SFIXED32: 15,\n  SFIXED64: 16,\n  SINT32: 17,\n  SINT64: 18,\n};\n\n\n/**\n * Wire-format type codes, taken from proto2/public/wire_format_lite.h.\n * @enum {number}\n */\nconst WireType = {\n  INVALID: -1,\n  VARINT: 0,\n  FIXED64: 1,\n  DELIMITED: 2,\n  START_GROUP: 3,\n  END_GROUP: 4,\n  FIXED32: 5\n};\n\n/** @return {boolean} */\nfunction isValidWireType(/** number */ wireType) {\n  return wireType >= 0 && wireType <= 5;\n}\n\n\n/**\n * Translates field type to wire type.\n * @param {!FieldType} fieldType\n * @return {!WireType}\n */\nfunction FieldTypeToWireType(fieldType) {\n  switch (fieldType) {\n    case FieldType.INT32:\n    case FieldType.INT64:\n    case FieldType.UINT32:\n    case FieldType.UINT64:\n    case FieldType.SINT32:\n    case FieldType.SINT64:\n    case FieldType.BOOL:\n    case FieldType.ENUM:\n      return WireType.VARINT;\n\n    case FieldType.DOUBLE:\n    case FieldType.FIXED64:\n    case FieldType.SFIXED64:\n      return WireType.FIXED64;\n\n    case FieldType.STRING:\n    case FieldType.MESSAGE:\n    case FieldType.BYTES:\n      return WireType.DELIMITED;\n\n    case FieldType.FLOAT:\n    case FieldType.FIXED32:\n    case FieldType.SFIXED32:\n      return WireType.FIXED32;\n\n    case FieldType.INVALID:\n    case FieldType.GROUP:\n    default:\n      return WireType.INVALID;\n  }\n}\n\n\n/**\n * Flag to indicate a missing field.\n * @const {number}\n */\nconst INVALID_FIELD_NUMBER = -1;\n\n/**\n * Flag to indicate a missing tag.\n * @const {number}\n */\nconst INVALID_TAG = -1;\n\n\n/**\n * The smallest denormal float32 value.\n * @const {number}\n */\nconst FLOAT32_EPS = 1.401298464324817e-45;\n\n\n/**\n * The smallest normal float64 value.\n * @const {number}\n */\nconst FLOAT32_MIN = 1.1754943508222875e-38;\n\n\n/**\n * The largest finite float32 value.\n * @const {number}\n */\nconst FLOAT32_MAX = 3.4028234663852886e+38;\n\n\n/**\n * The smallest denormal float64 value.\n * @const {number}\n */\nconst FLOAT64_EPS = 5e-324;\n\n\n/**\n * The smallest normal float64 value.\n * @const {number}\n */\nconst FLOAT64_MIN = 2.2250738585072014e-308;\n\n\n/**\n * The largest finite float64 value.\n * @const {number}\n */\nconst FLOAT64_MAX = 1.7976931348623157e+308;\n\n\n/**\n * Convenience constant equal to 2^20.\n * @const {number}\n */\nconst TWO_TO_20 = 1048576;\n\n\n/**\n * Convenience constant equal to 2^23.\n * @const {number}\n */\nconst TWO_TO_23 = 8388608;\n\n\n/**\n * Convenience constant equal to 2^31.\n * @const {number}\n */\nconst TWO_TO_31 = 2147483648;\n\n\n/**\n * Convenience constant equal to 2^32.\n * @const {number}\n */\nconst TWO_TO_32 = 4294967296;\n\n\n/**\n * Convenience constant equal to 2^52.\n * @const {number}\n */\nconst TWO_TO_52 = 4503599627370496;\n\n\n/**\n * Convenience constant equal to 2^63.\n * @const {number}\n */\nconst TWO_TO_63 = 9223372036854775808;\n\n\n/**\n * Convenience constant equal to 2^64.\n * @const {number}\n */\nconst TWO_TO_64 = 18446744073709551616;\n\n\n/**\n * Eight-character string of zeros, used as the default 64-bit hash value.\n * @const {string}\n */\nconst ZERO_HASH = '\\0\\0\\0\\0\\0\\0\\0\\0';\n\n\n// See go/messageset-wire-format\n// message MessageSet {\n//   repeated group Item = 1 {\n//     required uint32 type_id = 2;\n//     required bytes message = 3;\n//   };\n// };\nconst /** number */ MESSAGE_SET_GROUP_NUMBER = 1;\nconst /** number */ MESSAGE_SET_TYPE_ID_FIELD_NUMBER = 2;\nconst /** number */ MESSAGE_SET_MESSAGE_FIELD_NUMBER = 3;\nconst /** number */ MESSAGE_SET_MAX_TYPE_ID = 0xFFFFFFFE;\n\nexports = {\n  FieldType,\n  FieldTypeToWireType,\n  FLOAT32_EPS,\n  FLOAT32_MIN,\n  FLOAT32_MAX,\n  FLOAT64_EPS,\n  FLOAT64_MIN,\n  FLOAT64_MAX,\n  INVALID_FIELD_NUMBER,\n  INVALID_TAG,\n  MESSAGE_SET_GROUP_NUMBER,\n  MESSAGE_SET_MAX_TYPE_ID,\n  MESSAGE_SET_MESSAGE_FIELD_NUMBER,\n  MESSAGE_SET_TYPE_ID_FIELD_NUMBER,\n  TWO_TO_20,\n  TWO_TO_23,\n  TWO_TO_31,\n  TWO_TO_32,\n  TWO_TO_52,\n  TWO_TO_63,\n  TWO_TO_64,\n  WireType,\n  ZERO_HASH,\n  isValidWireType,\n};\n","/**\n * @fileoverview Internal helpers for JSPB field accessors. See\n * go/jspb-interface-type-checking-requirements for more information.\n *\n * This package defines a library of type assertions and coercions for use by\n * JSPB generated code, and specifies the acceptable types in use by the JSPB\n * wire format and API surface for all primitive types, {boolean, string, bytes,\n * float, double, int32, uint32, int64, uint64}.\n *\n * In this abstraction, the \"wire\" is not quite the wire, but rather the JSPB\n * array. All wire types produced by this API are convertible to the actual\n * wire format via the convertToJsonFormat transformation.\n *\n * For each type, if isValidWire${type}, then the value is a valid array\n * representation and can be safely coerced to a user-visible representation via\n * ${type}ToApi. If not, JSPB ignores the wire value, as if it were `null`.\n *\n * For each type, if isValidApi${type}, then the value is a valid API\n * representation (such as we would receive in a setter method) and can be\n * safely stored in our internal state, or converted to a array representation\n * via ${type}ToWire. If this check does not pass, implementations should\n * assert-fail.\n *\n * @public\n */\ngoog.module('jspb.internal_accessor_helpers');\n\nconst asserts = goog.require('goog.asserts');\nconst {ArrayStateFlags, TypeSpecificApiFormat, getArrayState, getDefaultTypeSpecificApiFormat, markArrayImmutable, setArrayState} = goog.require('jspb.internal_array_state');\nconst {ByteString} = goog.require('jspb.bytestring');\nconst {CheckLevel, DETAILED_JSPB_ASSERTS, getTypeCheck32BitIntFields, getTypeCheck64BitIntFields, getTypeCheck64BitIntFieldsAreInRange, getTypeCheckEnumFields, isBigIntAvailable, shouldCoerce64BitIntFieldsByJsType} = goog.require('jspb.internal_options');\nconst {DEFAULT_IMMUTABLE_INSTANCE_SYMBOL} = goog.require('jspb.internal_symbols');\nconst {InternalMessage, bytesAsByteString, getInternalArray, isInternalMessage} = goog.require('jspb.internal');\nconst {asyncThrowWarning, makeTypeError} = goog.require('jspb.exceptions');\nconst {cast} = goog.require('google3.javascript.common.asserts.asserts');\nconst {checkExhaustive} = goog.require('google3.javascript.typescript.contrib.check');\nconst {getSplit64High, getSplit64Low, joinInt64, joinSignedDecimalString, joinUint64, joinUnsignedDecimalString, splitDecimalString, splitInt64} = goog.require('jspb.utils');\nconst {isBigInt: isBigIntImpl, isNumber, isString} = goog.require('google3.javascript.common.asserts.guards');\nconst {isSafeInt52: isSafeInt52Impl, isValidSignedInt64: isValidSignedInt64Impl, toGbigint} = goog.require('google3.javascript.common.bigint.index');\nconst {withoutLogging} = goog.require('jspb.internal_operations');\n\n/** @const {function(number, bigint): bigint} */\nconst bigintAsIntN = /** @pureOrBreakMyCode */ (\n    /** @type {?} */ (\n        typeof BigInt === 'function' ? BigInt.asIntN : undefined));\n\n/** @const {function(number, bigint): bigint} */\nconst bigintAsUintN = /** @pureOrBreakMyCode */ (\n    /** @type {?} */ (\n        typeof BigInt === 'function' ? BigInt.asUintN : undefined));\n\n/** @const {function(number): boolean} */\nconst isSafeInteger = Number.isSafeInteger;\n\n/** @const {function(number): boolean} */\nconst numberIsFinite = Number.isFinite;\n\n/** @const {function(number): number} */\nconst trunc = Math.trunc;\n\n/** @const {number} */\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;\n\nconst /** !gbigint */ GBIGINT_ZERO = /** @pureOrBreakMyCode */ (toGbigint(0));\n\n/**\n * @param {!gbigint|bigint} value\n * @return {boolean}\n * @requireInlining\n */\nfunction isValidSignedInt64(value) {\n  return /** @type {!Function} */ (isValidSignedInt64Impl)(value);\n}\n\n/**\n * @param {!gbigint|bigint} value\n * @return {boolean}\n * @requireInlining\n */\nfunction isSafeInt52(value) {\n  return /** @type {!Function} */ (isSafeInt52Impl)(value);\n}\n\n/**\n * @param {*} value\n * @return {boolean}\n * @requireInlining\n */\nfunction isBigInt(value) {\n  return /** @type {!Function} */ (isBigIntImpl)(value);\n}\n\n/**\n * @param {*} value\n * @return {number}\n */\nfunction checkFloatingPoint(value) {\n  if (typeof value !== 'number') {\n    throw new Error(`Value of float/double field must be a number, found ${\n        typeof value}: ${value}`);\n  }\n  return /** @type {number} */ (value);\n}\n\n/**\n * @param {number|null|undefined} value\n * @return {number|null|undefined}\n */\nfunction checkNullishFloatingPoint(value) {\n  if (value == null) return value;\n  return checkFloatingPoint(value);\n}\n\n/** @return {number|undefined|null} */\nfunction coerceToNullishFloatingPoint(/** ? */ value) {\n  if (value == null || typeof value === 'number') {\n    return value;\n  } else if (value === 'NaN' || value === 'Infinity' || value === '-Infinity') {\n    return Number(value);\n  } else {\n    return undefined;\n  }\n}\n\n/** @return {string} */\nfunction ctorName(/** function(new: ?, ...)*/ ctor) {\n  return ctor.displayName || ctor.name || 'unknown type name';\n}\n\n/** @return {!ByteString|undefined|null} */\nfunction coerceToNullishBytes(/** ? */ value) {\n  if (value == null || value instanceof ByteString) return value;\n  if (typeof value === 'string') {\n    return ByteString.fromBase64(value);\n  }\n  // TODO(b/396420284): remove.\n  asserts.assert(!(value instanceof Uint8Array));\n  return undefined;\n}\n\n/** @return {!ByteString} */\nfunction checkBytes(\n    /** string|!Uint8Array|!ByteString|null|undefined */ value) {\n  return /** @type {!ByteString} */ (bytesAsByteString(\n      value, /* invalidIsMissing=*/ false, /* allowNullishValues= */ false));\n}\n\n/** @return {!ByteString|null|undefined} */\nfunction checkNullishBytes(\n    /** string|!Uint8Array|!ByteString|null|undefined */ value) {\n  return bytesAsByteString(\n      value, /* invalidIsMissing=*/ false, /* allowNullishValues= */ true);\n}\n\n/**\n * @param {*} value\n * @return {boolean}\n */\nfunction checkBoolean(value) {\n  if (typeof value !== 'boolean') {\n    throw new Error(`Expected boolean but got ${goog.typeOf(value)}: ${value}`);\n  }\n  return value;\n}\n\n/**\n * @param {*} value\n * @return {boolean|null|undefined}\n */\nfunction checkNullishBoolean(value) {\n  if (value == null) {\n    return /** @type{null|undefined} */ (value);\n  }\n  return checkBoolean(value);\n}\n\n/** @return {boolean|undefined|null} */\nfunction coerceToNullishBoolean(/** ? */ value) {\n  if (value == null || typeof value === 'boolean') return value;\n  if (typeof value === 'number') return !!value;\n  return undefined;  // some invalid value\n}\n\n// Represents strings formed by calling toString on a number value. Notably,\n// * Values < 1 must have a leading 0 (e.g. '0.5', but not '.5')\n// * Values with a decimal must have a fractional part (e.g. '1.' disallowed)\n// * Hex and exponential syntax are excluded\n// * May not have leading 0s in the whole part (e.g. '0123', such as zip codes)\n// This allows us to better match gbigint (go/bigint#creating-gbigint-values).\nconst NUMBER_SHAPED_CHECK = /^-?([1-9][0-9]*|0)(\\.[0-9]+)?$/;\n\n/**\n * @param {*} value\n * @param {boolean} forceTypeChecking\n * @return {boolean}  Returns true if value will be suitable for constructing\n *     gbigint (go/bigint) after truncation.\n */\nfunction isNumberShaped(value, forceTypeChecking) {\n  switch (typeof value) {\n    case 'bigint':\n      return true;\n    case 'number':\n      return numberIsFinite(value);\n    case 'string':\n      if (!getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking)) {\n        return !!value && isFinite(value);\n      }\n\n      return NUMBER_SHAPED_CHECK.test(value);\n    default:\n      return false;\n  }\n}\n\n/** @return {boolean} @requireInlining */\nfunction isValidEnum(/** ? */ value) {\n  return numberIsFinite(value);\n}\n\n/**\n * @param {?} value\n * @return {string|undefined}\n */\nfunction getEnumErrorMessage(value) {\n  return goog.DEBUG ?\n      `Expected enum as finite number but got ${goog.typeOf(value)}: ${value}` :\n      'enum';\n}\n\n/** @return {number} */\nfunction checkEnum(/** ? */ value) {\n  if (!isValidEnum(value)) {\n    switch (getTypeCheckEnumFields()) {\n      case CheckLevel.THROW:\n        throw makeTypeError(getEnumErrorMessage(value));\n      case CheckLevel.ASYNC_THROW:\n        asyncThrowWarning(getEnumErrorMessage(value));\n      default:  // do nothing\n    }\n  }\n  return getTypeCheckEnumFields() === CheckLevel.THROW ? value | 0 : value;\n}\n\n/** @return {number|null|undefined} */\nfunction checkNullishEnum(/** ? */ value) {\n  return value == null ? value : checkEnum(value);\n}\n\n/** @return {number|undefined|null} */\nfunction coerceToNullishEnum(/** ? */ value) {\n  if (value == null) return value;\n  if (getTypeCheckEnumFields() === CheckLevel.THROW) {\n    return isValidEnum(value) ? value | 0 : undefined;\n  } else {\n    return value;\n  }\n}\n\n/**\n * @return {boolean}\n * @requireInlining\n */\nfunction isValidInt32(/** ? */ value) {\n  return numberIsFinite(value);\n}\n\n/**\n * @param {?} value\n * @return {string|undefined}\n */\nfunction getInt32ErrorMessage(value) {\n  return goog.DEBUG ? `Expected int32 as finite number but got ${\n                          goog.typeOf(value)}: ${value}` :\n                      'int32';\n}\n\n/** @return {number} */\nfunction checkInt32(/** ? */ value) {\n  if (typeof value !== 'number') {\n    throw makeTypeError(getInt32ErrorMessage(value));\n  }\n  if (!isValidInt32(value)) {\n    switch (getTypeCheck32BitIntFields()) {\n      case CheckLevel.THROW:\n        throw makeTypeError(getInt32ErrorMessage(value));\n      case CheckLevel.ASYNC_THROW:\n        asyncThrowWarning(getInt32ErrorMessage(value));\n      default:  // do nothing\n    }\n  }\n  return getTypeCheck32BitIntFields() === CheckLevel.THROW ? value | 0 : value;\n}\n\n/** @return {number|null|undefined} */\nfunction checkNullishInt32(/** ? */ value) {\n  return value == null ? value : checkInt32(value);\n}\n\n/** @return {number|undefined|null} */\nfunction coerceToNullishInt32(/** ? */ value) {\n  if (value == null) return value;\n  if (typeof value === 'string' && value) {\n    // We need to handle strings to support int64 -> int32 conversions.\n    value = +value;\n  } else if (typeof value !== 'number') {\n    return undefined;\n  }\n  if (getTypeCheck32BitIntFields() === CheckLevel.THROW) {\n    return isValidInt32(value) ? value | 0 : undefined;\n  } else {\n    return value;\n  }\n}\n\n/**\n * @param {?} value\n * @return {string|undefined}\n */\nfunction getUint32ErrorMessage(value) {\n  return goog.DEBUG ? `Expected uint32 as finite number but got ${\n                          goog.typeOf(value)}: ${value}` :\n                      'uint32';\n}\n\n/** @return {number} */\nfunction checkUint32(/** ? */ value) {\n  if (typeof value !== 'number') {\n    throw makeTypeError(getUint32ErrorMessage(value));\n  }\n  if (!isValidInt32(value)) {\n    switch (getTypeCheck32BitIntFields()) {\n      case CheckLevel.THROW:\n        throw makeTypeError(getUint32ErrorMessage(value));\n      case CheckLevel.ASYNC_THROW:\n        asyncThrowWarning(getUint32ErrorMessage(value));\n      default:  // do nothing\n    }\n  }\n  return getTypeCheck32BitIntFields() === CheckLevel.THROW ? value >>> 0 :\n                                                             value;\n}\n\n/** @return {number|null|undefined} */\nfunction checkNullishUint32(/** ? */ value) {\n  return value == null ? value : checkUint32(value);\n}\n\n/** @return {number|undefined|null} */\nfunction coerceToNullishUint32(/** ? */ value) {\n  if (value == null) return value;\n  if (typeof value === 'string' && value) {\n    // We need to handle strings to support uint64 -> uint32 conversions.\n    value = +value;\n  } else if (typeof value !== 'number') {\n    return undefined;\n  }\n  if (getTypeCheck32BitIntFields() === CheckLevel.THROW) {\n    return isValidInt32(value) ? value >>> 0 : undefined;\n  } else {\n    return value;\n  }\n}\n\n/**\n * @param {?} value\n * @return {string|undefined}\n */\nfunction getInt64ErrorMessage(value) {\n  return goog.DEBUG ?\n      `Expected an int64 value encoded as a number or a string but got ${\n          goog.typeOf(value)}: ${value}` :\n      'int64';\n}\n\n/**\n * Validate that the provided value is an int64 number|string|bigint. This\n * function may truncate values to fit within the int64 range, but will not\n * change the data type (string -> string, number -> number, bigint -> bigint)\n * so long as the resulting value is within the safe range. Nullish values are\n * rejected.\n *\n * @param {*} value\n * @param {!TypeSpecificApiFormat=} requestedFormat\n * @return {number|string|!gbigint}\n */\nfunction checkInt64(value, requestedFormat) {\n  // TODO: varomodt - Change default format to GBIGINT.\n  requestedFormat ??= getDefaultTypeSpecificApiFormat();\n\n  // If the underlying data is being accessed via the _asString alternates,\n  // which always apply type checking, then we must also apply\n  // type checking here for consistency. Otherwise, the values would be\n  // marked as IS_API_FORMATTED under a different standard and have\n  // invalid values.\n  const shouldForceTypeChecking =\n      requestedFormat !== TypeSpecificApiFormat.LEGACY;\n  if (!getTypeCheck64BitIntFieldsAreInRange(\n          /* forceTypeChecking = */ shouldForceTypeChecking)) {\n    return /** @type{number|string|!gbigint} */ (value);\n  }\n\n  if (!isNumberShaped(\n          value, /* forceTypeChecking = */ shouldForceTypeChecking)) {\n    throw makeTypeError(getInt64ErrorMessage(value));\n  }\n\n  // We permit number|string|!gbigint values regardless of jstype annotations.\n  // In order to avoid unnecessary coercions (particularly string -> number,\n  // which can cause precision loss), guard against cross-type coercions.\n  //\n  // value must be number|string|!gbigint since it's number-shaped.\n\n  const valueType = typeof value;\n\n  switch (requestedFormat) {\n    case TypeSpecificApiFormat.STRING:\n      switch (valueType) {\n        case 'string':\n          return convertStringToInt64String(\n              /** @type {string} */ (value), /* forceTypeChecking = */ true);\n        case 'bigint':\n          return convertBigintToInt64String(/** @type {bigint} */ (value));\n        default:\n          return convertNumberToInt64String(\n              cast(value, isNumber), /* forceTypeChecking = */ true);\n      }\n\n    case TypeSpecificApiFormat.GBIGINT:\n      switch (valueType) {\n        case 'string':\n          return convertStringToInt64Gbigint(/** @type {string} */ (value));\n        case 'bigint':\n          return convertBigintToInt64Gbigint(/** @type {bigint} */ (value));\n        default:\n          return convertNumberToInt64Gbigint(cast(value, isNumber));\n      }\n\n    case TypeSpecificApiFormat.LEGACY:\n      switch (valueType) {\n        case 'string':\n          return convertStringToInt64String(\n              /** @type {string} */ (value), /* forceTypeChecking = */ false);\n        case 'bigint':\n          return convertBigintToInt64Gbigint(/** @type {bigint} */ (value));\n        default:\n          return convertNumberToInt64Number(\n              cast(value, isNumber), /* forceTypeChecking = */ false);\n      }\n\n    default:\n      return checkExhaustive(\n          requestedFormat, 'Unknown format requested type for int64');\n  }\n}\n\n/**\n * Validate that the provided value is an int64 number|string. This function may\n * truncate values to fit within the int64 range, but will not change the data\n * type (string -> string, number -> number) so long as the resulting value is\n * within the safe range. Nullish values are permitted.\n *\n * @param {*} value\n * @param {!TypeSpecificApiFormat=} requestedFormat\n * @return {number|string|!gbigint|null|undefined}\n */\nfunction checkNullishInt64(value, requestedFormat) {\n  // TODO: b/319288438 - Change default format to GBIGINT.\n  return value == null ?\n      /** @type {null|undefined} */ (value) :\n      /** @type{number|string} */ (checkInt64(value, requestedFormat));\n}\n\nconst /** string */ UINT64_MAX_STR = '18446744073709551615';\n\nconst /** number */ UINT64_MAX_STR_LEN = UINT64_MAX_STR.length;\n\n/**\n * Determine if the provided value is within the uint64 value range based on its\n * length and leading digits.\n * @param {string} value\n * @return {boolean}\n */\nfunction isStringInUint64Range(value) {\n  if (value[0] === '-') {\n    return false;\n  }\n\n  const len = value.length;\n  if (len < UINT64_MAX_STR_LEN) {\n    // value is definitely less than uint64 max is 18446744073709551615, which\n    // is 20 digits.\n    return true;\n  }\n\n  return len === UINT64_MAX_STR_LEN && value <= UINT64_MAX_STR;\n}\n\nconst /** string */ INT64_MIN_STR = '-9223372036854775808';\n\nconst /** number */ INT64_MIN_STR_LEN = INT64_MIN_STR.length;\n\nconst /** string */ INT64_MAX_STR = '9223372036854775807';\n\nconst /** number */ INT64_MAX_STR_LEN = INT64_MAX_STR.length;\n\n/**\n * Determine if the provided value is within the int64 value range based on its\n * length and leading digits.\n * @param {string} value\n * @return {boolean}\n */\nfunction isStringInInt64Range(value) {\n  const len = value.length;\n  if (value[0] === '-') {\n    if (len < INT64_MIN_STR_LEN) {\n      // value is definitely greater than int64 min, -9223372036854775808, which\n      // is 20 characters.\n      return true;\n    }\n\n    return len === INT64_MIN_STR_LEN && value <= INT64_MIN_STR;\n  }\n\n  // else value >= 0\n  if (len < INT64_MAX_STR_LEN) {\n    // value is definitely less than int64 max is 9223372036854775807, which\n    // is 19 digits.\n    return true;\n  }\n\n  return len === INT64_MAX_STR_LEN && value <= INT64_MAX_STR;\n}\n\n/**\n * @param {number} value\n * @return {string}\n */\nfunction truncateNumberToUint64RangeString(value) {\n  // This is a slow path, so ensure caller did basic checks before resorting to\n  // truncation.\n  asserts.assert(value < 0 || value > MAX_SAFE_INTEGER);\n  // Ensure no floating point values have made it to this point.\n  asserts.assert(Number.isInteger(value));\n\n  splitInt64(value);\n  return joinUnsignedDecimalString(getSplit64Low(), getSplit64High());\n}\n\n/**\n * @param {number} value\n * @return {number}\n */\nfunction truncateNumberToUint64RangeNumber(value) {\n  // This is a slow path, so ensure caller did basic checks before resorting to\n  // truncation.\n  asserts.assert(value < 0 || value > MAX_SAFE_INTEGER);\n  // Ensure no floating point values have made it to this point.\n  asserts.assert(Number.isInteger(value));\n\n  splitInt64(value);\n  return joinUint64(getSplit64Low(), getSplit64High());\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nfunction truncateStringToInt64RangeString(value) {\n  // Ensure no floating point values have made it to this point.\n  asserts.assert(value.indexOf('.') === -1);\n\n  if (isStringInInt64Range(value)) {\n    return value;\n  }\n\n  splitDecimalString(value);\n  return joinSignedDecimalString(getSplit64Low(), getSplit64High());\n}\n\n/**\n * @param {number} value\n * @return {number}\n */\nfunction truncateNumberToInt64RangeNumber(value) {\n  // This is a slow path, so ensure caller did basic checks before resorting to\n  // truncation.\n  asserts.assert(!isSafeInteger(value));\n  asserts.assert(Number.isInteger(value));\n\n  splitInt64(value);\n  return joinInt64(getSplit64Low(), getSplit64High());\n}\n\n/**\n * @param {number} value\n * @return {string}\n */\nfunction truncateNumberToInt64RangeString(value) {\n  // This is a slow path, so ensure caller did basic checks before resorting to\n  // truncation.\n  asserts.assert(!isSafeInteger(value));\n  // Ensure no floating point values have reached this point. They should've\n  // been truncated by the caller.\n  asserts.assert(Number.isInteger(value));\n\n  splitInt64(value);\n  return joinSignedDecimalString(getSplit64Low(), getSplit64High());\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nfunction truncateStringToUint64RangeString(value) {\n  // Ensure no floating point values have reached this point. They should've\n  // been truncated by the caller.\n  asserts.assert(value.indexOf('.') === -1);\n\n  if (isStringInUint64Range(value)) {\n    return value;\n  }\n\n  splitDecimalString(value);\n  return joinUnsignedDecimalString(getSplit64Low(), getSplit64High());\n}\n\n/**\n * @param {number} value\n * @param {boolean} forceTypeChecking\n * @return {number} The value truncated to the int64 range (if necessary). Note:\n *     this value may actually be a numeric string if the value is outside of\n *     the safe integer range.\n */\nfunction convertNumberToInt64Number(value, forceTypeChecking) {\n  // This is an assert here because the caller is expected to check.\n  asserts.assert(isNumberShaped(value, forceTypeChecking));\n  asserts.assert(getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking));\n\n  value = trunc(value);\n  if (!getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking)) {\n    return value;\n  }\n\n  if (isSafeInteger(value)) {\n    return value;\n  }\n\n  return truncateNumberToInt64RangeNumber(value);\n}\n\n/**\n * @param {number} value\n * @param {boolean} forceTypeChecking\n * @return {number} The value truncated to the uint64 range (if necessary).\n *     Note: this value may actually be a numeric string if the value is outside\n *     of the safe integer range.\n */\nfunction convertNumberToUint64Number(value, forceTypeChecking) {\n  // This is an assert here because the caller is expected to check.\n  asserts.assert(isNumberShaped(value, forceTypeChecking));\n  asserts.assert(getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking));\n\n  value = trunc(value);\n  if (!getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking)) {\n    return value;\n  }\n\n  if (value >= 0 && isSafeInteger(value)) {\n    return value;\n  }\n\n  return truncateNumberToUint64RangeNumber(value);\n}\n\n/**\n * Best effort string -> number within int64 range coercion. This operation will\n * not lose precision because we will return directly unsafe-integer as string\n * values with a type cast.\n *\n * @param {string} value\n * @param {boolean} forceTypeChecking\n * @return {number}\n */\nfunction convertStringToInt64NumberWhenSafe(value, forceTypeChecking) {\n  // These asserts are here because the caller is expected to check.\n  asserts.assert(isNumberShaped(value, forceTypeChecking));\n  asserts.assert(getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking));\n  asserts.assert(shouldCoerce64BitIntFieldsByJsType(forceTypeChecking));\n\n  // Value is a number-shaped string. It must be one of:\n  //   1. A safe, integer string (e.g. '3')\n  //   2. A safe, floating point string (e.g. '3.14')\n  //   3. An unsafe integer string\n  //   4. An unsafe floating point string\n\n  const coerced = Number(value);\n  const numTrunc = trunc(coerced);\n  if (isSafeInteger(numTrunc)) {\n    // Case 1: safe integer or float string\n    return numTrunc;\n  }\n\n  // Case 3 and 4: unsafe numeric string. Will need to apply an unsafe cast to\n  // avoid precision loss.\n  const int64Str = convertStringToInt64String(value, forceTypeChecking);\n  const int64Num = Number(int64Str);\n  return isSafeInteger(int64Num) ?\n      int64Num :\n      /** @type {number} */ (/** @type {?} */ (int64Str));\n}\n\n/**\n * Best effort string -> number within uint64 range coercion. This operation\n * will not lose precision because we will return directly unsafe-integer as\n * string values with a type cast.\n *\n * @param {string} value\n * @param {boolean} forceTypeChecking\n * @return {number}\n */\nfunction convertStringToUint64NumberWhenSafe(value, forceTypeChecking) {\n  // These asserts are here because the caller is expected to check.\n  asserts.assert(isNumberShaped(value, forceTypeChecking));\n  asserts.assert(getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking));\n  asserts.assert(shouldCoerce64BitIntFieldsByJsType(forceTypeChecking));\n\n  // Value is a number-shaped string. It must be one of:\n  //   1. A safe, integer string (e.g. '3')\n  //   2. A safe, floating point string (e.g. '3.14')\n  //   3. An unsafe integer string\n  //   4. An unsafe floating point string\n\n  const coerced = Number(value);\n\n  const numTrunc = trunc(coerced);\n  if (!getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking)) {\n    if (isSafeInteger(numTrunc)) {\n      // Case 1 and 2: safe integer or float string\n      return numTrunc;\n    }\n\n    // Case 3 and 4: unsafe numeric string. Apply an unsafe cast to avoid\n    // precision loss.\n    return /** @type {number} */ (\n        /** @type {*} */ (\n            convertStringToUint64String(value, forceTypeChecking)));\n  }\n\n  if (0 <= numTrunc && numTrunc <= MAX_SAFE_INTEGER) {\n    // Case 1 and 2: safe integer or float string\n    // Positive safe integers do not need range truncation.\n    return numTrunc;\n  }\n\n  // Case 3 and 4: unsafe numeric string. Apply an unsafe cast to avoid\n  // precision loss.\n  const uint64Str = convertStringToUint64String(value, forceTypeChecking);\n  const uint64Num = Number(uint64Str);\n\n  return isSafeInteger(uint64Num) ?\n      uint64Num :\n      /** @type {number} */ (/** @type {*} */ (uint64Str));\n}\n\n/**\n * @param {number} value\n * @param {boolean} forceTypeChecking\n * @return {string}\n */\nfunction convertNumberToInt64String(value, forceTypeChecking) {\n  // This is an assert here because the caller is expected to check.\n  asserts.assert(isNumberShaped(value, forceTypeChecking));\n  asserts.assert(getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking));\n\n  value = trunc(value);\n  if (!getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking)) {\n    return String(value);\n  }\n\n  // There's no positive safe integer value that could result\n  // in an unsafe signed integer after two's complement truncation:\n  // MAX_SAFE_INTEGER (2**53 - 1) < Int64 max (2**63 - 1).\n  if (isSafeInteger(value)) {\n    return String(value);\n  }\n\n  return truncateNumberToInt64RangeString(value);\n}\n\n/**\n * Best effort bigint -> number within int64 range coercion. This operation will\n * not lose precision because we will return directly unsafe-integer as string\n * values with a type cast.\n * @param {bigint} value\n * @return {number}\n */\nfunction convertBigintToInt64NumberWhenSafe(value) {\n  if (isSafeInt52(value)) {\n    return Number(value);\n  }\n\n  const value64 = bigintAsIntN(64, value);\n  if (isSafeInt52(value64)) {\n    return Number(value64);\n  }\n\n  return /** @type {number} */ (/** @type {*} */ (String(value64)));\n}\n\n/**\n * @param {bigint} value\n * @return {string}\n */\nfunction convertBigintToInt64String(value) {\n  return String(bigintAsIntN(64, value));\n}\n\n/**\n * Best effort bigint -> number within uint64 range coercion. This operation\n * will not lose precision because we will return directly unsafe-integer as\n * string values with a type cast.\n * @param {bigint} value\n * @return {number}\n */\nfunction convertBigintToUint64NumberWhenSafe(value) {\n  if (value >= 0 && isSafeInt52(value)) {\n    return Number(value);\n  }\n\n  const value64 = bigintAsUintN(64, value);\n  if (isSafeInt52(value64)) {\n    return Number(value64);\n  }\n\n  return /** @type {number} */ (/** @type {*} */ (String(value64)));\n}\n\n/**\n * @param {bigint} value\n * @return {string}\n */\nfunction convertBigintToUint64String(value) {\n  return String(bigintAsUintN(64, value));\n}\n\n/**\n * @param {number} value\n * @param {boolean} forceTypeChecking\n * @return {string}\n */\nfunction convertNumberToUint64String(value, forceTypeChecking) {\n  // This is an assert here because the caller is expected to check.\n  asserts.assert(isNumberShaped(value, forceTypeChecking));\n  asserts.assert(getTypeCheck64BitIntFields(forceTypeChecking));\n\n  value = trunc(value);\n  if (!getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking)) {\n    return String(value);\n  }\n\n  if (value >= 0 && isSafeInteger(value)) {\n    return String(value);\n  }\n\n  return truncateNumberToUint64RangeString(value);\n}\n\n/**\n * @param {string} value\n * @param {boolean} forceTypeChecking\n * @return {string}\n */\nfunction convertStringToInt64String(value, forceTypeChecking) {\n  // This is an assert here because the caller is expected to check.\n  asserts.assert(isNumberShaped(value, forceTypeChecking));\n  asserts.assert(getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking));\n\n  const coerced = trunc(Number(value));\n  if (isSafeInteger(coerced)) {\n    // This shortcut simplifies the obvious safe floats as well as\n    // edge cases like '+0' and '-0' that gbigint would reject.\n    return String(coerced);\n  }\n\n  const decimalIdx = value.indexOf('.');\n  if (decimalIdx !== -1) {\n    // e.g. '1.5' -> '1'\n    value = value.substring(0, decimalIdx);\n  }\n\n  if (!getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking)) {\n    // No decimal remaining in value.\n    return value;\n  }\n\n  // The truncated value cannot be a safe integer (we would've already\n  // finished), so we can't use the faster splitInt64.\n  return truncateStringToInt64RangeString(value);\n}\n\n/**\n * @param {string} value\n * @return {!gbigint}\n */\nfunction convertStringToInt64Gbigint(value) {\n  const coerced = trunc(Number(value));\n  if (isSafeInteger(coerced)) {\n    // This shortcut simplifies the obvious safe floats as well as\n    // edge cases like '+0' and '-0' that gbigint would reject.\n    return toGbigint(coerced);\n  }\n\n  const decimalIdx = value.indexOf('.');\n  if (decimalIdx !== -1) {\n    // e.g. '1.5' -> '1'\n    value = value.substring(0, decimalIdx);\n  }\n\n  if (isBigIntAvailable()) {\n    return convertBigintToInt64Gbigint(BigInt(value));\n  }\n\n  // The truncated value cannot be a safe integer (we would've already\n  // finished), so we can't use the faster splitInt64.\n  return toGbigint(truncateStringToInt64RangeString(value));\n}\n\n// TODO: b/319288438 - Remove string coercions in convertNumberTo(U)Int64Gbigint\n// once we can deserialize directly into gbigint.\n//\n// Value may be a valid 64-bit int value, but not a safe integer  because we\n// cannot yet binary deserialize directly into gbigint. The binary\n// deserialization to number may have already lost the precision before we ever\n// try to truncate into the 64-bit int range.\n//\n// However, toGbigint will throw on unsafe number inputs, so we may need to\n// coerce to string first to avoid the exception.\n\n/**\n * @param {number} value\n * @return {!gbigint}\n */\nfunction convertNumberToInt64Gbigint(value) {\n  if (isSafeInteger(value)) {\n    return toGbigint(\n        convertNumberToInt64Number(value, /*forceTypeChecking=*/ true));\n  }\n\n  return toGbigint(\n      convertNumberToInt64String(value, /*forceTypeChecking=*/ true));\n}\n\n/**\n * @param {number} value\n * @return {!gbigint}\n */\nfunction convertNumberToUint64Gbigint(value) {\n  if (isSafeInteger(value)) {\n    return toGbigint(\n        convertNumberToUint64Number(value, /*forceTypeChecking=*/ true));\n  }\n\n  return toGbigint(\n      convertNumberToUint64String(value, /*forceTypeChecking=*/ true));\n}\n\n/**\n * @param {string} value\n * @param {boolean} forceTypeChecking\n * @return {string}\n */\nfunction convertStringToUint64String(value, forceTypeChecking) {\n  // This is an assert here because the caller is expected to check.\n  asserts.assert(isNumberShaped(value, forceTypeChecking));\n  asserts.assert(getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking));\n\n  const coerced = trunc(Number(value));\n  if (isSafeInteger(coerced)) {\n    if (!getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking) ||\n        coerced >= 0) {\n      // This shortcut simplifies the obvious safe floats as well as\n      // edge cases like '+0' and '-0' that gbigint would reject.\n      //\n      // Additionally, safe positive integers will always be in uint64 range\n      // without truncation, so we're done. Negative values are omitted\n      // because they will need two's complement truncation to the uint64\n      // range.\n      return String(coerced);\n    }\n  }\n\n  const decimalIdx = value.indexOf('.');\n  if (decimalIdx !== -1) {\n    // e.g. '1.5' -> '1'\n    value = value.substring(0, decimalIdx);\n  }\n\n  return truncateStringToUint64RangeString(value);\n}\n\n/**\n * @param {string} value\n * @return {!gbigint}\n */\nfunction convertStringToUint64Gbigint(value) {\n  const coerced = trunc(Number(value));\n  if (isSafeInteger(coerced) && coerced >= 0) {\n    // This shortcut simplifies the obvious safe floats as well as\n    // edge cases like '+0' and '-0' that gbigint would reject.\n    //\n    // Additionally, safe positive integers will always be in uint64 range\n    // without truncation, so we're done. Negative values are omitted because\n    // they will need two's complement truncation to the uint64 range.\n    return toGbigint(coerced);\n  }\n\n  const decimalIdx = value.indexOf('.');\n  if (decimalIdx !== -1) {\n    // e.g. '1.5' -> '1'\n    value = value.substring(0, decimalIdx);\n  }\n\n  if (isBigIntAvailable()) {\n    return convertBigintToUint64Gbigint(BigInt(value));\n  }\n\n  return toGbigint(truncateStringToUint64RangeString(value));\n}\n\n/**\n * @param {bigint} value\n * @return {!gbigint}\n */\nfunction convertBigintToInt64Gbigint(value) {\n  asserts.assert(typeof value === 'bigint');\n  return toGbigint(bigintAsIntN(64, value));\n}\n\n/**\n * @param {bigint} value\n * @return {!gbigint}\n */\nfunction convertBigintToUint64Gbigint(value) {\n  asserts.assert(typeof value === 'bigint');\n  return toGbigint(bigintAsUintN(64, value));\n}\n\n/**\n * @param {*} value\n *\n * @return {number|undefined|null}\n */\nfunction coerceToNullishInt64(value) {\n  // Nullish values are ok\n  if (value == null) {\n    return /** @type {null|undefined} */ (value);\n  } else if (typeof value === 'bigint') {\n    return convertBigintToInt64NumberWhenSafe(/** @type{bigint} */ (value));\n  }\n\n  // TODO: b/169076588 - Successively tighten value enforcement to nullish\n  // values within int64 range.\n  if (!getTypeCheck64BitIntFieldsAreInRange(\n          /*forceTypeChecking = */ false)) {\n    return /** @type {number|undefined|null} */ (value);\n  }\n\n  if (!isNumberShaped(value, /*forceTypeChecking = */ false)) {\n    return undefined;\n  } else if (typeof value === 'number') {\n    return convertNumberToInt64Number(\n        /** @type {number} */ (value), /*forceTypeChecking = */ false);\n  }\n\n  const strValue = cast(value, isString);\n\n  // Only coerce across types if jstype-driven coercion is enabled.\n  if (shouldCoerce64BitIntFieldsByJsType(/* forceTypeChecking = */ false)) {\n    return convertStringToInt64NumberWhenSafe(\n        strValue, /* forceTypeChecking = */ false);\n  }\n  // We know value is an acceptable number-shaped input, but may still\n  // need to truncate to an integer.\n  return /** @type{number} */ (\n      /** @type {?} */ (convertStringToInt64String(\n          strValue, /*forceTypeChecking = */ false)));\n}\n\n/**\n * @param {*} value\n * @param {boolean=} forceTypeChecking\n *\n * @return {string|undefined|null}\n */\nfunction coerceToNullishInt64String(value, forceTypeChecking = false) {\n  const valueType = typeof value;\n  if (value == null) {\n    return /** @type {undefined|null} */ (value);\n  } else if (valueType === 'bigint') {\n    return convertBigintToInt64String(/** @type {bigint} */ (value));\n  }\n\n  if (!getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking)) {\n    return /** @type {string|undefined|null} */ (value);\n  }\n\n  if (!isNumberShaped(value, forceTypeChecking)) {\n    return undefined;\n  } else if (valueType === 'string') {\n    return convertStringToInt64String(\n        /** @type {string} */ (value), forceTypeChecking);\n  }\n\n  const numValue = cast(value, isNumber);\n\n  // Only coerce across types if jstype-driven coercion is enabled.\n  if (shouldCoerce64BitIntFieldsByJsType(forceTypeChecking)) {\n    return convertNumberToInt64String(numValue, forceTypeChecking);\n  }\n\n  // May still to truncate to an integer and apply range enforcement.\n  return /** @type {string} */ (\n      /** @type {?} */ (\n          convertNumberToInt64Number(numValue, forceTypeChecking)));\n}\n\n/**\n * @param {*} value\n *\n * @return {!gbigint|undefined|null}\n */\nfunction coerceToNullishInt64Gbigint(value) {\n  const valueType = typeof value;\n  if (value == null) {\n    return /** @type {undefined|null} */ (value);\n  } else if (valueType === 'bigint') {\n    return convertBigintToInt64Gbigint(/** @type {bigint} */ (value));\n  }\n\n  if (!isNumberShaped(value, /* forceTypeChecking = */ true)) {\n    return undefined;\n  } else if (valueType === 'string') {\n    return convertStringToInt64Gbigint(/** @type {string} */ (value));\n  }\n\n  const numValue = cast(value, isNumber);\n\n  return convertNumberToInt64Gbigint(numValue);\n}\n\n/**\n * @param {?} value\n * @return {string|undefined}\n */\nfunction getUint64ErrorMessage(value) {\n  return goog.DEBUG ?\n      `Expected an uint64 value encoded as a number or a string but got ${\n          goog.typeOf(value)}: ${value}` :\n      'uint64';\n}\n\n/**\n * @param {*} value\n * @param {!TypeSpecificApiFormat=} requestedFormat\n * @return {number|string|!gbigint}\n */\nfunction checkUint64(value, requestedFormat) {\n  // TODO: varomodt - Change default format to GBIGINT.\n  requestedFormat ??= getDefaultTypeSpecificApiFormat();\n\n  // If the underlying data is being accessed via the _asString alternates,\n  // which always apply type checking, then we must also apply\n  // type checking here for consistency. Otherwise, the values would be\n  // marked as IS_API_FORMATTED under a different standard and have\n  // invalid values.\n  const shouldForceTypeChecking =\n      requestedFormat !== TypeSpecificApiFormat.LEGACY;\n  if (!getTypeCheck64BitIntFieldsAreInRange(\n          /* forceTypeChecking = */ shouldForceTypeChecking)) {\n    return /** @type{number|string|!gbigint} */ (value);\n  }\n\n  if (!isNumberShaped(\n          value, /* forceTypeChecking = */ shouldForceTypeChecking)) {\n    throw makeTypeError(getUint64ErrorMessage(value));\n  }\n\n  // We permit number|string values regardless of jstype annotations. In\n  // order to avoid unnecessary coercions (particularly string -> number,\n  // which can cause precision loss), guard against cross-type coercions.\n  //\n  // value must be number|string|!gbigint since it's number-shaped.\n  const valueType = typeof value;\n  switch (requestedFormat) {\n    case TypeSpecificApiFormat.STRING:\n      switch (valueType) {\n        case 'string':\n          return convertStringToUint64String(\n              /** @type {string} */ (value), /* forceTypeChecking = */ true);\n        case 'bigint':\n          return convertBigintToUint64String(/** @type {bigint} */ (value));\n        default:\n          return convertNumberToUint64String(\n              cast(value, isNumber), /* forceTypeChecking = */ true);\n      }\n\n    case TypeSpecificApiFormat.GBIGINT:\n      switch (valueType) {\n        case 'string':\n          return convertStringToUint64Gbigint(/** @type {string} */ (value));\n        case 'bigint':\n          return convertBigintToUint64Gbigint(/** @type {bigint} */ (value));\n        default:\n          return convertNumberToUint64Gbigint(cast(value, isNumber));\n      }\n\n    case TypeSpecificApiFormat.LEGACY:\n      switch (valueType) {\n        case 'string':\n          return convertStringToUint64String(\n              /** @type {string} */ (value), /* forceTypeChecking = */ false);\n        case 'bigint':\n          return convertBigintToUint64Gbigint(/** @type {bigint} */ (value));\n        default:\n          return convertNumberToUint64Number(\n              cast(value, isNumber), /* forceTypeChecking = */ false);\n      }\n\n    default:\n      return checkExhaustive(\n          requestedFormat, 'Unknown format requested type for int64');\n  }\n}\n\n/**\n * @param {*} value\n * @param {!TypeSpecificApiFormat=} requestedFormat\n * @return {number|string|null|undefined}\n */\nfunction checkNullishUint64(value, requestedFormat) {\n  // TODO: b/319288438 - Change default format to GBIGINT.\n  return value == null ?\n      /** @type {null|undefined} */ (value) :\n      /** @type {number|string} */ (checkUint64(value, requestedFormat));\n}\n\n/**\n * @param {*} value\n *\n * @return {number|undefined|null}\n */\nfunction coerceToNullishUint64(value) {\n  if (value == null) {\n    return /** @type{undefined|null} */ (value);\n  } else if (typeof value === 'bigint') {\n    return convertBigintToUint64NumberWhenSafe(/** @type{bigint} */ (value));\n  }\n\n  if (!getTypeCheck64BitIntFieldsAreInRange(/*forceTypeChecking = */ false)) {\n    return /** @type {number|undefined|null} */ (value);\n  }\n\n  if (!isNumberShaped(value, /*forceTypeChecking = */ false)) {\n    return undefined;\n  } else if (typeof value === 'number') {\n    return convertNumberToUint64Number(value, /*forceTypeChecking = */ false);\n  }\n\n  const strValue = cast(value, isString);\n\n  // Only coerce across type if full jstype-driven coercion is enabled.\n  if (shouldCoerce64BitIntFieldsByJsType(/* forceTypeChecking = */ false)) {\n    return convertStringToUint64NumberWhenSafe(\n        strValue, /* forceTypeChecking = */ false);\n  }\n\n  // We know value is an acceptable number-shaped input, but may still\n  // need to truncate to an integer.\n  return /** @type{number} */ (\n      /** @type {?} */ (convertStringToUint64String(\n          strValue, /*forceTypeChecking = */ false)));\n}\n\n/**\n * @param {*} value\n * @param {boolean=} forceTypeChecking\n *\n * @return {string|undefined|null}\n */\nfunction coerceToNullishUint64String(value, forceTypeChecking = false) {\n  const valueType = typeof value;\n  if (value == null) {\n    return /** @type {null|undefined} */ (value);\n  } else if (valueType === 'bigint') {\n    return convertBigintToUint64String(/** @type {bigint} */ (value));\n  }\n\n  if (!getTypeCheck64BitIntFieldsAreInRange(forceTypeChecking)) {\n    return /** @type {string|undefined|null} */ (value);\n  }\n\n  if (!isNumberShaped(value, forceTypeChecking)) {\n    return undefined;\n  } else if (valueType === 'string') {\n    return convertStringToUint64String(\n        /** @type{string} */ (value), forceTypeChecking);\n  }\n\n  const numValue = cast(value, isNumber);\n\n  // Only coerce across type if jstype-driven coercion is enabled.\n  if (shouldCoerce64BitIntFieldsByJsType(forceTypeChecking)) {\n    return convertNumberToUint64String(numValue, forceTypeChecking);\n  }\n  // May still need to truncate to an integer and apply range enforcement.\n  return /** @type {string} */ (\n      /** @type {?} */ (\n          convertNumberToUint64Number(numValue, forceTypeChecking)));\n}\n\n/**\n * @param {*} value\n * @return {!gbigint|undefined|null}\n */\nfunction coerceToNullishUint64Gbigint(value) {\n  const valueType = typeof value;\n  if (value == null) {\n    return /** @type {undefined|null} */ (value);\n  } else if (valueType === 'bigint') {\n    return convertBigintToUint64Gbigint(/** @type {bigint} */ (value));\n  }\n\n  if (!isNumberShaped(value, /* forceTypeChecking = */ true)) {\n    return undefined;\n  } else if (valueType === 'string') {\n    return convertStringToUint64Gbigint(/** @type {string} */ (value));\n  }\n\n  const numValue = cast(value, isNumber);\n\n  return convertNumberToUint64Gbigint(numValue);\n}\n\n/**\n * Replacement for int64 coercion helpers to avoid precision loss. True\n * numbers and numbers as strings are both acceptable values for binary\n * serialization.\n *\n * @param {*} value\n *\n * @return {number|string|undefined|null}\n */\nfunction coerceToNullishInt64StringOrNumber(value) {\n  // Nullish values are ok\n  if (value == null) {\n    return /** @type{null|undefined} */ (value);\n  }\n\n  const valueType = typeof value;\n  if (valueType === 'bigint') {\n    return convertBigintToInt64String(/** @type{bigint} */ (value));\n  }\n\n  // This function is only used by binary serialization so it cannot/should\n  // not force type checking. We only want to enable type checking early when\n  // a user specifically opts into it via a specialized getter.\n  const doNotForceTypeChecking = false;\n\n  if (!getTypeCheck64BitIntFieldsAreInRange(doNotForceTypeChecking)) {\n    return /** @type{number|string|undefined|null} */ (value);\n  }\n\n  if (!isNumberShaped(value, doNotForceTypeChecking)) {\n    return undefined;\n  } else if (valueType === 'string') {\n    return convertStringToInt64String(\n        /** @type {string} */ (value), doNotForceTypeChecking);\n  } else if (valueType === 'number') {\n    return convertNumberToInt64Number(\n        /** @type {number} */ (value), doNotForceTypeChecking);\n  }\n\n  return undefined;\n}\n\n/**\n * Replacement for uint64 coercion helpers to avoid precision loss. True\n * numbers and numbers as strings are both acceptable values for binary\n * serialization.\n *\n * @param {*} value\n *\n * @return {number|string|undefined|null}\n */\nfunction coerceToNullishUint64StringOrNumber(value) {\n  // Nullish values are ok\n  if (value == null) {\n    return /** @type{null|undefined} */ (value);\n  }\n\n  const valueType = typeof value;\n  if (valueType === 'bigint') {\n    return convertBigintToUint64String(/** @type{bigint} */ (value));\n  }\n\n  // This function is only used by binary serialization so it cannot/should\n  // not force type checking. We only want to enable type checking early when\n  // a user specifically opts into it via a specialized getter.\n  const doNotForceTypeChecking = false;\n\n  if (!getTypeCheck64BitIntFieldsAreInRange(doNotForceTypeChecking)) {\n    return /** @type{number|string|undefined|null} */ (value);\n  }\n\n  if (!isNumberShaped(value, doNotForceTypeChecking)) {\n    return undefined;\n  } else if (valueType === 'string') {\n    return convertStringToUint64String(\n        /** @type {string} */ (value), doNotForceTypeChecking);\n  } else if (valueType === 'number') {\n    return convertNumberToUint64Number(\n        /** @type {number} */ (value), doNotForceTypeChecking);\n  }\n\n  return undefined;\n}\n\n/**\n * Coercion for use in the binary implementation that doesn't eagerly\n * construct bytestrings.\n *\n * @return {string|!ByteString|null|undefined}\n */\nfunction coerceToNullishBytesAsStringByteString(/** ? */ v) {\n  if (v == null || typeof v == 'string' || v instanceof ByteString) {\n    return v;\n  }\n  // TODO(b/396420284): remove.\n  asserts.assert(!(v instanceof Uint8Array));\n  return undefined;\n}\n\n\n/**\n * @param {*} value\n * @return {string}\n */\nfunction checkString(value) {\n  if (typeof value !== 'string') {\n    throw (\n        goog.DEBUG ?\n            new Error(\n                `Expected a string but got ${value} a ${goog.typeOf(value)}`) :\n            new Error());\n  }\n  return /** @type {string} */ (value);\n}\n\n/**\n * @param {*} value\n * @return {string|null|undefined}\n */\nfunction checkNullishString(value) {\n  if (value != null && typeof value !== 'string') {\n    throw (\n        goog.DEBUG ?\n            new Error(`Expected a string or null or undefined but got ${\n                value} a ${goog.typeOf(value)}`) :\n            new Error());\n  }\n  return /** @type{string|null|undefined} */ (value);\n}\n\n/** @return {string|undefined|null} */\nfunction coerceToNullishString(/** ? */ value) {\n  return (value == null || typeof value === 'string') ?\n      /** @type{string|undefined|null} */ (value) :\n      undefined;\n}\n\n/**\n * Checks that the value matches the type, subject to the current checkLevel.\n *\n * @param {?} value The value to check.\n * @param {function(new: T, ...)} ctor A user-defined constructor.\n * @return {T}\n * @template T\n * @closurePrimitive {asserts.matchesReturn}\n */\nfunction checkMessageType(value, ctor) {\n  // It would be faster to do a .constructor === ctor check, but that would\n  // break applications using `exemptUnsupportedSubclass` :-{. So instead we use\n  // instanceof.\n  if (!(value instanceof ctor)) {\n    throw new Error(`Expected instanceof ${ctorName(ctor)} but got ${\n        value && ctorName(value.constructor)}`);\n  }\n  return value;\n}\n\n/**\n * Inspects the value and either returns it if is already constructed,\n * constructs it in place, or otherwise returns `undefined`.\n *\n * @param {*} value\n * @param {function(new: T, ...)} ctor A user-defined constructor.\n * @param {boolean} constructMissing if the value is not an array or a\n *     message, construct an empty proto\n * @param {number} parentArrayState the array state of the parent array\n * @return {T_RETURN}\n * @template T\n * Use TTL to avoid weird inference\n * @template T_RETURN := union(T, 'null', 'undefined') =:\n * @suppress {visibility} access to message internals\n */\nfunction messageFromInlineStorage(\n    value, ctor, constructMissing, parentArrayState) {\n  // We want a fast check that it is a message, since in the common case we\n  // expect that value is either null/undefined or already constructed. If we\n  // find an array we will bootstrap it.\n\n  // The obvious choice is 'instanceof ctor' but that is about half as fast as\n  // the property test implemented by isMessage.\n  // The second choice is to do `value.constructor === ctor` but that would\n  // break applications using `exemptUnsupportedSubclass` :-{. So instead we use\n  // the messagePrototype property test.\n  if (isInternalMessage(value)) {\n    return value;\n  }\n\n  if (!Array.isArray(value)) {\n    if (!constructMissing) {\n      return undefined;\n    }\n\n    return (parentArrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY) ?\n        getDefaultImmutableInstanceInternalInline(ctor) :\n        new ctor();\n  }\n\n  // Otherwise, find our array.\n  updateArrayStateForNewlyParsedArray(value, parentArrayState);\n\n  // And return a new instance.\n  return new ctor(value);\n}\n\n\n/**\n * @param {!Array<*>} arr\n * @param {number} parentArrayState\n */\nfunction updateArrayStateForNewlyParsedArray(arr, parentArrayState) {\n  // Copy the immutable and owned bits bits from our parent to the\n  // submessage if they are set.\n  const originalArrState = getArrayState(arr);\n  let arrState = originalArrState;\n\n  // Newly parsed arrays get their owned bit from their parent.\n  arrState |= parentArrayState & ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED;\n\n  // If our parent is immutable, we must be immutable.\n  arrState |= parentArrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY;\n\n  if (arrState !== originalArrState) setArrayState(arr, arrState);\n}\n\n/**\n * @param {?} value\n * @return {string|undefined}\n */\nfunction getArrayErrorMessage(value) {\n  return goog.DEBUG ? `Expected array but got ${goog.typeOf(value)}: ${value}` :\n                      undefined;\n}\n\n/**\n * @param {*} value\n * @return {!Array<*>}\n * @closurePrimitive {asserts.matchesReturn}\n */\nfunction checkRepeatedFieldIsArray(value) {\n  if (!Array.isArray(value)) {\n    throw makeTypeError(getArrayErrorMessage(value));\n  }\n  return /** @type {!Array<*>} */ (value);\n}\n\n/**\n * Gets a default immutable instance for the given type.\n *\n * @return {!InternalMessage} The immutable instance.\n * @requireInlining\n */\nfunction getDefaultImmutableInstanceInternalInline(\n    /** function(new:InternalMessage, ?Array<?>=) */ ctor) {\n  return /** @type {!Object} */ (ctor)[DEFAULT_IMMUTABLE_INSTANCE_SYMBOL] ||=\n             emptyImmutableMessage(ctor);\n}\n\n/** @return {!InternalMessage} */\nfunction getDefaultImmutableInstanceInternal(\n    /** function(new:InternalMessage, ?Array<?>=) */ ctor) {\n  return getDefaultImmutableInstanceInternalInline(ctor);\n}\n\n/** @return {!InternalMessage} */\nfunction getDefaultImmutableInstanceInternalWithoutLoggingOperations(\n    /** function(new:InternalMessage, ?Array<?>=) */ ctor) {\n  // Avoid side-effects from this function in operations logs so that we\n  // do not have deltas due to test ordering.\n  return withoutLogging(() => getDefaultImmutableInstanceInternal(ctor));\n}\n\n/**\n * Gets a default immutable instance for the given type.\n *\n * @return {!InternalMessage} The immutable instance.\n */\nfunction getDefaultImmutableInstance(\n    /** function(new:InternalMessage, ?Array<?>=) */ ctor) {\n  if (DETAILED_JSPB_ASSERTS) {\n    // This is defined in another function because the JSCompiler's inlining\n    // will back off if you write _any_ lambda.\n    return getDefaultImmutableInstanceInternalWithoutLoggingOperations(ctor);\n  }\n\n  return getDefaultImmutableInstanceInternalInline(ctor);\n}\n\n/**\n * Gets an empty immutable instance for the given type.\n *\n * @param {function(new:InternalMessage, ?Array<?>=)} ctor A user-defined\n *     constructor.\n * @return {!InternalMessage} The immutable instance.\n */\nfunction emptyImmutableMessage(ctor) {\n  const newMsg = new ctor();\n  markArrayImmutable(\n      getInternalArray(/** @type {!InternalMessage} */ (newMsg)));\n  return newMsg;\n}\n\n/**\n * Coerces the given value to a boolean for map keys or values. Returns\n * undefined if the value is invalid.\n *\n * @return {boolean|undefined}\n */\nfunction booleanToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  if (assertCorrectTypeForSetters) return checkBoolean(value);\n  const coerced = coerceToNullishBoolean(value);\n  return coerced ?? (constructMissing ? false : undefined);\n}\n\n/**\n * Coerces the given value to a boolean for map keys. Returns undefined if the\n * value is invalid.\n *\n * @const\n */\nconst booleanKeyToApiForMaps = booleanToApiForMaps;\n\n\n/**\n * Coerces the given value to a number for map keys or values. Returns\n * undefined if the value is invalid.\n *\n * @return {number|undefined}\n */\nfunction int32ToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  value = assertCorrectTypeForSetters ? checkInt32(value) :\n                                        coerceToNullishInt32(value);\n  // TODO (b//280497549): remove the `| 0` bit once we coerce consistently.\n  return (value == null) ? (constructMissing ? 0 : undefined) : (value | 0);\n}\n\n/**\n * Coerces the given value to a number for map keys. Returns undefined if the\n * value is invalid.\n *\n * @const\n */\nconst int32KeyToApiForMaps = int32ToApiForMaps;\n\n/**\n * Coerces the given value to a number for map keys or values. Returns\n * undefined if the value is invalid.\n *\n * @return {number|undefined}\n */\nfunction uint32ToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  value = assertCorrectTypeForSetters ? checkUint32(value) :\n                                        coerceToNullishUint32(value);\n  // TODO (b//280497549): remove the `>>> 0` bit once we coerce consistently.\n  return (value == null) ? (constructMissing ? 0 : undefined) : (value >>> 0);\n}\n\n/**\n * Coerces the given value to a number for map keys. Returns undefined if the\n * value is invalid.\n *\n * @return {number|undefined}\n */\nfunction uint32KeyToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  let coerced =\n      uint32ToApiForMaps(value, assertCorrectTypeForSetters, constructMissing);\n  if (typeof coerced === 'number') {\n    return coerced >>> 0;\n  }\n  return coerced;\n}\n\n/**\n * Coerces the given value to a number for map values. Returns undefined if\n * the value is invalid.\n *\n * @return {number|string|!gbigint|undefined}\n */\nfunction int64ToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  value = assertCorrectTypeForSetters ? checkInt64(value) :\n                                        coerceToNullishInt64(value);\n  return (value == null) ? (constructMissing ? 0 : undefined) : value;\n}\n\n/**\n * Coerces the given value to a number for map keys. Returns undefined if the\n * value is invalid.\n *\n * @return {number|string|!gbigint|undefined}\n */\nfunction int64KeyToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  let coerced =\n      int64ToApiForMaps(value, assertCorrectTypeForSetters, constructMissing);\n  if (typeof coerced === 'string') {\n    const num = +coerced;\n    if (isSafeInteger(num)) {\n      return num;\n    }\n  }\n  return coerced;\n}\n\n/**\n * Coerces the given value to a number for map values. Returns undefined if\n * the value is invalid.\n *\n * @return {!gbigint|undefined}\n */\nfunction int64GbigintToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  value = assertCorrectTypeForSetters ?\n      /** @type {!gbigint} */ (\n          checkInt64(value, TypeSpecificApiFormat.GBIGINT)) :\n      coerceToNullishInt64Gbigint(value);\n  return (value == null) ? (constructMissing ? GBIGINT_ZERO : undefined) :\n                           value;\n}\n\n\n/**\n * Coerces the given value to a number for map keys. Returns undefined if the\n * value is invalid.\n *\n * @return {!gbigint|undefined}\n */\nfunction int64GbigintKeyToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  return int64GbigintToApiForMaps(\n      value, assertCorrectTypeForSetters, constructMissing);\n}\n\n/**\n * Coerces the given value to a number for map values. Returns  undefined if\n * the value is invalid.\n *\n * @return {number|string|!gbigint|undefined}\n */\nfunction uint64ToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  value = assertCorrectTypeForSetters ? checkUint64(value) :\n                                        coerceToNullishUint64(value);\n  return (value == null) ? (constructMissing ? 0 : undefined) : value;\n}\n\n/**\n * Coerces the given value to a number for map keys. Returns undefined if the\n * value is invalid.\n *\n * @return {number|string|!gbigint|undefined}\n */\nfunction uint64KeyToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  let coerced =\n      uint64ToApiForMaps(value, assertCorrectTypeForSetters, constructMissing);\n  if (typeof coerced === 'string') {\n    const num = +coerced;\n    if (isSafeInteger(num)) {\n      return num;\n    }\n  }\n  return coerced;\n}\n\n/**\n * Coerces the given value to a number for map values. Returns undefined if\n * the value is invalid.\n *\n * @return {!gbigint|undefined}\n */\nfunction uint64GbigintToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  value = assertCorrectTypeForSetters ?\n      /** @type {!gbigint} */ (\n          checkUint64(value, TypeSpecificApiFormat.GBIGINT)) :\n      coerceToNullishUint64Gbigint(value);\n  return (value == null) ? (constructMissing ? GBIGINT_ZERO : undefined) :\n                           value;\n}\n\n\n/**\n * Coerces the given value to a number for map keys. Returns undefined if the\n * value is invalid.\n *\n * @return {!gbigint|undefined}\n */\nfunction uint64GbigintKeyToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  return uint64GbigintToApiForMaps(\n      value, assertCorrectTypeForSetters, constructMissing);\n}\n\n/**\n * Coerces the given value to a number for map keys or values. Returns\n * undefined if the value is invalid.\n *\n * @return {number|undefined}\n */\nfunction floatToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  if (assertCorrectTypeForSetters) return checkFloatingPoint(value);\n  const coerced = coerceToNullishFloatingPoint(value);\n  return coerced ?? (constructMissing ? 0 : undefined);\n}\n\n/**\n * Coerces the given value to a string for map keys or values. Returns\n * undefined if the value is invalid.\n *\n * @return {string|undefined}\n */\nfunction stringToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  if (assertCorrectTypeForSetters) return checkString(value);\n  const coerced = coerceToNullishString(value);\n  return coerced ?? (constructMissing ? '' : undefined);\n}\n\n/**\n * Coerces the given value to a string for map keys. Returns undefined if the\n * value is invalid.\n *\n * @const\n */\nconst stringKeyToApiForMaps = stringToApiForMaps;\n\n/**\n * Coerces the given value to a ByteString for map keys or values. Returns\n * undefined if the value is invalid.\n *\n * @return {!ByteString|undefined}\n */\nfunction bytesToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  if (assertCorrectTypeForSetters) return checkBytes(value);\n  const coerced = coerceToNullishBytes(value);\n  return coerced ?? (constructMissing ? ByteString.empty() : undefined);\n}\n\n/**\n * Coerces the given value to a number for map keys or values. Returns\n * undefined if the value is invalid.\n *\n * @return {number|undefined}\n */\nfunction enumToApiForMaps(\n    /** ? */ value, /** boolean */ assertCorrectTypeForSetters,\n    /** boolean */ constructMissing) {\n  value = assertCorrectTypeForSetters ? checkEnum(value) :\n                                        coerceToNullishEnum(value);\n  if (value == null) {\n    // NOTE: 0 is not necessarily the correct default value for a proto2 enum\n    // (it should be the first value defined in the enum), but we don't have\n    // that information here.\n    return constructMissing ? 0 : undefined;\n  }\n  return value;\n}\n\nexports = {\n  booleanKeyToApiForMaps,\n  booleanToApiForMaps,\n  bytesToApiForMaps,\n  checkBoolean,\n  checkBytes,\n  checkEnum,\n  checkFloatingPoint,\n  checkInt32,\n  checkInt64,\n  checkMessageType,\n  checkNullishBoolean,\n  checkNullishBytes,\n  checkNullishEnum,\n  checkNullishFloatingPoint,\n  checkNullishInt32,\n  checkNullishInt64,\n  checkNullishString,\n  checkNullishUint32,\n  checkNullishUint64,\n  // TODO: b/237837118 - update callers to checkFloatingPoint and remove\n  checkNumber: checkFloatingPoint,\n  checkRepeatedFieldIsArray,\n  checkString,\n  checkUint32,\n  checkUint64,\n  coerceToNullishBoolean,\n  coerceToNullishBytes,\n  coerceToNullishEnum,\n  coerceToNullishInt32,\n  coerceToNullishInt64,\n  coerceToNullishInt64Gbigint,\n  coerceToNullishInt64String,\n  coerceToNullishInt64StringOrNumber,\n  coerceToNullishFloatingPoint,\n  coerceToNullishString,\n  coerceToNullishUint32,\n  coerceToNullishUint64,\n  coerceToNullishUint64Gbigint,\n  coerceToNullishUint64String,\n  coerceToNullishUint64StringOrNumber,\n  convertBigintToInt64Gbigint,\n  convertBigintToUint64Gbigint,\n  convertNumberToInt64Gbigint,\n  convertNumberToUint64Gbigint,\n  convertStringToInt64Gbigint,\n  convertStringToUint64Gbigint,\n  enumToApiForMaps,\n  floatToApiForMaps,\n  getDefaultImmutableInstance,\n  int32KeyToApiForMaps,\n  int32ToApiForMaps,\n  int64KeyToApiForMaps,\n  int64ToApiForMaps,\n  int64GbigintKeyToApiForMaps,\n  int64GbigintToApiForMaps,\n  isNumberShaped,\n  isSafeInt52,\n  isValidSignedInt64,\n  messageFromInlineStorage,\n  stringKeyToApiForMaps,\n  stringToApiForMaps,\n  uint32KeyToApiForMaps,\n  uint32ToApiForMaps,\n  uint64KeyToApiForMaps,\n  uint64ToApiForMaps,\n  uint64GbigintKeyToApiForMaps,\n  uint64GbigintToApiForMaps,\n  coerceToNullishBytesAsStringByteString,\n};\n","/**\n * @fileoverview Holds internal functions for implementing per-field logic for\n * reading/writing data from the jspb internal array.  Use by code other than\n * jspb gencode is forbidden.  You will be broken if you call these functions\n * without explicit approval.\n *\n * DO NOT USE THIS OUTSIDE OF THIS PACKAGE.\n */\ngoog.module('jspb_internal_adapters');\ngoog.module.declareLegacyNamespace();\n\nconst {ArrayState, ArrayStateFlags, EMPTY_LIST_SENTINEL, NO_PIVOT, TypeSpecificApiFormat, addArrayStateFlags, checkMessageStateInvariants, clearFlagBit, clearFlags, clearTypeSpecificFormattedFlagBits, getArrayIndexOffset, getArrayStateInline, getDefaultTypeSpecificApiFormat, getMessageArrayStateInline, getPivot, getPossiblyUnconstructedMessageArrayStateInline, getRepeatedArrayState, getTypeSpecificApiFormat, hasFlagBit, isApiFormattedField, isImmutableArray, markArrayImmutable, markKnownMapArray, markMutableReferencesAreOwned, setArrayState, setFlagBit, setFlagBitTo} = goog.require('jspb.internal_array_state');\nconst {ByteString} = goog.require('jspb.bytestring');\nconst {DETAILED_JSPB_ASSERTS, LegacyNullableBehavior, getAsyncThrowIf64BitIntReturnTypeMismatches, getAsyncThrowIfStringTypedInt64FieldDowngrade, getLegacyNullableBehavior, getWriteBackGbigintValues} = goog.require('jspb.internal_options');\nconst {DO_NOT_FREEZE__LEGACY_OPTION, DoNotFreezeToken, HasMessageId, InternalMessage, OR_UNDEFINED, OrUndefinedToken, assertArrayInvariants, assertRepeated64BitIntegerFieldApiFormattingInvariants, assertValidHasMessageIdOrUndefined, bytesAsByteString, checkNotImmutableState, checkRepeatedIndexInRangeForGet, checkRepeatedIndexInRangeForSet, getHasMessageId, getInternalArrayInline, indexFromFieldNumber, indexFromFieldNumberAndHasMessageId, isImmutableMessage, isInternalMessage, isNoLegacyNull, isSparseObjectInline} = goog.require('jspb.internal');\nconst {ENABLE_ASSERTS, assert, assertExists, assertInstanceof} = goog.require('goog.asserts');\nconst {HAS_NATIVE_SYMBOL, ONEOF_ARRAY_SYMBOL, RETURNED_64BIT_INT_VALUE_MISMATCH_SYMBOL, STRING_TYPE_DOWNGRADES_SYMBOL} = goog.require('jspb.internal_symbols');\nconst {JspbMap, getImmutableEmptyMap, isImmutableMap} = goog.require('jspb.internal_map');\nconst {MessageMeta, constructMessageArrayFromMetaForBinary} = goog.require('jspb.internal_construct');\nconst {assertValidLeakedMutableSubstructures, canMarkImmutableInPlaceIfParentIsOwned, copyArrayWithImmutableFields, ensureMutable, leakedMutableSubstructures, maybeCopyOnWrite, messageToMutable} = goog.require('jspb.internal_immutability');\nconst {asyncThrowWarning, throttledAsyncThrowWarning} = goog.require('jspb.exceptions');\nconst {booleanKeyToApiForMaps, booleanToApiForMaps, bytesToApiForMaps, checkBoolean, checkBytes, checkEnum, checkFloatingPoint, checkInt32, checkInt64, checkMessageType, checkNullishBoolean, checkNullishBytes, checkNullishEnum, checkNullishFloatingPoint, checkNullishInt32, checkNullishInt64, checkNullishString, checkNullishUint32, checkNullishUint64, checkRepeatedFieldIsArray, checkString, checkUint32, checkUint64, coerceToNullishBoolean, coerceToNullishEnum, coerceToNullishFloatingPoint, coerceToNullishInt32, coerceToNullishInt64, coerceToNullishInt64Gbigint, coerceToNullishInt64String, coerceToNullishString, coerceToNullishUint32, coerceToNullishUint64, coerceToNullishUint64Gbigint, coerceToNullishUint64String, enumToApiForMaps, floatToApiForMaps, getDefaultImmutableInstance, int32KeyToApiForMaps, int32ToApiForMaps, int64GbigintKeyToApiForMaps, int64GbigintToApiForMaps, int64KeyToApiForMaps, int64ToApiForMaps, messageFromInlineStorage, stringKeyToApiForMaps, stringToApiForMaps, uint32KeyToApiForMaps, uint32ToApiForMaps, uint64GbigintKeyToApiForMaps, uint64GbigintToApiForMaps, uint64KeyToApiForMaps, uint64ToApiForMaps} = goog.require('jspb.internal_accessor_helpers');\nconst {logNewArray, logOperation, slice} = goog.require('jspb.internal_operations');\nconst {toGbigint} = goog.require('google3.javascript.common.bigint.index');\n\n/**\n * Special field number used to signify a non-existent field.\n * @const {number}\n */\nconst NO_SUCH_FIELD = -1;\n\n/**\n * Default value for 64-bit int fields as a gbigint.\n * @const {!gbigint}\n */\nconst GBIGINT_ZERO = toGbigint(0);\n\n/** @typedef {boolean} */ let ForceTypeChecking;\n\n/**\n * Performs a rate-limited async throw if value is not actually typed as\n * expected.\n *\n * @param {T} msg\n * @param {number|string|null|undefined} value\n * @param {boolean} expectStringValue True if value should be a string, else a\n *     number.\n * @template T\n */\nfunction asyncThrowIf64BitIntReturnTypeMismatches(\n    msg, value, expectStringValue) {\n  if (value == null || !getAsyncThrowIf64BitIntReturnTypeMismatches()) {\n    return;\n  }\n\n  const expectedType = expectStringValue ? 'string' : 'number';\n  if (typeof value === expectedType) {\n    return;\n  } else if (\n      expectedType === 'number' && !Number.isSafeInteger(Number(value))) {\n    return;\n  }\n\n  const error = goog.DEBUG ?\n      `Expected a ${expectedType}-typed 64-bit int value, but got ${\n          goog.typeOf(value)}: ${value}` :\n      '64birm';\n\n  throttledAsyncThrowWarning(\n      msg, RETURNED_64BIT_INT_VALUE_MISMATCH_SYMBOL,\n      /* limit = */ 4, error);\n}\n\n/**\n * Performs a rate-limited async throw if values is not actually typed as\n * expected. This is a convenience version of\n * asyncThrowIf64BitIntReturnTypeMismatches. We only check one element for\n * repeated fields.\n *\n * @param {T} msg\n * @param {!Array<?>} values\n * @param {boolean} expectStringValue True if value should be a string, else a\n *     number.\n * @template T\n */\nfunction asyncThrowIfRepeated64BitIntReturnTypeMismatches(\n    msg, values, expectStringValue) {\n  if (values.length === 0) {\n    return;\n  }\n\n  // The purpose of this guard is to ensure the returned value generally\n  // aligns with the getter return type. In particular, number[] types that\n  // are actually becoming string[] due to traversing ESF.\n  //\n  // Unfortunately, legacy formatting semantics mean the repeated field could\n  // technically consist of both string and number values. We punt on this\n  // detecting this scenario to avoid undue burden.\n  asyncThrowIf64BitIntReturnTypeMismatches(msg, values[0], expectStringValue);\n}\n\n/**\n * Tests whether or not the given array needs to be re-formatted.\n * Returns true if our state is not API formatted or if it corresponds to\n * a 64-bit int field that needs a different type-specific formatting\n * (if expectedFormatType is defined)\n *\n * @param {!InternalMessage} message\n * @param {!ArrayState} state\n * @param {!TypeSpecificApiFormat=} expectedFormatType\n * @param {boolean=} doesntReturnArray\n * @return {boolean} Returns true if field should be (re-)formatted.\n */\nfunction needsApiFormatting(\n    message, state, expectedFormatType, doesntReturnArray) {\n  if (!hasFlagBit(state, ArrayStateFlags.IS_API_FORMATTED)) {\n    // Not formatted to begin with.\n    return true;\n  }\n\n  if (expectedFormatType == null) {\n    // Lack of an expected format means this field isn't a 64-bit int. no\n    // type-specific formatting is required.\n    return false;\n  }\n\n  assert(\n      expectedFormatType === TypeSpecificApiFormat.LEGACY ||\n          expectedFormatType === ArrayStateFlags.STRING_FORMATTED ||\n          expectedFormatType === ArrayStateFlags.GBIGINT_FORMATTED,\n      `Expected format type to be one of legacy, string, or gbigint, but got ${\n          expectedFormatType}`);\n\n  // Complain on attempt to dowgrade to legacy formatting for 64-bit int fields.\n  // Such a conversion is impossible (the legacy values were previously lost on\n  // conversion to string or gbigint formatting).\n  if (!doesntReturnArray &&\n      expectedFormatType === TypeSpecificApiFormat.LEGACY &&\n      (hasFlagBit(state, ArrayStateFlags.STRING_FORMATTED) ||\n       hasFlagBit(state, ArrayStateFlags.GBIGINT_FORMATTED)) &&\n      getAsyncThrowIfStringTypedInt64FieldDowngrade() &&\n      // Emit a warning at most four times per type.\n      (message.constructor[STRING_TYPE_DOWNGRADES_SYMBOL] =\n           (message.constructor[STRING_TYPE_DOWNGRADES_SYMBOL] | 0) + 1) < 5) {\n    asyncThrowWarning(\n        goog.DEBUG ?\n            'an _asLegacyNumberOrString accessor was called after an ' +\n                '_asString accessor: this can cause type errors when numeric ' +\n                'values are expected -- we recommend standardizing your ' +\n                'whole application on the _asString version. See ' +\n                'go/jspb-gencode?polyglot=typescript#int64-string-accessors ' +\n                'for more information.' :\n            'int64 downgrade');\n  }\n\n  // We know state already includes IS_API_FORMATTED (else would've returned\n  // early). If legacy formatting was expected, there's nothing more that can be\n  // done.\n  if (expectedFormatType === TypeSpecificApiFormat.LEGACY) {\n    return false;\n  }\n\n  return !hasFlagBit(\n      state, /** @type {!ArrayStateFlags} */ (expectedFormatType));\n}\n\nclass LegacyNullableToken {}\nconst LEGACY_NULLABLE = /** @type {!LegacyNullableToken} */ ({});\n\n/**\n * Gets the value of a field.\n *\n * If !legacyNullable, result will always be `undefined` if the field is unset.\n * Otherwise, result will use historic legacy nullable behavior (modulo any\n * other setting that overrides it).\n *\n * If you pass a coercion function and a value is present, we will coerce the\n * value. If the result was different and non-nullish, we will set it back.\n *\n * @return {?}\n */\nexports.getFieldNullable = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** !HasMessageId|undefined */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable,\n    /** (function(?): ?)= */ coerceFn) {\n  // Don't freeze jspb messages.\n  assert(Object.isExtensible(message));\n  const value = exports.getFieldNullableInternal(\n      getInternalArrayInline(message), /* arrayState= */ undefined, fieldNumber,\n      hasMessageId, coerceFn);\n  if (value === null && (!legacyNullable || shouldReturnUndefined(message))) {\n    return undefined;\n  }\n  return value;\n};\n\n/**\n * @param {!InternalMessage} message\n * @return {boolean}\n */\nfunction shouldReturnUndefined(message) {\n  return getLegacyNullableBehavior() ===\n      LegacyNullableBehavior.ALWAYS_UNDEFINED ||\n      isNoLegacyNull(message);\n}\n\nfunction assertIndexConsistentWithMessageState(\n    /** !Array<?> */ messageArray,\n    /** number */ arrayIndex,\n    /** number */ fieldNumber) {\n  if (ENABLE_ASSERTS) {\n    assert(\n        arrayIndex ===\n        indexFromFieldNumber(\n            fieldNumber,\n            getArrayIndexOffset(getArrayStateInline(messageArray))));\n  }\n}\n\n\n/**\n * Gets the value of a field.\n *\n * If you pass a coercion function and a value is present, we will coerce the\n * value. If the result was different and non-nullish, we will set it back.\n *\n * @return {?}\n */\nexports.getFieldNullableInternal = function(\n    /** !Array */ messageArray,\n    /** number|undefined */ messageArrayState,\n    /** number */ fieldNumber,\n    /** !HasMessageId|undefined */ hasMessageId,\n    /** (function(?): ?)= */ coerceFn) {\n  assertValidHasMessageIdOrUndefined(messageArray, hasMessageId);\n  if (DETAILED_JSPB_ASSERTS) {\n    logOperation({getField: 1});\n    assertValidLeakedMutableSubstructures(messageArray);\n  }\n  if (fieldNumber === NO_SUCH_FIELD) {\n    return null;\n  }\n\n  // This is very performance sensitive code.\n  //\n  // Generally we expect to be finding a value in the array portion of the\n  // message, so we avoid doing any work if the field number is less than\n  // the arrayLength-1.\n  //\n  // We always need to check the array length so do that first and guard all\n  // other checks on length checks first.\n  const arrayIndex =\n      indexFromFieldNumberAndHasMessageId(fieldNumber, hasMessageId);\n  assertIndexConsistentWithMessageState(messageArray, arrayIndex, fieldNumber);\n  assert(arrayIndex >= 0);\n  const last = messageArray.length - 1;\n\n  // Retrieve a value from the array or sparse object.\n  let value;\n  let /** ? */ lastValue;\n  let /** boolean|undefined */ inSparseObject;\n  if (last < indexFromFieldNumberAndHasMessageId(1, hasMessageId)) {\n    return undefined;\n  } else if (arrayIndex >= last) {\n    lastValue = messageArray[last];\n    if (isSparseObjectInline(lastValue)) {\n      value = lastValue[fieldNumber];\n      inSparseObject = true;\n    } else if (arrayIndex === last) {\n      value = lastValue;\n    } else {\n      return undefined;\n    }\n  } else {\n    value = messageArray[arrayIndex];\n  }\n\n  if (coerceFn && value != null) {\n    const coerced = coerceFn(value);\n    // For an invalid value, we treat the field as unknown and preserve its\n    // value. We may consider dropping them but there seems to be no strong\n    // reason to do so and the case is very rare.\n    if (coerced == null) return coerced;\n    if (!Object.is(coerced, value)) {\n      // Write back a coerced value.\n      if (inSparseObject) {\n        lastValue[fieldNumber] = coerced;\n      } else {\n        messageArray[arrayIndex] = coerced;\n      }\n      return coerced;\n    }\n  }\n\n  return value;\n};\n\n/**\n * Sets the value of a field.\n * @param {T} message\n * @param {number} fieldNumber The field number.\n * @param {string|number|boolean|!gbigint|!ByteString|!Array|!JspbMap|!InternalMessage|null|undefined}\n *     value\n * @param {!HasMessageId|undefined} hasMessageId\n * @return {T}\n * @template T\n */\nexports.setField = function(message, fieldNumber, value, hasMessageId) {\n  ensureMutable(message);\n  const messageArray = getInternalArrayInline(message);\n  setFieldIgnoringImmutabilityInternal(\n      messageArray, getMessageArrayStateInline(messageArray), fieldNumber,\n      value, hasMessageId);\n  return message;\n};\n\n/** @const */\nexports.setFieldIgnoringImmutability = setFieldIgnoringImmutabilityInternal;\n\n\n/**\n * Sets the value of a field even on immutable protos\n * @param {!Array<?>} messageArray\n * @param {!ArrayState|undefined} messageArrayState\n * @param {number} fieldNumber The field number.\n * @param {string|number|boolean|!gbigint|!ByteString|!Array|!JspbMap|!InternalMessage|null|undefined}\n *     value\n * @param {!HasMessageId|undefined} hasMessageId\n * @return {!ArrayState|undefined} the new array state.\n */\nfunction setFieldIgnoringImmutabilityInternal(\n    messageArray, messageArrayState, fieldNumber, value, hasMessageId) {\n  assertValidHasMessageIdOrUndefined(messageArray, hasMessageId);\n  if (DETAILED_JSPB_ASSERTS) logOperation({setField: 1});\n  const arrayIndex =\n      indexFromFieldNumberAndHasMessageId(fieldNumber, hasMessageId);\n  assertIndexConsistentWithMessageState(messageArray, arrayIndex, fieldNumber);\n  assert(arrayIndex >= 0);\n  const last = messageArray.length - 1;\n  if (last >= indexFromFieldNumberAndHasMessageId(1, hasMessageId) &&\n      arrayIndex >= last) {\n    const lastValue = messageArray[last];\n    if (isSparseObjectInline(lastValue)) {\n      lastValue[fieldNumber] = value;\n      return messageArrayState;\n    }\n  }\n\n  if (arrayIndex <= last) {\n    messageArray[arrayIndex] = value;\n    return messageArrayState;\n  }\n\n  // if we get here then we need to either extend the array or create a sparse\n  // object.\n  //\n  // no point in doing anything if the value is undefined. However, if the value\n  // is `null` then we need to assign it in order to preserve the behavior of\n  // legacyNullable accessors\n  if (value !== undefined) {\n    const pivot = getPivot(\n        messageArrayState ??= getMessageArrayStateInline(messageArray));\n    if (fieldNumber >= pivot) {\n      assert(pivot !== NO_PIVOT);\n      // don't bother allocating a sparse object if the value is null. We don't\n      // need to maintain null/undefined semantics for sparse objects.\n      if (value != null) {\n        messageArray[indexFromFieldNumberAndHasMessageId(pivot, hasMessageId)] =\n            {[fieldNumber]: value};\n      }\n    } else {\n      // Common case: field is below the pivot belongs in the array portion.\n      messageArray[arrayIndex] = value;  // this will extend the array\n    }\n  }\n  return messageArrayState;\n}\n\n\n/**\n * Returns whether the given field is set.\n * @return {boolean}\n */\nexports.hasWrapperField = function(\n    /** !InternalMessage */ message,\n    /** function(new:InternalMessage, ?Array<?>=)  */ ctor,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  const messageArray = getInternalArrayInline(message);\n  return getReadonlyWrapperFieldOrUndefinedInternal(\n             messageArray, getMessageArrayStateInline(messageArray), ctor,\n             fieldNumber, hasMessageId) !== undefined;\n};\n\n/**\n * Parameter to `getRepeatedWrapperFieldInternal`/`getApiFormattedRepeatedField`\n * to document how frozen the caller wants the array to be.\n * @enum {number}\n */\nconst RepeatedArrayReturnType = {\n  /** The caller intends to return a frozen array to the client. */\n  FROZEN: 1,\n\n  /**\n   * The caller intends to return an unfrozen array to the client.\n   * This is only valid if the message is mutable.\n   */\n  UNFROZEN: 2,\n\n  /**\n   * The caller will not return the array to the client, so the array returned\n   * can either be frozen or unfrozen, no cloning or freezing required.\n   */\n  EITHER_FROZEN_OR_UNFROZEN: 3,\n\n  /**\n   * Same as FROZEN if the array has not already been shared as unfrozen, and\n   * EITHER_FROZEN_OR_UNFROZEN otherwise.\n   */\n  FROZEN_UNLESS_SHARED: 4,\n};\n\nexports.RepeatedArrayReturnType = RepeatedArrayReturnType;\n\n/**\n * Check invariants on returned messages.\n *\n * This ensures that:\n * - A mutable child is never returned from an immutable parent.\n *\n * @return {!InternalMessage|undefined}\n */\nfunction assertMessageReturnedSafely(\n    /** !InternalMessage|undefined */ child, /** !Array<?> */ parent,\n    /** boolean|undefined */ isNewlyConstructed) {\n  // Drop out if no message was present.\n  if (!goog.DEBUG || !child) {\n    return child;\n  }\n\n  // Cannot return a mutable message from an immutable parent.\n  assert(isImmutableArray(parent) ? isImmutableMessage(child) : true);\n\n  // TODO(varomodt): apply these assertions globally: currently they are\n  // disabled due to non-Message values being set into JSPB arrays, especially\n  // mocks.\n  if (DETAILED_JSPB_ASSERTS) {\n    // A child message, if any, should be constructed\n    assert(\n        getMessageArrayStateInline(getInternalArrayInline(child)) &\n        ArrayStateFlags.CONSTRUCTED);\n\n    // Cannot return a mutable message from an immutable parent.\n    assert(\n        !(getMessageArrayStateInline(parent) &\n          ArrayStateFlags.IS_IMMUTABLE_ARRAY) ||\n        (getMessageArrayStateInline(getInternalArrayInline(child)) &\n         ArrayStateFlags.IS_IMMUTABLE_ARRAY));\n\n    if (isNewlyConstructed) {\n      // If the parent is owned, any newly constructed child should be owned or\n      // immutable.\n      if (getMessageArrayStateInline(parent) &\n          ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED) {\n        assert(\n            getMessageArrayStateInline(getInternalArrayInline(child)) &\n                (ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED |\n                 ArrayStateFlags.IS_IMMUTABLE_ARRAY),\n            'Array must be either owned or immutable.');\n      }\n    }\n  }\n  return child;\n}\n\n/**\n * Check invariants on returned maps.\n *\n * This ensures that:\n * - A map is always immutable|constructed|unowned.\n * - A mutable map is never returned from an immutable parent.\n * - An immutable map is never returned from a mutable parent.\n * - All message values in a map returned from an immutable parent are\n *   immutable or unconstructed.\n *\n * @template K, V\n * @return {!JspbMap<K, V>}\n * @suppress {visibility} accesses private properties of Map\n */\nfunction assertMapReturnedSafely(\n    /** !JspbMap<K, V> */ m, /** !Array<?> */ parent) {\n  // A map's mutability should correspond with that of its parent.\n  assert(isImmutableMap(m) === isImmutableArray(parent));\n\n  // Perform complex (especially linear-complexity) assertions only if\n  // DETAILED_JSPB_ASSERTS is set.\n  if (DETAILED_JSPB_ASSERTS && m.valueCtor) {\n    // values() will construct all our submessages before returning and we do\n    // not want that here.\n    for (const value of m.rawValuesInternal_()) {\n      if (isInternalMessage(value)) {\n        assertMessageReturnedSafely(\n            /** @type {!InternalMessage} */ (value), parent,\n            /* isNewlyConstructed = */ undefined);\n      }\n\n      if (Array.isArray(value)) {\n        const state = getArrayStateInline(value);\n        if (state & ArrayStateFlags.CONSTRUCTED) {\n          // State may be constructed if we were parsed from binary\n          checkMessageStateInvariants(value, state);\n        }\n      }\n    }\n  }\n\n  return m;\n}\n\n/**\n * Check invariants on returned repeated fields.\n *\n * @template T\n * @return {!Array<T>}\n */\nfunction assertArrayReturnedSafely(\n    /** !Array<T> */ arr, /** !Array<?> */ parent,\n    /** boolean= */ skipFrozenCheck = false) {\n  if (!ENABLE_ASSERTS) {\n    return arr;\n  }\n  assertArrayInvariants(arr, skipFrozenCheck);\n  const arrayState = getArrayStateInline(arr);\n  assert(arrayState & ArrayStateFlags.IS_REPEATED_FIELD);\n  if (!skipFrozenCheck) {\n    // We should always be frozen or unowned when an array is returned.\n    assert(\n        Object.isFrozen(arr) || (arrayState & ArrayStateFlags.UNFROZEN_SHARED));\n\n    // If the parent was immutable, this array must be frozen, but not\n    // necessarily marked as immutable for primitive fields.\n    assert(isImmutableArray(parent) ? Object.isFrozen(arr) : true);\n  }\n  return arr;\n}\n\n/**\n * Check invariants on returned repeated wrapper fields.\n *\n * @template T\n * @return {!Array<T>}\n */\nfunction assertMessageArrayReturnedSafely(\n    /** !Array<T> */ arr,\n    /** !Array<?> */ parent, /** number */ fieldNumber,\n    /** boolean|undefined */ isNewlyConstructed,\n    /** boolean= */ skipFrozenCheck = false) {\n  if (!ENABLE_ASSERTS) {\n    return arr;\n  }\n  const isParentImmutable = isImmutableArray(parent);\n  const arrayImmutable = isImmutableArray(arr);\n  const arrayFrozen = Object.isFrozen(arr);\n  const frozenAndImmutable = (arrayFrozen && arrayImmutable);\n  assertArrayReturnedSafely(arr, parent, skipFrozenCheck);\n\n  // If the parent or array was immutable, this array must be frozen and\n  // marked as immutable.\n  if (isParentImmutable || arrayImmutable) {\n    if (skipFrozenCheck) {\n      assert(arrayImmutable);\n    } else {\n      assert(frozenAndImmutable);\n    }\n  }\n\n  assert(isApiFormattedField(arr));\n\n  if (arrayImmutable && arr.length) {\n    // Perform linear-complexity assertions only if DETAILED_JSPB_ASSERTS.\n    let length = 1;\n    if (DETAILED_JSPB_ASSERTS) {\n      length = arr.length;\n    }\n    for (let i = 0; i < length; i++) {\n      assertMessageReturnedSafely(\n          /** @type {!InternalMessage} */ (arr[i]), parent, isNewlyConstructed);\n    }\n  }\n  return arr;\n}\n\n/**\n * Returns whether the given field is set.\n * @return {boolean}\n */\nexports.hasOneofWrapperField = function(\n    /** !InternalMessage */ message,\n    /** function(new:InternalMessage, ?Array<?>=)  */ ctor,\n    /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  const messageArray = getInternalArrayInline(message);\n  return getReadonlyWrapperFieldOrUndefinedInternal(\n             messageArray, getMessageArrayStateInline(messageArray), ctor,\n             exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n             hasMessageId) !== undefined;\n};\n\n/**\n * Gets the value of a repeated field.  This is only to be used by the binary\n * implementation for reading packed fields.\n * @return {!Array<?>}\n */\nexports.getRepeatedFieldForBinary = function(\n    /** !Array */ messageArray, /** number */ fieldNumber) {\n  const messageArrayState =\n      getPossiblyUnconstructedMessageArrayStateInline(messageArray);\n  return getRepeatedFieldInternalForBinary(\n      messageArray, messageArrayState, fieldNumber);\n};\n\n/**\n * Gets the count/size of a repeated field.\n * @return {number}\n * @template T\n */\nexports.getRepeatedWrapperCount = function(\n    /** !InternalMessage */ message,\n    /** function(new:T, ?Array<?>)} */ ctor,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  const messageArray = getInternalArrayInline(message);\n  const wrappers = getRepeatedWrapperFieldInternal(\n      message, messageArray, getMessageArrayStateInline(messageArray), ctor,\n      fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId);\n  return wrappers.length;\n};\n\n/**\n * Gets readonly wrapper for the repeated field value at `index`.\n * @return {T}\n * @template T\n */\nexports.getRepeatedIndexedReadonlyWrapper = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** function(new:T, ?Array<?>)} */ ctor,\n    /** number */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  const messageArray = getInternalArrayInline(message);\n  const wrappers = getRepeatedWrapperFieldInternal(\n      message, messageArray, getMessageArrayStateInline(messageArray), ctor,\n      fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId);\n  checkRepeatedIndexInRangeForGet(wrappers, index);\n  return wrappers[index];\n};\n\n/**\n * Gets mutable wrapper for the repeated field value at `index`.\n * @return {T}\n * @template T\n */\nexports.getRepeatedIndexedMutableWrapper = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** function(new:T, ?Array<?>)} */ ctor,\n    /** number */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  const messageArray = getInternalArrayInline(message);\n  const wrappers = getRepeatedWrapperFieldInternal(\n      message, messageArray, getMessageArrayStateInline(messageArray), ctor,\n      fieldNumber, RepeatedArrayReturnType.UNFROZEN, hasMessageId,\n      /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(wrappers, index);\n  const submessage = wrappers[index];\n  const asMutable = messageToMutable(submessage);\n  if (submessage !== asMutable) {\n    wrappers[index] = asMutable;\n    const state = getRepeatedArrayState(wrappers);\n    if (!hasFlagBit(state, ArrayStateFlags.MUTABLE_SUBSTRUCTURES)) {\n      setArrayState(\n          wrappers, setFlagBit(state, ArrayStateFlags.MUTABLE_SUBSTRUCTURES));\n      leakedMutableSubstructures(messageArray);\n    }\n  }\n  return asMutable;\n};\n\n/**\n * Sets wrapper for the repeated field value at `index`.\n * @return {Parent}\n * @template Parent, Child\n */\nexports.setRepeatedIndexedWrapper = function(\n    /** Parent */ message,\n    /** number */ fieldNumber,\n    /** function(new:Child, ?Array<?>=)} */ ctor,\n    /** number */ index,\n    /** Child */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  const self = /** @type {!InternalMessage} */ (message);\n  spliceRepeatedWrapperField(\n      self, fieldNumber, ctor, hasMessageId, value, index,\n      /*deleteCount=*/ 1, /* removeOnly = */ undefined);\n  return message;\n};\n\n/**\n * @return {number|null|undefined}\n */\nexports.getFloatingPointFieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  return exports.getFieldNullable(\n      message, fieldNumber, hasMessageId, legacyNullable,\n      coerceToNullishFloatingPoint);\n};\n\n/**\n * @return {!ByteString|null|undefined}\n */\nexports.getBytesFieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  return exports.getFieldNullable(\n      message, fieldNumber, hasMessageId, legacyNullable, coerceToNullishBytes);\n};\n\n/**\n * Whether a repeated field array should be frozen by the getter based on\n * opt-out and if it's an extension, expressed as a RepeatedArrayReturnType.\n * @param {!DoNotFreezeToken|undefined} freezeOptOut the\n *     DO_NOT_FREEZE__LEGACY_OPTION token if passed by the user to the accessor.\n * @return {!RepeatedArrayReturnType}\n */\nexports.getRepeatedFieldReturnType = function(freezeOptOut) {\n  return freezeOptOut === DO_NOT_FREEZE__LEGACY_OPTION ?\n      RepeatedArrayReturnType.UNFROZEN :\n      RepeatedArrayReturnType.FROZEN_UNLESS_SHARED;\n};\n\n/**\n * Access a repeated field that needs some amount of 'coercion' off the wire.\n *\n * If message is immutable, the returned array will always be frozen.\n *\n * If message is mutable, the returned array will be frozen or unfrozen\n * depending on returnType.\n *\n * @param {!InternalMessage} message\n * @param {number} fieldNumber\n * @param {function(?):(T|undefined|null)} coercionFn If the coercion function\n *     returns a nullish value then the value will be dropped from the repeated\n *     field.\n * @param {!RepeatedArrayReturnType} returnTypeForMutable\n * @param {boolean=} doesntReturnArray\n * @param {!TypeSpecificApiFormat=} formatType Specific type the array should be\n coerced to.\n * @param {!HasMessageId=} hasMessageId\n * @return {!Array<T>}\n * @template T\n */\nfunction getApiFormattedRepeatedField(\n    message, fieldNumber, coercionFn, returnTypeForMutable, doesntReturnArray,\n    formatType, hasMessageId) {\n  let messageArray = getInternalArrayInline(message);\n  let messageArrayState = getMessageArrayStateInline(messageArray);\n  const isImmutableParent = isImmutableMessage(message, messageArrayState);\n  const returnType =\n      isImmutableParent ? RepeatedArrayReturnType.FROZEN : returnTypeForMutable;\n  // EITHER_FROZEN_OR_UNFROZEN implies we don't return the array. Returning the\n  // array requires an explicit frozenness choice\n  doesntReturnArray = !!doesntReturnArray ||\n      returnType === RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN;\n\n  if (returnType === RepeatedArrayReturnType.UNFROZEN) {\n    if (maybeCopyOnWrite(message)) {\n      messageArray = getInternalArrayInline(message);\n      messageArrayState = getMessageArrayStateInline(messageArray);\n    }\n  }\n\n  let values = getRawRepeatedFieldWithDefault(\n      messageArray, messageArrayState, fieldNumber, hasMessageId);\n  let existingState = getRepeatedArrayState(values);\n  let valueState = setFlagsForRepeatedField(existingState, messageArrayState);\n\n  assertRepeated64BitIntegerFieldApiFormattingInvariants(values);\n\n  const needFormat =\n      needsApiFormatting(message, valueState, formatType, doesntReturnArray);\n  if (needFormat) {\n    // If we are changing the type-specific formatting of a\n    // 64-bit int repeated field, then we need to avoid modifying the instance\n    // we previously returned (e.g. a legacy access followed by an _asString\n    // access).\n    if (hasFlagBit(valueState, ArrayStateFlags.IS_API_FORMATTED)) {\n      values = slice(values);\n      existingState = 0;\n      valueState =\n          setFlagsForSlicedRepeatedArray(valueState, messageArrayState);\n      messageArrayState = assertExists(setFieldIgnoringImmutabilityInternal(\n          messageArray, messageArrayState, fieldNumber, values, hasMessageId));\n    }\n\n    let from = 0, to = 0;\n    for (; from < values.length; from++) {\n      const coerced = coercionFn(values[from]);\n      if (coerced != null) {\n        values[to++] = coerced;\n      }\n    }\n    if (to < from) {\n      // trim the end of the array since we dropped some invalid values.\n      values.length = to;\n    }\n\n    valueState = setFlagBit(valueState, ArrayStateFlags.IS_API_FORMATTED);\n    valueState = clearTypeSpecificFormattedFlagBits(valueState);\n    if (formatType) {\n      valueState = setFlagBit(valueState, formatType);\n    }\n    valueState =\n        clearFlagBit(valueState, ArrayStateFlags.MUTABLE_SUBSTRUCTURES);\n  }\n\n  if (valueState !== existingState) {\n    existingState = setArrayState(values, valueState);\n    if (hasFlagBit(valueState, ArrayStateFlags.IS_IMMUTABLE_ARRAY)) {\n      Object.freeze(values);\n    }\n  }\n\n  values = prepareRepeatedArrayForReturn(\n      values, valueState, messageArray, messageArrayState, fieldNumber,\n      hasMessageId, returnType, needFormat, doesntReturnArray);\n\n  assertRepeated64BitIntegerFieldApiFormattingInvariants(values);\n  if (!doesntReturnArray) {\n    assertArrayReturnedSafely(values, messageArray);\n  }\n\n  return values;\n}\n\n/**\n * Determines frozenness of repeated field array as last step before returning.\n *\n * NOTE: After this function, valuesState and messageArrayState may be different\n *\n * @param {!Array<?>} values\n * @param {!ArrayState} valuesState\n * @param {!Array<?>} messageArray\n * @param {!ArrayState} messageArrayState\n * @param {number} fieldNumber\n * @param {!HasMessageId|undefined} hasMessageId\n * @param {!RepeatedArrayReturnType} returnType\n * @param {boolean} newlyFormatted\n * @param {boolean} doesntReturnArray\n * @return {!Array<?>} values (may be different from input)\n */\nfunction prepareRepeatedArrayForReturn(\n    values, valuesState, messageArray, messageArrayState, fieldNumber,\n    hasMessageId, returnType, newlyFormatted, doesntReturnArray) {\n  let existingState = valuesState;\n  if (shouldReturnFrozen(returnType, valuesState, messageArrayState)) {\n    if (!isFrozenByFlags(valuesState, values)) {\n      const parentIsOwned = hasFlagBit(\n          messageArrayState, ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED);\n      // set appropriate bit if freezing\n      const onlyImmutableValues = !values.length ||\n          // if newly formatted, we can trust all values\n          (newlyFormatted &&\n           !hasFlagBit(valuesState, ArrayStateFlags.MUTABLE_SUBSTRUCTURES)) ||\n          // otherwise, standard conditions.\n          (parentIsOwned &&\n           canMarkImmutableInPlaceIfParentIsOwned(valuesState));\n      valuesState = setFlagBit(\n          valuesState,\n          onlyImmutableValues ? ArrayStateFlags.IS_IMMUTABLE_ARRAY :\n                                ArrayStateFlags.FROZEN_ARRAY);\n      if (valuesState !== existingState) {\n        // we're assuming users can't freeze arrays we give them, so this set\n        // should not encounter a frozen array if we didn't freeze it\n        existingState = setArrayState(values, valuesState);\n      }\n      Object.freeze(values);\n    }\n  } else {\n    if (returnType === RepeatedArrayReturnType.UNFROZEN &&\n        isFrozenByFlags(valuesState, values)) {\n      values = slice(values);\n      existingState = 0;\n      valuesState =\n          setFlagsForSlicedRepeatedArray(valuesState, messageArrayState);\n      messageArrayState = assertExists(setFieldIgnoringImmutabilityInternal(\n          messageArray, messageArrayState, fieldNumber, values, hasMessageId));\n    }\n\n    if (!isFrozenByFlags(valuesState, values)) {\n      if (!doesntReturnArray) {\n        valuesState = setFlagBit(valuesState, ArrayStateFlags.UNFROZEN_SHARED);\n      }\n      if (valuesState !== existingState) {\n        existingState = setArrayState(values, valuesState);\n      }\n    }\n  }\n\n  if (!hasFlagBit(valuesState, ArrayStateFlags.IS_IMMUTABLE_ARRAY) &&\n      !canMarkImmutableInPlaceIfParentIsOwned(valuesState)) {\n    messageArrayState =\n        leakedMutableSubstructures(messageArray, messageArrayState);\n  }\n\n  return values;\n}\n\n/**\n * @param {!Array<?>} messageArray\n * @param {number|undefined} messageArrayState\n * @param {number} fieldNumber\n * @param {!HasMessageId|undefined} hasMessageId\n * @return {!Array<?>}\n */\nfunction getRawRepeatedFieldWithDefault(\n    messageArray, messageArrayState, fieldNumber, hasMessageId) {\n  const values = exports.getFieldNullableInternal(\n      messageArray, messageArrayState, fieldNumber, hasMessageId);\n  return Array.isArray(values) ? values : EMPTY_LIST_SENTINEL;\n}\n\n/**\n * @param {number} valueState\n * @param {number} parentState\n * @return {number}\n */\nfunction setFlagsForRepeatedField(valueState, parentState) {\n  if (hasFlagBit(parentState, ArrayStateFlags.IS_IMMUTABLE_ARRAY)) {\n    valueState = setFlagBit(valueState, ArrayStateFlags.IS_IMMUTABLE_ARRAY);\n  }\n  valueState = setFlagBit(valueState, ArrayStateFlags.IS_REPEATED_FIELD);\n  return valueState;\n}\n\n/**\n * Determines if a repeated field array is frozen by flags. We prefer to use\n * flags over Object.isFrozen for performance reasons.\n * @param {number} state\n * @param {!ReadonlyArray<?>} array\n * @return {boolean}\n */\nfunction isFrozenByFlags(state, array) {\n  // we maintain the invariant that repeated field arrays are frozen if it's\n  // marked immutable and api formatted\n  const isFrozen = (hasFlagBit(state, ArrayStateFlags.IS_IMMUTABLE_ARRAY) &&\n                    hasFlagBit(state, ArrayStateFlags.IS_API_FORMATTED)) ||\n      hasFlagBit(state, ArrayStateFlags.FROZEN_ARRAY);\n  if (DETAILED_JSPB_ASSERTS && isFrozen) {\n    assert(Object.isFrozen(array));\n  }\n  return isFrozen;\n}\n\n/**\n * @param {!RepeatedArrayReturnType} returnType\n * @param {!ArrayState} state\n * @param {!ArrayState} parentState\n * @return {boolean}\n */\nfunction shouldReturnFrozen(returnType, state, parentState) {\n  if (returnType === RepeatedArrayReturnType.FROZEN) {\n    return true;\n  }\n  if (returnType !== RepeatedArrayReturnType.FROZEN_UNLESS_SHARED) {\n    return false;\n  }\n  if (hasFlagBit(state, ArrayStateFlags.IS_IMMUTABLE_ARRAY)) {\n    return true;\n  }\n  // If an array has already been returned as mutable before (i.e., from a\n  // getter with DO_NOT_FREEZE), we don't freeze it later even if another\n  // getter call doesn't have the opt-out.\n  return !hasFlagBit(state, ArrayStateFlags.UNFROZEN_SHARED) &&\n      // Historically, if the parent isn't owned, we treated the array as\n      // implicitly already unfrozen shared, so we never froze it. However, we\n      // should consider removing this and freezing arrays even if the parent\n      // isn't owned.\n      hasFlagBit(parentState, ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED);\n}\n\n/**\n * @return {!ByteString|null|undefined}\n */\nfunction coerceToNullishBytes(/** ? */ value) {\n  return bytesAsByteString(\n      value, /* invalidIsMissing=*/ true, /* allowNullishValues= */ true);\n}\n\n\n\n// NOTE: we handwrite this one instead of generating it because of the complex\n// default value.\n/**\n * Gets the value of a bytes field, with proto3 (non-nullable primitives)\n * semantics. Returns `defaultValue` as a ByteString if the field is not\n * otherwise set.\n * @return {!ByteString} The field's value.\n */\nexports.getBytesFieldWithDefault = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** string= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  const value =\n      exports.getBytesFieldNullable(message, fieldNumber, hasMessageId);\n  if (value == null) {\n    if (defaultValue === null) {\n      return defaultValue;\n    } else if (defaultValue === undefined) {\n      return ByteString.empty();\n    }\n    return ByteString.fromBase64(defaultValue);\n  } else {\n    return value;\n  }\n};\n\n\n/** @return{!Array} */\nfunction shallowCopyMapEntryArray(/** !Array */ array) {\n  array = slice(array);\n  for (let i = 0; i < array.length; i++) {\n    // TODO(lukes): we should handle non-array entries gracefully by dropping\n    // them.\n    const e = (array[i] = slice(array[i]));\n    if (Array.isArray(e[1])) {\n      e[1] = markArrayImmutable(e[1]);\n    }\n  }\n  return markKnownMapArray(array);\n}\n\n/**\n * Gets the value of a map field, lazily creating the map container if\n * necessary.\n *\n * IMPORTANT: When this function returns, messageArray and messageArrayState\n * might have new values.\n *\n * @template K, V\n * @return {!JspbMap<K, V>}\n * @suppress {visibility} accesses private properties of Map\n */\nfunction getReadonlyMapFieldInternal(\n    /** !InternalMessage */ message,\n    /** !Array<?> */ messageArray,\n    /** number */ messageArrayState,\n    /** boolean */ immutableMessage,\n    /** number */ fieldNumber,\n    /** ? */ valueCtor,\n    /** ? */ keyToApi,\n    /** ? */ valueToApi,\n    /** !HasMessageId|undefined */ hasMessageId) {\n  if (!immutableMessage && maybeCopyOnWrite(message)) {\n    messageArray = getInternalArrayInline(message);\n    messageArrayState = getMessageArrayStateInline(messageArray);\n  }\n\n  // Wrap the underlying elements array with a Map.\n  let arrOrMap = exports.getFieldNullableInternal(\n      messageArray, messageArrayState, fieldNumber, hasMessageId);\n  let isMapArrayImmutable = false;\n  if (arrOrMap == null) {\n    if (immutableMessage) {\n      return assertMapReturnedSafely(getImmutableEmptyMap(), messageArray);\n    }\n\n    // No need to add a RepeatedField tag,  Because maps are stored inline\n    // there is no need to distinguish these arrays on their own.\n    arrOrMap = logNewArray([]);\n  } else if (arrOrMap.constructor === JspbMap) {\n    // If this is an immutable map in a mutable message, unwrap so we can slice\n    // below.\n    const map = /** @type {!JspbMap<K,V>} */ (arrOrMap);\n    const isImmutableMap = map.arrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY;\n    if (isImmutableMap && !immutableMessage) {\n      // This performs a shallow copy, so we don't need to set\n      // `isMapArrayImmutable` to true. We also don't need to sort, since we are\n      // about to construct a new map\n      arrOrMap = map.toArrayInternalUnsorted();\n    } else {\n      return assertMapReturnedSafely(map, messageArray);\n    }\n  } else if (!Array.isArray(arrOrMap)) {\n    // This implies some kind of schema mismatch.  Treat as empty\n    arrOrMap = logNewArray([]);\n  } else /* if (Array.isArray(arrOrMap)) */ {\n    isMapArrayImmutable = isImmutableArray(arrOrMap);\n  }\n\n  // If we're immutable, ensure the map is marked as immutable.\n  if (immutableMessage) {\n    if (!arrOrMap.length) {\n      // return a standard value instead of mutating the message to replace\n      // an empty array\n      return getImmutableEmptyMap();\n    }\n    if (!isMapArrayImmutable) {\n      isMapArrayImmutable = true;\n      markArrayImmutable(arrOrMap);\n    }\n  } else if (isMapArrayImmutable) {\n    // If we are not immutable but the map array is, we should shallow copy but\n    // preserve the immutability of any submessages.\n    isMapArrayImmutable = false;\n    markKnownMapArray(arrOrMap);\n    arrOrMap = shallowCopyMapEntryArray(arrOrMap);\n  }\n\n  // If this map is mutable and the parent is owned, mark it owned. If the map\n  // is immutable, don't bother.\n  if (!isMapArrayImmutable &&\n      (messageArrayState & ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED)) {\n    markMutableReferencesAreOwned(arrOrMap);\n  }\n\n  // Make a wrapper around our map array. We need to do this after marking it\n  // to maintain array state invariants.\n  const jspbMap = new JspbMap(\n      /** @type {!Array<!Array<!Object>>} */ (arrOrMap), valueCtor, keyToApi,\n      valueToApi);\n\n  // Store the new map back into the array, even if the message is frozen\n  messageArrayState = assertExists(setFieldIgnoringImmutabilityInternal(\n      messageArray, messageArrayState, fieldNumber, jspbMap, hasMessageId));\n  if (!isMapArrayImmutable) {\n    messageArrayState =\n        leakedMutableSubstructures(messageArray, messageArrayState);\n  }\n  return assertMapReturnedSafely(jspbMap, messageArray);\n}\n\n\n/**\n * Gets the value of a map field, lazily creating the map container if\n * necessary. Does not modify the mutability of values.\n *\n * This should only be called from generated code, because it requires knowledge\n * of serialization/parsing callbacks (which are required by the map at\n * construction time, and the map may be constructed here).\n *\n * The return type is non-nullish to match the API, though it may be actually\n * nullish if `noLazyCreate` is set.\n *\n * @template K, V\n * @return {!JspbMap<K, V>}\n */\nfunction getReadonlyMapField(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** ? */ valueCtor,\n    /** ? */ keyToApi,\n    /** ? */ valueToApi,\n    /** !HasMessageId|undefined */ hasMessageId) {\n  const messageArray = getInternalArrayInline(message);\n  const messageArrayState = getMessageArrayStateInline(messageArray);\n  const immutableMessage = isImmutableMessage(message, messageArrayState);\n  return getReadonlyMapFieldInternal(\n      message, messageArray, messageArrayState, immutableMessage, fieldNumber,\n      valueCtor, keyToApi, valueToApi, hasMessageId);\n}\n\n/**\n * Gets the value of a map field, lazily creating the map container if\n * necessary. Ensures that the mutability of values matches that of their\n * container.\n *\n * @template K, V\n * @return {!JspbMap<K, V>}\n * @suppress {visibility} accesses private properties of Map\n */\nfunction getMapFieldInternal(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** ? */ valueCtor,\n    /** ? */ keyToApi,\n    /** ? */ valueToApi,\n    /** !HasMessageId|undefined */ hasMessageId) {\n  let mapValue, immutableMessage;\n  {\n    const messageArray = getInternalArrayInline(message);\n    assertValidHasMessageIdOrUndefined(messageArray, hasMessageId);\n    const messageArrayState = getMessageArrayStateInline(messageArray);\n    immutableMessage = isImmutableMessage(message, messageArrayState);\n    mapValue = getReadonlyMapFieldInternal(\n        message, messageArray, messageArrayState, immutableMessage, fieldNumber,\n        valueCtor, keyToApi, valueToApi, hasMessageId);\n  }\n\n  // If the message is immutable, getReadonlyMapField will have already ensured\n  // all values are immutable. If the message is mutable, some values may be\n  // immutable. Here we indicate to the map that it should shallow-copy in that\n  // case. This will also change the behavior of already accessed readonly maps.\n  if (!immutableMessage && valueCtor) {\n    mapValue.callToMutableOnAccess = true;\n  }\n\n  return mapValue;\n}\n\n\n/**\n * Adds an entry into a map without necessarily constructing it or type\n * checking it.\n *\n * Callers should consider that the entry is 'transferred' to this function, it\n * should not be reused.\n * @suppress {visibility} accesses private properties of Map\n */\nexports.putIntoMapForBinary = function(\n    /** !Array */ messageArray, /** number */ fieldNumber,\n    /** !Array<?> */ entry) {\n  // Slice our entry to prevent its being treated as a message during\n  // serialization, since the CONSTRUCTED bit will be set during\n  // deserialization.\n  //\n  // If we were to treat a map entry as a message, we might change its pivot\n  // and sparse-encode, which would be an invalid encoding. See b/438519440\n  // for when this happened with test randomization.\n  entry = slice(entry);\n\n  let messageArrayState =\n      getPossiblyUnconstructedMessageArrayStateInline(messageArray);\n  const hasMessageId = getHasMessageId(messageArrayState);\n  checkNotImmutableState(messageArrayState);\n  let mapValue = exports.getFieldNullableInternal(\n      messageArray, messageArrayState, fieldNumber, hasMessageId);\n  if (mapValue instanceof JspbMap) {\n    const isImmutableMap =\n        (mapValue.arrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY) != 0;\n    if (isImmutableMap) {\n      // Shallow copy the immutable map into a mutable array so we can mutate it\n      mapValue = mapValue.toArrayInternalUnsorted();\n      mapValue.push(entry);\n      messageArrayState = setFieldIgnoringImmutabilityInternal(\n          messageArray, messageArrayState, fieldNumber, mapValue, hasMessageId);\n    } else {\n      mapValue.setWireEntry(entry);\n    }\n    return;\n  }\n\n  if (!Array.isArray(mapValue)) {\n    // Initialize a 'map' as an array with a single entry\n    messageArrayState = setFieldIgnoringImmutabilityInternal(\n        messageArray, messageArrayState, fieldNumber,\n        markKnownMapArray([entry]), hasMessageId);\n    return;\n  }\n  let arrayState = getArrayStateInline(mapValue);\n  if (!(arrayState & ArrayStateFlags.KNOWN_MAP_ARRAY)) {\n    setArrayState(mapValue, arrayState |= ArrayStateFlags.KNOWN_MAP_ARRAY);\n  }\n  if (arrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY) {\n    mapValue = shallowCopyMapEntryArray(mapValue);\n    messageArrayState = setFieldIgnoringImmutabilityInternal(\n        messageArray, messageArrayState, fieldNumber, mapValue, hasMessageId);\n  }\n  // append the entry\n  mapValue.push(entry);\n};\n\n/**\n * Gets the value of a map field, lazily creating the map container if\n * necessary. Ensures the mutability of values matches their container.\n *\n * This should only be called from generated code, because it requires knowledge\n * of serialization/parsing callbacks (which are required by the map at\n * construction time, and the map may be constructed here).\n *\n * The return type is non-nullish to match the API, though it may be actually\n * nullish if `noLazyCreate` is set.\n *\n * @template K, V\n * @return {!JspbMap<K, V>}\n */\nexports.getMapField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** ? */ valueCtor, /** ? */ keyToApi, /** ? */ valueToApi,\n    /** !HasMessageId|undefined */ hasMessageId) {\n  return getMapFieldInternal(\n      message, fieldNumber, valueCtor, keyToApi, valueToApi, hasMessageId);\n};\n\n/**\n * Gets the value of a map field, lazily creating the map container if\n * necessary. Ensures the mutability of values matches their container.\n *\n * This should only be called from generated code, because it requires knowledge\n * of serialization/parsing callbacks (which are required by the map at\n * construction time, and the map may be constructed here).\n *\n * The return type is non-nullish to match the API, though it may be actually\n * nullish if `noLazyCreate` is set.\n *\n * @template K, V\n * @return {!JspbMap<K, V>}\n */\nfunction getPrimitiveMapField(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !Function */ keyToApi, /** !Function */ valueToApi,\n    /** !HasMessageId|undefined */ hasMessageId) {\n  return getMapFieldInternal(\n      message, fieldNumber, undefined, keyToApi, valueToApi, hasMessageId);\n}\n\n/**\n * Gets the value of a map field, lazily creating the map container if\n * necessary. Ensures the mutability of values matches their container.\n *\n * This should only be called from generated code, because it requires knowledge\n * of serialization/parsing callbacks (which are required by the map at\n * construction time, and the map may be constructed here).\n *\n * The return type is non-nullish to match the API, though it may be actually\n * nullish if `noLazyCreate` is set.\n *\n * @template K, V\n * @return {!JspbMap<K, V>}\n */\nfunction getMessageValuedMapField(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !Function */ valueCtor, /** !Function */ keyToApi,\n    /** !HasMessageId|undefined */ hasMessageId) {\n  return getMapFieldInternal(\n      message, fieldNumber, valueCtor, keyToApi, /* valueToApi=*/ undefined,\n      hasMessageId);\n}\n\n/**\n * Clears a map field.\n * @return {T}\n * @template T\n */\nexports.clearMapField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  const self = /** @type {!InternalMessage} */ (message);\n  ensureMutable(self);\n  const messageArray = getInternalArrayInline(self);\n  let messageArrayState = getMessageArrayStateInline(messageArray);\n  const maybe = exports.getFieldNullableInternal(\n      messageArray, messageArrayState, fieldNumber, hasMessageId);\n  // If the map is immutable, then we have been shallow copied from an immutable\n  // message but the map hasn't been accessed yet. So we might as well simply\n  // clear the field since there is no point in maintaining an instance at all.\n  if (maybe instanceof JspbMap && !isImmutableMap(maybe)) {\n    maybe.clear();\n  } else if (maybe != null) {\n    messageArrayState = setFieldIgnoringImmutabilityInternal(\n        messageArray, messageArrayState, fieldNumber, undefined, hasMessageId);\n  }\n  return self;\n};\n\n/** @this {JspbMap<?,?>} */ function mapSetter(value, key) {\n  this.set(key, value);\n}\n\n/**\n * Access a repeated field that needs some amount of 'coercion' off the wire.\n * @param {!InternalMessage} message\n * @param {number} fieldNumber\n * @param {!ReadonlyArray<T>|null|undefined} values\n * @param {function(?,?=):T} checkFn may throw if a value cannot be converted.\n * @param {!HasMessageId|undefined} hasMessageId\n * @return {!InternalMessage}\n * @template T\n */\nfunction setRepeatedPrimitiveField(\n    message, fieldNumber, values, checkFn, hasMessageId) {\n  ensureMutable(message);\n  const messageArray = getInternalArrayInline(message);\n  let messageArrayState = getMessageArrayStateInline(messageArray);\n  if (values == null) {\n    messageArrayState = setFieldIgnoringImmutabilityInternal(\n        messageArray, messageArrayState, fieldNumber, undefined, hasMessageId);\n    return message;\n  }\n\n  checkRepeatedFieldIsArray(values);\n  let valueState = getRepeatedArrayState(values);\n  let existingState = valueState;\n  const frozenByUs = isFrozenByFlags(valueState, values);\n  let isFrozen = frozenByUs || Object.isFrozen(values);\n\n  // if not frozen by us, we don't trust any of the input array state\n  if (!frozenByUs) {\n    valueState = 0;\n  }\n\n  if (!isFrozen) {\n    values = slice(values);\n    existingState = 0;\n    valueState = setFlagsForSlicedRepeatedArray(valueState, messageArrayState);\n    isFrozen = false;\n  }\n\n  valueState = setFlagBit(\n      valueState,\n      ArrayStateFlags.IS_REPEATED_FIELD | ArrayStateFlags.IS_API_FORMATTED);\n\n  const currentFormat =\n      getTypeSpecificApiFormat(valueState) ?? getDefaultTypeSpecificApiFormat();\n  valueState = setFlagBit(valueState, currentFormat);\n\n  for (let i = 0; i < values.length; i++) {\n    const value = values[i];\n    const newValue = checkFn(value, currentFormat);\n    if (!Object.is(value, newValue)) {\n      if (isFrozen) {\n        values = slice(values);\n        existingState = 0;\n        valueState =\n            setFlagsForSlicedRepeatedArray(valueState, messageArrayState);\n        isFrozen = false;\n      }\n      values[i] = newValue;\n    }\n  }\n\n  if (valueState !== existingState) {\n    if (isFrozen) {\n      values = slice(values);\n      valueState =\n          setFlagsForSlicedRepeatedArray(valueState, messageArrayState);\n    }\n    setArrayState(values, valueState);\n  }\n  assertArrayInvariants(values);\n\n  messageArrayState = setFieldIgnoringImmutabilityInternal(\n      messageArray, messageArrayState, fieldNumber, values, hasMessageId);\n  return message;\n}\n\n/**\n * Clears a field by making it undefined.\n * @return {T}\n * @template T\n */\nexports.clearField = function(/** !T */ message, /** number */ fieldNumber,\n                              /** !HasMessageId= */ hasMessageId) {\n  return exports.setField(\n      message, fieldNumber, /*value=*/ undefined, hasMessageId);\n};\n\n/**\n * Clears a oneof field by making it undefined.\n * @return {T}\n * @template T\n */\nexports.clearOneofField = function(\n    /** !T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneofGroup,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setOneofField(\n      message, fieldNumber, oneofGroup, /*value=*/ undefined, hasMessageId);\n};\n\n/**\n * Clears all entries in a oneof field.\n * @return {T}\n * @template T\n */\nexports.clearAllFieldsInOneof = function(\n    /** !T */ message,\n    /** !ReadonlyArray<number> */ oneofGroup,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  const messageArray = getInternalArrayInline(message);\n  const messageArrayState = getMessageArrayStateInline(messageArray);\n  setOneofCaseNumber(\n      messageArray, messageArrayState, oneofGroup, /*fieldNumber=*/ 0,\n      hasMessageId);\n  return message;\n};\n\n\n/**\n * Sets the value of a non-extension primitive field, with proto3 (non-nullable\n * primitives) semantics of ignoring values that are equal to the type's\n * default.\n * @return {T} return msg\n * @template T\n */\nfunction setFieldIgnoringDefault(\n    /** T */ msg, /** number */ fieldNumber,\n    /** string|number|boolean|!gbigint|!ByteString|null|undefined */ value,\n    /** string|number|boolean|!gbigint|!ByteString */ defaultValue,\n    /** !HasMessageId|undefined */ hasMessageId) {\n  const self = /** @type{!InternalMessage} */ (msg);\n  ensureMutable(self);\n  const messageArray = getInternalArrayInline(self);\n  let messageArrayState = getMessageArrayStateInline(messageArray);\n  let isDefault;\n  if (defaultValue === '0') {\n    // '0' defaultValue is used for all int64 types. we allow value to be\n    // number|string|gbigint here\n    isDefault = Number(value) === 0;\n  } else {\n    isDefault = value === defaultValue;\n  }\n  messageArrayState = setFieldIgnoringImmutabilityInternal(\n      messageArray, messageArrayState, fieldNumber,\n      isDefault ? undefined : value, hasMessageId);\n  return msg;\n}\n\n/**\n * Adds all values to a repeated, primitive field.\n * @return {T}\n * @template T\n */\nfunction addAllToRepeatedFieldImpl(\n    /** T */ message,\n    /** number */ fieldNumber,\n    /** function(?,?=):? */ checkFn,\n    /** !Iterable<?> */ values,\n    /** function(?):? */ coercionFn,\n    /** !HasMessageId|undefined */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkFn, values, /*index=*/ undefined, coercionFn,\n      hasMessageId, /*deleteCount=*/ undefined,\n      /*isSpreadable=*/ true, /* removeOnly = */ undefined);\n}\n\n/** @return {!Array<?>} */\nfunction getRepeatedFieldInternalForBinary(\n    /** !Array<?> */ messageArray, /** !ArrayState */ messageArrayState,\n    /** number */ fieldNumber) {\n  checkNotImmutableState(messageArrayState);\n  const hasMessageId = getHasMessageId(messageArrayState);\n\n  let values = getRawRepeatedFieldWithDefault(\n      messageArray, messageArrayState, fieldNumber, hasMessageId);\n  let existingState = getRepeatedArrayState(values);\n  let valueState = setFlagsForRepeatedField(existingState, messageArrayState);\n\n  // Slice any immutable or frozen array, or a shared array.\n  if (hasFlagBit(valueState, ArrayStateFlags.IS_IMMUTABLE_ARRAY) ||\n      isFrozenByFlags(valueState, values) ||\n      hasFlagBit(valueState, ArrayStateFlags.UNFROZEN_SHARED)) {\n    if (valueState !== existingState && !isFrozenByFlags(valueState, values)) {\n      setArrayState(values, valueState);\n    }\n    values = slice(values);\n    existingState = 0;\n    valueState = setFlagsForSlicedRepeatedArray(valueState, messageArrayState);\n    messageArrayState = assertExists(setFieldIgnoringImmutabilityInternal(\n        messageArray, messageArrayState, fieldNumber, values, hasMessageId));\n  }\n\n  // Update state bits.\n  valueState = clearFlagBit(\n      valueState,\n      // The binary implementation will push an unchecked value.\n      ArrayStateFlags.IS_API_FORMATTED |\n          // We may have mutable or immutable submessages.\n          ArrayStateFlags.ONLY_MUTABLE_VALUES);\n\n  // If anything changed, set it on the array.\n  if (valueState !== existingState) {\n    // Note that this is always the case if we sliced the array.\n    existingState = setArrayState(values, valueState);\n  }\n\n  // Perform some basic safety assertions: our returned array should always\n  // be marked as repeated and never immutable or api-formatted, since we will\n  // `push` an unformatted value onto it.\n  if (DETAILED_JSPB_ASSERTS) {\n    assert(valueState & ArrayStateFlags.IS_REPEATED_FIELD);\n    assert(!(valueState & ArrayStateFlags.IS_IMMUTABLE_ARRAY));\n    assert(!(valueState & ArrayStateFlags.IS_API_FORMATTED));\n  }\n  return values;\n}\n\n/**\n * Adds a value to a repeated field for binary implementation.\n * @param {!Array<?>} messageArray,\n * @param {number} fieldNumber\n * @param {*} value\n */\nexports.addToRepeatedFieldForBinary = function(\n    messageArray, fieldNumber, value) {\n  const messageArrayState =\n      getPossiblyUnconstructedMessageArrayStateInline(messageArray);\n  getRepeatedFieldInternalForBinary(\n      messageArray, messageArrayState, fieldNumber)\n      .push(value);\n};\n\n/**\n * Sets the a primitive repeated field's value at `index`.\n * @param {T} message\n * @param {number} fieldNumber\n * @param {function(?,?=):?} checkFn may throw if a value\n *     cannot be converted.\n * @param {number} index\n * @param {string|number|boolean|!gbigint|!ByteString|!Uint8Array} value\n * @param {function(?):?} coercionFn\n * @param {!HasMessageId|undefined} hasMessageId\n * @return {T}\n * @template T\n */\nfunction setRepeatedIndexedFieldImpl(\n    message, fieldNumber, checkFn, index, value, coercionFn, hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkFn, value, index, coercionFn, hasMessageId,\n      /*deleteCount=*/ 1);\n}\n\n/**\n * Sets the value of a field in a oneof union and clears all other fields in\n * the union.\n * @return {T}\n * @template T\n */\nexports.setOneofField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof,\n    /**\n       string|number|boolean|!gbigint|!ByteString|!Array|!InternalMessage|null|undefined\n     */\n    value, /** !HasMessageId|undefined */ hasMessageId) {\n  const self = /** @type {!InternalMessage} */ (message);\n  ensureMutable(self);\n  const messageArray = getInternalArrayInline(self);\n  let messageArrayState = getMessageArrayStateInline(messageArray);\n  if (value == null) {\n    const oneofsCaseMap = getOneofsCaseMap(messageArray);\n    const oneofCase = computeOneofCaseInternal(\n        oneofsCaseMap, messageArray, messageArrayState, oneof, hasMessageId);\n    if (oneofCase === fieldNumber) {\n      oneofsCaseMap.set(oneof, 0);\n    } else {\n      // some other case is set and we are clearing this one?  That is a no-op.\n      return self;\n    }\n  } else {\n    messageArrayState = setOneofCaseNumber(\n        messageArray, messageArrayState, oneof, fieldNumber, hasMessageId);\n  }\n  messageArrayState = setFieldIgnoringImmutabilityInternal(\n      messageArray, messageArrayState, fieldNumber, value, hasMessageId);\n  return message;\n};\n\n\n/**\n * Sets the value of a field in a oneof union and clears all other fields in\n * the union.\n * @template T\n */\nexports.setOneofFieldForBinary = function(\n    /** !Array<?> */ messageArray, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof,\n    /** string|number|boolean|!ByteString|!gbigint|!InternalMessage */ value) {\n  assertExists(value);\n  let messageArrayState =\n      getPossiblyUnconstructedMessageArrayStateInline(messageArray);\n  const hasMessageId = getHasMessageId(messageArrayState);\n  messageArrayState = setOneofCaseNumber(\n      messageArray, messageArrayState, oneof, fieldNumber, hasMessageId);\n  messageArrayState = setFieldIgnoringImmutabilityInternal(\n      messageArray, messageArrayState, fieldNumber, value, hasMessageId);\n};\n\n/**\n * Returns fieldNumber if the given oneof group in msg is indeed set to\n * fieldNumber. Otherwise returns NO_SUCH_FIELD.\n *\n * NOTE: this is exposed on, and accessed via, the exports object purely so it\n * can be monkey patched by debug.js.\n *\n * @param {!InternalMessage} message The message.\n * @param {!ReadonlyArray<number>} oneof The fields belonging to the oneof.\n * @param {number} fieldNumber The field number.\n * @param {!HasMessageId|undefined} hasMessageId\n * @return {number}\n */\nexports.isOneofCase = function(message, oneof, fieldNumber, hasMessageId) {\n  return exports.computeOneofCase(message, oneof, hasMessageId) ===\n          fieldNumber ?\n      fieldNumber :\n      NO_SUCH_FIELD;\n};\n\n\n/**\n * Computes the selection in a oneof group for the given message, ensuring\n * only one field is set in the process.\n *\n * According to the protobuf language guide (\n * https://developers.google.com/protocol-buffers/docs/proto#oneof), \"if the\n * parser encounters multiple members of the same oneof on the wire, only the\n * last member seen is used in the parsed message.\" Since JSPB serializes\n * messages to a JSON array, the \"last member seen\" will always be the field\n * with the greatest field number (directly corresponding to the greatest\n * array index).\n *\n * @return {number} The field number currently set in the union, or 0 if none.\n */\nexports.computeOneofCase = function(\n    /** !InternalMessage */ message, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  const messageArray = getInternalArrayInline(message);\n  return computeOneofCaseInternal(\n      getOneofsCaseMap(messageArray), messageArray,\n      /* messageArrayState= */ undefined, oneof, hasMessageId);\n};\n\n\n/** @return {!Map<!ReadonlyArray<number>, number>} */\nfunction getOneofsCaseMap(/** !Array */ internalArray) {\n  const asObject = /** @type {!Object} */ (internalArray);\n  if (HAS_NATIVE_SYMBOL) {\n    return asObject[ONEOF_ARRAY_SYMBOL] ??= new Map();\n  } else if (ONEOF_ARRAY_SYMBOL in internalArray) {\n    return assertInstanceof(asObject[ONEOF_ARRAY_SYMBOL], Map);\n  } else {\n    const oneofsSet = new Map();\n    Object.defineProperty(asObject, ONEOF_ARRAY_SYMBOL, {value: oneofsSet});\n    return oneofsSet;\n  }\n}\n\n/**\n * Updates the oneof case number to the given field number.\n *\n * This enforces the oneof constraint, so any array mutations should come after\n * calling this.\n *\n * @return {!ArrayState|undefined}\n */\nfunction setOneofCaseNumber(\n    /** !Array<?> */ messageArray,\n    /** !ArrayState|undefined */ messageArrayState,\n    /** !ReadonlyArray<number> */ oneof,\n    /** number */ fieldNumber, /** !HasMessageId|undefined */ hasMessageId) {\n  assert(fieldNumber === 0 || oneof.includes(fieldNumber));\n  const oneofsCaseMap = getOneofsCaseMap(messageArray);\n  const oneofCase = computeOneofCaseInternal(\n      oneofsCaseMap, messageArray, messageArrayState, oneof, hasMessageId);\n  if (oneofCase !== fieldNumber) {\n    if (oneofCase) {\n      messageArrayState = setFieldIgnoringImmutabilityInternal(\n          messageArray, messageArrayState, oneofCase, undefined, hasMessageId);\n    }\n    oneofsCaseMap.set(oneof, fieldNumber);\n  }\n  return messageArrayState;\n}\n\n\n/**\n * Enforces the oneof constraint and returns the case number.\n * @return {number}\n */\nfunction computeOneofCaseInternal(\n    /** !Map<!ReadonlyArray<number>, number> */ oneofsCaseMap,\n    /** !Array<?> */ messageArray,\n    /** !ArrayState|undefined */ messageArrayState,\n    /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId|undefined */ hasMessageId) {\n  assertValidHasMessageIdOrUndefined(messageArray, hasMessageId);\n  let caseNumber = oneofsCaseMap.get(oneof);\n  if (caseNumber != null) {\n    return caseNumber;\n  }\n  // Scan for the last field in the oneof that is set.  Clear out all other\n  // fields.\n  caseNumber = 0;\n  for (let i = 0; i < oneof.length; i++) {\n    const fieldNumber = oneof[i];\n    if (exports.getFieldNullableInternal(\n            messageArray, messageArrayState, fieldNumber, hasMessageId) !=\n        null) {\n      if (caseNumber !== 0) {\n        // Multiple oneof fields are set, clear the previous and keep looking.\n        messageArrayState = setFieldIgnoringImmutabilityInternal(\n            messageArray, messageArrayState, caseNumber, undefined,\n            hasMessageId);\n      }\n      caseNumber = fieldNumber;\n    }\n  }\n  oneofsCaseMap.set(oneof, caseNumber);\n  return caseNumber;\n}\n\n\n/**\n * Gets and wraps a proto field on access, if there is no field present, it\n * creates and inserts one.\n * @return {T} The field as a jspb proto.\n * @template T\n */\nexports.getMutableOneofWrapperField = function(\n    /** !InternalMessage */ message,\n    /** function(new:T, ?Array<?>=) */ ctor, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof,\n    /** !OrUndefinedToken<?>|undefined */ legacyOrUndefined,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  if (legacyOrUndefined === OR_UNDEFINED) {\n    if (exports.isOneofCase(message, oneof, fieldNumber, hasMessageId) !==\n        fieldNumber) {\n      return undefined;\n    }\n  } else {\n    const messageArray = getInternalArrayInline(message);\n    setOneofCaseNumber(\n        messageArray, /* messageArrayState= */ undefined, oneof, fieldNumber,\n        hasMessageId);\n  }\n  return exports.getMutableWrapperField(\n      message, ctor, fieldNumber, legacyOrUndefined, hasMessageId);\n};\n\n\n/**\n * Gets and wraps a mutable proto field on access, if there is no field present,\n * it creates and inserts one.\n *\n * @template T\n * @return {T} The field as a jspb proto.\n */\nexports.getMutableWrapperField = function(\n    /** !InternalMessage */ message,\n    /** function(new:T, ?Array<?>=) */ ctor,\n    /** number */ fieldNumber,\n    /** !OrUndefinedToken<?>|undefined */ legacyOrUndefined,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  const messageArray = getInternalArrayInline(message);\n  let messageArrayState = getMessageArrayStateInline(messageArray);\n  const data = exports.getFieldNullableInternal(\n      messageArray, messageArrayState, fieldNumber, hasMessageId);\n  const wantOrUndefined = legacyOrUndefined === OR_UNDEFINED;\n  let submessage = messageFromInlineStorage(\n      data, ctor, /* constructMissing= */ !wantOrUndefined,\n      /* arrayState = */ messageArrayState);\n  if (wantOrUndefined && !submessage) {\n    return undefined;\n  }\n  submessage = messageToMutable(submessage);\n  // This will happen if the message was missing, we are constructing from an\n  // Array or we needed to make a mutable copy. In such cases we need to store\n  // back to ensure the wrapper and the value are in sync.\n  if (data !== submessage) {\n    messageArrayState = setFieldIgnoringImmutabilityInternal(\n        messageArray, messageArrayState, fieldNumber, submessage, hasMessageId);\n    messageArrayState =\n        leakedMutableSubstructures(messageArray, messageArrayState);\n  }\n  return submessage;\n};\n\n/**\n * Gets and wraps a mutable proto field on access, if there is no field present,\n * it creates and inserts one.\n *\n * @return {!Array} The field as a jspb proto.\n */\nexports.getMutableOneofWrapperArrayForBinary = function(\n    /** !Array */ messageArray,\n    /** !MessageMeta */ messageMeta,\n    /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof) {\n  let messageArrayState = getArrayStateInline(messageArray);\n  setOneofCaseNumber(\n      messageArray, messageArrayState, oneof, fieldNumber,\n      getHasMessageId(messageArrayState));\n  return exports.getMutableWrapperArrayForBinary(\n      messageArray, messageMeta, fieldNumber);\n};\n\n/**\n * Gets and wraps a mutable proto field on access, if there is no field present,\n * it creates and inserts one.\n *\n * @return {!Array} The field as a jspb proto.\n */\nexports.getMutableWrapperArrayForBinary = function(\n    /** !Array */ messageArray,\n    /** !MessageMeta */ messageMeta,\n    /** number */ fieldNumber) {\n  let messageArrayState =\n      getPossiblyUnconstructedMessageArrayStateInline(messageArray);\n  const hasMessageId = getHasMessageId(messageArrayState);\n  const data = exports.getFieldNullableInternal(\n      messageArray, messageArrayState, fieldNumber, hasMessageId);\n  let /** !Array<?>|undefined */ submessageArray;\n  if (isInternalMessage(data)) {\n    const /** !InternalMessage */ asMessage = data;\n    if (!isImmutableMessage(asMessage)) {\n      maybeCopyOnWrite(asMessage);\n      return getInternalArrayInline(asMessage);\n    }\n    // we know this is an immutable array and will clone it below.\n    submessageArray = getInternalArrayInline(asMessage);\n    assert(\n        getArrayStateInline(submessageArray) &\n        ArrayStateFlags.IS_IMMUTABLE_ARRAY);\n  } else if (Array.isArray(data)) {\n    submessageArray = data;\n  }\n  if (submessageArray) {\n    const dataArrayState = getArrayStateInline(submessageArray);\n    if (dataArrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY) {\n      submessageArray =\n          copyArrayWithImmutableFields(submessageArray, dataArrayState);\n    }\n  }\n  submessageArray =\n      constructMessageArrayFromMetaForBinary(submessageArray, messageMeta);\n  // if we either copied or constructed back, store the new value.\n  if (submessageArray !== data) {\n    messageArrayState = setFieldIgnoringImmutabilityInternal(\n        messageArray, messageArrayState, fieldNumber, submessageArray,\n        hasMessageId);\n  }\n  return submessageArray;\n};\n\n/**\n * Gets and wraps a proto field on access, maintaining null/undefined and\n * mutability state.\n *\n * @return {T_RETURN} The field as a jspb proto.\n * @template T\n * Use go/closure-ttl to modify the return value to be nullable without\n * influencing generic type inference\n * @template T_RETURN := union(T, 'undefined') =:\n */\nfunction getReadonlyWrapperFieldOrUndefinedInternal(\n    /** !Array<?> */ messageArray,\n    /** !ArrayState */ messageArrayState,\n    /** function(new:T, ?Array<?>=) */ ctor,\n    /** number */ fieldNumber,\n    /** !HasMessageId|undefined */ hasMessageId) {\n  let isNewlyConstructed = false;\n  const submsg =\n      /** @type {!InternalMessage} */ (exports.getFieldNullableInternal(\n          messageArray, messageArrayState, fieldNumber, hasMessageId,\n          (data) => {\n            const result = messageFromInlineStorage(\n                data, ctor,\n                /* constructMissing= */ false,\n                /* arrayState = */ messageArrayState);\n            isNewlyConstructed = result !== data && result != null;\n            return result;\n          }));\n  if (submsg == null) return undefined;\n  if (isNewlyConstructed && !isImmutableMessage(submsg)) {\n    leakedMutableSubstructures(messageArray, messageArrayState);\n  }\n  return assertMessageReturnedSafely(submsg, messageArray, isNewlyConstructed);\n}\n\n/**\n * Gets and wraps a proto field on access, returning a default immutable\n * instance if no value is present.\n *\n * @return {!M} The field as a jspb proto.\n * @template M\n */\nexports.getReadonlyWrapperField = function(\n    /** !InternalMessage */ message,\n    /** function(new:M, ?Array<?>=) */ ctor,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  const messageArray = getInternalArrayInline(message);\n  return getReadonlyWrapperFieldOrUndefinedInternal(\n             messageArray, getMessageArrayStateInline(messageArray), ctor,\n             fieldNumber, hasMessageId) ||\n      getDefaultImmutableInstance(ctor);\n};\n\n/**\n * Gets and wraps a proto field on access, returning `undefined` if no value is\n * present.\n *\n * @return {!M|undefined} The field as a jspb proto.\n * @template M\n */\nexports.getReadonlyWrapperFieldOrUndefined = function(\n    /** !InternalMessage */ message,\n    /** function(new:M, ?Array<?>=) */ ctor,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  const messageArray = getInternalArrayInline(message);\n  return getReadonlyWrapperFieldOrUndefinedInternal(\n      messageArray, getMessageArrayStateInline(messageArray), ctor, fieldNumber,\n      hasMessageId);\n};\n\n/**\n * Gets and wraps a proto field on access, with the mutability of the parent\n * message. Returns the literal value if null or undefined.\n *\n * If the value in the message is immutable and its parent is mutable, this\n * method will coerce and copy back to the parent message.\n *\n * @return {T_RETURN} The field as a jspb proto.\n * @template T\n * Use go/closure-ttl to modify the return value to be nullable without\n * influencing generic type inference\n * @template T_RETURN := union(T, 'undefined') =:\n */\nexports.getWrapperFieldOrUndefined = function(\n    /** !InternalMessage */ message,\n    /** function(new:T, ?Array<?>=) */ ctor,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  let messageArray = getInternalArrayInline(message);\n  let messageArrayState = getMessageArrayStateInline(messageArray);\n  let submessage = getReadonlyWrapperFieldOrUndefinedInternal(\n      messageArray, messageArrayState, ctor, fieldNumber, hasMessageId);\n  if (submessage == null) {\n    return submessage;\n  }\n\n  // If we are mutable then we must return a mutable submessage.\n  messageArrayState = getMessageArrayStateInline(messageArray);\n  if (!isImmutableMessage(message, messageArrayState)) {\n    const mutableSubmessage = messageToMutable(submessage);\n    if (mutableSubmessage !== submessage) {\n      if (maybeCopyOnWrite(message)) {\n        messageArray = getInternalArrayInline(message);\n        messageArrayState = getMessageArrayStateInline(messageArray);\n      }\n      submessage = mutableSubmessage;\n      messageArrayState = setFieldIgnoringImmutabilityInternal(\n          messageArray, messageArrayState, fieldNumber, submessage,\n          hasMessageId);\n      messageArrayState =\n          leakedMutableSubstructures(messageArray, messageArrayState);\n    }\n  }\n  return assertMessageReturnedSafely(\n      submessage, messageArray, /* isNewlyConstructed = */ undefined);\n};\n\n/**\n * Gets and wraps a repeated proto field on access, maintaining the current\n * mutability of the values.\n *\n * @param {!InternalMessage} message\n * @param {function(new:T, ?Array<?>)} ctor Constructor for the\n *     field.\n * @param {number} fieldNumber The field number.\n * @param {!HasMessageId=} hasMessageId\n * @return {!Array<T>} The repeated field as an array of protos.\n * @template T\n */\nexports.getReadonlyRepeatedWrapperField = function(\n    message, ctor, fieldNumber, hasMessageId) {\n  const messageArray = getInternalArrayInline(message);\n  return getRepeatedWrapperFieldInternal(\n      message, messageArray, getMessageArrayStateInline(messageArray), ctor,\n      fieldNumber, RepeatedArrayReturnType.FROZEN, hasMessageId);\n};\n\n/**\n * Gets and wraps a repeated proto field on access.\n *\n * IMPORTANT: When this function returns, messageArray and messageArrayState\n * might have new values.\n *\n * @param {!InternalMessage} message parent message\n * @param {!Array<?>} messageArray\n * @param {number} messageArrayState array state of our parent.\n * @param {function(new:T, ?Array<?>)} ctor Constructor for the field.\n * @param {number} fieldNumber The field number.\n * @param {!RepeatedArrayReturnType} returnTypeForMutable Whether we should\n *     return a frozen or unfrozen array. Ignored if immutable parent.\n * @param {!HasMessageId|undefined} hasMessageId\n * @param {boolean=} doesntReturnArray\n * @param {boolean=} forceMutableValuesIfParentIsMutable Coerce values to\n *     mutable if that has not been done. Only has effect if the parent is\n *     mutable.\n * @return {!Array<T>} The repeated field as an array of protos.\n * @template T\n */\nfunction getRepeatedWrapperFieldInternal(\n    message, messageArray, messageArrayState, ctor, fieldNumber,\n    returnTypeForMutable, hasMessageId, doesntReturnArray,\n    forceMutableValuesIfParentIsMutable) {\n  const immutableMessage = isImmutableMessage(message, messageArrayState);\n  const returnType =\n      immutableMessage ? RepeatedArrayReturnType.FROZEN : returnTypeForMutable;\n  doesntReturnArray = !!doesntReturnArray ||\n      returnType === RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN;\n  const forceMutableValues =\n      forceMutableValuesIfParentIsMutable && !immutableMessage;\n\n  if (returnType === RepeatedArrayReturnType.UNFROZEN || forceMutableValues) {\n    if (maybeCopyOnWrite(message)) {\n      messageArray = getInternalArrayInline(message);\n      messageArrayState = getMessageArrayStateInline(messageArray);\n    }\n  }\n\n  let data = getRawRepeatedFieldWithDefault(\n      messageArray, messageArrayState, fieldNumber, hasMessageId);\n  let existingState = getRepeatedArrayState(data);\n  let valueState = setFlagsForRepeatedField(existingState, messageArrayState);\n\n  const needFormat = !hasFlagBit(valueState, ArrayStateFlags.IS_API_FORMATTED);\n  if (needFormat) {\n    valueState =\n        constructRepeatedSubmessages(data, ctor, valueState, messageArrayState);\n  }\n\n  if (valueState !== existingState) {\n    existingState = setArrayState(data, valueState);\n    if (hasFlagBit(valueState, ArrayStateFlags.IS_IMMUTABLE_ARRAY)) {\n      Object.freeze(data);\n    }\n  }\n\n  if (forceMutableValues) {\n    // if returning frozen, an empty array has only mutable even if not marked\n    const onlyMutableValues =\n        hasFlagBit(valueState, ArrayStateFlags.ONLY_MUTABLE_VALUES) ||\n        (!data.length &&\n         shouldReturnFrozen(returnType, valueState, messageArrayState));\n    if (!onlyMutableValues) {\n      // we assume users can't freeze arrays we give them, so we only have to\n      // slice if we froze this array\n      if (isFrozenByFlags(valueState, data)) {\n        data = slice(data);\n        valueState =\n            setFlagsForSlicedRepeatedArray(valueState, messageArrayState);\n        messageArrayState = assertExists(setFieldIgnoringImmutabilityInternal(\n            messageArray, messageArrayState, fieldNumber, data, hasMessageId));\n      }\n      valueState = coerceToMutable(data, valueState);\n      existingState = setArrayState(data, valueState);\n    }\n  }\n\n  data = prepareRepeatedArrayForReturn(\n      data, valueState, messageArray, messageArrayState, fieldNumber,\n      hasMessageId, returnType, needFormat, doesntReturnArray);\n\n  // TODO: add some assert even when doesntReturnArray\n  if (!doesntReturnArray) {\n    assertMessageArrayReturnedSafely(\n        data, messageArray, fieldNumber,\n        /*isNewlyConstructed=*/ needFormat,\n        /*skipFrozenCheck=*/ returnType === RepeatedArrayReturnType.UNFROZEN);\n  }\n\n  return data;\n}\n\n/**\n * Constructs each of the messages in a repeated message field. Returns the new\n * state bits of the repeated field array. Caller is responsible for setting the\n * new state bits on the array.\n * @param {!Array<?>} data Array of raw submessages to construct.\n * @param {function(new:InternalMessage, ?Array<?>)} ctor Constructor for the\n *     submessages.\n * @param {!ArrayState} dataState array state of data.\n * @param {!ArrayState} messageArrayState array state of our parent.\n * @return {!ArrayState} new array state for data.\n */\nfunction constructRepeatedSubmessages(\n    data, ctor, dataState, messageArrayState) {\n  const isImmutableArray =\n      hasFlagBit(dataState, ArrayStateFlags.IS_IMMUTABLE_ARRAY);\n  // submessages inherit state bits from the parent message by default, but if\n  // the repeated field array is marked immutable, the submessages have to be\n  // immutable\n  if (isImmutableArray) {\n    messageArrayState =\n        setFlagBit(messageArrayState, ArrayStateFlags.IS_IMMUTABLE_ARRAY);\n  }\n  let hasOnlyMutableValues = !isImmutableArray;\n  let hasOnlyImmutableValues = true;\n  let readFrom = 0;\n  let writeTo = 0;\n  for (; readFrom < data.length; readFrom++) {\n    const datum = data[readFrom];\n    // Construct a new message.\n    const msg = messageFromInlineStorage(\n        datum, ctor, /*constructMissing=*/ false,\n        /*messageArrayState=*/ messageArrayState);\n    if (!(msg instanceof ctor)) {\n      // This means the value stored in this position is incorrect, and there\n      // is no message for it.  We need to just keep going.\n      continue;\n    }\n    if (!isImmutableArray) {\n      const isImmutable = isImmutableMessage(msg);\n      hasOnlyMutableValues &&= !isImmutable;\n      hasOnlyImmutableValues &&= isImmutable;\n    }\n    data[writeTo++] = msg;\n  }\n\n  // Trim the end of the array if we had to remove invalid values.\n  if (writeTo < readFrom) {\n    data.length = writeTo;\n  }\n\n  dataState = setFlagBit(dataState, ArrayStateFlags.IS_API_FORMATTED);\n  dataState = setFlagBitTo(\n      dataState, ArrayStateFlags.MUTABLE_SUBSTRUCTURES,\n      !hasOnlyImmutableValues);\n  dataState = setFlagBitTo(\n      dataState, ArrayStateFlags.ONLY_MUTABLE_VALUES, hasOnlyMutableValues);\n\n  return dataState;\n}\n\n/**\n * Coerce all elements of data to be mutable.\n * @param {!Array<?>} data array of messages\n * @param {!ArrayState} state array state of data\n * @return {!ArrayState} new array state for data\n */\nfunction coerceToMutable(data, state) {\n  for (let i = 0; i < data.length; i++) {\n    const msg = data[i];\n    const asMutable = messageToMutable(msg);\n    if (msg !== asMutable) {\n      data[i] = asMutable;\n    }\n  }\n  state = setFlagBit(state, ArrayStateFlags.ONLY_MUTABLE_VALUES);\n  state =\n      setFlagBitTo(state, ArrayStateFlags.MUTABLE_SUBSTRUCTURES, !!data.length);\n  return state;\n}\n\n/**\n * Gets the value of a oneof wrapper field, maintaining its current mutability.\n *\n * @return {!T_NOT_NULL_OR_UNDEFINED}\n * @template T\n * @template T_NOT_NULL_OR_UNDEFINED :=\n *     cond(isUnknown(T), unknown(),\n *       mapunion(T, (X) =>\n *         cond(eq(X, 'null'), none(),\n *           cond(eq(X, 'undefined'), none(), X))))\n * =:\n */\nexports.getReadonlyOneofWrapperField = function(\n    /** !InternalMessage */ message, /** function(new:T, ?Array<?>=) */ ctor,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getReadonlyWrapperField(\n      message, ctor,\n      exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets and wraps a repeated proto field on access, ensuring that each returned\n * value matches the mutability of its parent.\n *\n * If the parent message is mutable and we see an immutable value in the array,\n * we will shallow-copy to a mutable value and copy back to the source arrays.\n *\n * @param {!InternalMessage} message\n * @param {function(new:T, ?Array<?>)} ctor Constructor for the field.\n * @param {number} fieldNumber The field number.\n * @param {!RepeatedArrayReturnType} returnTypeForMutable The return type if\n *     message is mutable. Ignored if message is immutable.\n * @param {!HasMessageId=} hasMessageId\n * @return {!Array<T>} The repeated field as an array of protos.\n * @template T\n */\nexports.getRepeatedWrapperField = function(\n    message, ctor, fieldNumber, returnTypeForMutable, hasMessageId) {\n  const messageArray = getInternalArrayInline(message);\n  return getRepeatedWrapperFieldInternal(\n      message, messageArray, getMessageArrayStateInline(messageArray), ctor,\n      fieldNumber, returnTypeForMutable, hasMessageId,\n      /*doesntReturnArray=*/ false,\n      /*forceMutableValuesIfParentIsMutable=*/ true);\n};\n\n/**\n * @return {M}\n * @template M\n */\nfunction checkWrapperForSetter(\n    /** ?M|undefined */ value,\n    /** function(new:M, ?Array<?>=)|undefined */ ctor) {\n  if (value != null) {\n    // ctor must exist if there is data\n    checkMessageType(value, assertExists(ctor));\n  } else {\n    // Normalize null to undefined in storage\n    value = undefined;\n  }\n  return value;\n}\n\n/**\n * @param {!InternalMessage} message\n * @param {?InternalMessage|undefined} value\n */\nfunction leakedMutableIfValueIsMutable(message, value) {\n  if (value && !isImmutableMessage(value)) {\n    leakedMutableSubstructures(getInternalArrayInline(message));\n  }\n}\n\n/**\n * Sets a proto field and syncs it to the backing array.\n * @return {T}\n * @template T,M\n */\nexports.setWrapperField = function(\n    /** T */ message,\n    /** function(new:M, ?Array<?>=)|undefined */ ctor,\n    /** number */ fieldNumber,\n    /** ?M|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  value = checkWrapperForSetter(value, ctor);\n  exports.setField(message, fieldNumber, value, hasMessageId);\n  leakedMutableIfValueIsMutable(message, value);\n  return message;\n};\n\n/**\n * Sets a proto field in a oneof union and syncs it to the backing array.\n * @return {T}\n * @template T,M\n */\nexports.setOneofWrapperField = function(\n    /** T */ message,\n    /** function(new:M, ?Array<?>=) */ ctor,\n    /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof,\n    /** ?M|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  value = checkWrapperForSetter(value, ctor);\n  exports.setOneofField(message, fieldNumber, oneof, value, hasMessageId);\n  leakedMutableIfValueIsMutable(message, value);\n  return message;\n};\n\n/**\n * Sets a repeated proto field and syncs it to the backing array.\n * @return {T}\n * @template T,M\n */\nexports.setRepeatedWrapperField = function(\n    /** T */ message,\n    /** function(new:M, ?Array<?>=)|undefined*/ ctor,\n    /** number */ fieldNumber,\n    /** ?ReadonlyArray<?>|undefined */ msgs,\n    /** !HasMessageId= */ hasMessageId) {\n  const self = /** @type {!InternalMessage} */ (message);\n  ensureMutable(self);\n  const messageArray = getInternalArrayInline(self);\n  let messageArrayState = getMessageArrayStateInline(messageArray);\n\n  if (msgs == null) {\n    messageArrayState = setFieldIgnoringImmutabilityInternal(\n        messageArray, messageArrayState, fieldNumber, undefined, hasMessageId);\n    return message;\n  }\n\n  checkRepeatedFieldIsArray(msgs);\n  let valueState = getRepeatedArrayState(msgs);\n  let existingState = valueState;\n  const frozenByUs = isFrozenByFlags(valueState, msgs);\n  const isFrozen = frozenByUs || Object.isFrozen(msgs);\n\n  // go over array and check values are of the right message type. also compute\n  // mutability info if array wasn't frozen by us\n  let hasOnlyMutableValues = true;\n  let hasOnlyImmutableValues = true;\n  for (let i = 0; i < msgs.length; i++) {\n    const item = msgs[i];\n    checkMessageType(item, assertExists(ctor));\n    if (!frozenByUs) {\n      const isImmutable = isImmutableMessage(item);\n      hasOnlyMutableValues &&= !isImmutable;\n      hasOnlyImmutableValues &&= isImmutable;\n    }\n  }\n\n  // we only update state bits if array wasn't already frozen by us\n  if (!frozenByUs) {\n    valueState =\n        ArrayStateFlags.IS_REPEATED_FIELD | ArrayStateFlags.IS_API_FORMATTED;\n    valueState = setFlagBitTo(\n        valueState, ArrayStateFlags.ONLY_MUTABLE_VALUES, hasOnlyMutableValues);\n    valueState = setFlagBitTo(\n        valueState, ArrayStateFlags.MUTABLE_SUBSTRUCTURES,\n        !hasOnlyImmutableValues);\n  }\n  if (!isFrozen || valueState !== existingState) {\n    msgs = slice(msgs);\n    existingState = 0;\n    valueState = setFlagsForSlicedRepeatedArray(valueState, messageArrayState);\n  }\n  if (valueState !== existingState) {\n    setArrayState(msgs, valueState);\n  }\n  assertArrayInvariants(msgs);\n\n  messageArrayState = setFieldIgnoringImmutabilityInternal(\n      messageArray, messageArrayState, fieldNumber, msgs, hasMessageId);\n  if (!hasFlagBit(valueState, ArrayStateFlags.IS_IMMUTABLE_ARRAY) &&\n      !canMarkImmutableInPlaceIfParentIsOwned(valueState)) {\n    messageArrayState =\n        leakedMutableSubstructures(messageArray, messageArrayState);\n  }\n  return message;\n};\n\n/**\n * Updates flags on the state of a newly sliced repeated array.\n *\n * @param {!ArrayState} state the current state\n * @param {!ArrayState} parentState state of the parent message\n * @return {!ArrayState} the new state\n */\nfunction setFlagsForSlicedRepeatedArray(state, parentState) {\n  const immutableParent =\n      hasFlagBit(parentState, ArrayStateFlags.IS_IMMUTABLE_ARRAY);\n  state =\n      setFlagBitTo(state, ArrayStateFlags.IS_IMMUTABLE_ARRAY, immutableParent);\n  state = clearFlagBit(\n      state, ArrayStateFlags.FROZEN_ARRAY | ArrayStateFlags.UNFROZEN_SHARED);\n  return state;\n}\n\n/**\n * Supports four use-cases:\n *   1) Appending new value or iterable of values\n *      * `index` === undefined\n *      * `deleteCount` === undefined\n *      * `isSpreadable` - indicates whether `value` is an iterable\n *   2) Inserting a new value\n *      * `index` - number defining the insertion point\n *      * `deleteCount` === undefined\n *   3) Replace an existing value\n *      * `index` - number defining the insertion point\n *      * `deleteCount` === 1\n *   3) Remove an existing value\n *      * `index` - number defining the removal point, defaulting to the end.\n *      * `removeOnly` === true\n *      * `deleteCount` === 1\n * @param {T} message\n * @param {number} fieldNumber\n * @param {function(?,?=):?} checkFn\n * @param {*} value a singular value or an iterable of values depending on\n *     parameter `isSpreadable`\n * @param {number|undefined} index\n * @param {function(?):?} coercionFn\n * @param {!HasMessageId|undefined} hasMessageId\n * @param {number=} deleteCount\n * @param {boolean=} isSpreadable whether `value` is an iterable\n * @param {boolean=} removeOnly\n * @return {T}\n * @template T\n */\nfunction spliceRepeatedPrimitiveField(\n    message, fieldNumber, checkFn, value, index, coercionFn, hasMessageId,\n    deleteCount, isSpreadable, removeOnly) {\n  const self = /** @type {!InternalMessage} */ (message);\n  ensureMutable(self);\n  const arr = getApiFormattedRepeatedField(\n      self, fieldNumber, coercionFn, RepeatedArrayReturnType.UNFROZEN,\n      /*doesntReturnArray=*/ true, /* formatType = */ undefined, hasMessageId);\n  let arrState = getRepeatedArrayState(arr);\n  const currentFormat =\n      getTypeSpecificApiFormat(arrState) ?? getDefaultTypeSpecificApiFormat();\n\n  if (isSpreadable) {\n    if (Array.isArray(value)) {\n      // in case value === arr, only read up to the original length\n      const length = value.length;\n      for (let i = 0; i < length; i++) {\n        arr.push(checkFn(value[i], currentFormat));\n      }\n    } else {\n      for (const v of /** @type {!Iterable<?>} */ (value)) {\n        arr.push(checkFn(v, currentFormat));\n      }\n    }\n  } else {\n    if (deleteCount) {\n      assert(deleteCount === 1);\n    }\n    if (deleteCount && removeOnly) {\n      index ??= arr.length - 1;\n      checkRepeatedIndexInRangeForGet(arr, index);\n      arr.splice(index, deleteCount);\n    } else {\n      if (deleteCount) {\n        checkRepeatedIndexInRangeForSet(arr, index);\n      }\n      if (index != undefined) {\n        // NOTE: an explicit `undefined` for deleteCount acts like zero.\n        arr.splice(index, deleteCount, checkFn(value, currentFormat));\n      } else {\n        arr.push(checkFn(value, currentFormat));\n      }\n    }\n  }\n\n  assertRepeated64BitIntegerFieldApiFormattingInvariants(arr);\n  return message;\n}\n\n/**\n * Splices a submessage into a repeated proto field, optionally deleting at most\n * one, and returns the newly added submessage.\n *\n * Supports four use-cases:\n *   1) Appending new value\n *      * `index` === undefined\n *      * `deleteCount` === undefined\n *      * `value` can undefined to create a new value, or specify the existing\n *        wrapper value to append.\n *   2) Inserting a new value\n *      * `index` - number defining the insertion point\n *      * `deleteCount` === undefined\n *      * `value` can undefined to create a new value, or specify the existing\n *        wrapper append\n *   3) Replace an existing value\n *      * `index` - number defining the insertion point\n *      * `deleteCount` === 1\n *      * `value` must be specified as an existing wrapper of the field type\n *   4) Removing an existing value\n *      * `index` - number defining the insertion point, defaulting to the end.\n *      * `deleteCount` === 1\n *      * `removeOnly` === true\n * @param {!InternalMessage} message\n * @param {number} fieldNumber The field number.\n * @param {function(new:T_CHILD, ?Array=)} ctor The constructor of the\n *     message type.\n * @param {!HasMessageId|undefined} hasMessageId\n * @param {T_CHILD=} value Proto that will be added to the\n *     repeated field.\n * @param {number|undefined=} index Index at which to insert the value.\n * @param {number=} deleteCount Number of elements to delete when splicing,\n *     defaults to zero and merely inserts.\n * @param {boolean=} removeOnly\n * @return {T_CHILD|undefined} proto that was inserted to the repeated\n *     field, or undefined if removing only\n * @template MessageType\n * Use go/closure-ttl to declare a non-undefined version of T_CHILD. Replace\n * the undefined in blah|undefined with none. This is necessary because the\n * compiler will infer T_CHILD to be |undefined.\n * @template T_CHILD\n * =:\n */\nfunction spliceRepeatedWrapperField(\n    message, fieldNumber, ctor, hasMessageId, value, index, deleteCount,\n    removeOnly) {\n  ensureMutable(message);\n  const messageArray = getInternalArrayInline(message);\n  const msgs = getRepeatedWrapperFieldInternal(\n      message, messageArray, getMessageArrayStateInline(messageArray), ctor,\n      fieldNumber, RepeatedArrayReturnType.UNFROZEN, hasMessageId,\n      /*doesntReturnArray=*/ true);\n\n  // Replacing or appending one value is currently the only use-case for delete\n  // count.\n  if (deleteCount) {\n    assert(deleteCount === 1);\n  }\n  if (deleteCount && removeOnly) {\n    index ??= msgs.length - 1;\n    checkRepeatedIndexInRangeForGet(msgs, index);\n    msgs.splice(index, deleteCount);\n    if (!msgs.length) {\n      clearFlags(msgs, ArrayStateFlags.MUTABLE_SUBSTRUCTURES);\n    }\n    return undefined;\n  } else {\n    if (deleteCount) {\n      checkRepeatedIndexInRangeForSet(msgs, index);\n      // Check that setters pass the right type.\n      checkMessageType(value, ctor);\n    } else {\n      value = value != null ? checkMessageType(value, ctor) : new ctor();\n    }\n    if (index != undefined) {\n      // NOTE: an explicit `undefined` for deleteCount acts like zero.\n      msgs.splice(index, deleteCount, value);\n    } else {\n      msgs.push(value);\n    }\n\n    let arrayState = getRepeatedArrayState(msgs);\n    const oldState = arrayState;\n    const immutableValue = isImmutableMessage(value);\n\n    if (immutableValue) {\n      // We no longer know that this wrapper field has only mutable values.\n      arrayState =\n          clearFlagBit(arrayState, ArrayStateFlags.ONLY_MUTABLE_VALUES);\n      if (msgs.length === 1) {\n        arrayState =\n            clearFlagBit(arrayState, ArrayStateFlags.MUTABLE_SUBSTRUCTURES);\n      }\n    } else {\n      arrayState =\n          setFlagBit(arrayState, ArrayStateFlags.MUTABLE_SUBSTRUCTURES);\n    }\n\n    if (arrayState !== oldState) {\n      setArrayState(msgs, arrayState);\n    }\n    if (!immutableValue) {\n      leakedMutableSubstructures(messageArray);\n    }\n\n    return value;\n  }\n}\n\n/**\n * Adds a submessage to a repeated proto field, and returns the newly added\n * submessage.\n * @param {!InternalMessage} message\n * @param {number} fieldNumber The field number.\n * @param {function(new:T_CHILD, ?Array=)} ctor The constructor of the\n *     message type.\n * @param {T_CHILD=} value Proto that will be added to the\n *     repeated field.\n * @param {number|undefined=} index Index at which to insert the value.\n * @param {!HasMessageId=} hasMessageId\n * @return {T_CHILD_NOT_UNDEFINED} proto that was inserted to the repeated\n *     field\n * @template MessageType\n * Use go/closure-ttl to declare a non-undefined version of T_CHILD. Replace\n * the undefined in blah|undefined with none. This is necessary because the\n * compiler will infer T_CHILD to be |undefined.\n * @template T_CHILD\n * @template T_CHILD_NOT_UNDEFINED :=\n *     cond(isUnknown(T_CHILD), unknown(),\n *       mapunion(T_CHILD, (X) =>\n *         cond(eq(X, 'undefined'), none(), X)))\n * =:\n */\nexports.addAndReturnRepeatedWrapperField = function(\n    message, fieldNumber, ctor, value, index, hasMessageId) {\n  return spliceRepeatedWrapperField(\n      message, fieldNumber, ctor, hasMessageId, value, index);\n};\n\n/**\n * Adds a submessage to a repeated proto field, and returns `this`.\n * @return {T}\n * @template T\n * @template T_CHILD\n */\nexports.addToRepeatedWrapperField = function(\n    /** T */ message,\n    /** number */ fieldNumber, /** function(new:T_CHILD, ?Array=) */ ctor,\n    /** T_CHILD */ value, /**number=*/ index,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.addAndReturnRepeatedWrapperField(\n      message, fieldNumber, ctor, value, index, hasMessageId);\n  return message;\n};\n\n/**\n * Adds a submessage to a repeated proto field, and returns `this`.\n * @return {T}\n * @template T\n * @template T_CHILD\n */\nexports.removeFromRepeatedWrapperField = function(\n    /** T */ message,\n    /** number */ fieldNumber, /** function(new:T_CHILD, ?Array=) */ ctor,\n    /** number= */ index, /** !HasMessageId= */ hasMessageId) {\n  spliceRepeatedWrapperField(\n      message, fieldNumber, ctor, hasMessageId, /*value=*/ undefined, index,\n      /*deleteCount=*/ 1, /*removeOnly=*/ true);\n  return message;\n};\n\n/**\n * Adds a submessage to a repeated proto field, and returns `this`.\n * @return {T}\n * @template T\n * @template T_CHILD\n */\nexports.addAllToRepeatedWrapperField = function(\n    /** T */ message,\n    /** number */ fieldNumber, /** function(new:T_CHILD, ?Array=) */ ctor,\n    /** !Iterable<T_CHILD> */ values, /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  const messageArray = getInternalArrayInline(message);\n  const msgs = getRepeatedWrapperFieldInternal(\n      message, messageArray, getMessageArrayStateInline(messageArray), ctor,\n      fieldNumber, RepeatedArrayReturnType.UNFROZEN, hasMessageId,\n      /*doesntReturnArray=*/ true);\n  let clearedOnlyMutable = 0;\n  let clearedOnlyImmutable = 0;\n  if (Array.isArray(values)) {\n    // in case values === msgs, only read up to the original length\n    const length = values.length;\n    for (let i = 0; i < length; i++) {\n      const insertedValue = checkMessageType(values[i], ctor);\n      msgs.push(insertedValue);\n      const valueIsImmutable = isImmutableMessage(insertedValue);\n      if (valueIsImmutable && !(clearedOnlyMutable++)) {\n        clearFlags(msgs, ArrayStateFlags.ONLY_MUTABLE_VALUES);\n      }\n      if (!valueIsImmutable && !(clearedOnlyImmutable++)) {\n        addArrayStateFlags(msgs, ArrayStateFlags.MUTABLE_SUBSTRUCTURES);\n      }\n    }\n  } else {\n    for (const value of values) {\n      const insertedValue = checkMessageType(value, ctor);\n      msgs.push(insertedValue);\n      const valueIsImmutable = isImmutableMessage(insertedValue);\n      if (valueIsImmutable && !(clearedOnlyMutable++)) {\n        clearFlags(msgs, ArrayStateFlags.ONLY_MUTABLE_VALUES);\n      }\n      if (!valueIsImmutable && !(clearedOnlyImmutable++)) {\n        addArrayStateFlags(msgs, ArrayStateFlags.MUTABLE_SUBSTRUCTURES);\n      }\n    }\n  }\n  if (clearedOnlyImmutable) {\n    leakedMutableSubstructures(messageArray);\n  }\n  return message;\n};\n\n/**\n * @return {number|null|undefined}\n */\nexports.getInt64FieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  if (getWriteBackGbigintValues()) {\n    return coerceToNullishInt64(exports.getFieldNullable(\n        message, fieldNumber, hasMessageId, legacyNullable,\n        coerceToNullishInt64Gbigint));\n  } else {\n    const value = coerceToNullishInt64(exports.getFieldNullable(\n        message, fieldNumber, hasMessageId, legacyNullable));\n    asyncThrowIf64BitIntReturnTypeMismatches(\n        message, value, /* expectStringValue = */ false);\n    return value;\n  }\n};\n\n/**\n * @return {string|null|undefined}\n */\nexports.getInt64FieldNullable_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  if (getWriteBackGbigintValues()) {\n    return coerceToNullishInt64String(exports.getFieldNullable(\n        message, fieldNumber, hasMessageId, legacyNullable,\n        coerceToNullishInt64Gbigint));\n  } else {\n    return coerceToNullishInt64String(\n        exports.getFieldNullable(\n            message, fieldNumber, hasMessageId, legacyNullable),\n        /* forceTypeChecking = */ true);\n  }\n};\n\n/**\n * @return {string|null|undefined}\n */\nexports.getInt64StringFieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  const value = coerceToNullishInt64String(exports.getFieldNullable(\n      message, fieldNumber, hasMessageId, legacyNullable));\n  asyncThrowIf64BitIntReturnTypeMismatches(\n      message, value, /* expectStringValue = */ true);\n  return value;\n};\n\n/**\n * @return {!gbigint|null|undefined}\n */\nexports.getInt64GbigintFieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  if (getWriteBackGbigintValues()) {\n    return exports.getFieldNullable(\n        message, fieldNumber, hasMessageId, legacyNullable,\n        coerceToNullishInt64Gbigint);\n  } else {\n    return coerceToNullishInt64Gbigint(exports.getFieldNullable(\n        message, fieldNumber, hasMessageId, legacyNullable));\n  }\n};\n\n/**\n * @return {number|null|undefined}\n */\nexports.getUint64FieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  if (getWriteBackGbigintValues()) {\n    return coerceToNullishUint64(exports.getFieldNullable(\n        message, fieldNumber, hasMessageId, legacyNullable,\n        coerceToNullishUint64Gbigint));\n  } else {\n    const value = coerceToNullishUint64(exports.getFieldNullable(\n        message, fieldNumber, hasMessageId, legacyNullable));\n    asyncThrowIf64BitIntReturnTypeMismatches(\n        message, value, /* expectStringValue = */ false);\n    return value;\n  }\n};\n\n/**\n * @return {string|null|undefined}\n */\nexports.getUint64FieldNullable_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  if (getWriteBackGbigintValues()) {\n    return coerceToNullishUint64String(exports.getFieldNullable(\n        message, fieldNumber, hasMessageId, legacyNullable,\n        coerceToNullishUint64Gbigint));\n  } else {\n    return coerceToNullishUint64String(\n        exports.getFieldNullable(\n            message, fieldNumber, hasMessageId, legacyNullable),\n        /* forceTypeChecking = */ true);\n  }\n};\n\n/**\n * @return {string|null|undefined}\n */\nexports.getUint64StringFieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  const value = coerceToNullishUint64String(exports.getFieldNullable(\n      message, fieldNumber, hasMessageId, legacyNullable));\n  asyncThrowIf64BitIntReturnTypeMismatches(\n      message, value, /* expectStringValue = */ true);\n  return value;\n};\n\n/**\n * @return {!gbigint|null|undefined}\n */\nexports.getUint64GbigintFieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  if (getWriteBackGbigintValues()) {\n    return exports.getFieldNullable(\n        message, fieldNumber, hasMessageId, legacyNullable,\n        coerceToNullishUint64Gbigint);\n  } else {\n    return coerceToNullishUint64Gbigint(exports.getFieldNullable(\n        message, fieldNumber, hasMessageId, legacyNullable));\n  }\n};\n\n/**\n * Gets the value of a repeated int64 field.\n * @param {!InternalMessage} message\n * @param {number} fieldNumber\n * @param {!RepeatedArrayReturnType} returnType\n * @param {!HasMessageId=} hasMessageId\n * @param {boolean=} doesntReturnArray\n * @return {!Array<number>}\n */\nexports.getRepeatedInt64Field = function(\n    message, fieldNumber, returnType, hasMessageId, doesntReturnArray) {\n  const value = getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishInt64, returnType, doesntReturnArray,\n      TypeSpecificApiFormat.LEGACY, hasMessageId);\n  if (!doesntReturnArray) {\n    asyncThrowIfRepeated64BitIntReturnTypeMismatches(\n        message, value,\n        /* expectStringValue = */ false);\n  }\n  return value;\n};\n\n/**\n * Gets the value of a repeated int64 field.\n * @param {!InternalMessage} message\n * @param {number} fieldNumber\n * @param {!RepeatedArrayReturnType} returnType\n * @param {!HasMessageId=} hasMessageId\n * @param {boolean=} doesntReturnArray\n * @return {!Array<!gbigint>}\n */\nexports.getRepeatedInt64GbigintField = function(\n    message, fieldNumber, returnType, hasMessageId, doesntReturnArray) {\n  return getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishInt64Gbigint, returnType,\n      doesntReturnArray, TypeSpecificApiFormat.GBIGINT, hasMessageId);\n};\n\n/**\n * @param {*} value\n * @return {string|null|undefined}\n */\nfunction coerceToNullishInt64StringWithForcedTypeChecking(value) {\n  return coerceToNullishInt64String(value, /* forceTypeChecking = */ true);\n}\n\n/**\n * Gets the value of a repeated int64 field.\n * @param {!InternalMessage} message\n * @param {number} fieldNumber\n * @param {!RepeatedArrayReturnType} returnType\n * @param {!HasMessageId=} hasMessageId\n * @param {boolean=} doesntReturnArray\n * @return {!ReadonlyArray<string>}\n */\nexports.getRepeatedInt64Field_asString = function(\n    message, fieldNumber, returnType, hasMessageId, doesntReturnArray) {\n  return /** @type {!ReadonlyArray<string>} */ (getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishInt64StringWithForcedTypeChecking,\n      returnType, doesntReturnArray, TypeSpecificApiFormat.STRING,\n      hasMessageId));\n};\n\n/**\n * Gets the value of a repeated int64 as string field.\n * @param {!InternalMessage} message\n * @param {number} fieldNumber\n * @param {!RepeatedArrayReturnType} returnType\n * @param {!HasMessageId=} hasMessageId\n * @param {boolean=} doesntReturnArray\n * @return {!Array<string>}\n */\nexports.getRepeatedInt64StringField = function(\n    message, fieldNumber, returnType, hasMessageId, doesntReturnArray) {\n  const value = getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishInt64String, returnType,\n      doesntReturnArray, TypeSpecificApiFormat.LEGACY, hasMessageId);\n  if (!doesntReturnArray) {\n    asyncThrowIfRepeated64BitIntReturnTypeMismatches(\n        message, value,\n        /* expectStringValue = */ true);\n  }\n\n  return value;\n};\n\n/**\n * Gets the value of a repeated uint64 field.\n * @return {!Array<number>}\n */\nexports.getRepeatedUint64Field = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !RepeatedArrayReturnType */ returnType,\n    /** !HasMessageId= */ hasMessageId, /** boolean= */ doesntReturnArray) {\n  const value = getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishUint64, returnType,\n      doesntReturnArray, TypeSpecificApiFormat.LEGACY, hasMessageId);\n  if (!doesntReturnArray) {\n    asyncThrowIfRepeated64BitIntReturnTypeMismatches(\n        message, value,\n        /* expectStringValue = */ false);\n  }\n  return value;\n};\n\n/**\n * @param {*} value\n * @return {string|null|undefined}\n */\nfunction coerceToNullishUint64StringWithForcedTypeChecking(value) {\n  return coerceToNullishUint64String(value, /* forceTypeChecking = */ true);\n}\n\n/**\n * Gets the value of a repeated uint64 field.\n * @return {!ReadonlyArray<string>}\n */\nexports.getRepeatedUint64Field_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !RepeatedArrayReturnType */ returnType,\n    /** !HasMessageId= */ hasMessageId, /** boolean= */ doesntReturnArray) {\n  return /** @type {!ReadonlyArray<string>} */ (getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishUint64StringWithForcedTypeChecking,\n      returnType, doesntReturnArray,\n      /* formatType = */ TypeSpecificApiFormat.STRING, hasMessageId));\n};\n\n/**\n * Gets the value of a repeated uint64 field.\n * @return {!Array<!gbigint>}\n */\nexports.getRepeatedUint64GbigintField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !RepeatedArrayReturnType */ returnType,\n    /** !HasMessageId= */ hasMessageId, /** boolean= */ doesntReturnArray) {\n  return getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishUint64Gbigint, returnType,\n      doesntReturnArray, TypeSpecificApiFormat.GBIGINT, hasMessageId);\n};\n\n/**\n * Gets the value of a repeated uint64 as string field.\n * @return {!Array<string>}\n */\nexports.getRepeatedUint64StringField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !RepeatedArrayReturnType */ returnType,\n    /** !HasMessageId= */ hasMessageId, /** boolean= */ doesntReturnArray) {\n  const value = getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishUint64String, returnType,\n      doesntReturnArray, TypeSpecificApiFormat.LEGACY, hasMessageId);\n  if (!doesntReturnArray) {\n    asyncThrowIfRepeated64BitIntReturnTypeMismatches(\n        message, value,\n        /* expectStringValue = */ true);\n  }\n  return value;\n};\n\nconst checkInt64String = checkInt64;\nconst checkUint64String = checkUint64;\nconst checkNullishInt64String = checkNullishInt64;\nconst checkNullishUint64String = checkNullishUint64;\n\n// These aliases are OK in debug mode because the implementations are\n// handwritten above.\nexports.getRepeatedInt64StringField_asString =\n    exports.getRepeatedInt64Field_asString;\nexports.getRepeatedUint64StringField_asString =\n    exports.getRepeatedUint64Field_asString;\n\n//\n// Generated code follows. To update, run:\n// javascript/apps/jspb/update_adapters.sh\n//\n// BEGIN AUTO-GENERATED ////////////////////////////////////////////////////////\n\n/**\n * @return {boolean|null|undefined}\n */\nexports.getBooleanFieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  return coerceToNullishBoolean(exports.getFieldNullable(\n      message, fieldNumber, hasMessageId, legacyNullable));\n};\n\n/**\n * @return {number|null|undefined}\n */\nexports.getInt32FieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  return coerceToNullishInt32(exports.getFieldNullable(\n      message, fieldNumber, hasMessageId, legacyNullable));\n};\n\n/**\n * @return {number|null|undefined}\n */\nexports.getUint32FieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  return coerceToNullishUint32(exports.getFieldNullable(\n      message, fieldNumber, hasMessageId, legacyNullable));\n};\n\n/**\n * @return {string|null|undefined}\n */\nexports.getStringFieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  return coerceToNullishString(exports.getFieldNullable(\n      message, fieldNumber, hasMessageId, legacyNullable));\n};\n\n/**\n * @return {number|null|undefined}\n */\nexports.getEnumFieldNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId,\n    /** !LegacyNullableToken|undefined= */ legacyNullable) {\n  return coerceToNullishEnum(exports.getFieldNullable(\n      message, fieldNumber, hasMessageId, legacyNullable));\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {boolean}\n */\nexports.getBooleanFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** boolean= */ defaultValue = false, /** !HasMessageId= */ hasMessageId) {\n  return exports.getBooleanFieldNullable(message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {number}\n */\nexports.getInt32FieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number= */ defaultValue = 0, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt32FieldNullable(message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {number}\n */\nexports.getUint32FieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number= */ defaultValue = 0, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint32FieldNullable(message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {number}\n */\nexports.getInt64FieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number= */ defaultValue = 0, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldNullable(message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {number}\n */\nexports.getUint64FieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number= */ defaultValue = 0, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldNullable(message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {string}\n */\nexports.getInt64StringFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** string= */ defaultValue = '0', /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64StringFieldNullable(\n             message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {string}\n */\nexports.getUint64StringFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** string= */ defaultValue = '0', /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64StringFieldNullable(\n             message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {!gbigint}\n */\nexports.getInt64GbigintFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !gbigint= */ defaultValue = GBIGINT_ZERO,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64GbigintFieldNullable(\n             message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {!gbigint}\n */\nexports.getUint64GbigintFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !gbigint= */ defaultValue = GBIGINT_ZERO,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64GbigintFieldNullable(\n             message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {number}\n */\nexports.getFloatingPointFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number= */ defaultValue = 0, /** !HasMessageId= */ hasMessageId) {\n  return exports.getFloatingPointFieldNullable(\n             message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {string}\n */\nexports.getStringFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** string= */ defaultValue = '', /** !HasMessageId= */ hasMessageId) {\n  return exports.getStringFieldNullable(message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {number}\n */\nexports.getEnumFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number= */ defaultValue = 0, /** !HasMessageId= */ hasMessageId) {\n  return exports.getEnumFieldNullable(message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {string}\n */\nexports.getInt64FieldWithDefault_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** string= */ defaultValue = '0', /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldNullable_asString(\n             message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {string}\n */\nexports.getUint64FieldWithDefault_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** string= */ defaultValue = '0', /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldNullable_asString(\n             message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {string}\n */\nexports.getInt64StringFieldWithDefault_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** string= */ defaultValue = '0', /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldNullable_asString(\n             message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * Gets the value of a field or default when unset.\n * @return {string}\n */\nexports.getUint64StringFieldWithDefault_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** string= */ defaultValue = '0', /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldNullable_asString(\n             message, fieldNumber, hasMessageId) ??\n      defaultValue;\n};\n\n/**\n * @return {!Array<boolean>}\n */\nexports.getRepeatedBooleanField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !RepeatedArrayReturnType */ returnType,\n    /** !HasMessageId= */ hasMessageId, /** boolean= */ doesntReturnArray) {\n  return getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishBoolean, returnType,\n      doesntReturnArray, /* formatType= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {boolean}\n */\nexports.getRepeatedIndexedBooleanField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedBooleanField(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the count of a primitive repeated field's values.\n * @return {number}\n */\nexports.getRepeatedBooleanCount = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports\n      .getRepeatedBooleanField(\n          message, fieldNumber,\n          RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN, hasMessageId,\n          /*doesntReturnArray=*/ true)\n      .length;\n};\n\n/**\n * @return {!Array<number>}\n */\nexports.getRepeatedInt32Field = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !RepeatedArrayReturnType */ returnType,\n    /** !HasMessageId= */ hasMessageId, /** boolean= */ doesntReturnArray) {\n  return getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishInt32, returnType, doesntReturnArray,\n      /* formatType= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {number}\n */\nexports.getRepeatedIndexedInt32Field = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedInt32Field(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the count of a primitive repeated field's values.\n * @return {number}\n */\nexports.getRepeatedInt32Count = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports\n      .getRepeatedInt32Field(\n          message, fieldNumber,\n          RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN, hasMessageId,\n          /*doesntReturnArray=*/ true)\n      .length;\n};\n\n/**\n * @return {!Array<number>}\n */\nexports.getRepeatedUint32Field = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !RepeatedArrayReturnType */ returnType,\n    /** !HasMessageId= */ hasMessageId, /** boolean= */ doesntReturnArray) {\n  return getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishUint32, returnType,\n      doesntReturnArray, /* formatType= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {number}\n */\nexports.getRepeatedIndexedUint32Field = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedUint32Field(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the count of a primitive repeated field's values.\n * @return {number}\n */\nexports.getRepeatedUint32Count = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports\n      .getRepeatedUint32Field(\n          message, fieldNumber,\n          RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN, hasMessageId,\n          /*doesntReturnArray=*/ true)\n      .length;\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {number}\n */\nexports.getRepeatedIndexedInt64Field = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedInt64Field(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the count of a primitive repeated field's values.\n * @return {number}\n */\nexports.getRepeatedInt64Count = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports\n      .getRepeatedInt64Field(\n          message, fieldNumber,\n          RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN, hasMessageId,\n          /*doesntReturnArray=*/ true)\n      .length;\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {number}\n */\nexports.getRepeatedIndexedUint64Field = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedUint64Field(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the count of a primitive repeated field's values.\n * @return {number}\n */\nexports.getRepeatedUint64Count = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports\n      .getRepeatedUint64Field(\n          message, fieldNumber,\n          RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN, hasMessageId,\n          /*doesntReturnArray=*/ true)\n      .length;\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {string}\n */\nexports.getRepeatedIndexedInt64StringField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedInt64StringField(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the count of a primitive repeated field's values.\n * @return {number}\n */\nexports.getRepeatedInt64StringCount = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports\n      .getRepeatedInt64StringField(\n          message, fieldNumber,\n          RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN, hasMessageId,\n          /*doesntReturnArray=*/ true)\n      .length;\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {string}\n */\nexports.getRepeatedIndexedUint64StringField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedUint64StringField(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the count of a primitive repeated field's values.\n * @return {number}\n */\nexports.getRepeatedUint64StringCount = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports\n      .getRepeatedUint64StringField(\n          message, fieldNumber,\n          RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN, hasMessageId,\n          /*doesntReturnArray=*/ true)\n      .length;\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {!gbigint}\n */\nexports.getRepeatedIndexedInt64GbigintField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedInt64GbigintField(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {!gbigint}\n */\nexports.getRepeatedIndexedUint64GbigintField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedUint64GbigintField(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * @return {!Array<number>}\n */\nexports.getRepeatedFloatingPointField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !RepeatedArrayReturnType */ returnType,\n    /** !HasMessageId= */ hasMessageId, /** boolean= */ doesntReturnArray) {\n  return getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishFloatingPoint, returnType,\n      doesntReturnArray, /* formatType= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {number}\n */\nexports.getRepeatedIndexedFloatingPointField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedFloatingPointField(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the count of a primitive repeated field's values.\n * @return {number}\n */\nexports.getRepeatedFloatingPointCount = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports\n      .getRepeatedFloatingPointField(\n          message, fieldNumber,\n          RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN, hasMessageId,\n          /*doesntReturnArray=*/ true)\n      .length;\n};\n\n/**\n * @return {!Array<string>}\n */\nexports.getRepeatedStringField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !RepeatedArrayReturnType */ returnType,\n    /** !HasMessageId= */ hasMessageId, /** boolean= */ doesntReturnArray) {\n  return getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishString, returnType,\n      doesntReturnArray, /* formatType= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {string}\n */\nexports.getRepeatedIndexedStringField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedStringField(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the count of a primitive repeated field's values.\n * @return {number}\n */\nexports.getRepeatedStringCount = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports\n      .getRepeatedStringField(\n          message, fieldNumber,\n          RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN, hasMessageId,\n          /*doesntReturnArray=*/ true)\n      .length;\n};\n\n/**\n * @return {!Array<!ByteString>}\n */\nexports.getRepeatedBytesField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !RepeatedArrayReturnType */ returnType,\n    /** !HasMessageId= */ hasMessageId, /** boolean= */ doesntReturnArray) {\n  return getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishBytes, returnType, doesntReturnArray,\n      /* formatType= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {!ByteString}\n */\nexports.getRepeatedIndexedBytesField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedBytesField(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the count of a primitive repeated field's values.\n * @return {number}\n */\nexports.getRepeatedBytesCount = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports\n      .getRepeatedBytesField(\n          message, fieldNumber,\n          RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN, hasMessageId,\n          /*doesntReturnArray=*/ true)\n      .length;\n};\n\n/**\n * @return {!Array<number>}\n */\nexports.getRepeatedEnumField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !RepeatedArrayReturnType */ returnType,\n    /** !HasMessageId= */ hasMessageId, /** boolean= */ doesntReturnArray) {\n  return getApiFormattedRepeatedField(\n      message, fieldNumber, coerceToNullishEnum, returnType, doesntReturnArray,\n      /* formatType= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {number}\n */\nexports.getRepeatedIndexedEnumField = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedEnumField(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the count of a primitive repeated field's values.\n * @return {number}\n */\nexports.getRepeatedEnumCount = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports\n      .getRepeatedEnumField(\n          message, fieldNumber,\n          RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN, hasMessageId,\n          /*doesntReturnArray=*/ true)\n      .length;\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {string}\n */\nexports.getRepeatedIndexedInt64Field_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedInt64Field_asString(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {string}\n */\nexports.getRepeatedIndexedUint64Field_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedUint64Field_asString(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {string}\n */\nexports.getRepeatedIndexedInt64StringField_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedInt64Field_asString(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the a primitive repeated field's value at `index`.\n * @return {string}\n */\nexports.getRepeatedIndexedUint64StringField_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** number */ index, /** !HasMessageId= */ hasMessageId) {\n  const data = exports.getRepeatedUint64Field_asString(\n      message, fieldNumber, RepeatedArrayReturnType.EITHER_FROZEN_OR_UNFROZEN,\n      hasMessageId, /*doesntReturnArray=*/ true);\n  checkRepeatedIndexInRangeForGet(data, index);\n  return data[index];\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {boolean}\n */\nexports.getOneofBooleanFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** boolean= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getBooleanFieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number}\n */\nexports.getOneofInt32FieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** number= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt32FieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number}\n */\nexports.getOneofUint32FieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** number= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint32FieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number}\n */\nexports.getOneofInt64FieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** number= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofInt64FieldWithDefault_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** string= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldWithDefault_asString(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number}\n */\nexports.getOneofUint64FieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** number= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofUint64FieldWithDefault_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** string= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldWithDefault_asString(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofInt64StringFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** string= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64StringFieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofInt64StringFieldWithDefault_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** string= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldWithDefault_asString(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofUint64StringFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** string= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64StringFieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofUint64StringFieldWithDefault_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** string= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldWithDefault_asString(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {!gbigint}\n */\nexports.getOneofInt64GbigintFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !gbigint= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64GbigintFieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {!gbigint}\n */\nexports.getOneofUint64GbigintFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !gbigint= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64GbigintFieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number}\n */\nexports.getOneofFloatingPointFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** number= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getFloatingPointFieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofStringFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** string= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getStringFieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {!ByteString}\n */\nexports.getOneofBytesFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** string= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getBytesFieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number}\n */\nexports.getOneofEnumFieldWithDefault = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** number= */ defaultValue,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getEnumFieldWithDefault(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      defaultValue, hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {boolean}\n */\nexports.getOneofBooleanFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getBooleanFieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number}\n */\nexports.getOneofInt32FieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt32FieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number}\n */\nexports.getOneofUint32FieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint32FieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number}\n */\nexports.getOneofInt64FieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofInt64FieldLegacyNullable_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldLegacyNullable_asString(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number}\n */\nexports.getOneofUint64FieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofUint64FieldLegacyNullable_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldLegacyNullable_asString(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofInt64StringFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64StringFieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofInt64StringFieldLegacyNullable_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldLegacyNullable_asString(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofUint64StringFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64StringFieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofUint64StringFieldLegacyNullable_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldLegacyNullable_asString(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {!gbigint}\n */\nexports.getOneofInt64GbigintFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64GbigintFieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {!gbigint}\n */\nexports.getOneofUint64GbigintFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64GbigintFieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number}\n */\nexports.getOneofFloatingPointFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getFloatingPointFieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string}\n */\nexports.getOneofStringFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getStringFieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {!ByteString}\n */\nexports.getOneofBytesFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getBytesFieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {T|undefined}\n * @template T\n */\nexports.getOneofWrapperFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** function(new:T, ?Array<?>=) */ ctor,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getWrapperFieldOrUndefined(\n      message, ctor,\n      exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number}\n */\nexports.getOneofEnumFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getEnumFieldLegacyNullable(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {boolean|undefined}\n */\nexports.getOneofBooleanFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getBooleanFieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number|undefined}\n */\nexports.getOneofInt32FieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt32FieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number|undefined}\n */\nexports.getOneofUint32FieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint32FieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number|undefined}\n */\nexports.getOneofInt64FieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string|undefined}\n */\nexports.getOneofInt64FieldOrUndefined_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldOrUndefined_asString(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number|undefined}\n */\nexports.getOneofUint64FieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string|undefined}\n */\nexports.getOneofUint64FieldOrUndefined_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldOrUndefined_asString(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string|undefined}\n */\nexports.getOneofInt64StringFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64StringFieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string|undefined}\n */\nexports.getOneofInt64StringFieldOrUndefined_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldOrUndefined_asString(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string|undefined}\n */\nexports.getOneofUint64StringFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64StringFieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string|undefined}\n */\nexports.getOneofUint64StringFieldOrUndefined_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldOrUndefined_asString(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {!gbigint|undefined}\n */\nexports.getOneofInt64GbigintFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64GbigintFieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {!gbigint|undefined}\n */\nexports.getOneofUint64GbigintFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64GbigintFieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number|undefined}\n */\nexports.getOneofFloatingPointFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getFloatingPointFieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {string|undefined}\n */\nexports.getOneofStringFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getStringFieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {!ByteString|undefined}\n */\nexports.getOneofBytesFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getBytesFieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {T|undefined}\n * @template T\n */\nexports.getReadonlyOneofWrapperFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** function(new:T, ?Array<?>=) */ ctor,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getReadonlyWrapperFieldOrUndefined(\n      message, ctor,\n      exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * Gets the value of a oneof field.\n * @return {number|undefined}\n */\nexports.getOneofEnumFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** !HasMessageId= */ hasMessageId) {\n  return exports.getEnumFieldOrUndefined(\n      message, exports.isOneofCase(message, oneof, fieldNumber, hasMessageId),\n      hasMessageId);\n};\n\n/**\n * @return {boolean|undefined}\n */\nexports.getBooleanFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {boolean|undefined} */ (\n      exports.getBooleanFieldNullable(message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {boolean}\n */\nexports.getBooleanFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {boolean} */ (exports.getBooleanFieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {number|undefined}\n */\nexports.getInt32FieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {number|undefined} */ (\n      exports.getInt32FieldNullable(message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {number}\n */\nexports.getInt32FieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {number} */ (exports.getInt32FieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {number|undefined}\n */\nexports.getUint32FieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {number|undefined} */ (\n      exports.getUint32FieldNullable(message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {number}\n */\nexports.getUint32FieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {number} */ (exports.getUint32FieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {number|undefined}\n */\nexports.getInt64FieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {number|undefined} */ (\n      exports.getInt64FieldNullable(message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {number}\n */\nexports.getInt64FieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {number} */ (exports.getInt64FieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {number|undefined}\n */\nexports.getUint64FieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {number|undefined} */ (\n      exports.getUint64FieldNullable(message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {number}\n */\nexports.getUint64FieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {number} */ (exports.getUint64FieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {string|undefined}\n */\nexports.getInt64StringFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string|undefined} */ (\n      exports.getInt64StringFieldNullable(message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {string}\n */\nexports.getInt64StringFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string} */ (exports.getInt64StringFieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {string|undefined}\n */\nexports.getUint64StringFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string|undefined} */ (\n      exports.getUint64StringFieldNullable(message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {string}\n */\nexports.getUint64StringFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string} */ (exports.getUint64StringFieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {!gbigint|undefined}\n */\nexports.getInt64GbigintFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {!gbigint|undefined} */ (\n      exports.getInt64GbigintFieldNullable(message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {!gbigint}\n */\nexports.getInt64GbigintFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {!gbigint} */ (exports.getInt64GbigintFieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {!gbigint|undefined}\n */\nexports.getUint64GbigintFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {!gbigint|undefined} */ (\n      exports.getUint64GbigintFieldNullable(\n          message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {!gbigint}\n */\nexports.getUint64GbigintFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {!gbigint} */ (exports.getUint64GbigintFieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {number|undefined}\n */\nexports.getFloatingPointFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {number|undefined} */ (exports.getFloatingPointFieldNullable(\n      message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {number}\n */\nexports.getFloatingPointFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {number} */ (exports.getFloatingPointFieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {string|undefined}\n */\nexports.getStringFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string|undefined} */ (\n      exports.getStringFieldNullable(message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {string}\n */\nexports.getStringFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string} */ (exports.getStringFieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {!ByteString|undefined}\n */\nexports.getBytesFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {!ByteString|undefined} */ (\n      exports.getBytesFieldNullable(message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {!ByteString}\n */\nexports.getBytesFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {!ByteString} */ (exports.getBytesFieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {number|undefined}\n */\nexports.getEnumFieldOrUndefined = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {number|undefined} */ (\n      exports.getEnumFieldNullable(message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {number}\n */\nexports.getEnumFieldLegacyNullable = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {number} */ (exports.getEnumFieldNullable(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {string|undefined}\n */\nexports.getInt64FieldOrUndefined_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string|undefined} */ (\n      exports.getInt64FieldNullable_asString(\n          message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {string}\n */\nexports.getInt64FieldLegacyNullable_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string} */ (exports.getInt64FieldNullable_asString(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {string|undefined}\n */\nexports.getUint64FieldOrUndefined_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string|undefined} */ (\n      exports.getUint64FieldNullable_asString(\n          message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {string}\n */\nexports.getUint64FieldLegacyNullable_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string} */ (exports.getUint64FieldNullable_asString(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {string|undefined}\n */\nexports.getInt64StringFieldOrUndefined_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string|undefined} */ (\n      exports.getInt64FieldNullable_asString(\n          message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {string}\n */\nexports.getInt64StringFieldLegacyNullable_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string} */ (exports.getInt64FieldNullable_asString(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {string|undefined}\n */\nexports.getUint64StringFieldOrUndefined_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string|undefined} */ (\n      exports.getUint64FieldNullable_asString(\n          message, fieldNumber, hasMessageId));\n};\n\n/**\n * @return {string}\n */\nexports.getUint64StringFieldLegacyNullable_asString = function(\n    /** !InternalMessage */ message, /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return /** @type {string} */ (exports.getUint64FieldNullable_asString(\n      message, fieldNumber, hasMessageId, LEGACY_NULLABLE));\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setBooleanField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** boolean|null|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  return exports.setField(\n      message, fieldNumber, checkNullishBoolean(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setProto3BooleanField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** boolean|null|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  return setFieldIgnoringDefault(\n      message, fieldNumber, checkNullishBoolean(value), false, hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setOneofBooleanField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** boolean|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setOneofField(\n      message, fieldNumber, oneof, checkNullishBoolean(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setInt32Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|null|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  return exports.setField(\n      message, fieldNumber, checkNullishInt32(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setProto3Int32Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|null|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  return setFieldIgnoringDefault(\n      message, fieldNumber, checkNullishInt32(value), 0, hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setOneofInt32Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** number|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setOneofField(\n      message, fieldNumber, oneof, checkNullishInt32(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setUint32Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|null|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  return exports.setField(\n      message, fieldNumber, checkNullishUint32(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setProto3Uint32Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|null|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  return setFieldIgnoringDefault(\n      message, fieldNumber, checkNullishUint32(value), 0, hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setOneofUint32Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** number|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setOneofField(\n      message, fieldNumber, oneof, checkNullishUint32(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setInt64Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|string|!gbigint|null|undefined */ value,\n    /** !TypeSpecificApiFormat= */ requestedFormat,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setField(\n      message, fieldNumber, checkNullishInt64(value, requestedFormat),\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setProto3Int64Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|string|!gbigint|null|undefined */ value,\n    /** !TypeSpecificApiFormat= */ requestedFormat,\n    /** !HasMessageId= */ hasMessageId) {\n  return setFieldIgnoringDefault(\n      message, fieldNumber, checkNullishInt64(value, requestedFormat), '0',\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setOneofInt64Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof,\n    /** number|string|!gbigint|null|undefined */ value,\n    /** !TypeSpecificApiFormat= */ requestedFormat,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setOneofField(\n      message, fieldNumber, oneof, checkNullishInt64(value, requestedFormat),\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setUint64Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|string|!gbigint|null|undefined */ value,\n    /** !TypeSpecificApiFormat= */ requestedFormat,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setField(\n      message, fieldNumber, checkNullishUint64(value, requestedFormat),\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setProto3Uint64Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|string|!gbigint|null|undefined */ value,\n    /** !TypeSpecificApiFormat= */ requestedFormat,\n    /** !HasMessageId= */ hasMessageId) {\n  return setFieldIgnoringDefault(\n      message, fieldNumber, checkNullishUint64(value, requestedFormat), '0',\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setOneofUint64Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof,\n    /** number|string|!gbigint|null|undefined */ value,\n    /** !TypeSpecificApiFormat= */ requestedFormat,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setOneofField(\n      message, fieldNumber, oneof, checkNullishUint64(value, requestedFormat),\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setInt64StringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|string|!gbigint|null|undefined */ value,\n    /** !TypeSpecificApiFormat= */ requestedFormat,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setField(\n      message, fieldNumber, checkNullishInt64String(value, requestedFormat),\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setProto3Int64StringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|string|!gbigint|null|undefined */ value,\n    /** !TypeSpecificApiFormat= */ requestedFormat,\n    /** !HasMessageId= */ hasMessageId) {\n  return setFieldIgnoringDefault(\n      message, fieldNumber, checkNullishInt64String(value, requestedFormat),\n      '0', hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setOneofInt64StringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof,\n    /** number|string|!gbigint|null|undefined */ value,\n    /** !TypeSpecificApiFormat= */ requestedFormat,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setOneofField(\n      message, fieldNumber, oneof,\n      checkNullishInt64String(value, requestedFormat), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setUint64StringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|string|!gbigint|null|undefined */ value,\n    /** !TypeSpecificApiFormat= */ requestedFormat,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setField(\n      message, fieldNumber, checkNullishUint64String(value, requestedFormat),\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setProto3Uint64StringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|string|!gbigint|null|undefined */ value,\n    /** !TypeSpecificApiFormat= */ requestedFormat,\n    /** !HasMessageId= */ hasMessageId) {\n  return setFieldIgnoringDefault(\n      message, fieldNumber, checkNullishUint64String(value, requestedFormat),\n      '0', hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setOneofUint64StringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof,\n    /** number|string|!gbigint|null|undefined */ value,\n    /** !TypeSpecificApiFormat= */ requestedFormat,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setOneofField(\n      message, fieldNumber, oneof,\n      checkNullishUint64String(value, requestedFormat), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setFloatingPointField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|null|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  return exports.setField(\n      message, fieldNumber, checkNullishFloatingPoint(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setProto3FloatingPointField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|null|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  return setFieldIgnoringDefault(\n      message, fieldNumber, checkNullishFloatingPoint(value), 0, hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setOneofFloatingPointField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** number|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setOneofField(\n      message, fieldNumber, oneof, checkNullishFloatingPoint(value),\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setStringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** string|null|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  return exports.setField(\n      message, fieldNumber, checkNullishString(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setProto3StringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** string|null|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  return setFieldIgnoringDefault(\n      message, fieldNumber, checkNullishString(value), '', hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setOneofStringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** string|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setOneofField(\n      message, fieldNumber, oneof, checkNullishString(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setBytesField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** string|!Uint8Array|!ByteString|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setField(\n      message, fieldNumber, checkNullishBytes(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setProto3BytesField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** string|!Uint8Array|!ByteString|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setFieldIgnoringDefault(\n      message, fieldNumber, checkNullishBytes(value), ByteString.empty(),\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setOneofBytesField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof,\n    /** string|!Uint8Array|!ByteString|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setOneofField(\n      message, fieldNumber, oneof, checkNullishBytes(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setEnumField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|null|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  return exports.setField(\n      message, fieldNumber, checkNullishEnum(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setProto3EnumField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|null|undefined */ value, /** !HasMessageId= */ hasMessageId) {\n  return setFieldIgnoringDefault(\n      message, fieldNumber, checkNullishEnum(value), 0, hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setOneofEnumField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number> */ oneof, /** number|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.setOneofField(\n      message, fieldNumber, oneof, checkNullishEnum(value), hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setRepeatedBooleanField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<boolean>|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedPrimitiveField(\n      message, fieldNumber, value, checkBoolean, hasMessageId);\n};\n\n/**\n * Adds a value to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addToRepeatedBooleanField = function(\n    /** T */ message, /** number */ fieldNumber, /** boolean */ value,\n    /** number= */ index, /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkBoolean, value, index, coerceToNullishBoolean,\n      hasMessageId);\n};\n\n/**\n * Removes a value from a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.removeFromRepeatedBooleanField = function(\n    /** T */ message, /** number */ fieldNumber, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkBoolean, undefined, index,\n      coerceToNullishBoolean, hasMessageId, /*deleteCount=*/ 1,\n      /*isSpreadable=*/ false, /*removeOnly=*/ true);\n};\n\n/**\n * Adds a collection of values to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addAllToRepeatedBooleanField = function(\n    /** T */ message,\n    /** number */ fieldNumber,\n    /** !Iterable<boolean> */ values,\n    /** !HasMessageId= */ hasMessageId) {\n  return addAllToRepeatedFieldImpl(\n      message, fieldNumber, checkBoolean, values, coerceToNullishBoolean,\n      hasMessageId);\n};\n\n/**\n * Sets the a primitive repeated field's value at `index`.\n * @return {T}\n * @template T\n */\nexports.setRepeatedIndexedBooleanField = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ index,\n    /** boolean */ value, /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedIndexedFieldImpl(\n      message, fieldNumber, checkBoolean, index, value, coerceToNullishBoolean,\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setRepeatedInt32Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number>|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedPrimitiveField(\n      message, fieldNumber, value, checkInt32, hasMessageId);\n};\n\n/**\n * Adds a value to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addToRepeatedInt32Field = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ value,\n    /** number= */ index, /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkInt32, value, index, coerceToNullishInt32,\n      hasMessageId);\n};\n\n/**\n * Removes a value from a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.removeFromRepeatedInt32Field = function(\n    /** T */ message, /** number */ fieldNumber, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkInt32, undefined, index, coerceToNullishInt32,\n      hasMessageId, /*deleteCount=*/ 1, /*isSpreadable=*/ false,\n      /*removeOnly=*/ true);\n};\n\n/**\n * Adds a collection of values to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addAllToRepeatedInt32Field = function(\n    /** T */ message,\n    /** number */ fieldNumber,\n    /** !Iterable<number> */ values,\n    /** !HasMessageId= */ hasMessageId) {\n  return addAllToRepeatedFieldImpl(\n      message, fieldNumber, checkInt32, values, coerceToNullishInt32,\n      hasMessageId);\n};\n\n/**\n * Sets the a primitive repeated field's value at `index`.\n * @return {T}\n * @template T\n */\nexports.setRepeatedIndexedInt32Field = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ index,\n    /** number */ value, /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedIndexedFieldImpl(\n      message, fieldNumber, checkInt32, index, value, coerceToNullishInt32,\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setRepeatedUint32Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number>|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedPrimitiveField(\n      message, fieldNumber, value, checkUint32, hasMessageId);\n};\n\n/**\n * Adds a value to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addToRepeatedUint32Field = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ value,\n    /** number= */ index, /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkUint32, value, index, coerceToNullishUint32,\n      hasMessageId);\n};\n\n/**\n * Removes a value from a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.removeFromRepeatedUint32Field = function(\n    /** T */ message, /** number */ fieldNumber, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkUint32, undefined, index,\n      coerceToNullishUint32, hasMessageId, /*deleteCount=*/ 1,\n      /*isSpreadable=*/ false, /*removeOnly=*/ true);\n};\n\n/**\n * Adds a collection of values to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addAllToRepeatedUint32Field = function(\n    /** T */ message,\n    /** number */ fieldNumber,\n    /** !Iterable<number> */ values,\n    /** !HasMessageId= */ hasMessageId) {\n  return addAllToRepeatedFieldImpl(\n      message, fieldNumber, checkUint32, values, coerceToNullishUint32,\n      hasMessageId);\n};\n\n/**\n * Sets the a primitive repeated field's value at `index`.\n * @return {T}\n * @template T\n */\nexports.setRepeatedIndexedUint32Field = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ index,\n    /** number */ value, /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedIndexedFieldImpl(\n      message, fieldNumber, checkUint32, index, value, coerceToNullishUint32,\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setRepeatedInt64Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number|string|!gbigint>|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedPrimitiveField(\n      message, fieldNumber, value, checkInt64, hasMessageId);\n};\n\n/**\n * Adds a value to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addToRepeatedInt64Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|string|!gbigint */ value, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkInt64, value, index, coerceToNullishInt64,\n      hasMessageId);\n};\n\n/**\n * Removes a value from a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.removeFromRepeatedInt64Field = function(\n    /** T */ message, /** number */ fieldNumber, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkInt64, undefined, index, coerceToNullishInt64,\n      hasMessageId, /*deleteCount=*/ 1, /*isSpreadable=*/ false,\n      /*removeOnly=*/ true);\n};\n\n/**\n * Adds a collection of values to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addAllToRepeatedInt64Field = function(\n    /** T */ message,\n    /** number */ fieldNumber,\n    /** !Iterable<number|string|!gbigint> */ values,\n    /** !HasMessageId= */ hasMessageId) {\n  return addAllToRepeatedFieldImpl(\n      message, fieldNumber, checkInt64, values, coerceToNullishInt64,\n      hasMessageId);\n};\n\n/**\n * Sets the a primitive repeated field's value at `index`.\n * @return {T}\n * @template T\n */\nexports.setRepeatedIndexedInt64Field = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ index,\n    /** number|string|!gbigint */ value, /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedIndexedFieldImpl(\n      message, fieldNumber, checkInt64, index, value, coerceToNullishInt64,\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setRepeatedUint64Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number|string|!gbigint>|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedPrimitiveField(\n      message, fieldNumber, value, checkUint64, hasMessageId);\n};\n\n/**\n * Adds a value to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addToRepeatedUint64Field = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|string|!gbigint */ value, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkUint64, value, index, coerceToNullishUint64,\n      hasMessageId);\n};\n\n/**\n * Removes a value from a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.removeFromRepeatedUint64Field = function(\n    /** T */ message, /** number */ fieldNumber, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkUint64, undefined, index,\n      coerceToNullishUint64, hasMessageId, /*deleteCount=*/ 1,\n      /*isSpreadable=*/ false, /*removeOnly=*/ true);\n};\n\n/**\n * Adds a collection of values to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addAllToRepeatedUint64Field = function(\n    /** T */ message,\n    /** number */ fieldNumber,\n    /** !Iterable<number|string|!gbigint> */ values,\n    /** !HasMessageId= */ hasMessageId) {\n  return addAllToRepeatedFieldImpl(\n      message, fieldNumber, checkUint64, values, coerceToNullishUint64,\n      hasMessageId);\n};\n\n/**\n * Sets the a primitive repeated field's value at `index`.\n * @return {T}\n * @template T\n */\nexports.setRepeatedIndexedUint64Field = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ index,\n    /** number|string|!gbigint */ value, /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedIndexedFieldImpl(\n      message, fieldNumber, checkUint64, index, value, coerceToNullishUint64,\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setRepeatedInt64StringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number|string|!gbigint>|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedPrimitiveField(\n      message, fieldNumber, value, checkInt64String, hasMessageId);\n};\n\n/**\n * Adds a value to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addToRepeatedInt64StringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|string|!gbigint */ value, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkInt64String, value, index,\n      coerceToNullishInt64String, hasMessageId);\n};\n\n/**\n * Removes a value from a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.removeFromRepeatedInt64StringField = function(\n    /** T */ message, /** number */ fieldNumber, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkInt64String, undefined, index,\n      coerceToNullishInt64String, hasMessageId, /*deleteCount=*/ 1,\n      /*isSpreadable=*/ false, /*removeOnly=*/ true);\n};\n\n/**\n * Adds a collection of values to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addAllToRepeatedInt64StringField = function(\n    /** T */ message,\n    /** number */ fieldNumber,\n    /** !Iterable<number|string|!gbigint> */ values,\n    /** !HasMessageId= */ hasMessageId) {\n  return addAllToRepeatedFieldImpl(\n      message, fieldNumber, checkInt64String, values,\n      coerceToNullishInt64String, hasMessageId);\n};\n\n/**\n * Sets the a primitive repeated field's value at `index`.\n * @return {T}\n * @template T\n */\nexports.setRepeatedIndexedInt64StringField = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ index,\n    /** number|string|!gbigint */ value, /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedIndexedFieldImpl(\n      message, fieldNumber, checkInt64String, index, value,\n      coerceToNullishInt64String, hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setRepeatedUint64StringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number|string|!gbigint>|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedPrimitiveField(\n      message, fieldNumber, value, checkUint64String, hasMessageId);\n};\n\n/**\n * Adds a value to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addToRepeatedUint64StringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** number|string|!gbigint */ value, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkUint64String, value, index,\n      coerceToNullishUint64String, hasMessageId);\n};\n\n/**\n * Removes a value from a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.removeFromRepeatedUint64StringField = function(\n    /** T */ message, /** number */ fieldNumber, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkUint64String, undefined, index,\n      coerceToNullishUint64String, hasMessageId, /*deleteCount=*/ 1,\n      /*isSpreadable=*/ false, /*removeOnly=*/ true);\n};\n\n/**\n * Adds a collection of values to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addAllToRepeatedUint64StringField = function(\n    /** T */ message,\n    /** number */ fieldNumber,\n    /** !Iterable<number|string|!gbigint> */ values,\n    /** !HasMessageId= */ hasMessageId) {\n  return addAllToRepeatedFieldImpl(\n      message, fieldNumber, checkUint64String, values,\n      coerceToNullishUint64String, hasMessageId);\n};\n\n/**\n * Sets the a primitive repeated field's value at `index`.\n * @return {T}\n * @template T\n */\nexports.setRepeatedIndexedUint64StringField = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ index,\n    /** number|string|!gbigint */ value, /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedIndexedFieldImpl(\n      message, fieldNumber, checkUint64String, index, value,\n      coerceToNullishUint64String, hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setRepeatedFloatingPointField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number>|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedPrimitiveField(\n      message, fieldNumber, value, checkFloatingPoint, hasMessageId);\n};\n\n/**\n * Adds a value to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addToRepeatedFloatingPointField = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ value,\n    /** number= */ index, /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkFloatingPoint, value, index,\n      coerceToNullishFloatingPoint, hasMessageId);\n};\n\n/**\n * Removes a value from a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.removeFromRepeatedFloatingPointField = function(\n    /** T */ message, /** number */ fieldNumber, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkFloatingPoint, undefined, index,\n      coerceToNullishFloatingPoint, hasMessageId, /*deleteCount=*/ 1,\n      /*isSpreadable=*/ false, /*removeOnly=*/ true);\n};\n\n/**\n * Adds a collection of values to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addAllToRepeatedFloatingPointField = function(\n    /** T */ message,\n    /** number */ fieldNumber,\n    /** !Iterable<number> */ values,\n    /** !HasMessageId= */ hasMessageId) {\n  return addAllToRepeatedFieldImpl(\n      message, fieldNumber, checkFloatingPoint, values,\n      coerceToNullishFloatingPoint, hasMessageId);\n};\n\n/**\n * Sets the a primitive repeated field's value at `index`.\n * @return {T}\n * @template T\n */\nexports.setRepeatedIndexedFloatingPointField = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ index,\n    /** number */ value, /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedIndexedFieldImpl(\n      message, fieldNumber, checkFloatingPoint, index, value,\n      coerceToNullishFloatingPoint, hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setRepeatedStringField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<string>|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedPrimitiveField(\n      message, fieldNumber, value, checkString, hasMessageId);\n};\n\n/**\n * Adds a value to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addToRepeatedStringField = function(\n    /** T */ message, /** number */ fieldNumber, /** string */ value,\n    /** number= */ index, /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkString, value, index, coerceToNullishString,\n      hasMessageId);\n};\n\n/**\n * Removes a value from a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.removeFromRepeatedStringField = function(\n    /** T */ message, /** number */ fieldNumber, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkString, undefined, index,\n      coerceToNullishString, hasMessageId, /*deleteCount=*/ 1,\n      /*isSpreadable=*/ false, /*removeOnly=*/ true);\n};\n\n/**\n * Adds a collection of values to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addAllToRepeatedStringField = function(\n    /** T */ message,\n    /** number */ fieldNumber,\n    /** !Iterable<string> */ values,\n    /** !HasMessageId= */ hasMessageId) {\n  return addAllToRepeatedFieldImpl(\n      message, fieldNumber, checkString, values, coerceToNullishString,\n      hasMessageId);\n};\n\n/**\n * Sets the a primitive repeated field's value at `index`.\n * @return {T}\n * @template T\n */\nexports.setRepeatedIndexedStringField = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ index,\n    /** string */ value, /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedIndexedFieldImpl(\n      message, fieldNumber, checkString, index, value, coerceToNullishString,\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setRepeatedBytesField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<string|!Uint8Array|!ByteString>|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedPrimitiveField(\n      message, fieldNumber, value, checkBytes, hasMessageId);\n};\n\n/**\n * Adds a value to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addToRepeatedBytesField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** string|!Uint8Array|!ByteString */ value, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkBytes, value, index, coerceToNullishBytes,\n      hasMessageId);\n};\n\n/**\n * Removes a value from a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.removeFromRepeatedBytesField = function(\n    /** T */ message, /** number */ fieldNumber, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkBytes, undefined, index, coerceToNullishBytes,\n      hasMessageId, /*deleteCount=*/ 1, /*isSpreadable=*/ false,\n      /*removeOnly=*/ true);\n};\n\n/**\n * Adds a collection of values to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addAllToRepeatedBytesField = function(\n    /** T */ message,\n    /** number */ fieldNumber,\n    /** !Iterable<string|!Uint8Array|!ByteString> */ values,\n    /** !HasMessageId= */ hasMessageId) {\n  return addAllToRepeatedFieldImpl(\n      message, fieldNumber, checkBytes, values, coerceToNullishBytes,\n      hasMessageId);\n};\n\n/**\n * Sets the a primitive repeated field's value at `index`.\n * @return {T}\n * @template T\n */\nexports.setRepeatedIndexedBytesField = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ index,\n    /** string|!Uint8Array|!ByteString */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedIndexedFieldImpl(\n      message, fieldNumber, checkBytes, index, value, coerceToNullishBytes,\n      hasMessageId);\n};\n\n/**\n * @return {T}\n * @template T\n */\nexports.setRepeatedEnumField = function(\n    /** T */ message, /** number */ fieldNumber,\n    /** !ReadonlyArray<number>|null|undefined */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedPrimitiveField(\n      message, fieldNumber, value, checkEnum, hasMessageId);\n};\n\n/**\n * Adds a value to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addToRepeatedEnumField = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ value,\n    /** number= */ index, /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkEnum, value, index, coerceToNullishEnum,\n      hasMessageId);\n};\n\n/**\n * Removes a value from a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.removeFromRepeatedEnumField = function(\n    /** T */ message, /** number */ fieldNumber, /** number= */ index,\n    /** !HasMessageId= */ hasMessageId) {\n  return spliceRepeatedPrimitiveField(\n      message, fieldNumber, checkEnum, undefined, index, coerceToNullishEnum,\n      hasMessageId, /*deleteCount=*/ 1, /*isSpreadable=*/ false,\n      /*removeOnly=*/ true);\n};\n\n/**\n * Adds a collection of values to a repeated primitive field.\n * @return {T}\n * @template T\n */\nexports.addAllToRepeatedEnumField = function(\n    /** T */ message,\n    /** number */ fieldNumber,\n    /** !Iterable<number> */ values,\n    /** !HasMessageId= */ hasMessageId) {\n  return addAllToRepeatedFieldImpl(\n      message, fieldNumber, checkEnum, values, coerceToNullishEnum,\n      hasMessageId);\n};\n\n/**\n * Sets the a primitive repeated field's value at `index`.\n * @return {T}\n * @template T\n */\nexports.setRepeatedIndexedEnumField = function(\n    /** T */ message, /** number */ fieldNumber, /** number */ index,\n    /** number */ value, /** !HasMessageId= */ hasMessageId) {\n  return setRepeatedIndexedFieldImpl(\n      message, fieldNumber, checkEnum, index, value, coerceToNullishEnum,\n      hasMessageId);\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasBooleanField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getBooleanFieldOrUndefined(\n             message, fieldNumber, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasOneofBooleanField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getOneofBooleanFieldOrUndefined(\n             message, fieldNumber, oneof, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasInt32Field = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt32FieldOrUndefined(message, fieldNumber, hasMessageId) !=\n      null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasOneofInt32Field = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getOneofInt32FieldOrUndefined(\n             message, fieldNumber, oneof, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasUint32Field = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint32FieldOrUndefined(\n             message, fieldNumber, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasOneofUint32Field = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getOneofUint32FieldOrUndefined(\n             message, fieldNumber, oneof, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasInt64Field = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64FieldOrUndefined(message, fieldNumber, hasMessageId) !=\n      null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasOneofInt64Field = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getOneofInt64FieldOrUndefined(\n             message, fieldNumber, oneof, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasUint64Field = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64FieldOrUndefined(\n             message, fieldNumber, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasOneofUint64Field = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getOneofUint64FieldOrUndefined(\n             message, fieldNumber, oneof, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasInt64StringField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getInt64StringFieldOrUndefined(\n             message, fieldNumber, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasOneofInt64StringField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getOneofInt64StringFieldOrUndefined(\n             message, fieldNumber, oneof, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasUint64StringField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getUint64StringFieldOrUndefined(\n             message, fieldNumber, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasOneofUint64StringField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getOneofUint64StringFieldOrUndefined(\n             message, fieldNumber, oneof, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasFloatingPointField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getFloatingPointFieldOrUndefined(\n             message, fieldNumber, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasOneofFloatingPointField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getOneofFloatingPointFieldOrUndefined(\n             message, fieldNumber, oneof, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasStringField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getStringFieldOrUndefined(\n             message, fieldNumber, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasOneofStringField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getOneofStringFieldOrUndefined(\n             message, fieldNumber, oneof, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasBytesField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getBytesFieldOrUndefined(message, fieldNumber, hasMessageId) !=\n      null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasOneofBytesField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getOneofBytesFieldOrUndefined(\n             message, fieldNumber, oneof, hasMessageId) != null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasEnumField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getEnumFieldOrUndefined(message, fieldNumber, hasMessageId) !=\n      null;\n};\n\n/**\n * Returns the presence of a field.\n * @return {boolean}\n */\nexports.hasOneofEnumField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyArray<number> */ oneof,\n    /** !HasMessageId= */ hasMessageId) {\n  return exports.getOneofEnumFieldOrUndefined(\n             message, fieldNumber, oneof, hasMessageId) != null;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,boolean>}\n */\nexports.getBooleanBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, booleanKeyToApiForMaps, booleanToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putBooleanBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanBooleanMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllBooleanBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getBooleanBooleanMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setBooleanBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllBooleanBooleanMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteBooleanBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanBooleanMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,number>}\n */\nexports.getBooleanInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, booleanKeyToApiForMaps, int32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putBooleanInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanInt32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllBooleanInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getBooleanInt32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setBooleanInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllBooleanInt32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteBooleanInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanInt32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,number>}\n */\nexports.getBooleanUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, booleanKeyToApiForMaps, uint32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putBooleanUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanUint32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllBooleanUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getBooleanUint32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setBooleanUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllBooleanUint32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteBooleanUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanUint32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,number>}\n */\nexports.getBooleanInt64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, booleanKeyToApiForMaps, int64ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putBooleanInt64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanInt64MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllBooleanInt64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getBooleanInt64MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setBooleanInt64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllBooleanInt64MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteBooleanInt64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanInt64MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,number>}\n */\nexports.getBooleanUint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, booleanKeyToApiForMaps, uint64ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putBooleanUint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanUint64MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllBooleanUint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getBooleanUint64MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setBooleanUint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllBooleanUint64MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteBooleanUint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanUint64MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,number>}\n */\nexports.getBooleanFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, booleanKeyToApiForMaps, floatToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putBooleanFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanFloatingPointMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllBooleanFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getBooleanFloatingPointMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setBooleanFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllBooleanFloatingPointMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteBooleanFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanFloatingPointMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,string>}\n */\nexports.getBooleanStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, booleanKeyToApiForMaps, stringToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putBooleanStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanStringMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllBooleanStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getBooleanStringMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setBooleanStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllBooleanStringMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteBooleanStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanStringMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,!ByteString>}\n */\nexports.getBooleanBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, booleanKeyToApiForMaps, bytesToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putBooleanBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanBytesMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllBooleanBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getBooleanBytesMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setBooleanBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllBooleanBytesMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteBooleanBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanBytesMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,?>}\n */\nexports.getBooleanEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, booleanKeyToApiForMaps, enumToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putBooleanEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanEnumMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllBooleanEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getBooleanEnumMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setBooleanEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllBooleanEnumMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteBooleanEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanEnumMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,?>}\n */\nexports.getReadonlyBooleanWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getReadonlyMapField(\n      message, fieldNumber, valueCtor, booleanKeyToApiForMaps,\n      /* valueToApi= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,?>}\n */\nexports.getBooleanWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getMessageValuedMapField(\n      message, fieldNumber, valueCtor, booleanKeyToApiForMaps, hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putBooleanWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyBooleanWrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllBooleanWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getReadonlyBooleanWrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setBooleanWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllBooleanWrapperMapField(\n        message, fieldNumber, newMap, valueCtor, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteBooleanWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyBooleanWrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,!gbigint>}\n */\nexports.getBooleanInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, booleanKeyToApiForMaps, int64GbigintToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putBooleanInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanInt64GbigintMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllBooleanInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getBooleanInt64GbigintMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setBooleanInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllBooleanInt64GbigintMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteBooleanInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanInt64GbigintMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<boolean,!gbigint>}\n */\nexports.getBooleanUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, booleanKeyToApiForMaps, uint64GbigintToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putBooleanUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanUint64GbigintMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllBooleanUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getBooleanUint64GbigintMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setBooleanUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllBooleanUint64GbigintMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteBooleanUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getBooleanUint64GbigintMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,boolean>}\n */\nexports.getInt32BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int32KeyToApiForMaps, booleanToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt32BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32BooleanMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt32BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt32BooleanMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt32BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt32BooleanMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt32BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32BooleanMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getInt32Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int32KeyToApiForMaps, int32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt32Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32Int32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt32Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt32Int32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt32Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt32Int32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt32Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32Int32MapField(message, fieldNumber, hasMessageId).delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getInt32Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int32KeyToApiForMaps, uint32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt32Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32Uint32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt32Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt32Uint32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt32Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt32Uint32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt32Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32Uint32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getInt32Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int32KeyToApiForMaps, int64ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt32Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32Int64MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt32Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt32Int64MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt32Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt32Int64MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt32Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32Int64MapField(message, fieldNumber, hasMessageId).delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getInt32Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int32KeyToApiForMaps, uint64ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt32Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32Uint64MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt32Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt32Uint64MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt32Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt32Uint64MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt32Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32Uint64MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getInt32FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int32KeyToApiForMaps, floatToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt32FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32FloatingPointMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt32FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt32FloatingPointMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt32FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt32FloatingPointMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt32FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32FloatingPointMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,string>}\n */\nexports.getInt32StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int32KeyToApiForMaps, stringToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt32StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32StringMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt32StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt32StringMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt32StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt32StringMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt32StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32StringMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,!ByteString>}\n */\nexports.getInt32BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int32KeyToApiForMaps, bytesToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt32BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32BytesMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt32BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt32BytesMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt32BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt32BytesMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt32BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32BytesMapField(message, fieldNumber, hasMessageId).delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,?>}\n */\nexports.getInt32EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int32KeyToApiForMaps, enumToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt32EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32EnumMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt32EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt32EnumMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt32EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt32EnumMapField(message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt32EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32EnumMapField(message, fieldNumber, hasMessageId).delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,?>}\n */\nexports.getReadonlyInt32WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getReadonlyMapField(\n      message, fieldNumber, valueCtor, int32KeyToApiForMaps,\n      /* valueToApi= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,?>}\n */\nexports.getInt32WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getMessageValuedMapField(\n      message, fieldNumber, valueCtor, int32KeyToApiForMaps, hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt32WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyInt32WrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt32WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getReadonlyInt32WrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt32WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt32WrapperMapField(\n        message, fieldNumber, newMap, valueCtor, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt32WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyInt32WrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,!gbigint>}\n */\nexports.getInt32Int64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int32KeyToApiForMaps, int64GbigintToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt32Int64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32Int64GbigintMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt32Int64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt32Int64GbigintMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt32Int64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt32Int64GbigintMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt32Int64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32Int64GbigintMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,!gbigint>}\n */\nexports.getInt32Uint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int32KeyToApiForMaps, uint64GbigintToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt32Uint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32Uint64GbigintMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt32Uint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt32Uint64GbigintMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt32Uint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt32Uint64GbigintMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt32Uint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt32Uint64GbigintMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,boolean>}\n */\nexports.getUint32BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint32KeyToApiForMaps, booleanToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint32BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32BooleanMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint32BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint32BooleanMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint32BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint32BooleanMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint32BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32BooleanMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getUint32Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint32KeyToApiForMaps, int32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint32Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32Int32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint32Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint32Int32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint32Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint32Int32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint32Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32Int32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getUint32Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint32KeyToApiForMaps, uint32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint32Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32Uint32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint32Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint32Uint32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint32Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint32Uint32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint32Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32Uint32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getUint32Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint32KeyToApiForMaps, int64ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint32Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32Int64MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint32Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint32Int64MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint32Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint32Int64MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint32Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32Int64MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getUint32Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint32KeyToApiForMaps, uint64ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint32Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32Uint64MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint32Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint32Uint64MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint32Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint32Uint64MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint32Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32Uint64MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getUint32FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint32KeyToApiForMaps, floatToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint32FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32FloatingPointMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint32FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint32FloatingPointMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint32FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint32FloatingPointMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint32FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32FloatingPointMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,string>}\n */\nexports.getUint32StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint32KeyToApiForMaps, stringToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint32StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32StringMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint32StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint32StringMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint32StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint32StringMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint32StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32StringMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,!ByteString>}\n */\nexports.getUint32BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint32KeyToApiForMaps, bytesToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint32BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32BytesMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint32BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint32BytesMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint32BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint32BytesMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint32BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32BytesMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,?>}\n */\nexports.getUint32EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint32KeyToApiForMaps, enumToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint32EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32EnumMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint32EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint32EnumMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint32EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint32EnumMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint32EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32EnumMapField(message, fieldNumber, hasMessageId).delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,?>}\n */\nexports.getReadonlyUint32WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getReadonlyMapField(\n      message, fieldNumber, valueCtor, uint32KeyToApiForMaps,\n      /* valueToApi= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,?>}\n */\nexports.getUint32WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getMessageValuedMapField(\n      message, fieldNumber, valueCtor, uint32KeyToApiForMaps, hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint32WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyUint32WrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint32WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getReadonlyUint32WrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint32WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint32WrapperMapField(\n        message, fieldNumber, newMap, valueCtor, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint32WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyUint32WrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,!gbigint>}\n */\nexports.getUint32Int64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint32KeyToApiForMaps, int64GbigintToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint32Int64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32Int64GbigintMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint32Int64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint32Int64GbigintMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint32Int64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint32Int64GbigintMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint32Int64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32Int64GbigintMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,!gbigint>}\n */\nexports.getUint32Uint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint32KeyToApiForMaps, uint64GbigintToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint32Uint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32Uint64GbigintMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint32Uint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint32Uint64GbigintMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint32Uint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint32Uint64GbigintMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint32Uint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint32Uint64GbigintMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,boolean>}\n */\nexports.getInt64BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64KeyToApiForMaps, booleanToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64BooleanMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64BooleanMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64BooleanMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64BooleanMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getInt64Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64KeyToApiForMaps, int32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64Int32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64Int32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64Int32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64Int32MapField(message, fieldNumber, hasMessageId).delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getInt64Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64KeyToApiForMaps, uint32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64Uint32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64Uint32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64Uint32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64Uint32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getInt64Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64KeyToApiForMaps, int64ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64Int64MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64Int64MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64Int64MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64Int64MapField(message, fieldNumber, hasMessageId).delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getInt64Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64KeyToApiForMaps, uint64ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64Uint64MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64Uint64MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64Uint64MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64Uint64MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getInt64FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64KeyToApiForMaps, floatToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64FloatingPointMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64FloatingPointMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64FloatingPointMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64FloatingPointMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,string>}\n */\nexports.getInt64StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64KeyToApiForMaps, stringToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64StringMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64StringMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64StringMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64StringMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,!ByteString>}\n */\nexports.getInt64BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64KeyToApiForMaps, bytesToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64BytesMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64BytesMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64BytesMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64BytesMapField(message, fieldNumber, hasMessageId).delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,?>}\n */\nexports.getInt64EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64KeyToApiForMaps, enumToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64EnumMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64EnumMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64EnumMapField(message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64EnumMapField(message, fieldNumber, hasMessageId).delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,?>}\n */\nexports.getReadonlyInt64WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getReadonlyMapField(\n      message, fieldNumber, valueCtor, int64KeyToApiForMaps,\n      /* valueToApi= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,?>}\n */\nexports.getInt64WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getMessageValuedMapField(\n      message, fieldNumber, valueCtor, int64KeyToApiForMaps, hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyInt64WrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getReadonlyInt64WrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64WrapperMapField(\n        message, fieldNumber, newMap, valueCtor, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyInt64WrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,boolean>}\n */\nexports.getUint64BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64KeyToApiForMaps, booleanToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64BooleanMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64BooleanMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64BooleanMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64BooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64BooleanMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getUint64Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64KeyToApiForMaps, int32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64Int32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64Int32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64Int32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64Int32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64Int32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getUint64Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64KeyToApiForMaps, uint32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64Uint32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64Uint32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64Uint32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64Uint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64Uint32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getUint64Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64KeyToApiForMaps, int64ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64Int64MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64Int64MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64Int64MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64Int64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64Int64MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getUint64Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64KeyToApiForMaps, uint64ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64Uint64MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64Uint64MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64Uint64MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64Uint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64Uint64MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,number>}\n */\nexports.getUint64FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64KeyToApiForMaps, floatToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64FloatingPointMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64FloatingPointMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64FloatingPointMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64FloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64FloatingPointMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,string>}\n */\nexports.getUint64StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64KeyToApiForMaps, stringToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64StringMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64StringMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64StringMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64StringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64StringMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,!ByteString>}\n */\nexports.getUint64BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64KeyToApiForMaps, bytesToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64BytesMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64BytesMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64BytesMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64BytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64BytesMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,?>}\n */\nexports.getUint64EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64KeyToApiForMaps, enumToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64EnumMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64EnumMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64EnumMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64EnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64EnumMapField(message, fieldNumber, hasMessageId).delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,?>}\n */\nexports.getReadonlyUint64WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getReadonlyMapField(\n      message, fieldNumber, valueCtor, uint64KeyToApiForMaps,\n      /* valueToApi= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<number,?>}\n */\nexports.getUint64WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getMessageValuedMapField(\n      message, fieldNumber, valueCtor, uint64KeyToApiForMaps, hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyUint64WrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getReadonlyUint64WrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64WrapperMapField(\n        message, fieldNumber, newMap, valueCtor, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64WrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyUint64WrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,boolean>}\n */\nexports.getStringBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, stringKeyToApiForMaps, booleanToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putStringBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringBooleanMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllStringBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getStringBooleanMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setStringBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllStringBooleanMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteStringBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringBooleanMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,number>}\n */\nexports.getStringInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, stringKeyToApiForMaps, int32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putStringInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringInt32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllStringInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getStringInt32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setStringInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllStringInt32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteStringInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringInt32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,number>}\n */\nexports.getStringUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, stringKeyToApiForMaps, uint32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putStringUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringUint32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllStringUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getStringUint32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setStringUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllStringUint32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteStringUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringUint32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,number>}\n */\nexports.getStringInt64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, stringKeyToApiForMaps, int64ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putStringInt64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringInt64MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllStringInt64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getStringInt64MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setStringInt64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllStringInt64MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteStringInt64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringInt64MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,number>}\n */\nexports.getStringUint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, stringKeyToApiForMaps, uint64ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putStringUint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringUint64MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllStringUint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getStringUint64MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setStringUint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllStringUint64MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteStringUint64MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringUint64MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,number>}\n */\nexports.getStringFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, stringKeyToApiForMaps, floatToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putStringFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringFloatingPointMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllStringFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getStringFloatingPointMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setStringFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllStringFloatingPointMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteStringFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringFloatingPointMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,string>}\n */\nexports.getStringStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, stringKeyToApiForMaps, stringToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putStringStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringStringMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllStringStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getStringStringMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setStringStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllStringStringMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteStringStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringStringMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,!ByteString>}\n */\nexports.getStringBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, stringKeyToApiForMaps, bytesToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putStringBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringBytesMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllStringBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getStringBytesMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setStringBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllStringBytesMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteStringBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringBytesMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,?>}\n */\nexports.getStringEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, stringKeyToApiForMaps, enumToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putStringEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringEnumMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllStringEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getStringEnumMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setStringEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllStringEnumMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteStringEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringEnumMapField(message, fieldNumber, hasMessageId).delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,?>}\n */\nexports.getReadonlyStringWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getReadonlyMapField(\n      message, fieldNumber, valueCtor, stringKeyToApiForMaps,\n      /* valueToApi= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,?>}\n */\nexports.getStringWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getMessageValuedMapField(\n      message, fieldNumber, valueCtor, stringKeyToApiForMaps, hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putStringWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyStringWrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllStringWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getReadonlyStringWrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setStringWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllStringWrapperMapField(\n        message, fieldNumber, newMap, valueCtor, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteStringWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyStringWrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,!gbigint>}\n */\nexports.getStringInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, stringKeyToApiForMaps, int64GbigintToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putStringInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringInt64GbigintMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllStringInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getStringInt64GbigintMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setStringInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllStringInt64GbigintMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteStringInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringInt64GbigintMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<string,!gbigint>}\n */\nexports.getStringUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, stringKeyToApiForMaps, uint64GbigintToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putStringUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringUint64GbigintMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllStringUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getStringUint64GbigintMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setStringUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllStringUint64GbigintMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteStringUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getStringUint64GbigintMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,boolean>}\n */\nexports.getInt64GbigintBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64GbigintKeyToApiForMaps, booleanToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64GbigintBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64GbigintBooleanMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64GbigintBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64GbigintBooleanMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64GbigintBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64GbigintBooleanMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64GbigintBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64GbigintBooleanMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,number>}\n */\nexports.getInt64GbigintInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64GbigintKeyToApiForMaps, int32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64GbigintInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64GbigintInt32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64GbigintInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64GbigintInt32MapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64GbigintInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64GbigintInt32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64GbigintInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64GbigintInt32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,number>}\n */\nexports.getInt64GbigintUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64GbigintKeyToApiForMaps, uint32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64GbigintUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64GbigintUint32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64GbigintUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64GbigintUint32MapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64GbigintUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64GbigintUint32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64GbigintUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64GbigintUint32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,number>}\n */\nexports.getInt64GbigintFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64GbigintKeyToApiForMaps, floatToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64GbigintFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getInt64GbigintFloatingPointMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64GbigintFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64GbigintFloatingPointMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64GbigintFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64GbigintFloatingPointMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64GbigintFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getInt64GbigintFloatingPointMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,string>}\n */\nexports.getInt64GbigintStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64GbigintKeyToApiForMaps, stringToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64GbigintStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64GbigintStringMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64GbigintStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64GbigintStringMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64GbigintStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64GbigintStringMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64GbigintStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64GbigintStringMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,!ByteString>}\n */\nexports.getInt64GbigintBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64GbigintKeyToApiForMaps, bytesToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64GbigintBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64GbigintBytesMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64GbigintBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64GbigintBytesMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64GbigintBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64GbigintBytesMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64GbigintBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64GbigintBytesMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,?>}\n */\nexports.getInt64GbigintEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64GbigintKeyToApiForMaps, enumToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64GbigintEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64GbigintEnumMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64GbigintEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64GbigintEnumMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64GbigintEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64GbigintEnumMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64GbigintEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getInt64GbigintEnumMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,?>}\n */\nexports.getReadonlyInt64GbigintWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getReadonlyMapField(\n      message, fieldNumber, valueCtor, int64GbigintKeyToApiForMaps,\n      /* valueToApi= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,?>}\n */\nexports.getInt64GbigintWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getMessageValuedMapField(\n      message, fieldNumber, valueCtor, int64GbigintKeyToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64GbigintWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyInt64GbigintWrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64GbigintWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getReadonlyInt64GbigintWrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64GbigintWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64GbigintWrapperMapField(\n        message, fieldNumber, newMap, valueCtor, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64GbigintWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyInt64GbigintWrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,!gbigint>}\n */\nexports.getInt64GbigintInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64GbigintKeyToApiForMaps,\n      int64GbigintToApiForMaps, hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64GbigintInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getInt64GbigintInt64GbigintMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64GbigintInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64GbigintInt64GbigintMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64GbigintInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64GbigintInt64GbigintMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64GbigintInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getInt64GbigintInt64GbigintMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,!gbigint>}\n */\nexports.getInt64GbigintUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, int64GbigintKeyToApiForMaps,\n      uint64GbigintToApiForMaps, hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putInt64GbigintUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getInt64GbigintUint64GbigintMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllInt64GbigintUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getInt64GbigintUint64GbigintMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setInt64GbigintUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllInt64GbigintUint64GbigintMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteInt64GbigintUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getInt64GbigintUint64GbigintMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,boolean>}\n */\nexports.getUint64GbigintBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64GbigintKeyToApiForMaps, booleanToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64GbigintBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64GbigintBooleanMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64GbigintBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64GbigintBooleanMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64GbigintBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64GbigintBooleanMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64GbigintBooleanMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64GbigintBooleanMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,number>}\n */\nexports.getUint64GbigintInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64GbigintKeyToApiForMaps, int32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64GbigintInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64GbigintInt32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64GbigintInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64GbigintInt32MapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64GbigintInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64GbigintInt32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64GbigintInt32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64GbigintInt32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,number>}\n */\nexports.getUint64GbigintUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64GbigintKeyToApiForMaps, uint32ToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64GbigintUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64GbigintUint32MapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64GbigintUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64GbigintUint32MapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64GbigintUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64GbigintUint32MapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64GbigintUint32MapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64GbigintUint32MapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,number>}\n */\nexports.getUint64GbigintFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64GbigintKeyToApiForMaps, floatToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64GbigintFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getUint64GbigintFloatingPointMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64GbigintFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64GbigintFloatingPointMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64GbigintFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64GbigintFloatingPointMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64GbigintFloatingPointMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getUint64GbigintFloatingPointMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,string>}\n */\nexports.getUint64GbigintStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64GbigintKeyToApiForMaps, stringToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64GbigintStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64GbigintStringMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64GbigintStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64GbigintStringMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64GbigintStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64GbigintStringMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64GbigintStringMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64GbigintStringMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,!ByteString>}\n */\nexports.getUint64GbigintBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64GbigintKeyToApiForMaps, bytesToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64GbigintBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64GbigintBytesMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64GbigintBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64GbigintBytesMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64GbigintBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64GbigintBytesMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64GbigintBytesMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64GbigintBytesMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,?>}\n */\nexports.getUint64GbigintEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64GbigintKeyToApiForMaps, enumToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64GbigintEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64GbigintEnumMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64GbigintEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64GbigintEnumMapField(message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64GbigintEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64GbigintEnumMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64GbigintEnumMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.getUint64GbigintEnumMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,?>}\n */\nexports.getReadonlyUint64GbigintWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getReadonlyMapField(\n      message, fieldNumber, valueCtor, uint64GbigintKeyToApiForMaps,\n      /* valueToApi= */ undefined, hasMessageId);\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,?>}\n */\nexports.getUint64GbigintWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  return getMessageValuedMapField(\n      message, fieldNumber, valueCtor, uint64GbigintKeyToApiForMaps,\n      hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64GbigintWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyUint64GbigintWrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64GbigintWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getReadonlyUint64GbigintWrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64GbigintWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** ?= */ valueCtor, /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64GbigintWrapperMapField(\n        message, fieldNumber, newMap, valueCtor, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64GbigintWrapperMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ?= */ valueCtor,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getReadonlyUint64GbigintWrapperMapField(\n          message, fieldNumber, valueCtor, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,!gbigint>}\n */\nexports.getUint64GbigintInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64GbigintKeyToApiForMaps,\n      int64GbigintToApiForMaps, hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64GbigintInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getUint64GbigintInt64GbigintMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64GbigintInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64GbigintInt64GbigintMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64GbigintInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64GbigintInt64GbigintMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64GbigintInt64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getUint64GbigintInt64GbigintMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n/**\n * Gets the value of a map field.\n * @return {!Map<!gbigint,!gbigint>}\n */\nexports.getUint64GbigintUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !HasMessageId= */ hasMessageId) {\n  return getPrimitiveMapField(\n      message, fieldNumber, uint64GbigintKeyToApiForMaps,\n      uint64GbigintToApiForMaps, hasMessageId);\n};\n\n/**\n * Sets a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.putUint64GbigintUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key, /** ? */ value,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getUint64GbigintUint64GbigintMapField(message, fieldNumber, hasMessageId)\n      .set(key, value);\n  return message;\n};\n\n/**\n * Sets all entries from the passed in map.\n * @return {T}\n * @template T\n */\nexports.putAllUint64GbigintUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?> */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  ensureMutable(message);\n  newMap.forEach(\n      mapSetter,\n      exports.getUint64GbigintUint64GbigintMapField(\n          message, fieldNumber, hasMessageId));\n  return message;\n};\n\n/**\n * Replaces entries with the passed in map.\n * @return {?}\n */\nexports.setUint64GbigintUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** !ReadonlyMap<?, ?>|undefined */ newMap,\n    /** !HasMessageId= */ hasMessageId) {\n  exports.clearMapField(message, fieldNumber, hasMessageId);\n  if (newMap) {\n    exports.putAllUint64GbigintUint64GbigintMapField(\n        message, fieldNumber, newMap, hasMessageId);\n  }\n  return message;\n};\n\n/**\n * Deletes a single entry of a map field.\n * @return {T}\n * @template T\n */\nexports.deleteUint64GbigintUint64GbigintMapField = function(\n    /** !InternalMessage */ message,\n    /** number */ fieldNumber, /** ? */ key,\n    /** !HasMessageId= */ hasMessageId) {\n  exports\n      .getUint64GbigintUint64GbigintMapField(message, fieldNumber, hasMessageId)\n      .delete(key);\n  return message;\n};\n\n// END AUTO-GENERATED\n// //////////////////////////////////////////////////////////\n","/**\n * @fileoverview Pivot selectors for message serialization.\n * @package\n *\n * DO NOT USE THIS OUTSIDE OF THIS PACKAGE.\n */\n\ngoog.module('jspb.internal_pivot_selectors');\n\nconst {InternalMessage, fieldNumberFromIndex} = goog.require('jspb.internal');\nconst {TestSerializationFormat, getRandomizeSerializationFormat} = goog.require('jspb.internal_options');\nconst {VALID_PIVOT_SELECTOR} = goog.require('jspb.internal_symbols');\nconst {fail} = goog.require('goog.asserts');\n\nconst /** ? */ VALID_PIVOT_SELECTOR_VALUE = {};\n\n/**\n * We flip this bit in a test variant to exercise the memory cost pivot\n * selector.\n * @define {boolean}\n */\nconst TEST_ONLY_USE_MEMORY_COST_PIVOT_SELECTOR_BY_DEFAULT = goog.define(\n    'jspb.TEST_ONLY_USE_MEMORY_COST_PIVOT_SELECTOR_BY_DEFAULT', false);\n\n/**\n * @typedef {function(number, number, !Array, (!Object|undefined),\n * ((function(new: InternalMessage))|undefined)): number}\n */\nlet InternalPivotSelector;\n\nconst MIN_PIVOT = 1;\nconst MAX_PIVOT = 1024;\n\nconst /** symbol */ RANDOMIZED_PIVOT_CHOICE = Symbol();\nlet /** boolean|undefined */ withoutWrapperRandomizedPivotChoice;\n\n/**\n * Selects the existing pivot.\n * @return {number}\n */\nfunction defaultPivotSelector(\n    /** number */ currentPivot, /** number */ arrayIndexOffset,\n    /** !Array */ array,\n    /** !Object|undefined */ sparseObject,\n    /** (function(new: InternalMessage))|undefined */ maybeCtor) {\n  // Break unsupported parsers.\n  if (goog.DEBUG && !COMPILED) {\n    const format = getRandomizeSerializationFormat();\n    if (format === TestSerializationFormat.ALWAYS_SPARSE) {\n      return 1;\n    }\n    if (format === TestSerializationFormat.RANDOMIZED &&\n        (maybeCtor ?\n             (/** @type {?} */ (maybeCtor)[RANDOMIZED_PIVOT_CHOICE] ??=\n                  Math.random() < 0.5) :\n             withoutWrapperRandomizedPivotChoice ??= Math.random() < 0.5)) {\n      return 1;\n    }\n  }\n  if (TEST_ONLY_USE_MEMORY_COST_PIVOT_SELECTOR_BY_DEFAULT) {\n    return memoryCostPivotSelector(\n        currentPivot, arrayIndexOffset, array, sparseObject, maybeCtor);\n  }\n  return noChangePivotSelector(\n      currentPivot, arrayIndexOffset, array, sparseObject, maybeCtor);\n}\n\ndefaultPivotSelector[VALID_PIVOT_SELECTOR] = VALID_PIVOT_SELECTOR_VALUE;\n\n/**\n * Selects the existing pivot.\n * @return {number}\n */\nfunction noChangePivotSelector(\n    /** number */ currentPivot, /** number */ arrayIndexOffset,\n    /** !Array */ array,\n    /** !Object|undefined */ sparseObject,\n    /** (function(new: InternalMessage))|undefined */ maybeCtor) {\n  return currentPivot;\n}\n\n/**\n * Select a pivot to minimize the in-memory cost of the wire format in V8.\n * @return {number}\n */\nfunction memoryCostPivotSelector(\n    /** number */ currentPivot, /** number */ arrayIndexOffset,\n    /** !Array */ array,\n    /** !Object|undefined */ sparseObject,\n    /** (function(new: InternalMessage))|undefined */ maybeCtor) {\n  return costPivotSelector(\n      currentPivot, arrayIndexOffset, array, sparseObject, arrayMemoryCost,\n      objectMemoryCost);\n}\n\nmemoryCostPivotSelector[VALID_PIVOT_SELECTOR] = VALID_PIVOT_SELECTOR_VALUE;\n\n/**\n * Select a pivot to minimize the uncompressed wire cost of JSPB serialization.\n * @return {number}\n */\nfunction wireCostPivotSelector(\n    /** number */ currentPivot, /** number */ arrayIndexOffset,\n    /** !Array */ array,\n    /** !Object|undefined */ sparseObject,\n    /** (function(new: InternalMessage))|undefined */ maybeCtor) {\n  return costPivotSelector(\n      currentPivot, arrayIndexOffset, array, sparseObject, arrayWireCost,\n      objectWireCost);\n}\n\nwireCostPivotSelector[VALID_PIVOT_SELECTOR] = VALID_PIVOT_SELECTOR_VALUE;\n\n/**\n * Selects a pivot of one.\n * @return {number}\n */\nfunction objectOnlyPivotSelector(\n    /** number */ currentPivot, /** number */ arrayIndexOffset,\n    /** !Array */ array,\n    /** !Object|undefined */ sparseObject,\n    /** (function(new: InternalMessage))|undefined */ maybeCtor) {\n  return MIN_PIVOT;\n}\n\nobjectOnlyPivotSelector[VALID_PIVOT_SELECTOR] = VALID_PIVOT_SELECTOR_VALUE;\n\n/** @typedef {number} */\nlet MaxFieldNumberInObject;\n\n/** @typedef {number} */\nlet NumFieldsInObject;\n\n/** @typedef {number} */\nlet TotalObjectKeyBytes;\n\n/** @typedef {number} */\nlet NumEntriesInArray;\n\n/** @typedef {number} */\nlet SetFieldsInArray;\n\n/** @typedef {function(!NumEntriesInArray, !SetFieldsInArray): number } */\nlet ArrayCostFn;\n\n/**\n * @typedef {function(!NumFieldsInObject, !MaxFieldNumberInObject,\n * !TotalObjectKeyBytes): number }\n */\nlet ObjectCostFn;\n\n/**\n * Select a pivot to minimize the cost of the wire format, according to the\n * given cost functions.\n * @return {number}\n */\nfunction costPivotSelector(\n    /** number */ originalPivot, /** number */ arrayIndexOffset,\n    /** !Array */ array,\n    /** !Object|undefined */ sparseObject,\n    /** !ArrayCostFn */ arrayCostFn,\n    /** !ObjectCostFn */ objectCostFn) {\n  // Fast-track empty arrays.\n  if (!array.length && !sparseObject) return MIN_PIVOT;\n\n  // Derive initial parameters for our cost function by walking the initial\n  // state of the array and sparse object.\n  let initialMaxFieldNumberInObject = 0;\n  let initialFieldsInObject = 0;\n  let initialSetFieldsInArray = 0;\n  let initialArrayLength = 0;\n  let initialTotalObjectKeyBytes = 0;\n  for (let i = array.length - 1; i >= 0; i--) {\n    const value = array[i];\n    if (sparseObject && i === array.length - 1 && (value === sparseObject)) {\n      continue;\n    }\n    initialArrayLength++;\n    if (value != null) initialSetFieldsInArray++;\n  }\n  if (sparseObject) {\n    for (const k in sparseObject) {\n      const n = +k;\n      if (isNaN(n)) continue;\n      initialTotalObjectKeyBytes += keyBytes(n);\n      initialFieldsInObject++;\n      if (n > initialMaxFieldNumberInObject) initialMaxFieldNumberInObject = n;\n    }\n  }\n\n  // Initialize our min-cost pivot selection with the initial cost.\n  let minCostPivot = originalPivot;\n  let minCost = arrayCostFn(initialArrayLength, initialSetFieldsInArray) +\n      objectCostFn(initialFieldsInObject, initialMaxFieldNumberInObject,\n                   initialTotalObjectKeyBytes);\n\n  // Our first case is a pivot lower than the current one. To select one, we\n  // iterate over the array and each time we see a value, we consider the pivot\n  // being (n+1).\n  let setFieldsInArray = initialSetFieldsInArray;\n  let fieldsInObject = initialFieldsInObject;\n  let maxFieldNumberInObject = initialMaxFieldNumberInObject;\n  let totalObjectKeyBytes = initialTotalObjectKeyBytes;\n  for (let i = array.length - 1; i >= 0; i--) {\n    // Skip nulls and the sparse object.\n    const value = array[i];\n    if (value == null ||\n        (sparseObject && i === array.length - 1 && (value === sparseObject))) {\n      continue;\n    }\n\n    // Consider the pivot being (n+1).\n    const n = fieldNumberFromIndex(i, arrayIndexOffset);\n    const lastFieldNumberInArray = n;\n    const cost = arrayCostFn(lastFieldNumberInArray, setFieldsInArray) +\n        objectCostFn(fieldsInObject, maxFieldNumberInObject,\n                     totalObjectKeyBytes);\n    if (cost < minCost) {\n      minCostPivot = 1 + n;\n      minCost = cost;\n    }\n\n    // On our next iteration, this field will be in the object; so we need to\n    // increase its count and max field number.\n    fieldsInObject++;\n    setFieldsInArray--;\n    totalObjectKeyBytes += keyBytes(n);\n    maxFieldNumberInObject = Math.max(maxFieldNumberInObject, n);\n  }\n\n  // Our second case is the pivot being one. We write this after iterating\n  // the array so that we know how many fields were written.\n  const zeroPivotCost = arrayCostFn(0, 0) +\n      objectCostFn(fieldsInObject, maxFieldNumberInObject, totalObjectKeyBytes);\n  if (zeroPivotCost < minCost) {\n    minCostPivot = 1;\n    minCost = zeroPivotCost;\n  }\n\n  // And our third case is the pivot being greater than the current one. This\n  // only makes sense if we have an object. Note that by spec, numeric keys in\n  // objects iterate in order, which is important for this logic.\n  if (sparseObject) {\n    fieldsInObject = initialFieldsInObject;\n    maxFieldNumberInObject = initialMaxFieldNumberInObject;\n    totalObjectKeyBytes = initialTotalObjectKeyBytes;\n    setFieldsInArray = initialSetFieldsInArray;\n    for (const k in sparseObject) {\n      const n = +k;\n      if (isNaN(n)) continue;\n      // We never put fields above 1023 in the array.\n      if (n >= MAX_PIVOT) continue;\n      fieldsInObject--;\n      setFieldsInArray++;\n      totalObjectKeyBytes -= k.length;\n      const cost = arrayCostFn(n, setFieldsInArray) +\n          objectCostFn(fieldsInObject, maxFieldNumberInObject,\n                       totalObjectKeyBytes);\n      if (cost < minCost) {\n        minCostPivot = 1 + n;\n        minCost = cost;\n      }\n    }\n  }\n\n  return minCostPivot;\n}\n\n// LINT.IfChange(PivotSelector)\n/** @return {number} */\nfunction objectWireCost(\n    /** !NumFieldsInObject */ numFields,\n    /** !MaxFieldNumberInObject */ maxFieldNumber,\n    /** !TotalObjectKeyBytes */ totalObjectKeyBytes) {\n  const numCommas = numFields > 1 ? numFields - 1 : 0;\n  return totalObjectKeyBytes + numFields * 3 + numCommas;\n}\n\n/** @return {number} */\nfunction arrayWireCost(\n    /** !NumEntriesInArray */ numEntriesInArray,\n    /** !SetFieldsInArray */ setFieldsInArray) {\n  const numCommas = numEntriesInArray > 1 ? numEntriesInArray - 1 : 0;\n  const numNulls = (numEntriesInArray - setFieldsInArray);\n  return numCommas + numNulls * 4;\n}\n\n/** @return {number} */\nfunction objectMemoryCost(\n    /** !NumFieldsInObject */ numFields,\n    /** !MaxFieldNumberInObject */ maxFieldNumber,\n    /** !TotalObjectKeyBytes */ totalObjectKeyBytes) {\n  if (numFields == 0) return 0;\n\n  // There are two basic representations that could be applied to the sparse\n  // object keys in V8, a NumberDictionary and a FixedArray.\n  //\n  // V8 chooses representations based on some heuristics, which are implemented\n  // below.\n  const preferFastElementsSizeFactor = 3;\n  const numberDictionaryEntrySize = 3;\n  const fieldCountWithBuffer = numFields + (numFields / 2);\n  const minimumNumberDictionaryCapacity = 4;\n  const sizeThreshold = preferFastElementsSizeFactor *\n      numberDictionaryEntrySize *\n      Math.max(\n          roundUpToPowerOfTwo(fieldCountWithBuffer),\n          minimumNumberDictionaryCapacity);\n  return sizeThreshold <= maxFieldNumber ?\n      numberDictionaryMemoryCost(numFields) :\n      arrayMemoryCost(\n          maxFieldNumber,\n          // This is wrong but the implementation ignores the parameter.\n          /* setFieldsInArray= */ maxFieldNumber);\n}\n\n/** @return {number} */\nfunction numberDictionaryMemoryCost(/** number */ numFields) {\n  // NumberDictionary sizes up every 2 fields up to field number 6. These\n  // numbers are written below and linearly interpolated across the flat\n  // regions. The interpolation prevents some pathological behavior where we\n  // always write a second value into the object when we can.\n  //\n  // Everything above 10 fields is an upper bound.\n  if (numFields == 0) {\n    return 0;\n  } else if (numFields < 4) {\n    return 100 + (numFields - 1) * 16;\n  } else if (numFields < 6) {\n    return 148 + (numFields - 4) * 16;\n  } else if (numFields < 12) {\n    return 244 + (numFields - 6) * 16;\n  } else if (numFields < 22) {\n    return 436 + (numFields - 12) * 19;\n  } else if (numFields < 44) {\n    return 820 + (numFields - 22) * 17;\n  }\n  // Anything else which we have not measured should use a linear upper-bound.\n  // In practice this is unlikely to happen.\n  return 52 + 32 * numFields;\n}\n\n/** @return {number} */\nfunction arrayMemoryCost(\n    /** !NumEntriesInArray */ maxFieldNumber,\n    /** !SetFieldsInArray */ setFieldsInArray) {\n  // Note that this is actually the cost of an object backed by a FixedArray.\n  //\n  // The delta, however, is a constant factor so it doesn't matter for our\n  // purposes.\n  return 40 + 4 * maxFieldNumber;\n}\n\n/** @return {number} */\nfunction roundUpToPowerOfTwo(/** number */ value) {\n  // There is no unsigned left shift in JS.\n  return 1 << (32 - Math.clz32(value - 1));\n}\n\n/** @return {number} */\nfunction keyBytes(/** number */ value) {\n  if (value >= 100) {\n    if (value >= 10000) {\n      return Math.ceil(Math.log10(1 + value));\n    }\n    return value < 1000 ? 3 : 4;\n  } else {\n    return value < 10 ? 1 : 2;\n  }\n}\n\n// LINT.ThenChange(//depot/google3/java/com/google/apps/jspb/Serializer.java:PivotSelector)\n\n/** @type {boolean} */\nlet checkPivotSelectorInstances = true;\n\nfunction setCheckPivotSelectorInstances(/** boolean */ value) {\n  checkPivotSelectorInstances = value;\n}\n\n/**\n * @return {!InternalPivotSelector}\n */\nfunction assertValidPivotSelector(/** !Object */ obj) {\n  if (obj == null || obj === noChangePivotSelector) {\n    return noChangePivotSelector;\n  }\n  if (checkPivotSelectorInstances &&\n      (obj[VALID_PIVOT_SELECTOR] !== VALID_PIVOT_SELECTOR_VALUE)) {\n    // Don't throw when we have a bad parameter because recaptcha's botguard\n    // obfuscations sometimes pass one.\n    //\n    // TODO(varomodt): figure out which pass is unsound.\n    fail('Invalid pivot selector');\n    return noChangePivotSelector;\n  }\n  return /** @type {!InternalPivotSelector} */ (obj);\n}\n\n/**\n * Used to gate tests which depend on the exact wire format. That should be\n * handled by wire conformance.\n *\n * @return {boolean}\n */\nfunction hasNonstandardPivotSelector() {\n  return TEST_ONLY_USE_MEMORY_COST_PIVOT_SELECTOR_BY_DEFAULT;\n}\n\nexports = {\n  InternalPivotSelector,\n  assertValidPivotSelector,\n  defaultPivotSelector,\n  memoryCostPivotSelector,\n  noChangePivotSelector,\n  objectOnlyPivotSelector,\n  wireCostPivotSelector,\n\n  // Exported for testing.\n  arrayMemoryCost,\n  arrayWireCost,\n  costPivotSelector,\n  hasNonstandardPivotSelector,\n  keyBytes,\n  objectMemoryCost,\n  objectWireCost,\n  roundUpToPowerOfTwo,\n  setCheckPivotSelectorInstances,\n};\n","/** @fileoverview Internal utilities for working with unknown fields. */\ngoog.module('jspb.internal_unknown_fields');\n\nconst asyncThrow = goog.require('goog.async.throwException');\nconst {ByteString} = goog.require('jspb.bytestring');\nconst {HAS_NATIVE_SYMBOL, LAZILY_PARSE_LATE_LOADED_EXTENSIONS_SYMBOL, UNKNOWN_BINARY_FIELDS_SYMBOL, UNKNOWN_BINARY_FIELD_IN_JSPB_SERIALIZE_THROTTLE_KEY, UNKNOWN_BINARY_THROTTLE_KEY, UNKNOWN_JSPB_FIELD_IN_BINARY_SERIALIZE_THROTTLE_KEY} = goog.require('jspb.internal_symbols');\nconst {InternalMessage, getInternalArray, hasOwnPropertyIfNotTrusted, isMessage} = goog.require('jspb.internal');\nconst {assert, assertArray} = goog.require('goog.asserts');\nconst {slice} = goog.require('jspb.internal_operations');\nconst {throttledAsyncThrowWarning} = goog.require('jspb.exceptions');\n\n\n/** @return {!UnknownFields|undefined} */\nfunction getUnknownFields(/** !Array */ messageArray) {\n  const unknownBinaryFields = goog.weakUsage(UNKNOWN_BINARY_FIELDS_SYMBOL);\n  return unknownBinaryFields ? assertArray(messageArray)[unknownBinaryFields] :\n                               undefined;\n}\n\n/** @typedef {function(!Array, number, !Array<!ByteString>)} */\nlet UnrevivedFieldCallbackFn;\n\n/**\n * @implements {IObject<number, !Array<!ByteString>>}\n */\nclass UnknownFields {\n  constructor() {\n    /**\n     * @type {(function(!Array, (number|undefined), ?,\n     *     !UnrevivedFieldCallbackFn=): void)|undefined}\n     */\n    this.reviveUnknownFields;\n  }\n\n  forEachUnknownField(\n      /** function(!UnknownFields, number, !Array<!ByteString>) */ fn) {\n    for (const k in /** @type {?} */ (this)) {\n      // the isNaN skips the reviveUnknownFields property.\n      if (!hasOwnPropertyIfNotTrusted(this, k) || isNaN(k)) continue;\n      fn(this, +k, assertArray(/** @type {?} */ (this)[k]));\n    }\n  }\n\n  /**\n   * Copies this unknown field set.\n   * @return {!UnknownFields}\n   */\n  cloneUnknownFields() {\n    const otherFields = new UnknownFields();\n    this.forEachUnknownField((fieldSet, fieldNumber, entries) => {\n      otherFields[fieldNumber] = slice(entries);\n    });\n    otherFields.reviveUnknownFields = this.reviveUnknownFields;\n    return otherFields;\n  }\n}\n\n\n/** Adds a single unknown field. */\nfunction addUnknownField(\n    /** !Array */ messageArray, /** number */ fieldNumber,\n    /** !ByteString|undefined */ unknownField) {\n  assertArray(messageArray);\n  if (!unknownField) return;\n  const fields = messageArray[UNKNOWN_BINARY_FIELDS_SYMBOL] ??=\n      new UnknownFields();\n  (fields[fieldNumber] ??= []).push(unknownField);\n}\n\n/** Clears all the unknown fields from the array. */\nfunction clearUnknownFields(/** !Array */ messageArray) {\n  assertArray(messageArray);\n  const unknownBinaryFields = goog.weakUsage(UNKNOWN_BINARY_FIELDS_SYMBOL);\n  if (unknownBinaryFields && unknownBinaryFields in messageArray) {\n    delete messageArray[unknownBinaryFields];\n  }\n}\n\n/** Clears all the unknown fields from the array. */\nfunction clearUnknownField(/** !InternalMessage */ msg,\n                           /** number */ fieldNumber) {\n  assert(isMessage(msg));\n  const messageArray = getInternalArray(msg);\n  assertArray(messageArray);\n  const unknownBinaryFields = goog.weakUsage(UNKNOWN_BINARY_FIELDS_SYMBOL);\n  if (unknownBinaryFields && unknownBinaryFields in messageArray) {\n    const fields = messageArray[unknownBinaryFields];\n    if (fields) delete fields[fieldNumber];\n  }\n}\n\n/**\n * Copy unknown fields from one message to another. Assumes that the other\n * message does not already have unknown fields.\n */\nfunction copyUnknownFields(/** !Array */ to, /** !Array */ from) {\n  if (!goog.weakUsage(UNKNOWN_BINARY_FIELDS_SYMBOL)) return;\n  assertArray(to);\n  assertArray(from);\n  assert(to[UNKNOWN_BINARY_FIELDS_SYMBOL] === undefined);\n  const sourceFields = getUnknownFields(from);\n  if (sourceFields && sourceFields instanceof UnknownFields) {\n    to[UNKNOWN_BINARY_FIELDS_SYMBOL] = sourceFields.cloneUnknownFields();\n  }\n}\n\nconst LAZY_REVIVAL_OPTIONS = {\n  reviveIntoImmutable: true\n};\n\nfunction maybeReviveUnknownField(\n    /** !InternalMessage */ msg,\n    /** number */ fieldNumber,\n    /** (typeof LAZILY_PARSE_LATE_LOADED_EXTENSIONS_SYMBOL)|undefined */\n    lazyParse,\n    /** boolean= */ orClear = false) {\n  if (\n      // We don't need to retain this block if the lazy parsing or unknown\n      // fields symbols are not referenced in this program.\n      goog.weakUsage(LAZILY_PARSE_LATE_LOADED_EXTENSIONS_SYMBOL) &&\n      goog.weakUsage(UNKNOWN_BINARY_FIELDS_SYMBOL) &&\n      // We only revive fields if their extendee sets the lazy pasing bit.\n      lazyParse === LAZILY_PARSE_LATE_LOADED_EXTENSIONS_SYMBOL) {\n    const messageArray = getInternalArray(msg);\n    const unknownBinaryFields = messageArray[UNKNOWN_BINARY_FIELDS_SYMBOL];\n    if (!unknownBinaryFields) return;\n\n    // If we have a reviver function and we have not previously failed to revive\n    // this field, attempt to revive it.\n    const revive = unknownBinaryFields.reviveUnknownFields;\n    if (revive) {\n      try {\n        revive(messageArray, fieldNumber, LAZY_REVIVAL_OPTIONS);\n        return;\n      } catch (e) {\n        // In debug we throw the error to help with debugging but in production\n        // we simply continue with the field unset and set a bit to avoid\n        // attempting to parse again.\n        if (goog.DEBUG) {\n          throw new Error(`unknown binary extension ${fieldNumber}`);\n        }\n        asyncThrow(e);\n      }\n    }\n  }\n  if (orClear) clearUnknownField(msg, fieldNumber);\n}\n\nlet /** boolean|undefined */ shouldIgnoreUnknownFieldAccess;\n\n/**\n * @template T\n * @return {T}\n */\nfunction withoutReportingUnknownExtensionAccess(/** function(): T */ fn) {\n  try {\n    shouldIgnoreUnknownFieldAccess = true;\n    return fn();\n  } finally {\n    shouldIgnoreUnknownFieldAccess = undefined;\n  }\n}\n\nlet /** boolean|undefined */ shouldIgnoreDroppedUnknownAny;\n\n/**\n * @template T\n * @return {T}\n */\nfunction withoutReportingDroppedUnknownAny(/** function(): T */ fn) {\n  try {\n    shouldIgnoreDroppedUnknownAny = true;\n    return fn();\n  } finally {\n    shouldIgnoreDroppedUnknownAny = undefined;\n  }\n}\n\n/**\n * This method should be called on any extension field access to detect\n * dropped unknown binary extensions.\n */\nfunction recordUnknownFieldAccessOnArray(/** !Array */ messageArray,\n                                         /** number */ fieldNumber) {\n  assertArray(messageArray);\n  const unknownBinaryFieldsSymbol =\n      goog.weakUsage(UNKNOWN_BINARY_FIELDS_SYMBOL);\n  if (HAS_NATIVE_SYMBOL && !shouldIgnoreUnknownFieldAccess &&\n      unknownBinaryFieldsSymbol &&\n      messageArray[unknownBinaryFieldsSymbol]?.[fieldNumber] != null) {\n    // If you see a failure due to this log line, you are losing data because\n    // a binary field was unknown at parse time. This could be either an\n    // unknown field (e.g. a field that was added after this client was built)\n    // or possibly an extension which is unknown to this binary.\n    //\n    // In the case of an extension, see go/jspb-proto2-extensions for\n    // information on how to ensure it is loaded before the parse occurs.\n    //\n    // See go/jspb-unknown-fields for more context.\n    throttledAsyncThrowWarning(\n        undefined, UNKNOWN_BINARY_THROTTLE_KEY, 3, `0ub:${fieldNumber}`);\n  }\n}\n\n/**\n * Reports via async warning that a field was accessed when unknown binary data\n * was present for that field number.\n */\nfunction recordUnknownFieldAccess(/** !InternalMessage */ msg,\n                                  /** number */ fieldNumber) {\n  assert(isMessage(msg));\n  recordUnknownFieldAccessOnArray(getInternalArray(msg), fieldNumber);\n}\n\n/**\n * Reports via async warning that a field was dropped during binary\n * serialization.\n */\nfunction recordUnknownFieldDroppedInSerializeBinary(/** !Array */ messageArray,\n                                                    /** number */ fieldNumber) {\n  assertArray(messageArray);\n\n  // Drop out for low field numbers as they are not likely to be extensions\n  // so a warning would not be actionable.\n  if (fieldNumber < 500) return;\n\n  // If you see a failure due to this log line, you are losing data because\n  // a JSPB field was unknown at serialization time. This could be either an\n  // unknown field (e.g. a field that was added after this client was built)\n  // or possibly an extension which is unknown to this binary.\n  //\n  // In the case of an extension, see go/jspb-proto2-extensions for\n  // information on how to ensure it is loaded before the serialization\n  // occurs.\n  throttledAsyncThrowWarning(\n      undefined, UNKNOWN_JSPB_FIELD_IN_BINARY_SERIALIZE_THROTTLE_KEY, 3,\n      `0ubsb:${fieldNumber}`);\n}\n\n\n/**\n * Reports via async warning that an Any value was dropped during binary\n * serialization.\n */\nfunction recordJspbAnyDroppedInSerializeBinary(\n    /** !Array|!InternalMessage */ value) {\n  if (!shouldIgnoreDroppedUnknownAny) {\n    // If you see a failure due to this log line, you are losing data from an\n    // Any proto during binary serialization, see go/jspb-api-gotchas#any.\n    //\n    // We recommend passing the `serializeBinaryFn` parameter to `Any.packJspb`\n    // if the Any was packed client-side.\n    throttledAsyncThrowWarning(\n        undefined, UNKNOWN_JSPB_FIELD_IN_BINARY_SERIALIZE_THROTTLE_KEY, 3,\n        '0ubsb');\n  }\n}\n\n/**\n * Reports via async warning that a field was dropped during JSPB\n * serialization.\n */\nfunction recordUnknownFieldDroppedInSerialize(\n    /** !UnknownFields */ unknownFields,\n    /** number */ fieldNumber,\n    /** !Array<!ByteString> */ entries) {\n  // Drop out for low field numbers as they are not likely to be extensions\n  // so a warning would not be actionable.\n  if (fieldNumber < 100) return;\n\n  // If you see a failure due to this log line, you are losing data because\n  // a binary field was unknown at parse time. This could be either an\n  // unknown field (e.g. a field that was added after this client was built)\n  // or possibly an extension which is unknown to this binary.\n  //\n  // In the case of an extension, see go/jspb-proto2-extensions for\n  // information on how to ensure it is loaded before the parse occurs.\n  //\n  // See go/jspb-unknown-fields for more context.\n  throttledAsyncThrowWarning(\n      undefined, UNKNOWN_BINARY_FIELD_IN_JSPB_SERIALIZE_THROTTLE_KEY, 1,\n      `0ubs:${fieldNumber}`);\n}\n\nexports = {\n  UnknownFields,\n  addUnknownField,\n  clearUnknownField,\n  clearUnknownFields,\n  copyUnknownFields,\n  getUnknownFields,\n  maybeReviveUnknownField,\n  recordJspbAnyDroppedInSerializeBinary,\n  recordUnknownFieldAccess,\n  recordUnknownFieldDroppedInSerializeBinary,\n  recordUnknownFieldDroppedInSerialize,\n  withoutReportingDroppedUnknownAny,\n  withoutReportingUnknownExtensionAccess,\n};\n","/**\n * @fileoverview The implementation of the main jspb copying routines.\n * clone and toJsonValue.\n *\n * DO NOT USE THIS OUTSIDE OF THIS PACKAGE.\n */\ngoog.module('jspb.internal_copy');\n\nconst {ArrayStateFlags, DEFAULT_ARRAY_STATE, getArrayIndexOffset, getArrayState, getMessageArrayState} = goog.require('jspb.internal_array_state');\nconst {ByteString} = goog.require('jspb.bytestring');\nconst {DEFAULT_PIVOT_SELECTOR, PivotSelector} = goog.require('jspb.dynamic_pivot_selection');\nconst {ENABLE_ASSERTS, assert, assertArray, assertExists} = goog.require('goog.asserts');\nconst {HAS_NATIVE_SYMBOL, UNKNOWN_BINARY_FIELDS_SYMBOL} = goog.require('jspb.internal_symbols');\nconst {InternalMessage, assertArrayInvariants, fieldNumberFromIndex, getInternalArray, hasOwnPropertyIfNotTrusted, indexFromFieldNumber, isInternalMessage, isSparseObject} = goog.require('jspb.internal');\nconst {InternalPivotSelector, assertValidPivotSelector, noChangePivotSelector} = goog.require('jspb.internal_pivot_selectors');\nconst {JspbMap} = goog.require('jspb.internal_map');\nconst {SUPPORTS_STRUCTURED_CLONE} = goog.require('jspb.internal_bytes');\nconst {copyUnknownFields, recordUnknownFieldDroppedInSerialize} = goog.require('jspb.internal_unknown_fields');\nconst {isSafeInt52} = goog.require('google3.javascript.common.bigint.index');\nconst {logNewArray} = goog.require('jspb.internal_operations');\n\n\nconst NO_PIVOT = -1 >>> 0;  // 2^32-1\n\n/**\n * Helper for cloning an internal JsPb object.\n * @param {!Array<?>} array A JsPb object, eg, a field, to be cloned.\n * @param {number} arrayState The state of the array.\n * @param {(function(*, boolean): *)} convertLeaf a function to map onto\n *     all primitive values in this object.\n * @param {boolean=} isOwned Whether array is known not to be exposed to users.\n *     When this is provided, it's taken to imply we're in a clone operation.\n * @param {function(new: InternalMessage)=} maybeCtorInDebug The constructor\n *     of the message, if available, in debug mode.\n * @return {!Array<?>} A clone of the input object.\n */\nfunction cloneJspbArray(\n    array, arrayState, convertLeaf, isOwned, maybeCtorInDebug) {\n  const inClone = isOwned !== undefined;\n  isOwned = !!isOwned;\n\n  // Complain when we drop unknown fields.\n  const unknownBinaryFieldsSymbol =\n      goog.weakUsage(UNKNOWN_BINARY_FIELDS_SYMBOL);\n  let unknownBinaryFields;\n  if (!inClone && HAS_NATIVE_SYMBOL && unknownBinaryFieldsSymbol &&\n      (unknownBinaryFields = array[unknownBinaryFieldsSymbol])) {\n    unknownBinaryFields.forEachUnknownField(\n        recordUnknownFieldDroppedInSerialize);\n  }\n\n  // The array we are copying into.\n  const clonedArray = logNewArray([]);\n  let length = array.length;\n  let sparseObject;\n  // The array index at which to start writing values to a sparse object when\n  // iterating over the array.\n  let pivotIndex = NO_PIVOT;\n  let movableSparseObject = false;\n\n  // Compute an array index offset, which is defined if we are constructed.\n  const isConstructed = !!(arrayState & ArrayStateFlags.CONSTRUCTED);\n  const arrayIndexOffset =\n      isConstructed ? getArrayIndexOffset(arrayState) : undefined;\n\n  // There are 3 interesting cases\n  // 1. We have a constructed message array and are performing a clone\n  //    operation.\n  // 2. We have a constructed message array and are not performing a clone\n  //    operation.\n  // 3. We have an array that is either not a message or is not constructed.\n  //\n  // For case 1, we can trust the pivot and sparse object bits. But we don't\n  // want to shift anything around.  In theory we could move the sparse object\n  // if it made sense but in the interest of backwards compatibility we do not,\n  // plus APIs like `toImmutable` do not accept a pivot selector.\n  //\n  // For case 2, we perform pivot selection and move the sparse object as\n  // needed.\n  //\n  // For case 3, we cannot trust either the pivot or sparse object bits,\n  // and thus do not move anything.\n\n\n  // Locate a sparse object and derive the pivot if the array is not repeated.\n  if (!(arrayState & ArrayStateFlags.IS_REPEATED_FIELD)) {\n    sparseObject = length && array[length - 1];\n    if (isSparseObject(sparseObject)) {\n      length--;\n      pivotIndex = length;\n    } else {\n      sparseObject = undefined;\n      // Here we could read the pivot from the array state for constructed\n      // messages, but there is no need to do so as we know it is beyond any\n      // field index.\n    }\n\n    // We may be moving the pivot if we have a pivot selector, do not have a\n    // message ID and are not cloning. We could move the pivot on clones\n    // but there is no need to and doing so may incur some extra allocations.\n    if (isConstructed && !(arrayState & ArrayStateFlags.HAS_MESSAGE_ID) &&\n        !inClone) {\n      movableSparseObject = true;\n      const pivotSelector = /** @type {!InternalPivotSelector} */ (\n          /** @type {?} */ (currentPivotSelector ?? DEFAULT_PIVOT_SELECTOR));\n      pivotIndex = indexFromFieldNumber(\n          pivotSelector(\n              fieldNumberFromIndex(pivotIndex, assertExists(arrayIndexOffset)),\n              assertExists(arrayIndexOffset), array, sparseObject,\n              maybeCtorInDebug),\n          assertExists(arrayIndexOffset));\n    }\n  }\n\n  // Copy fields from the array into the cloned array or sparse object.\n  let newSparseObject = undefined;\n  for (let i = 0; i < length; i++) {\n    let item = array[i];\n    // This implicitly turns null into undefined which is a legacy behavior we\n    // need to maintain for _legacyNullable callers.\n    if (item == null || (item = convertLeaf(item, isOwned)) == null) {\n      continue;\n    }\n    if (isConstructed && i >= pivotIndex) {\n      // This should not be possible unless there is a pivot selector.\n      assertNontrivialPivotSelector();\n      const n = fieldNumberFromIndex(i, assertExists(arrayIndexOffset));\n      (newSparseObject ??= {})[n] = item;\n    } else {\n      clonedArray[i] = item;\n    }\n  }\n\n  // Copy fields from any existing sparse object into the array or object.\n  if (sparseObject) {\n    for (let key in sparseObject) {\n      if (!hasOwnPropertyIfNotTrusted(sparseObject, key)) {\n        continue;\n      }\n      let item = sparseObject[key];\n      // This implicitly turns null into undefined which is a legacy behavior we\n      // need to maintain for _legacyNullable callers.\n      if (item == null || (item = convertLeaf(item, isOwned)) == null) {\n        continue;\n      }\n      const n = +key;\n      let i;\n      if (isConstructed && !Number.isNaN(n) &&\n          (i = indexFromFieldNumber(n, assertExists(arrayIndexOffset))) <\n              pivotIndex) {\n        // This should not be possible unless there is a pivot selector.\n        assertNontrivialPivotSelector();\n        clonedArray[assertExists(i)] = item;\n      } else {\n        (newSparseObject ??= {})[key] = item;\n      }\n    }\n  }\n\n  // If we have a sparse object, we need to add it to the end of the array.\n  // In a cloneImmutable operation we maintain pivots but otherwise we can\n  // just place the sparse object at the end of the array.\n  if (newSparseObject) {\n    if (movableSparseObject) {\n      clonedArray.push(newSparseObject);\n    } else {\n      assert(pivotIndex < NO_PIVOT);\n      clonedArray[pivotIndex] = newSparseObject;\n    }\n  }\n\n  // If in a clone operation, attempt to copy unknown binary fields. By doing\n  // this at the end we assure that the array accesses in the above loop are\n  // monomorphic.\n  if (inClone) {\n    copyUnknownFields(clonedArray, array);\n  }\n  return clonedArray;\n}\n\n\n/** @return {!Array<?>} */\nfunction convertMapEntryToJsonFormat(/** !Array<?> */ entry) {\n  entry[0] = convertToJsonFormat(entry[0]);\n  entry[1] = convertToJsonFormat(entry[1]);\n  return entry;\n}\n\n/**\n * @param {?} v the value to copy if it's a Uint8Array.\n * @return {?}\n * @suppress {visibility} access to map internals\n */\nfunction convertToJsonFormat(v) {\n  assertExists(v);  // callers should have handled this.\n  switch (typeof v) {\n    case 'number':\n      return Number.isFinite(v) ? v : '' + v;\n    case 'bigint':\n      return /** @type{!Function}*/ (isSafeInt52)(v) ? Number(v) : '' + v;\n    case 'boolean':\n      // Coerce to 0 or 1\n      return v ? 1 : 0;\n    case 'object':\n      if (Array.isArray(v)) {\n        assertArrayInvariants(v);\n        const state = getArrayState(v);\n        // If this is an empty repeated field, don't copy it in any mode.\n        if (v.length === 0 && (state & ArrayStateFlags.IS_REPEATED_FIELD)) {\n          return undefined;\n        }\n        return cloneJspbArray(v, state, convertToJsonFormat);\n      }\n      if (isInternalMessage(v)) {\n        return toJsonValueInternal(/** @type {!InternalMessage} */ (v));\n      }\n      // TODO(b/205306125): We use instanceof below to support dead code\n      // elimination even though constructor comparisons would be preferable\n      // performance wise.\n      if (v instanceof ByteString) {\n        return v.asBase64();\n      }\n      if (v instanceof JspbMap) {\n        return v.toArrayOrUndefinedInternal(convertMapEntryToJsonFormat);\n      }\n      // TODO(b/396420284): remove.\n      assert(!(v instanceof Uint8Array));\n      // Arrays and sparse objects were handled by our caller, so this is really\n      // just an invalid value. Drop it.\n      return undefined;\n  }\n  return v;\n}\n\n/**\n * Returns a deep copy of the given object, converting inner fields to\n * JSON-compatible types.\n *\n * @param {!Array<?>} el element to clone.\n * @return {!Array<?>} A copy of this element\n */\nfunction cloneToJsonFormat(el) {\n  assertArray(el);\n  return cloneJspbArray(\n      el,\n      // We don't need to pass the array state here because we either don't\n      // expect any existing state from the source (e.g. cloneRaw) or we are not\n      // producing an array for a clone so the caller doesn't need it.\n      DEFAULT_ARRAY_STATE,\n      /* convertLeaf = */ convertToJsonFormat);\n}\n\n/**\n * Helper for cloning an external array.\n *\n * @const {function(!Array<?>): !Array<?>}\n */\nconst cloneRaw = SUPPORTS_STRUCTURED_CLONE ?\n    /** @type {function(!Array<?>): !Array<?>} */ (\n        /** @type{?}*/ (structuredClone)) :\n    /** @return {!Array<?>} */\n    (/** !Array<?> */ arr) => cloneToJsonFormat(arr);\n\n/**\n * Our current pivot selector.\n *\n * Stashed in a global and managed by `toRaw`.  This is simpler than\n * threading it through the recursive methods and it also makes it\n * easier for the compiler to trim it and related conditions when\n * the application isn't using pivot selectors.\n *\n * @private {!InternalPivotSelector|undefined}\n */\nlet currentPivotSelector;\n\n/**\n * @param {!InternalMessage} message\n * @param {!PivotSelector=} pivotSelector\n * @return {!Array<?>}\n */\nfunction toJsonValue(message, pivotSelector) {\n  assert(!currentPivotSelector);\n  if (pivotSelector) {\n    currentPivotSelector = assertValidPivotSelector(pivotSelector);\n    try {\n      return toJsonValueInternal(message);\n    } finally {\n      currentPivotSelector = undefined;\n    }\n  }\n  return toJsonValueInternal(message);\n}\n\n/**\n * Internal implementation of `toJSON` that can be devirtualized\n *\n * Generally, `serialize()` should be called instead, but this may be useful\n * when a JSON stringifiable value is required for compatibility with other\n * APIs.\n *\n * @param {!InternalMessage} message\n * @return {!Array<?>} The proto represented as an array.\n */\nfunction toJsonValueInternal(message) {\n  const internalArr = getInternalArray(message);\n  return cloneJspbArray(\n      internalArr, getMessageArrayState(internalArr),\n      /* convertLeaf = */ convertToJsonFormat,\n      /* isOwned= */ undefined,\n      /* ctor= */ goog.DEBUG ?\n          /** @type {function(new: InternalMessage)} */ (message.constructor) :\n          undefined);\n}\n\n/**\n * Check for branches that can only be reached if a pivot selector other than\n * noChangePivotSelector is in use.\n */\nfunction assertNontrivialPivotSelector() {\n  if (!ENABLE_ASSERTS) return;\n  const pivotSelector = currentPivotSelector ?? DEFAULT_PIVOT_SELECTOR;\n  assert(pivotSelector !== noChangePivotSelector);\n}\n\nexports = {\n  // A low level array copying routine for unconstructed arrays.\n  cloneRaw,\n  // A primitive copy routine exposed for clone/toMutable/toImmutable\n  cloneJspbArray,\n  // Also used by dump.\n  cloneToJsonFormat,\n  // The internal implementation of `toJsonValue` that can be devirtualized.\n  toJsonValue,\n};\n","/**\n * @fileoverview Utilities for enabling dynamic pivot selection.\n *\n * This file provides helpers for selecting a \"pivot\" for JSPB serializations.\n * In the go/jspb-wireformat, you can select which values are serialized into\n * the 'dense array' or 'sparse object' according to where the 'pivot' index\n * is (representing the first field number which would be represented in the\n * sparse object). For example, see the following serializations:\n *\n * - [1,null,2,3]\n *   + Here, the pivot is effectively `4`, or any greater number.\n * - [1,{\"2\":\"hi\"}]\n *   + Here, the pivot is `2`.\n * - [{\"1\":\"hi\"}]\n *   + Here, the pivot is `1` or `0`.\n *\n * This file provides two different strategies for selecting a pivot:\n *\n * - `MEMORY_COST_PIVOT_SELECTOR`: This strategy selects the pivot which\n *   minimizes the total memory cost of the serialization as a JS object, in V8.\n *   This will eventually be the default for server-side pivot selection.\n *\n * - `WIRE_COST_PIVOT_SELECTOR`: This strategy selects the pivot which\n *   minimizes the uncompressed wire length of the serialization. This may\n *   be useful when application performance is sensitive to serialization size\n *   (e.g. if you have a lot of serializations attached to the DOM), or in some\n *   special cases (such as huge oneofs).\n *\n * The default is to \"do nothing\", wherein we use the default pivot, which is\n * 500. In practice, this is actually quite close to the result of the\n * `MEMORY_COST_PIVOT_SELECTOR` and is preferable for most applications since it\n * avoids object copies.\n *\n * **NOTE**: These pivot selectors will be ignored on messages with a\n * `message_id` so as not to break the semantics of `equals`. Message IDs\n * **cannot be removed**: see go/jspb-options#message_id.\n */\n\ngoog.module('jspb.dynamic_pivot_selection');\n\nconst internalPivotSelectors = goog.require('jspb.internal_pivot_selectors');\n\n/**\n * This is an opaque type which represents a pivot selection strategy.\n *\n * See the file overview on dynamic_pivot_selection.js for more information.\n *\n * You cannot construct these directly, use the constants below.\n *\n * @abstract\n */\nclass PivotSelector {\n  constructor() {\n    throw (\n        goog.DEBUG ? new Error('Do not construct these yourself.') :\n                     new Error());\n  }\n}\n\n/**\n * A pivot selector which minimizes the memory cost of the serialization in V8.\n *\n * @const {!PivotSelector}\n */\nconst MEMORY_COST_PIVOT_SELECTOR =\n    /** @type {!PivotSelector} */ (\n        /** @type {?} */ (internalPivotSelectors.memoryCostPivotSelector));\n\n/**\n * A pivot selector which minimizes the uncompressed wire size of the\n * serialization.\n *\n * @const {!PivotSelector}\n */\nconst WIRE_COST_PIVOT_SELECTOR =\n    /** @type {!PivotSelector} */ (\n        /** @type {?} */ (internalPivotSelectors.wireCostPivotSelector));\n\n/**\n * A pivot selector which never moves the pivot, even in tests.\n *\n * @const {!PivotSelector}\n * @deprecated there is no good reason to use this. If you are asserting on\n *   proto content, see go/jspb-testing. If you are trying to use a proto as\n *   a key, consider a solution involving hash_code_reexport.js and\n *   Message.equals.\n */\nconst DETERMINISTIC_PIVOT_SELECTOR =\n    /** @type {!PivotSelector} */ (\n        /** @type {?} */ (internalPivotSelectors.noChangePivotSelector));\n\n/**\n * This returns the default pivot selector.\n *\n * @const {!PivotSelector}\n */\nconst DEFAULT_PIVOT_SELECTOR = /** @type {!PivotSelector} */ (\n    /** @type {?} */ (\n        goog.DEBUG ? internalPivotSelectors.defaultPivotSelector :\n                     internalPivotSelectors.noChangePivotSelector));\n\nexports = {\n  DETERMINISTIC_PIVOT_SELECTOR,\n  MEMORY_COST_PIVOT_SELECTOR,\n  PivotSelector,\n  WIRE_COST_PIVOT_SELECTOR,\n  DEFAULT_PIVOT_SELECTOR,\n};\n","/**\n * @fileoverview Internal message construction utils.\n *\n * DO NOT USE THIS OUTSIDE OF THIS PACKAGE.\n */\n\ngoog.module('jspb.internal_construct');\n\nconst {ALREADY_CONSTRUCTED_THROTTLE_KEY} = goog.require('jspb.internal_symbols');\nconst {ArrayState, ArrayStateFlags, PIVOT_LIMIT, checkMessageStateInvariants, getArrayIndexOffset, getArrayState, hasFlagBit, setArrayState, setPivot} = goog.require('jspb.internal_array_state');\nconst {ENABLE_ASSERTS, assert, assertArray} = goog.require('goog.asserts');\nconst {assertArrayInvariants, fieldNumberFromIndex, hasOwnPropertyIfNotTrusted, indexFromFieldNumber, isSparseObject} = goog.require('jspb.internal');\nconst {logNewArray} = goog.require('jspb.internal_operations');\nconst {shouldThrowInArrayConstructorIfArrayIsAlreadyConstructed, shouldTransferArrayInConstructor} = goog.require('jspb.internal_options');\nconst {throttledAsyncThrowWarning} = goog.require('jspb.exceptions');\nconst {transferArray} = goog.require('jspb.internal.transfer_array');\n\n\nconst ENCODED_MAP_META = /** @type {*} */ (/** @type {?} */ (true));\n\n/** @abstract */\nclass Opaque {}\n\n/**\n * A MessageMeta is an array describing the type information necessary to\n * construct a message.\n *\n * These arrays may have either two or three elements, which are:\n *\n * [\n *    suggested pivot (number, usually zero),\n *    message_id (string, usually undefined),\n *    is_map (boolean, true iff present)\n * ]\n *\n * Because we cannot express such a tuple in JS types, we expose only as an\n * opaque type and localize manipulations to this file.\n *\n * @typedef {typeof Opaque}\n */\nlet MessageMeta;\n\nlet /** !MessageMeta|undefined */ mapEntryMessageMeta;\n\nlet /** !MessageMeta|undefined */ noPivotNoMessageIdMessageMeta;\n\n/**\n * Parses the value from the beginning of binaryFieldsObject into a MessageMeta\n * value, returns `undefined` if not a valid raw message meta.\n *\n * See `GenerateClassBinaryFields` in\n * net/proto2/compiler/js/internal/generator.cc\n *\n * @return {!MessageMeta|undefined}\n */\nfunction tryParseMessageMeta(/** ? */ value) {\n  switch (typeof value) {\n    case 'boolean':\n      // All map entry message metadatas are [0, undefined, true] so we\n      // shouldn't bother making more than one array.\n      return (mapEntryMessageMeta ||= createMapEntryMessageMeta());\n    case 'number':\n      // Take its negation, bare pivots are encoded as non-positive numbers to\n      // avoid ambiguity with oneof field arrays which are always >=1\n      return value > 0 ?\n          undefined :\n          // 0 is incredibly common so cache the MessageMeta for it\n          // This also avoids the awkward `-0` values we would otherwise get.\n          value === 0 ?\n          (noPivotNoMessageIdMessageMeta ||= createMessageMeta(0)) :\n          createMessageMeta(-value);\n    case 'string':\n      // This is just a message_id\n      return createMessageMeta(0, value);\n    case 'object':\n      // This is a message meta, check that it is valid and cast.\n      assertArray(value);\n      assert(value.length === 2 || (value.length === 3 && value[2] === true));\n      assert(\n          value[0] == null || (typeof value[0] === 'number' && value[0] >= 0));\n      assert(value[1] == null || typeof value[1] === 'string');\n      return /** @type{!MessageMeta}*/ (/** @type{?} */ (value));\n    default:\n      return undefined;\n  }\n}\n\n/**\n * Creates a `MessageMeta` for map entry fields.\n *\n * @return {!MessageMeta}\n */\nfunction createMapEntryMessageMeta() {\n  return /** @type {!MessageMeta} */ (/** @type {?} */ ([0, undefined, true]));\n}\n\n/**\n * @return {!MessageMeta}\n */\nfunction createMessageMeta(\n    /** number|undefined */ suggestedPivot,\n    /** string|undefined= */ messageId) {\n  return /** @type{!MessageMeta}*/ (\n      /** @type{?} */ ([suggestedPivot, messageId]));\n}\n\n/** @return {!Array<?>} */\nfunction constructMessageArrayFromMetaForBinary(\n    /** ?Array<?>|undefined */ data, /** !MessageMeta */ metadata) {\n  assertArray(metadata);\n  const metaAsArray = /** @type{!Array<?>} */ (/** @type{?} */ (metadata));\n  const suggestedPivot = metaAsArray[0];\n  const messageId = metaAsArray[1];\n  return constructMessageArray(data, suggestedPivot, messageId);\n}\n\n/** @return {!Array<?>} */\nfunction constructMessageArrayForJsonConversion(\n    /** ?Array<?>|undefined */ data, /** string|undefined= */ messageId) {\n  return constructMessageArray(data, /*suggestedPivot=*/ 500, messageId);\n}\n\n/** @return {boolean} */\nfunction metaHasMessageId(/** !MessageMeta */ metadata) {\n  assertArray(metadata);\n  const metaAsArray = /** @type{!Array<?>} */ (/** @type{?} */ (metadata));\n  return !!(metaAsArray[1]);\n}\n\n/**\n * Computes an array index offset given a MessageMeta.\n *\n * @return {number}\n */\nfunction arrayIndexOffsetForMeta(/** !MessageMeta */ metadata) {\n  return metaHasMessageId(metadata) ? 0 : -1;\n}\n\n/** @return {!Array<?>} */\nfunction constructMessageArrayForMessageConstructor(\n    /** ?Array<?>|undefined */ data, /** number|undefined=*/ suggestedPivot,\n    /** string|undefined= */ messageId) {\n  return constructMessageArray(\n      data, suggestedPivot, messageId, ArrayStateFlags.HAS_WRAPPER);\n}\n\n/** @return {!Array<?>} @noinline */\nfunction constructMessageArray(\n    /** ?Array<?>|undefined */ data, /** number|undefined=*/ suggestedPivot,\n    /** string|undefined= */ messageId,\n    /** !ArrayState= */ arrayStateToAdd = 0) {\n  // In tests, assert that immutable api formatted values are always\n  // frozen. This allows us to surface state management problems early, before\n  // assertArrayReturnedSafely and friends would fail.\n  if (goog.DEBUG && ENABLE_ASSERTS && (data != null)) {\n    for (let i = 0; i < data.length; i++) {\n      const value = data[i];\n      if (Array.isArray(value)) {\n        assertArrayInvariants(value);\n      }\n    }\n  }\n\n  // Check array state invariants.\n  let arrayState;\n  if (data == null) {\n    // The only reference to this array is this message so we know there are\n    // no external mutable references.\n    arrayState = ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED;\n    if (messageId) {\n      data = logNewArray([messageId]);\n      arrayState |= ArrayStateFlags.HAS_MESSAGE_ID;\n    } else {\n      data = logNewArray([]);\n    }\n    if (suggestedPivot) {\n      arrayState = setPivot(arrayState, suggestedPivot);\n    }\n  } else {\n    if (!Array.isArray(data)) {\n      if (goog.DEBUG) {\n        throw new Error(\n            `data passed to JSPB constructors must be an Array, got '${\n                JSON.stringify(data)}' a ${goog.typeOf(data)}`);\n      } else {\n        throw new Error('narr');\n      }\n    }\n\n    arrayState = getArrayState(data);\n\n    // Throw an error if the array is already owned by another jspb proto\n    // instance.\n    // Repeated field arrays should never be passed to constructors.\n    if (shouldThrowInArrayConstructorIfArrayIsAlreadyConstructed() &&\n        hasFlagBit(arrayState, ArrayStateFlags.IS_REPEATED_FIELD)) {\n      if (goog.DEBUG) {\n        throw new Error(\n            'Array passed to JSPB constructor is a repeated field array that belongs to another proto instance.');\n      } else {\n        throw new Error('rfarr');\n      }\n    }\n\n    // Mutable arrays that have already been marked as constructed belong to\n    // another proto instance, so they cannot be safely used to construct\n    // another message.\n    if (isPossiblyMutablyShared(arrayState)) {\n      maybeThrowAlreadyConstructedError();\n    }\n\n    if (goog.DEBUG) {\n      // Only perform these mutability tests in debug, this is almost entirely\n      // a testonly issue.\n      if (Object.isFrozen(data) || !Object.isExtensible(data) ||\n          Object.isSealed(data)) {\n        throw new Error(`data passed to JSPB constructors must be mutable`);\n      }\n    }\n\n    // If `shouldTransferArrayInConstructor` is enabled, and the array is not\n    // owned by us, then transfer it in debug environments to prevent external\n    // mutations by users.\n    if (shouldTransferArrayInConstructor() &&\n        hasFlagBit(arrayStateToAdd, ArrayStateFlags.HAS_WRAPPER) &&\n        !hasFlagBit(arrayState, ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED) &&\n        !hasFlagBit(arrayState, ArrayStateFlags.IS_IMMUTABLE_ARRAY)) {\n      // Transfer array in debug environments to prevent external mutations by\n      // users.\n      data = transferArray(/** @type{!Array<?>} */ (data));\n    }\n\n    if (arrayState & ArrayStateFlags.FROZEN_ARRAY) {\n      // In DEBUG we would've thrown above.\n      throw new Error('farr');\n    }\n\n    // Fast-path for constructed messages.\n    if (arrayState & ArrayStateFlags.CONSTRUCTED) {\n      if ((arrayState | arrayStateToAdd) !== arrayState) {\n        setArrayState(data, arrayState |= arrayStateToAdd);\n      }\n\n      // Check state invariants.\n      if (ENABLE_ASSERTS) {\n        checkMessageStateInvariants(data, arrayState);\n      }\n\n      return data;\n    }\n\n    if (messageId) {\n      arrayState |= ArrayStateFlags.HAS_MESSAGE_ID;\n      if (messageId !== data[0]) {\n        // Validate message ids in messages constructed from data.\n        // Ensure that the data matches the Id unless explicitly disabled.\n        if (goog.DEBUG) {\n          throw new Error(`Expected message to have a message id: \"${\n              messageId}\" in the array, got: ${JSON.stringify(data[0])} a ${\n              goog.typeOf(data[0])}, are you parsing with the wrong proto?`);\n        } else {\n          throw new Error('mid');\n        }\n      }\n    }\n\n    arrayState = initPivotAndSparseObject(\n        data,\n        // Pretend to set CONSTRUCTED for assertions.\n        //\n        // We will do this below but avoid it here so there is exactly one\n        // assignment.\n        arrayState | ArrayStateFlags.CONSTRUCTED, suggestedPivot);\n  }\n\n  // At this point all message bits are consistent so we can set CONSTRUCTED.\n  arrayState |= ArrayStateFlags.CONSTRUCTED | arrayStateToAdd;\n\n  // Update our array state.\n  setArrayState(data, arrayState);\n\n  return data;\n}\n\n/** @noinline */\nfunction maybeThrowAlreadyConstructedError() {\n  if (shouldThrowInArrayConstructorIfArrayIsAlreadyConstructed()) {\n    if (goog.DEBUG) {\n      throw new Error(\n          'Array passed to JSPB constructor already belongs to another JSPB proto instance');\n    } else {\n      throw new Error('carr');\n    }\n  }\n  // Async-throw if !goog.DEBUG. If we were in debug mode but\n  // shouldThrowInArrayConstructorIfArrayIsAlreadyConstructed was false then\n  // it was explicitly disabled for testing.\n  if (!goog.DEBUG) {\n    throttledAsyncThrowWarning(\n        undefined, ALREADY_CONSTRUCTED_THROTTLE_KEY, 5, 'carr');\n  }\n}\n\n/**\n * Whether the array is owned by another jspb proto instance and unsafe\n * to be passed to the message constructor.\n *\n * @param {!ArrayState} arrayState\n * @return {boolean}\n */\nfunction isPossiblyMutablyShared(arrayState) {\n  // Any mutable instance with a wrapper is owned by another proto.\n  return hasFlagBit(arrayState, ArrayStateFlags.HAS_WRAPPER) &&\n      !hasFlagBit(arrayState, ArrayStateFlags.IS_IMMUTABLE_ARRAY);\n}\n\n/**\n * If the array contains an sparse object in its last position, then the\n * object is kept in place and its position is used as the pivot.  If not,\n * decides the pivot of the message based on suggestedPivot without\n * materializing the extension object.  Returns the updated arrayState value\n *\n * @param {!Array} data The JsPb internal array.\n * @param {number} arrayState the array state for the message.\n * @param {number|undefined} suggestedPivot See description for\n *     Message.constructor.\n * @return {number}\n */\nfunction initPivotAndSparseObject(data, arrayState, suggestedPivot) {\n  // There are 3 variants that need to be dealt with which are the\n  // combination of whether there exists an sparse object (SO) and\n  // whether there is a suggested pivot (SP).\n  //\n  // SO,    ?    : pivot is the index of the SO\n  // no-SO, no-SP: pivot is MAX_INT\n  // no-SO, SP   : pivot is the max(lastindex + 1, SP)\n  const msgLength = data.length;\n  if (msgLength) {\n    const lastIndex = msgLength - 1;\n    const obj = data[lastIndex];\n    if (isSparseObject(obj)) {\n      const arrayIndexOffset = getArrayIndexOffset(arrayState);\n      const pivot = fieldNumberFromIndex(lastIndex, arrayIndexOffset);\n      if (pivot >= PIVOT_LIMIT) {\n        if (goog.DEBUG) {\n          throw new Error(\n              `Found a message with a sparse object at fieldNumber ${\n                  pivot} is >= the limit ${PIVOT_LIMIT}`);\n        } else {\n          throw new Error('pvtlmt');\n        }\n      }\n\n      // Move low extensions to the dense portion so we don't have to worry\n      // about them. This means that values in the sparse object 'overwrite'\n      // values in the array but that is consistent with server behavior.\n      //\n      // Note that we cannot assume that the sparse object keys are ordered\n      // because they might not have been in browsers before 2016.\n      //\n      // We don't bother removing the sparse object because serialization\n      // already implements that.\n      for (const k in obj) {\n        if (!hasOwnPropertyIfNotTrusted(obj, k)) continue;\n        const n = +k;\n        if (n < pivot) {\n          const i = indexFromFieldNumber(n, arrayIndexOffset);\n          assert(data[i] == null);\n          data[i] = obj[k];\n          delete obj[k];\n        } else if (goog.FEATURESET_YEAR >= 2018) {\n          break;\n        }\n      }\n\n      return setPivot(arrayState, pivot);\n    }\n  }\n  if (suggestedPivot) {\n    // If a sparse object is not present, set the pivot value as being\n    // after the last value in the array to avoid overwriting values, etc.\n    const arrayIndexOffset = getArrayIndexOffset(arrayState);\n    const pivot = Math.max(\n        suggestedPivot, fieldNumberFromIndex(msgLength, arrayIndexOffset));\n    if (pivot > PIVOT_LIMIT) {\n      if (goog.DEBUG) {\n        throw new Error(`a message was constructed with an array of length ${\n            msgLength} which is longer than ${\n            PIVOT_LIMIT}, are you using a supported serializer?`);\n      } else {\n        throw new Error('spvt');\n      }\n    }\n    // Otherwise store in the arrayState\n    return setPivot(arrayState, pivot);\n  } else {\n    // otherwise don't set a pivot, this is the same as explicitly setting\n    // NO_PIVOT\n    return arrayState;\n  }\n}\n\n/**\n * Returns whether the given MessageMeta corresponds to a map entry field.\n *\n * @return {boolean}\n */\nfunction isMapEntryMessageMeta(/** !MessageMeta */ messageMeta) {\n  return messageMeta === mapEntryMessageMeta;\n}\n\nexports = {\n  ENCODED_MAP_META,\n  MessageMeta,\n  arrayIndexOffsetForMeta,\n  constructMessageArrayForJsonConversion,\n  constructMessageArrayForMessageConstructor,\n  constructMessageArrayFromMetaForBinary,\n  isMapEntryMessageMeta,\n  metaHasMessageId,\n  tryParseMessageMeta,\n};\n","/**\n * @fileoverview Internal utilities for manipulating immutable messages.\n * @package\n *\n * DO NOT USE THIS OUTSIDE OF THIS PACKAGE.\n */\ngoog.module('jspb.internal_immutability');\n\nconst asserts = goog.require('goog.asserts');\nconst {ALLOW_COPY_ON_WRITE, DETAILED_JSPB_ASSERTS} = goog.require('jspb.internal_options');\nconst {ArrayState, ArrayStateFlags, addArrayStateFlags, copyArrayBitsClone, getArrayState, getMessageArrayState, getPossiblyUnconstructedMessageArrayState, getPossiblyUnconstructedMessageArrayStateInline, hasFlagBit, markArrayImmutable, setArrayState} = goog.require('jspb.internal_array_state');\nconst {ByteString} = goog.require('jspb.bytestring');\nconst {EXEMPTED_SUBCLASS_MARKER, InternalMessage, assertArrayInvariants, checkMutableMessage, getInternalArray, isCopyOnWrite, isImmutableMessage, isInternalMessage, iterateFields, setCopyOnWrite, setInternalArray, setInternalArrayForNewMessage, setNoLegacyNull} = goog.require('jspb.internal');\nconst {JspbMap, isImmutableMap} = goog.require('jspb.internal_map');\nconst {cloneJspbArray} = goog.require('jspb.internal_copy');\nconst {logOperation} = goog.require('jspb.internal_operations');\n\n\n/**\n * Returns whether an array with the given state is a candidate for in-place\n * markImmutable.\n *\n * @param {!ArrayState} state\n * @return {boolean}\n */\nfunction canMarkImmutableInPlaceIfParentIsOwned(state) {\n  // Callers shouldn't call us on already immutable arrays.\n  asserts.assert(!hasFlagBit(state, ArrayStateFlags.IS_IMMUTABLE_ARRAY));\n\n  // We never have a mutable sub-array with a wrapper inside a mutable parent\n  // with a wrapper because we always write back the wrapper.\n  asserts.assert(!hasFlagBit(state, ArrayStateFlags.HAS_WRAPPER));\n\n  // All message and map arrays that have no wrappers can be marked immutable\n  // in-place. Only repeated field arrays that have been unfrozen shared or\n  // contain mutable submessages can't be marked immutable.\n  return !hasFlagBit(state, ArrayStateFlags.MUTABLE_SUBSTRUCTURES) &&\n      !hasFlagBit(state, ArrayStateFlags.UNFROZEN_SHARED);\n}\n\n/**\n * @param {T} v\n * @param {boolean} parentIsOwned\n * @return {T}\n * @template T\n * @suppress {visibility} Access to map internals\n */\nfunction copyImmutableFieldValue(v, parentIsOwned) {\n  asserts.assertExists(v);\n  // boolean, number, string, bigint are all immutable, so we can just return\n  // them.\n  if (typeof v !== 'object') {\n    return v;\n  }\n  if (Array.isArray(v)) {\n    assertArrayInvariants(v);\n    const state = getArrayState(v);\n    // If this is an empty repeated field, don't copy it in any mode.\n    if (v.length === 0 && (state & ArrayStateFlags.IS_REPEATED_FIELD)) {\n      return undefined;\n    }\n    return getArrayForClone(v, state, parentIsOwned);\n  }\n\n  if (isInternalMessage(v)) {\n    return copyToImmutableMessageOrArray(/** @type {!InternalMessage} */ (v));\n  }\n  if (v instanceof JspbMap) {\n    const mapArrayState = v.arrayState;\n    if (mapArrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY) return v;\n    if (!v.size) return undefined;\n    const entries = markArrayImmutable(v.toArrayInternalUnsorted());\n    if (v.valueCtor) {\n      // Message maps are lazily constructed so we need to inspect and copy the\n      // values. Keys can be ignored because they are all immutable and already\n      // validated.\n      for (let i = 0; i < entries.length; i++) {\n        const entry = entries[i];\n        let value = entry[1];\n        if (value == null || typeof value !== 'object') {\n          // lined up with the behavior of JspbMap.constructor, undefined is\n          // treated as missing and modeled as `null` in the map entry\n          value = undefined;\n          // type inference cannot figure out that `value` is a !Object here :(\n        } else if (isInternalMessage(value)) {\n          value = copyToImmutableMessageOrArray(\n              /** @type {!InternalMessage} */ (value));\n        } else if (Array.isArray(value)) {\n          value = getArrayForClone(\n              value, getPossiblyUnconstructedMessageArrayStateInline(value),\n              !!(mapArrayState & ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED));\n        } else {\n          // This must be some schema skew issue, just drop the value.\n          value = undefined;\n        }\n        entry[1] = value;\n      }\n    } else {\n      // No need to inspect values because they are all immutable and in fact\n      // the constructor has already validated everything.\n    }\n    return entries;\n  }\n  if (v instanceof ByteString) {\n    return v;\n  }\n  // TODO: b/396420284 - remove.\n  asserts.assert(!(v instanceof Uint8Array));\n  // Arrays and sparse objects were handled by our caller, so this is really\n  // just an invalid value. Drop it.\n  return undefined;\n}\n\n/**\n * Returns an array suitable for a clone, possibly without any copying.\n *\n * @param {!Array<?>} array\n * @param {!ArrayState} arrayState\n * @param {boolean} parentIsOwned\n * @return {!Array<?>}\n */\nfunction getArrayForClone(array, arrayState, parentIsOwned) {\n  if (arrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY) {\n    return array;\n  }\n  if (parentIsOwned && canMarkImmutableInPlaceIfParentIsOwned(arrayState)) {\n    addArrayStateFlags(\n        array,\n        ArrayStateFlags.IS_IMMUTABLE_ARRAY |\n            ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED);\n    // Immutable API_FORMATTED arrays must be frozen.\n    if (arrayState & ArrayStateFlags.IS_API_FORMATTED) Object.freeze(array);\n  } else {\n    array = copyArrayWithImmutableFields(\n        array, arrayState, /*markImmutable=*/ false,\n        parentIsOwned && !(arrayState & ArrayStateFlags.UNFROZEN_SHARED));\n  }\n  return array;\n}\n\n/**\n * @param {!InternalMessage} template\n * @param {!Array<?>} array\n * @param {boolean=} mutable\n * @return {!InternalMessage}\n */\nfunction wrapImmutableArray(template, array, mutable) {\n  const ctor = /** @type {function(new:InternalMessage, ?Array=)} */ (\n      template.constructor);\n  const msg = new ctor(array);\n  if (mutable) {\n    setCopyOnWrite(msg, true);\n  }\n  setNoLegacyNull(msg, true);\n  return msg;\n}\n\n/**\n * Returns an immutable message/array (possibly without any copying), or a copy\n * of the message's array suitable for a clone.\n *\n * @param {!InternalMessage} msg Message to copy from.\n * @return {!InternalMessage|!Array<?>}\n */\nfunction copyToImmutableMessageOrArray(msg) {\n  asserts.assert(isInternalMessage(msg));\n  const array = getInternalArray(msg);\n  const arrayState = getMessageArrayState(array);\n  if (isImmutableMessage(msg, arrayState)) {\n    return msg;\n  }\n  if (tryZeroCopyImmutable(msg, array, arrayState)) {\n    // ideally, we just return array here, but we wrap in a message to be able\n    // to mark noLegacyNull.\n    return wrapImmutableArray(msg, array);\n  }\n  return copyArrayWithImmutableFields(array, arrayState);\n}\n\n/**\n * Returns a copy of the provided message with a mutable base messages and\n * immutable submessages.\n *\n * @param {!T} msg Message to copy from.\n * @return {!T} A copied message with immutable fields.\n * @template T\n */\nfunction copyMutableWithImmutableFields(msg) {\n  asserts.assert(isInternalMessage(msg));\n  const array = getInternalArray(msg);\n  const arrayState = getMessageArrayState(array);\n  if (tryZeroCopyImmutable(msg, array, arrayState)) {\n    return wrapImmutableArray(msg, array, /*mutable=*/ true);\n  }\n  return copyArrayToMessageWithImmutableFields(\n      msg, array, arrayState, /*immutable=*/ false);\n}\n\n/**\n * Copies the content of the second argument into the first.\n *\n * @param {!T} toMessage Message which will receive a copy of fromMessage\n * @param {!T} fromMessage Message that will be copied into toMessage.\n * @return {!T} toMessage\n * @template T\n */\nfunction copyMutableIntoMessage(toMessage, fromMessage) {\n  asserts.assert(isInternalMessage(toMessage));\n  asserts.assert(isInternalMessage(fromMessage));\n  checkMutableMessage(toMessage);\n  if (fromMessage.constructor !== toMessage.constructor) {\n    throw new Error('Copy source and target message must have the same type.');\n  }\n  let array = getInternalArray(fromMessage);\n  const arrayState = getMessageArrayState(array);\n  if (tryZeroCopyImmutable(fromMessage, array, arrayState)) {\n    setInternalArrayForNewMessage(toMessage, array);\n    setCopyOnWrite(toMessage, true);\n    setNoLegacyNull(toMessage, true);\n    return toMessage;\n  }\n  array = copyArrayWithImmutableFields(array, arrayState);\n  setInternalArray(toMessage, array);\n  return toMessage;\n}\n\n/**\n * Returns a copy of the provided message `Array` as a message with\n * immutable sub structures.\n *\n * @return {!InternalMessage}\n * @template T\n */\nfunction copyArrayToMessageWithImmutableFields(\n    /** !T */ template, /** !Array<?> */ array, /** number */ arrayState,\n    /** boolean */ immutable) {\n  return new template.constructor(\n      copyArrayWithImmutableFields(array, arrayState, immutable));\n}\n\n/**\n * Returns a copy of the provided message `Array` as a deeply immutable array.\n *\n * The returned array is always newly constructed but may share internal\n * structures with the provided array.\n *\n * @param {!Array<?>} array\n * @param {!ArrayState} arrayState\n * @param {boolean=} markImmutable Whether new array should be marked immutable.\n * @param {boolean=} isOwned Whether array is known not to be exposed to users.\n * @return {!Array}\n */\nfunction copyArrayWithImmutableFields(\n    array, arrayState, markImmutable, isOwned) {\n  if (DETAILED_JSPB_ASSERTS) {\n    logOperation({copyMessageWithImmutableFields: 1});\n  }\n  asserts.assert(arrayState === getArrayState(array));\n\n  isOwned ??= hasFlagBit(\n      arrayState,\n      ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED |\n          ArrayStateFlags.IS_IMMUTABLE_ARRAY);\n  const newArray =\n      cloneJspbArray(array, arrayState, copyImmutableFieldValue, isOwned);\n\n  arrayState = copyArrayBitsClone(arrayState, markImmutable);\n  setArrayState(newArray, arrayState);\n\n  return newArray;\n}\n\n/**\n * Returns a frozen message directly from a JSPB Transport Format encoded\n * string.\n * @param {function(new:JSPB, ?Array=)} ctor Constructor for the message.\n * @param {string} data a string of JSPB Transport Format encoded data.\n * @return {!JSPB} a frozen message.\n * @template JSPB\n */\nfunction deserializeAsImmutable(ctor, data) {\n  asserts.assertString(data);\n  asserts.assertFunction(ctor);\n  const array = JSON.parse(data);\n  if (!Array.isArray(array)) {\n    throw new Error(\n        'Expected jspb data to be an array, got ' + goog.typeOf(array) + ': ' +\n        array);\n  }\n  markArrayImmutable(array);\n  const msg = new ctor(array);\n  asserts.assert(isInternalMessage(msg));\n  return msg;\n}\n\n/**\n * Converts the given message to a mutable instance, if necessary.\n *\n * @param {!InternalMessage} msg\n * @return {!InternalMessage}\n */\nfunction messageToMutable(msg) {\n  const array = getInternalArray(msg);\n  const arrayState = getMessageArrayState(array);\n  if (!isImmutableMessage(msg, arrayState)) {\n    return msg;\n  }\n  if (tryZeroCopyImmutable(msg, array, arrayState)) {\n    return wrapImmutableArray(msg, array, /*mutable=*/ true);\n  }\n  return copyArrayToMessageWithImmutableFields(\n      msg, array, arrayState, /*immutable=*/ false);\n}\n\n/**\n * Converts the given message to an immutable instance, if necessary.\n *\n * @param {!InternalMessage} msg\n * @return {!InternalMessage}\n */\nfunction messageToImmutable(msg) {\n  const array = getInternalArray(msg);\n  const arrayState = getMessageArrayState(array);\n  if (isImmutableMessage(msg, arrayState)) {\n    return msg;\n  }\n  if (tryZeroCopyImmutable(msg, array, arrayState)) {\n    return wrapImmutableArray(msg, array);\n  }\n  return copyArrayToMessageWithImmutableFields(\n      msg, array, arrayState, /*immutable=*/ true);\n}\n\n/**\n * @param {!InternalMessage} msg\n * @return {boolean} whether copy happened\n */\nfunction maybeCopyOnWrite(msg) {\n  if (!isCopyOnWrite(msg)) {\n    return false;\n  }\n  let array = getInternalArray(msg);\n  const arrayState = getMessageArrayState(array);\n  asserts.assert(arrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY);\n  array = copyArrayWithImmutableFields(array, arrayState);\n  setInternalArray(msg, array);\n  return true;\n}\n\n/**\n * Ensures the given message is mutable, and makes array mutable if necessary.\n * Throws otherwise.\n * @param {!InternalMessage} msg\n * @param {!ArrayState=} arrayState\n */\nfunction ensureMutable(msg, arrayState) {\n  if (arrayState !== undefined &&\n      !(arrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY)) {\n    return;\n  }\n  if (!maybeCopyOnWrite(msg)) {\n    checkMutableMessage(\n        msg, arrayState ?? getMessageArrayState(getInternalArray(msg)));\n  }\n}\n\n/**\n * @param {!Array<?>} messageArray\n * @param {!ArrayState=} messageArrayState\n * @return {!ArrayState}\n */\nfunction leakedMutableSubstructures(messageArray, messageArrayState) {\n  if (!ALLOW_COPY_ON_WRITE) {\n    return messageArrayState ?? 0;\n  }\n  if (messageArrayState === undefined) {\n    messageArrayState =\n        getPossiblyUnconstructedMessageArrayStateInline(messageArray);\n  } else {\n    asserts.assert(\n        messageArrayState ===\n        getPossiblyUnconstructedMessageArrayState(messageArray));\n  }\n  asserts.assert(!(messageArrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY));\n  if (DETAILED_JSPB_ASSERTS) {\n    asserts.assert(hasLeakedMutableDebugOnly(messageArray));\n  }\n  if (!hasLeakedMutableSubstructures(messageArrayState)) {\n    messageArrayState |= ArrayStateFlags.MUTABLE_SUBSTRUCTURES;\n    setArrayState(messageArray, messageArrayState);\n  }\n  return messageArrayState;\n}\n\n/**\n * @param {!ArrayState} arrayState\n * @return {boolean}\n */\nfunction hasLeakedMutableSubstructures(arrayState) {\n  return !(arrayState & ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED) ||\n      !!(arrayState & ArrayStateFlags.MUTABLE_SUBSTRUCTURES);\n}\n\n/**\n * Attempts to mark the given array as immutable in place.\n *\n * @param {!InternalMessage} msg\n * @param {!Array<?>} array\n * @param {!ArrayState} arrayState\n * @return {boolean} whether the array was made immutable\n */\nfunction tryZeroCopyImmutable(msg, array, arrayState) {\n  if (!ALLOW_COPY_ON_WRITE) {\n    return false;\n  }\n  // We don't want to copy-on-write unsupported subclasses because they may not\n  // respect expectations about the internal array.\n  if (EXEMPTED_SUBCLASS_MARKER && msg[EXEMPTED_SUBCLASS_MARKER]) {\n    return false;\n  }\n  if (arrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY) {\n    return true;\n  }\n  if (!hasLeakedMutableSubstructures(arrayState)) {\n    if (DETAILED_JSPB_ASSERTS) {\n      asserts.assert(!hasLeakedMutableDebugOnly(array));\n    }\n    setArrayState(array, arrayState | ArrayStateFlags.IS_IMMUTABLE_ARRAY);\n    setCopyOnWrite(msg, true);\n    return true;\n  }\n  return false;\n}\n\n/**\n * @param {!Array<?>} messageArray\n * @return {boolean}\n */\nfunction hasLeakedMutableDebugOnly(messageArray) {\n  const arrayState =\n      getPossiblyUnconstructedMessageArrayStateInline(messageArray);\n  if (!(arrayState & ArrayStateFlags.MUTABLE_REFERENCES_ARE_OWNED)) {\n    return true;\n  }\n  let leaked = false;\n  iterateFields(messageArray, arrayState, (fieldNumber, value) => {\n    leaked ||= isLeakedMutableFieldDebugOnlyWithOwnedParent(value);\n  });\n  return leaked;\n}\n\n/**\n * @param {*} value\n * @return {boolean}\n */\nfunction isLeakedMutableFieldDebugOnlyWithOwnedParent(value) {\n  if (isInternalMessage(value)) {\n    return !isImmutableMessage(/** @type {!InternalMessage} */ (value));\n  }\n  if (value instanceof JspbMap) {\n    return !isImmutableMap(value);\n  }\n  if (Array.isArray(value)) {\n    const arrayState = getArrayState(value);\n    if (arrayState & ArrayStateFlags.IS_IMMUTABLE_ARRAY) return false;\n    return !canMarkImmutableInPlaceIfParentIsOwned(arrayState);\n  }\n  return false;\n}\n\n/**\n * @param {!Array<?>} messageArray\n */\nfunction assertValidLeakedMutableSubstructures(messageArray) {\n  if (ALLOW_COPY_ON_WRITE) {\n    asserts.assert(\n        hasLeakedMutableSubstructures(\n            getPossiblyUnconstructedMessageArrayState(messageArray)) ||\n        !hasLeakedMutableDebugOnly(messageArray));\n  }\n}\n\nexports = {\n  assertValidLeakedMutableSubstructures,\n  canMarkImmutableInPlaceIfParentIsOwned,\n  copyArrayWithImmutableFields,\n  copyImmutableFieldValue,\n  copyMutableIntoMessage,\n  copyMutableWithImmutableFields,\n  deserializeAsImmutable,\n  ensureMutable,\n  leakedMutableSubstructures,\n  maybeCopyOnWrite,\n  messageToImmutable,\n  messageToMutable,\n};\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableMultiWatchRequest');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyMultiWatchRequest');\n\ngoog.require('jspb$punctual$proto$MultiWatchRequest$MutableClose');\ngoog.require('jspb$punctual$proto$MutableWatchRequest');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$e.punctual$proto$Affinitization');\ngoog.requireType('jspb$e.punctual$proto$MultiWatchRequest$RequestCase');\ngoog.requireType('jspb$punctual$proto$ImmutableMultiWatchRequest');\ngoog.requireType('jspb$r$punctual$proto$MultiWatchRequest$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$MultiWatchRequest$ReadonlyClose');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyWatchRequest');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableMultiWatchRequest>}\n * @implements {jspb$r$punctual$proto$MultiWatchRequest$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableMultiWatchRequest = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * @override\n   * @return {!jspb$e.punctual$proto$MultiWatchRequest$RequestCase}\n   */\n  getRequestCase() {\n    return /** @type {!jspb$e.punctual$proto$MultiWatchRequest$RequestCase} */(jspb_internal_adapters.computeOneofCase(this, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_));\n  }\n\n\n  /**\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequest}\n   */\n  clearRequest() {\n    return jspb_internal_adapters.clearAllFieldsInOneof(this, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_);\n  }\n\n\n  /**\n   * optional int64 stream_id = 1;\n   * @override\n   * @return {!gbigint}\n   */\n  getStreamId() {\n    return jspb_internal_adapters.getInt64GbigintFieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * optional int64 stream_id = 1;\n   * @override\n   * @return {string}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getStreamId_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * optional int64 stream_id = 1;\n   * @override\n   * @return {string}\n   */\n  getStreamId_asString() {\n    return jspb_internal_adapters.getInt64StringFieldWithDefault_asString(this, 1);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequest} returns this\n   */\n  setStreamId(value) {\n    return jspb_internal_adapters.setInt64StringField(this, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequest} returns this\n   */\n  clearStreamId() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasStreamId() {\n    return jspb_internal_adapters.hasInt64StringField(this, 1);\n  }\n\n\n  /**\n   * optional int64 stream_id = 1;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getStreamIdOrUndefined() {\n    return jspb_internal_adapters.getInt64GbigintFieldOrUndefined(this, 1);\n  }\n\n\n  /**\n   * optional int64 stream_id = 1;\n   * @override\n   * @return {string|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getStreamIdOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldOrUndefined(this, 1);\n  }\n\n\n  /**\n   * optional int64 stream_id = 1;\n   * @override\n   * @return {string|undefined}\n   */\n  getStreamIdOrUndefined_asString() {\n    return jspb_internal_adapters.getInt64StringFieldOrUndefined_asString(this, 1);\n  }\n\n\n  /**\n   * optional WatchRequest open = 2;\n   * @override\n   * @return {!jspb$punctual$proto$MutableWatchRequest|undefined}\n   */\n  getOpen() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableWatchRequest, 2, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_);\n  }\n\n\n  /**\n   * optional WatchRequest open = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyWatchRequest}\n   */\n  getReadonlyOpen() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$MutableWatchRequest, 2, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_);\n  }\n\n\n  /**\n   * optional WatchRequest open = 2;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableWatchRequest|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableWatchRequest') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchRequest|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchRequest\n   */\n  getMutableOpen(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$MutableWatchRequest, 2, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyWatchRequest|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequest} returns this\n   */\n  setOpen(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$MutableWatchRequest, 2, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequest} returns this\n   */\n  clearOpen() {\n    return jspb_internal_adapters.clearOneofField(this, 2, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasOpen() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$MutableWatchRequest, 2, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_);\n  }\n\n\n  /**\n   * optional WatchRequest open = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyWatchRequest|undefined}\n   */\n  getOpenOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableWatchRequest, 2, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_);\n  }\n\n\n  /**\n   * optional Close close = 3;\n   * @override\n   * @return {!jspb$punctual$proto$MultiWatchRequest$MutableClose|undefined}\n   */\n  getClose() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MultiWatchRequest$MutableClose, 3, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_);\n  }\n\n\n  /**\n   * optional Close close = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$MultiWatchRequest$ReadonlyClose}\n   */\n  getReadonlyClose() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$MultiWatchRequest$MutableClose, 3, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_);\n  }\n\n\n  /**\n   * optional Close close = 3;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MultiWatchRequest$MutableClose|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MultiWatchRequest$MutableClose') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchRequest$MutableClose|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchRequest$MutableClose\n   */\n  getMutableClose(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$MultiWatchRequest$MutableClose, 3, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$MultiWatchRequest$ReadonlyClose|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequest} returns this\n   */\n  setClose(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$MultiWatchRequest$MutableClose, 3, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequest} returns this\n   */\n  clearClose() {\n    return jspb_internal_adapters.clearOneofField(this, 3, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasClose() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$MultiWatchRequest$MutableClose, 3, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_);\n  }\n\n\n  /**\n   * optional Close close = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$MultiWatchRequest$ReadonlyClose|undefined}\n   */\n  getCloseOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MultiWatchRequest$MutableClose, 3, jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_);\n  }\n\n\n  /**\n   * optional Affinitization affinitization = 4;\n   * @override\n   * @return {!jspb$e.punctual$proto$Affinitization}\n   */\n  getAffinitization() {\n    return /** @type {!jspb$e.punctual$proto$Affinitization} */ (jspb_internal_adapters.getEnumFieldWithDefault(this, 4));\n  }\n\n\n  /**\n   * @param {!jspb$e.punctual$proto$Affinitization|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequest} returns this\n   */\n  setAffinitization(value) {\n    return jspb_internal_adapters.setEnumField(this, 4, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequest} returns this\n   */\n  clearAffinitization() {\n    return jspb_internal_adapters.clearField(this, 4);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasAffinitization() {\n    return jspb_internal_adapters.hasEnumField(this, 4);\n  }\n\n\n  /**\n   * optional Affinitization affinitization = 4;\n   * @override\n   * @return {!jspb$e.punctual$proto$Affinitization|undefined}\n   */\n  getAffinitizationOrUndefined() {\n    return /** @type {!jspb$e.punctual$proto$Affinitization|undefined} */ (jspb_internal_adapters.getEnumFieldOrUndefined(this, 4));\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableMultiWatchRequest}\n */\njspb$punctual$proto$MutableMultiWatchRequest.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableMultiWatchRequest}\n */\njspb$punctual$proto$MutableMultiWatchRequest.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableMultiWatchRequest}\n */\njspb$punctual$proto$MutableMultiWatchRequest.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableMultiWatchRequest));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableMultiWatchRequest.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableMultiWatchRequest>}\n */\njspb$punctual$proto$MutableMultiWatchRequest.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableMultiWatchRequest));\n\n/**\n * Object form of MultiWatchRequest as accepted by the `fromObject` method.\n * @typedef {{\n *  streamId: (?string|undefined),\n *  open: (?jspb$punctual$proto$MutableWatchRequest.ObjectFormat|undefined),\n *  close: (?jspb$punctual$proto$MultiWatchRequest$MutableClose.ObjectFormat|undefined),\n *  affinitization: (?number|undefined)\n * }}\n */\njspb$punctual$proto$MutableMultiWatchRequest.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableMultiWatchRequest.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableMultiWatchRequest.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableMultiWatchRequest.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableMultiWatchRequest.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableMultiWatchRequest.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.MultiWatchRequest\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableMultiWatchRequest|!jspb$punctual$proto$MutableMultiWatchRequest}\n */\njspb$ro.punctual$proto$ReadonlyMultiWatchRequest = {};\n\n/**\n * Oneof group definition.\n * @private {!ReadonlyArray<number>}\n * @const\n * @nodts\n */\njspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_ = [2,3];\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableMultiWatchRequest.displayName = 'proto.punctual.proto.MultiWatchRequest';\n}\n/**\n * Interface form of MultiWatchRequest as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  streamId: (!gbigint|undefined),\n *  streamId_asString: (string|undefined),\n *  open: (!jspb$ro.punctual$proto$ReadonlyWatchRequest|undefined),\n *  close: (!jspb$ro.punctual$proto$MultiWatchRequest$ReadonlyClose|undefined),\n *  affinitization: (!jspb$e.punctual$proto$Affinitization|undefined)\n * }}\n */\njspb$punctual$proto$MutableMultiWatchRequest.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableMultiWatchRequest.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableMultiWatchRequest}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchRequest, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchRequest.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableMultiWatchRequest\n */\njspb$punctual$proto$MutableMultiWatchRequest.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableMultiWatchRequest));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$ReadonlyMultiWatchRequest} value\n * @return {!jspb$punctual$proto$MutableMultiWatchRequest.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$ReadonlyMultiWatchRequest): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchRequest, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchRequest.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MutableMultiWatchRequest.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/common.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableObjectPath');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyObjectPath');\n\ngoog.require('jspb$punctual$proto$ObjectPath$MutablePart');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$ImmutableObjectPath');\ngoog.requireType('jspb$r$punctual$proto$ObjectPath$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$ObjectPath$ReadonlyPart');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableObjectPath>}\n * @implements {jspb$r$punctual$proto$ObjectPath$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableObjectPath = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * repeated Part parts = 1;\n   * @param {!jspb_internal_public_for_gencode.DoNotFreezeToken=} freezeOptOut\n   * @tsType (freezeOptOut: import('google3/javascript/apps/jspb/internal_public').DoNotFreezeToken): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ObjectPath$MutablePart[]\n   * @tsType (): readonly \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ObjectPath$MutablePart[]\n   * @override\n   * @return {!ReadonlyArray<!jspb$punctual$proto$ObjectPath$MutablePart>}\n   */\n  getPartsList(freezeOptOut) {\n    return jspb_internal_adapters.getRepeatedWrapperField(this, jspb$punctual$proto$ObjectPath$MutablePart, 1, jspb_internal_adapters.getRepeatedFieldReturnType(freezeOptOut));\n  }\n\n\n  /**\n   * repeated Part parts = 1;\n   * @override\n   * @return {!ReadonlyArray<!jspb$ro.punctual$proto$ObjectPath$ReadonlyPart>}\n   */\n  getReadonlyPartsList() {\n    return jspb_internal_adapters.getReadonlyRepeatedWrapperField(this, jspb$punctual$proto$ObjectPath$MutablePart, 1);\n  }\n\n\n  /**\n   * @param {!ReadonlyArray<!jspb$ro.punctual$proto$ObjectPath$ReadonlyPart>|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectPath} returns this\n   */\n  setPartsList(value) {\n    return jspb_internal_adapters.setRepeatedWrapperField(this, jspb$punctual$proto$ObjectPath$MutablePart, 1, value);\n  }\n\n\n  /**\n   * Gets mutable repeated field reference.\n   * @param {number} index\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart}\n   */\n  getMutableParts(index) {\n    return jspb_internal_adapters.getRepeatedIndexedMutableWrapper(this, 1, jspb$punctual$proto$ObjectPath$MutablePart, index);\n  }\n\n\n  /**\n   * Gets readonly repeated field reference.\n   * @override\n   * @param {number} index\n   * @return {!jspb$ro.punctual$proto$ObjectPath$ReadonlyPart}\n   */\n  getReadonlyParts(index) {\n    return jspb_internal_adapters.getRepeatedIndexedReadonlyWrapper(this, 1, jspb$punctual$proto$ObjectPath$MutablePart, index);\n  }\n\n\n  /**\n   * Adds repeated field and returns `this`.\n   * @param {!jspb$ro.punctual$proto$ObjectPath$ReadonlyPart} value\n   * @param {number=} index\n   * @return {!jspb$punctual$proto$MutableObjectPath} returns this\n   */\n  addParts(value, index) {\n    return jspb_internal_adapters.addToRepeatedWrapperField(this, 1, jspb$punctual$proto$ObjectPath$MutablePart, value, index);\n  }\n\n\n  /**\n   * Adds repeated field and returns newly added submessage.\n   * @param {!jspb$punctual$proto$ObjectPath$MutablePart=} value\n   * @param {number=} index\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} the value that was added\n   */\n  addAndReturnParts(value, index) {\n    return jspb_internal_adapters.addAndReturnRepeatedWrapperField(this, 1, jspb$punctual$proto$ObjectPath$MutablePart, value, index);\n  }\n\n\n  /**\n   * Adds multiple values to a repeated field and returns `this`.\n   * @param {!Iterable<!jspb$ro.punctual$proto$ObjectPath$ReadonlyPart>} values\n   * @return {!jspb$punctual$proto$MutableObjectPath} returns this\n   */\n  addAllParts(values) {\n    return jspb_internal_adapters.addAllToRepeatedWrapperField(this, 1, jspb$punctual$proto$ObjectPath$MutablePart, values);\n  }\n\n\n  /**\n   * Sets repeated field value at `index` and returns `this`.\n   * @param {number} index\n   * @param {!jspb$ro.punctual$proto$ObjectPath$ReadonlyPart} value\n   * @return {!jspb$punctual$proto$MutableObjectPath} returns this\n   */\n  setParts(index, value) {\n    return jspb_internal_adapters.setRepeatedIndexedWrapper(this, 1, jspb$punctual$proto$ObjectPath$MutablePart, index, value);\n  }\n\n\n  /**\n   * Removes a value from a repeated field and returns `this`.\n   * @param {number=} index defaults to the end\n   * @return {!jspb$punctual$proto$MutableObjectPath} returns this\n   */\n  removeParts(index) {\n    return jspb_internal_adapters.removeFromRepeatedWrapperField(this, 1, jspb$punctual$proto$ObjectPath$MutablePart, index);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectPath} returns this\n   */\n  clearPartsList() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns the size of this field.\n   * @override\n   * @return {number}\n   */\n  getPartsCount() {\n    return jspb_internal_adapters.getRepeatedWrapperCount(this, jspb$punctual$proto$ObjectPath$MutablePart, 1);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableObjectPath}\n */\njspb$punctual$proto$MutableObjectPath.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableObjectPath}\n */\njspb$punctual$proto$MutableObjectPath.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableObjectPath}\n */\njspb$punctual$proto$MutableObjectPath.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableObjectPath));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableObjectPath.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableObjectPath>}\n */\njspb$punctual$proto$MutableObjectPath.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableObjectPath));\n\n/**\n * Object form of ObjectPath as accepted by the `fromObject` method.\n * @typedef {{\n *  partsList: (?Array<!jspb$punctual$proto$ObjectPath$MutablePart.ObjectFormat>|undefined)\n * }}\n */\njspb$punctual$proto$MutableObjectPath.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableObjectPath.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableObjectPath.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableObjectPath.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableObjectPath.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableObjectPath.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.ObjectPath\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableObjectPath|!jspb$punctual$proto$MutableObjectPath}\n */\njspb$ro.punctual$proto$ReadonlyObjectPath = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableObjectPath.displayName = 'proto.punctual.proto.ObjectPath';\n}\n/**\n * Interface form of ObjectPath as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  partsList: (!ReadonlyArray<!jspb$ro.punctual$proto$ObjectPath$ReadonlyPart>|undefined)\n * }}\n */\njspb$punctual$proto$MutableObjectPath.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableObjectPath.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableObjectPath}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectPath, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectPath.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableObjectPath\n */\njspb$punctual$proto$MutableObjectPath.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableObjectPath));\n","/**\n * @fileoverview internal instrumentation for elemental jspb operations.\n * @package\n *\n * DO NOT USE THIS OUTSIDE OF THIS PACKAGE.\n */\ngoog.module('jspb.internal_operations');\n\nconst {DETAILED_JSPB_ASSERTS} = goog.require('jspb.internal_options');\nconst {assertNumber} = goog.require('goog.asserts');\n\n/** @record */\nclass PartialLog {\n  constructor() {\n    /** @type {number|undefined} */\n    this.newArray;\n\n    /** @type {number|undefined} */\n    this.slice;\n\n    /** @type {number|undefined} */\n    this.getField;\n\n    /** @type {number|undefined} */\n    this.setField;\n\n    /** @type {number|undefined} */\n    this.constructMessage;\n\n    /** @type {number|undefined} */\n    this.constructMap;\n\n    /** @type {number|undefined} */\n    this.copyMessageWithImmutableFields;\n\n    /** @type {number|undefined} */\n    this.internalCompareFields;\n  }\n}\n\n/**\n * @extends {PartialLog}\n * @record\n */\nclass OperationLog {\n  constructor() {\n    /** @package @override @type {number} */\n    this.newArray;\n\n    /** @package @override @type {number} */\n    this.slice;\n\n    /** @package @override @type {number} */\n    this.getField;\n\n    /** @package @override @type {number} */\n    this.setField;\n\n    /** @package @override @type {number} */\n    this.constructMessage;\n\n    /** @package @override @type {number} */\n    this.constructMap;\n\n    /** @package @override @type {number} */\n    this.copyMessageWithImmutableFields;\n\n    /** @package @override @type {number} */\n    this.internalCompareFields;\n  }\n}\n\n/** @type {!OperationLog|undefined} */\nlet currentLog = DETAILED_JSPB_ASSERTS ? emptyLog() : undefined;\n\n/** @type {boolean} */\nlet shouldLogOperations = true;\n\n/** @return {!OperationLog} */\nfunction emptyLog() {\n  if (!DETAILED_JSPB_ASSERTS) throw new Error();\n  return {\n    newArray: 0,\n    slice: 0,\n    getField: 0,\n    setField: 0,\n    constructMessage: 0,\n    constructMap: 0,\n    copyMessageWithImmutableFields: 0,\n    internalCompareFields: 0,\n  };\n}\n\nfunction logOperation(/** !PartialLog */ log) {\n  if (!DETAILED_JSPB_ASSERTS) return;\n  if (!shouldLogOperations) return;\n  for (const k in /** @type {!Object} */ (log)) {\n    /** @type {!Object} */ (currentLog)[k] +=\n        assertNumber(/** @type {!Object} */ (log)[k]);\n  }\n}\n\n/** Clears our current operation log. */\nfunction clearLog() {\n  if (!DETAILED_JSPB_ASSERTS) throw new Error();\n  currentLog = emptyLog();\n}\n\n/** @return {!PartialLog} */\nfunction getLog() {\n  if (!DETAILED_JSPB_ASSERTS) throw new Error();\n  const result = {};\n  for (const k in /** @type {!Object} */ (currentLog)) {\n    const value =\n        /** @type {number} */ (/** @type {!Object} */ (currentLog)[k]);\n    if (value > 0) {\n      result[k] = value;\n    }\n  }\n  // assign prevents mutations.\n  return /** @type {!PartialLog} */ (result);\n}\n\n/**\n * @param {!ReadonlyArray<T>} value\n * @return {!Array<T>}\n * @template T\n */\nfunction slice(value) {\n  if (DETAILED_JSPB_ASSERTS) logOperation({slice: 1});\n  // Use spread if we can, it is much faster on frozen arrays.\n  return (goog.FEATURESET_YEAR >= 2018) ? [...value] :\n                                          Array.prototype.slice.call(value);\n}\n\n/**\n * @param {!Array<T>} value\n * @return {!Array<T>}\n * @template T\n */\nfunction logNewArray(value) {\n  if (DETAILED_JSPB_ASSERTS) logOperation({newArray: 1});\n  return value;\n}\n\n/**\n * @param {boolean} shouldLog\n * @template T\n */\nfunction setShouldLog(shouldLog) {\n  if (DETAILED_JSPB_ASSERTS) {\n    shouldLogOperations = shouldLog;\n  }\n}\n\n/**\n * @return {boolean}\n */\nfunction getShouldLog() {\n  return !!shouldLogOperations;\n}\n\n/**\n * @param {function(): T} fn\n * @return {T}\n * @template T\n */\nfunction withoutLogging(fn) {\n  if (!DETAILED_JSPB_ASSERTS) {\n    return fn();\n  }\n  const shouldLog = getShouldLog();\n  try {\n    setShouldLog(false);\n    return fn();\n  } finally {\n    setShouldLog(shouldLog);\n  }\n}\n\nexports = {\n  PartialLog,\n  clearLog,\n  getLog,\n  getShouldLog,\n  logNewArray,\n  logOperation,\n  setShouldLog,\n  slice,\n  withoutLogging,\n};\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake');\ngoog.provide('jspb$ro.punctual$proto$MultiWatchResponseBatch$ReadonlyHandshake');\n\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$MultiWatchResponseBatch$ImmutableHandshake');\ngoog.requireType('jspb$r$punctual$proto$MultiWatchResponseBatch$Handshake$internalDoNotUseReader');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$MultiWatchResponseBatch$ImmutableHandshake>}\n * @implements {jspb$r$punctual$proto$MultiWatchResponseBatch$Handshake$internalDoNotUseReader}\n */\njspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional string channel_id = 1;\n   * @override\n   * @return {string}\n   */\n  getChannelId() {\n    return jspb_internal_adapters.getStringFieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * @param {string|null|undefined} value\n   * @return {!jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake} returns this\n   */\n  setChannelId(value) {\n    return jspb_internal_adapters.setStringField(this, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake} returns this\n   */\n  clearChannelId() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasChannelId() {\n    return jspb_internal_adapters.hasStringField(this, 1);\n  }\n\n\n  /**\n   * optional string channel_id = 1;\n   * @override\n   * @return {string|undefined}\n   */\n  getChannelIdOrUndefined() {\n    return jspb_internal_adapters.getStringFieldOrUndefined(this, 1);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$MultiWatchResponseBatch$ImmutableHandshake}\n */\njspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake}\n */\njspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake}\n */\njspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake>}\n */\njspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake));\n\n/**\n * Object form of Handshake as accepted by the `fromObject` method.\n * @typedef {{\n *  channelId: (?string|undefined)\n * }}\n */\njspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MultiWatchResponseBatch$MutableHandshake.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.MultiWatchResponseBatch.Handshake\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$MultiWatchResponseBatch$ImmutableHandshake|!jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake}\n */\njspb$ro.punctual$proto$MultiWatchResponseBatch$ReadonlyHandshake = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.displayName = 'proto.punctual.proto.MultiWatchResponseBatch.Handshake';\n}\n/**\n * Interface form of Handshake as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  channelId: (string|undefined)\n * }}\n */\njspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.FieldsInterface} record\n * @return {!jspb$punctual$proto$MultiWatchResponseBatch$ImmutableHandshake}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponseBatch$ImmutableHandshake\n */\njspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$MultiWatchResponseBatch$ReadonlyHandshake} value\n * @return {!jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$MultiWatchResponseBatch$ReadonlyHandshake): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/common.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$ObjectPath$MutablePart');\ngoog.provide('jspb$ro.punctual$proto$ObjectPath$ReadonlyPart');\n\ngoog.require('jspb$google$protobuf$MutableTimestamp');\ngoog.require('jspb$punctual$proto$ObjectPath$MutableNullPart');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$e.punctual$proto$ObjectPath$Part$PartCase');\ngoog.requireType('jspb$punctual$proto$ObjectPath$ImmutablePart');\ngoog.requireType('jspb$r$punctual$proto$ObjectPath$Part$internalDoNotUseReader');\ngoog.requireType('jspb$ro.google$protobuf$ReadonlyTimestamp');\ngoog.requireType('jspb$ro.punctual$proto$ObjectPath$ReadonlyNullPart');\ngoog.requireType('jspb.bytestring');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ObjectPath$ImmutablePart>}\n * @implements {jspb$r$punctual$proto$ObjectPath$Part$internalDoNotUseReader}\n */\njspb$punctual$proto$ObjectPath$MutablePart = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * @override\n   * @return {!jspb$e.punctual$proto$ObjectPath$Part$PartCase}\n   */\n  getPartCase() {\n    return /** @type {!jspb$e.punctual$proto$ObjectPath$Part$PartCase} */(jspb_internal_adapters.computeOneofCase(this, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_));\n  }\n\n\n  /**\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart}\n   */\n  clearPart() {\n    return jspb_internal_adapters.clearAllFieldsInOneof(this, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional bytes bytes_decreasing = 5;\n   * @override\n   * @return {!jspb.bytestring.ByteString|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getBytesDecreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getBytesDecreasing() {\n    return jspb_internal_adapters.getOneofBytesFieldLegacyNullable(this, 5, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional bytes bytes_decreasing = 5;\n   * @override\n   * @return {!jspb.bytestring.ByteString|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getBytesDecreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getBytesDecreasing_legacyNullable() {\n    return jspb_internal_adapters.getOneofBytesFieldLegacyNullable(this, 5, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional bytes bytes_decreasing = 5;\n   * @deprecated Use getBytesDecreasing() instead. See go/jspb-gencode#bytes\n   * @return {string|null}\n   * @override\n   */\n  getBytesDecreasing_asB64() {\n    return /** @type {string|null} */ (jspb_internal_public_for_gencode.byteStringAsB64(\n      jspb_internal_adapters.getOneofBytesFieldLegacyNullable(this, 5, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_)));\n  }\n\n\n  /**\n   * optional bytes bytes_decreasing = 5;\n   * @deprecated Use getBytesDecreasing() instead. See go/jspb-gencode#bytes\n   * @return {string|null}\n   * @override\n   */\n  getBytesDecreasing_asBase64OrUint8Array() {\n    return /** @type {string|null} */ (jspb_internal_public_for_gencode.byteStringAsBase64OrUint8Array(\n      jspb_internal_adapters.getOneofBytesFieldLegacyNullable(this, 5, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_)));\n  }\n\n\n  /**\n   * optional bytes bytes_decreasing = 5;\n   * @deprecated Use getBytesDecreasing() instead. See go/jspb-gencode#bytes\n   * @return {!Uint8Array|null}\n   */\n  getBytesDecreasing_asU8() {\n    jspb_internal_public_for_gencode.assertMutable(this);\n    return /** @type {!Uint8Array|null} */ (jspb_internal_public_for_gencode.byteStringAsU8(\n      jspb_internal_adapters.getOneofBytesFieldLegacyNullable(this, 5, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_)));\n  }\n\n\n  /**\n   * @param {!(string|!Uint8Array|!jspb.bytestring.ByteString)|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setBytesDecreasing(value) {\n    return jspb_internal_adapters.setOneofBytesField(this, 5, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearBytesDecreasing() {\n    return jspb_internal_adapters.clearOneofField(this, 5, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasBytesDecreasing() {\n    return jspb_internal_adapters.hasOneofBytesField(this, 5, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional bytes bytes_decreasing = 5;\n   * @override\n   * @return {!jspb.bytestring.ByteString|undefined}\n   */\n  getBytesDecreasingOrUndefined() {\n    return jspb_internal_adapters.getOneofBytesFieldOrUndefined(this, 5, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_decreasing = 4;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getSignedNumDecreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getSignedNumDecreasing() {\n    return jspb_internal_adapters.getOneofInt64GbigintFieldLegacyNullable(this, 4, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_decreasing = 4;\n   * @override\n   * @return {string|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getSignedNumDecreasing_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofInt64StringFieldLegacyNullable(this, 4, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_decreasing = 4;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getSignedNumDecreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getSignedNumDecreasing_legacyNullable() {\n    return jspb_internal_adapters.getOneofInt64GbigintFieldLegacyNullable(this, 4, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_decreasing = 4;\n   * @override\n   * @return {string|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getSignedNumDecreasing_legacyNullable_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofInt64StringFieldLegacyNullable(this, 4, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setSignedNumDecreasing(value) {\n    return jspb_internal_adapters.setOneofInt64StringField(this, 4, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearSignedNumDecreasing() {\n    return jspb_internal_adapters.clearOneofField(this, 4, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasSignedNumDecreasing() {\n    return jspb_internal_adapters.hasOneofInt64StringField(this, 4, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_decreasing = 4;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getSignedNumDecreasingOrUndefined() {\n    return jspb_internal_adapters.getOneofInt64GbigintFieldOrUndefined(this, 4, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_decreasing = 4;\n   * @override\n   * @return {string|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getSignedNumDecreasingOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofInt64StringFieldOrUndefined(this, 4, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_decreasing = 4;\n   * @override\n   * @return {string|undefined}\n   */\n  getSignedNumDecreasingOrUndefined_asString() {\n    return jspb_internal_adapters.getOneofInt64StringFieldOrUndefined_asString(this, 4, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional string string_decreasing = 3;\n   * @override\n   * @return {string|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getStringDecreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getStringDecreasing() {\n    return jspb_internal_adapters.getOneofStringFieldLegacyNullable(this, 3, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional string string_decreasing = 3;\n   * @override\n   * @return {string|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getStringDecreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getStringDecreasing_legacyNullable() {\n    return jspb_internal_adapters.getOneofStringFieldLegacyNullable(this, 3, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * @param {string|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setStringDecreasing(value) {\n    return jspb_internal_adapters.setOneofStringField(this, 3, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearStringDecreasing() {\n    return jspb_internal_adapters.clearOneofField(this, 3, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasStringDecreasing() {\n    return jspb_internal_adapters.hasOneofStringField(this, 3, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional string string_decreasing = 3;\n   * @override\n   * @return {string|undefined}\n   */\n  getStringDecreasingOrUndefined() {\n    return jspb_internal_adapters.getOneofStringFieldOrUndefined(this, 3, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_decreasing = 6;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getNumDecreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getNumDecreasing() {\n    return jspb_internal_adapters.getOneofUint64GbigintFieldLegacyNullable(this, 6, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_decreasing = 6;\n   * @override\n   * @return {string|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getNumDecreasing_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofUint64StringFieldLegacyNullable(this, 6, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_decreasing = 6;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getNumDecreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getNumDecreasing_legacyNullable() {\n    return jspb_internal_adapters.getOneofUint64GbigintFieldLegacyNullable(this, 6, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_decreasing = 6;\n   * @override\n   * @return {string|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getNumDecreasing_legacyNullable_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofUint64StringFieldLegacyNullable(this, 6, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setNumDecreasing(value) {\n    return jspb_internal_adapters.setOneofUint64StringField(this, 6, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearNumDecreasing() {\n    return jspb_internal_adapters.clearOneofField(this, 6, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasNumDecreasing() {\n    return jspb_internal_adapters.hasOneofUint64StringField(this, 6, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_decreasing = 6;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getNumDecreasingOrUndefined() {\n    return jspb_internal_adapters.getOneofUint64GbigintFieldOrUndefined(this, 6, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_decreasing = 6;\n   * @override\n   * @return {string|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getNumDecreasingOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofUint64StringFieldOrUndefined(this, 6, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_decreasing = 6;\n   * @override\n   * @return {string|undefined}\n   */\n  getNumDecreasingOrUndefined_asString() {\n    return jspb_internal_adapters.getOneofUint64StringFieldOrUndefined_asString(this, 6, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional bytes bytes = 7;\n   * @override\n   * @return {!jspb.bytestring.ByteString|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getBytesOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getBytes() {\n    return jspb_internal_adapters.getOneofBytesFieldLegacyNullable(this, 7, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional bytes bytes = 7;\n   * @override\n   * @return {!jspb.bytestring.ByteString|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getBytesOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getBytes_legacyNullable() {\n    return jspb_internal_adapters.getOneofBytesFieldLegacyNullable(this, 7, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional bytes bytes = 7;\n   * @deprecated Use getBytes() instead. See go/jspb-gencode#bytes\n   * @return {string|null}\n   * @override\n   */\n  getBytes_asB64() {\n    return /** @type {string|null} */ (jspb_internal_public_for_gencode.byteStringAsB64(\n      jspb_internal_adapters.getOneofBytesFieldLegacyNullable(this, 7, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_)));\n  }\n\n\n  /**\n   * optional bytes bytes = 7;\n   * @deprecated Use getBytes() instead. See go/jspb-gencode#bytes\n   * @return {string|null}\n   * @override\n   */\n  getBytes_asBase64OrUint8Array() {\n    return /** @type {string|null} */ (jspb_internal_public_for_gencode.byteStringAsBase64OrUint8Array(\n      jspb_internal_adapters.getOneofBytesFieldLegacyNullable(this, 7, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_)));\n  }\n\n\n  /**\n   * optional bytes bytes = 7;\n   * @deprecated Use getBytes() instead. See go/jspb-gencode#bytes\n   * @return {!Uint8Array|null}\n   */\n  getBytes_asU8() {\n    jspb_internal_public_for_gencode.assertMutable(this);\n    return /** @type {!Uint8Array|null} */ (jspb_internal_public_for_gencode.byteStringAsU8(\n      jspb_internal_adapters.getOneofBytesFieldLegacyNullable(this, 7, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_)));\n  }\n\n\n  /**\n   * @param {!(string|!Uint8Array|!jspb.bytestring.ByteString)|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setBytes(value) {\n    return jspb_internal_adapters.setOneofBytesField(this, 7, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearBytes() {\n    return jspb_internal_adapters.clearOneofField(this, 7, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasBytes() {\n    return jspb_internal_adapters.hasOneofBytesField(this, 7, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional bytes bytes = 7;\n   * @override\n   * @return {!jspb.bytestring.ByteString|undefined}\n   */\n  getBytesOrUndefined() {\n    return jspb_internal_adapters.getOneofBytesFieldOrUndefined(this, 7, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_increasing = 2;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getSignedNumIncreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getSignedNumIncreasing() {\n    return jspb_internal_adapters.getOneofInt64GbigintFieldLegacyNullable(this, 2, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_increasing = 2;\n   * @override\n   * @return {string|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getSignedNumIncreasing_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofInt64StringFieldLegacyNullable(this, 2, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_increasing = 2;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getSignedNumIncreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getSignedNumIncreasing_legacyNullable() {\n    return jspb_internal_adapters.getOneofInt64GbigintFieldLegacyNullable(this, 2, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_increasing = 2;\n   * @override\n   * @return {string|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getSignedNumIncreasing_legacyNullable_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofInt64StringFieldLegacyNullable(this, 2, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setSignedNumIncreasing(value) {\n    return jspb_internal_adapters.setOneofInt64StringField(this, 2, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearSignedNumIncreasing() {\n    return jspb_internal_adapters.clearOneofField(this, 2, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasSignedNumIncreasing() {\n    return jspb_internal_adapters.hasOneofInt64StringField(this, 2, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_increasing = 2;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getSignedNumIncreasingOrUndefined() {\n    return jspb_internal_adapters.getOneofInt64GbigintFieldOrUndefined(this, 2, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_increasing = 2;\n   * @override\n   * @return {string|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getSignedNumIncreasingOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofInt64StringFieldOrUndefined(this, 2, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional int64 signed_num_increasing = 2;\n   * @override\n   * @return {string|undefined}\n   */\n  getSignedNumIncreasingOrUndefined_asString() {\n    return jspb_internal_adapters.getOneofInt64StringFieldOrUndefined_asString(this, 2, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional string string = 1;\n   * @override\n   * @return {string|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getStringOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getString() {\n    return jspb_internal_adapters.getOneofStringFieldLegacyNullable(this, 1, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional string string = 1;\n   * @override\n   * @return {string|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getStringOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getString_legacyNullable() {\n    return jspb_internal_adapters.getOneofStringFieldLegacyNullable(this, 1, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * @param {string|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setString(value) {\n    return jspb_internal_adapters.setOneofStringField(this, 1, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearString() {\n    return jspb_internal_adapters.clearOneofField(this, 1, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasString() {\n    return jspb_internal_adapters.hasOneofStringField(this, 1, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional string string = 1;\n   * @override\n   * @return {string|undefined}\n   */\n  getStringOrUndefined() {\n    return jspb_internal_adapters.getOneofStringFieldOrUndefined(this, 1, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_increasing = 8;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getNumIncreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getNumIncreasing() {\n    return jspb_internal_adapters.getOneofUint64GbigintFieldLegacyNullable(this, 8, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_increasing = 8;\n   * @override\n   * @return {string|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getNumIncreasing_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofUint64StringFieldLegacyNullable(this, 8, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_increasing = 8;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getNumIncreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getNumIncreasing_legacyNullable() {\n    return jspb_internal_adapters.getOneofUint64GbigintFieldLegacyNullable(this, 8, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_increasing = 8;\n   * @override\n   * @return {string|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getNumIncreasing_legacyNullable_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofUint64StringFieldLegacyNullable(this, 8, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setNumIncreasing(value) {\n    return jspb_internal_adapters.setOneofUint64StringField(this, 8, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearNumIncreasing() {\n    return jspb_internal_adapters.clearOneofField(this, 8, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasNumIncreasing() {\n    return jspb_internal_adapters.hasOneofUint64StringField(this, 8, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_increasing = 8;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getNumIncreasingOrUndefined() {\n    return jspb_internal_adapters.getOneofUint64GbigintFieldOrUndefined(this, 8, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_increasing = 8;\n   * @override\n   * @return {string|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getNumIncreasingOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofUint64StringFieldOrUndefined(this, 8, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional uint64 num_increasing = 8;\n   * @override\n   * @return {string|undefined}\n   */\n  getNumIncreasingOrUndefined_asString() {\n    return jspb_internal_adapters.getOneofUint64StringFieldOrUndefined_asString(this, 8, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional double double_decreasing = 9;\n   * @override\n   * @return {number|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getDoubleDecreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getDoubleDecreasing() {\n    return jspb_internal_adapters.getOneofFloatingPointFieldLegacyNullable(this, 9, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional double double_decreasing = 9;\n   * @override\n   * @return {number|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getDoubleDecreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getDoubleDecreasing_legacyNullable() {\n    return jspb_internal_adapters.getOneofFloatingPointFieldLegacyNullable(this, 9, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * @param {number|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setDoubleDecreasing(value) {\n    return jspb_internal_adapters.setOneofFloatingPointField(this, 9, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearDoubleDecreasing() {\n    return jspb_internal_adapters.clearOneofField(this, 9, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasDoubleDecreasing() {\n    return jspb_internal_adapters.hasOneofFloatingPointField(this, 9, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional double double_decreasing = 9;\n   * @override\n   * @return {number|undefined}\n   */\n  getDoubleDecreasingOrUndefined() {\n    return jspb_internal_adapters.getOneofFloatingPointFieldOrUndefined(this, 9, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional double double_increasing = 10;\n   * @override\n   * @return {number|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getDoubleIncreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getDoubleIncreasing() {\n    return jspb_internal_adapters.getOneofFloatingPointFieldLegacyNullable(this, 10, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional double double_increasing = 10;\n   * @override\n   * @return {number|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getDoubleIncreasingOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getDoubleIncreasing_legacyNullable() {\n    return jspb_internal_adapters.getOneofFloatingPointFieldLegacyNullable(this, 10, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * @param {number|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setDoubleIncreasing(value) {\n    return jspb_internal_adapters.setOneofFloatingPointField(this, 10, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearDoubleIncreasing() {\n    return jspb_internal_adapters.clearOneofField(this, 10, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasDoubleIncreasing() {\n    return jspb_internal_adapters.hasOneofFloatingPointField(this, 10, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional double double_increasing = 10;\n   * @override\n   * @return {number|undefined}\n   */\n  getDoubleIncreasingOrUndefined() {\n    return jspb_internal_adapters.getOneofFloatingPointFieldOrUndefined(this, 10, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional google.protobuf.Timestamp timestamp_decreasing = 11;\n   * @override\n   * @return {!jspb$google$protobuf$MutableTimestamp|undefined}\n   */\n  getTimestampDecreasing() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$google$protobuf$MutableTimestamp, 11, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional google.protobuf.Timestamp timestamp_decreasing = 11;\n   * @override\n   * @return {!jspb$ro.google$protobuf$ReadonlyTimestamp}\n   */\n  getReadonlyTimestampDecreasing() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$google$protobuf$MutableTimestamp, 11, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional google.protobuf.Timestamp timestamp_decreasing = 11;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$google$protobuf$MutableTimestamp|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$google$protobuf$MutableTimestamp') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$google$protobuf$MutableTimestamp|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$google$protobuf$MutableTimestamp\n   */\n  getMutableTimestampDecreasing(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$google$protobuf$MutableTimestamp, 11, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.google$protobuf$ReadonlyTimestamp|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setTimestampDecreasing(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$google$protobuf$MutableTimestamp, 11, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearTimestampDecreasing() {\n    return jspb_internal_adapters.clearOneofField(this, 11, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasTimestampDecreasing() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$google$protobuf$MutableTimestamp, 11, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional google.protobuf.Timestamp timestamp_decreasing = 11;\n   * @override\n   * @return {!jspb$ro.google$protobuf$ReadonlyTimestamp|undefined}\n   */\n  getTimestampDecreasingOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$google$protobuf$MutableTimestamp, 11, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional google.protobuf.Timestamp timestamp_increasing = 12;\n   * @override\n   * @return {!jspb$google$protobuf$MutableTimestamp|undefined}\n   */\n  getTimestampIncreasing() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$google$protobuf$MutableTimestamp, 12, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional google.protobuf.Timestamp timestamp_increasing = 12;\n   * @override\n   * @return {!jspb$ro.google$protobuf$ReadonlyTimestamp}\n   */\n  getReadonlyTimestampIncreasing() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$google$protobuf$MutableTimestamp, 12, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional google.protobuf.Timestamp timestamp_increasing = 12;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$google$protobuf$MutableTimestamp|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$google$protobuf$MutableTimestamp') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$google$protobuf$MutableTimestamp|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$google$protobuf$MutableTimestamp\n   */\n  getMutableTimestampIncreasing(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$google$protobuf$MutableTimestamp, 12, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.google$protobuf$ReadonlyTimestamp|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setTimestampIncreasing(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$google$protobuf$MutableTimestamp, 12, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearTimestampIncreasing() {\n    return jspb_internal_adapters.clearOneofField(this, 12, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasTimestampIncreasing() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$google$protobuf$MutableTimestamp, 12, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional google.protobuf.Timestamp timestamp_increasing = 12;\n   * @override\n   * @return {!jspb$ro.google$protobuf$ReadonlyTimestamp|undefined}\n   */\n  getTimestampIncreasingOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$google$protobuf$MutableTimestamp, 12, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional NullPart null_part = 13;\n   * @override\n   * @return {!jspb$punctual$proto$ObjectPath$MutableNullPart|undefined}\n   */\n  getNullPart() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$ObjectPath$MutableNullPart, 13, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional NullPart null_part = 13;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ObjectPath$ReadonlyNullPart}\n   */\n  getReadonlyNullPart() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$ObjectPath$MutableNullPart, 13, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional NullPart null_part = 13;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$ObjectPath$MutableNullPart|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$ObjectPath$MutableNullPart') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ObjectPath$MutableNullPart|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ObjectPath$MutableNullPart\n   */\n  getMutableNullPart(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$ObjectPath$MutableNullPart, 13, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ObjectPath$ReadonlyNullPart|null|undefined} value\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  setNullPart(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$ObjectPath$MutableNullPart, 13, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$ObjectPath$MutablePart} returns this\n   */\n  clearNullPart() {\n    return jspb_internal_adapters.clearOneofField(this, 13, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasNullPart() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$ObjectPath$MutableNullPart, 13, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n  /**\n   * optional NullPart null_part = 13;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ObjectPath$ReadonlyNullPart|undefined}\n   */\n  getNullPartOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$ObjectPath$MutableNullPart, 13, jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ObjectPath$ImmutablePart}\n */\njspb$punctual$proto$ObjectPath$MutablePart.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$ObjectPath$MutablePart}\n */\njspb$punctual$proto$ObjectPath$MutablePart.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$ObjectPath$MutablePart}\n */\njspb$punctual$proto$ObjectPath$MutablePart.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$ObjectPath$MutablePart));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$ObjectPath$MutablePart.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$ObjectPath$MutablePart>}\n */\njspb$punctual$proto$ObjectPath$MutablePart.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$ObjectPath$MutablePart));\n\n/**\n * Object form of Part as accepted by the `fromObject` method.\n * @typedef {{\n *  bytesDecreasing: (?string|undefined),\n *  signedNumDecreasing: (?string|undefined),\n *  stringDecreasing: (?string|undefined),\n *  numDecreasing: (?string|undefined),\n *  bytes: (?string|undefined),\n *  signedNumIncreasing: (?string|undefined),\n *  string: (?string|undefined),\n *  numIncreasing: (?string|undefined),\n *  doubleDecreasing: (?number|undefined),\n *  doubleIncreasing: (?number|undefined),\n *  timestampDecreasing: (?jspb$google$protobuf$MutableTimestamp.ObjectFormat|undefined),\n *  timestampIncreasing: (?jspb$google$protobuf$MutableTimestamp.ObjectFormat|undefined),\n *  nullPart: (?jspb$punctual$proto$ObjectPath$MutableNullPart.ObjectFormat|undefined)\n * }}\n */\njspb$punctual$proto$ObjectPath$MutablePart.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$ObjectPath$MutablePart.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$ObjectPath$MutablePart.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$ObjectPath$MutablePart.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$ObjectPath$MutablePart.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$ObjectPath$MutablePart.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.ObjectPath.Part\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ObjectPath$ImmutablePart|!jspb$punctual$proto$ObjectPath$MutablePart}\n */\njspb$ro.punctual$proto$ObjectPath$ReadonlyPart = {};\n\n/**\n * Oneof group definition.\n * @private {!ReadonlyArray<number>}\n * @const\n * @nodts\n */\njspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_ = [1,2,3,4,5,6,7,8,9,10,11,12,13];\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$ObjectPath$MutablePart.displayName = 'proto.punctual.proto.ObjectPath.Part';\n}\n/**\n * Interface form of Part as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  bytesDecreasing: (!jspb.bytestring.ByteString|undefined),\n *  signedNumDecreasing: (!gbigint|undefined),\n *  signedNumDecreasing_asString: (string|undefined),\n *  stringDecreasing: (string|undefined),\n *  numDecreasing: (!gbigint|undefined),\n *  numDecreasing_asString: (string|undefined),\n *  bytes: (!jspb.bytestring.ByteString|undefined),\n *  signedNumIncreasing: (!gbigint|undefined),\n *  signedNumIncreasing_asString: (string|undefined),\n *  string: (string|undefined),\n *  numIncreasing: (!gbigint|undefined),\n *  numIncreasing_asString: (string|undefined),\n *  doubleDecreasing: (number|undefined),\n *  doubleIncreasing: (number|undefined),\n *  timestampDecreasing: (!jspb$ro.google$protobuf$ReadonlyTimestamp|undefined),\n *  timestampIncreasing: (!jspb$ro.google$protobuf$ReadonlyTimestamp|undefined),\n *  nullPart: (!jspb$ro.punctual$proto$ObjectPath$ReadonlyNullPart|undefined)\n * }}\n */\njspb$punctual$proto$ObjectPath$MutablePart.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$ObjectPath$MutablePart.FieldsInterface} record\n * @return {!jspb$punctual$proto$ObjectPath$ImmutablePart}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$ObjectPath$MutablePart, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ObjectPath$MutablePart.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ObjectPath$ImmutablePart\n */\njspb$punctual$proto$ObjectPath$MutablePart.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$ObjectPath$MutablePart));\n","/**\n * @fileoverview Main library for JSPB, includes functions and classes related\n * to `Message` the baseclass of all generated protocol buffers.\n *\n * Functionality should go in this file if it is part of `Message` or is\n * directly related to `Message` and can't be reasonably used independently of\n * `Message`.  If the functionality is only needed for rare cases or by the\n * generated code, it would ideally go in a different file.\n */\ngoog.module('jspb');\n\nconst asserts = goog.require('goog.asserts');\nconst xid = goog.requireType('xid');\nconst {ArrayStateFlags, copyArrayBitsClone, getMessageArrayState, markArrayImmutable, markMutableReferencesAreOwned, setArrayState} = goog.require('jspb.internal_array_state');\nconst {DETAILED_JSPB_ASSERTS, GENERATE_TYPE_NAME_PROPERTIES, USE_DETAILED_MESSAGE_TYPE_HIERARCHY, getCheckEqualsConsistentWithHashCode, getCheckEqualsDoesNotChangeWithTypeInformation} = goog.require('jspb.internal_options');\nconst {EXEMPTED_SUBCLASS_MARKER, GENERATED_SUBCLASS_MARKER, InternalMessage, MESSAGE_PROTOTYPE_MARKER_VALUE, checkMutableMessage, disallowPassingToStructuredClone, getHasMessageId, getInternalArray, isImmutableMessage, isSparseObject, setInternalArray, setInternalArrayForNewMessage, setMessageCtorInDebug} = goog.require('jspb.internal');\nconst {ExtensionFieldInfo} = goog.requireType('jspb.extension_field_info');\nconst {ImmutableMessage} = goog.requireType('jspb.immutable_message');\nconst {MESSAGE_PROTOTYPE_MARKER} = goog.require('jspb.internal_symbols');\nconst {MutableMessageInterface} = goog.require('jspb.message_interface');\nconst {MutableMessage} = goog.requireType('jspb.mutable_message');\nconst {PivotSelector} = goog.require('jspb.dynamic_pivot_selection');\nconst {clearField, getMutableWrapperField, getReadonlyRepeatedWrapperField, getReadonlyWrapperField, getRepeatedFieldReturnType, getRepeatedIndexedMutableWrapper, hasWrapperField} = goog.require('jspb_internal_adapters');\nconst {clearUnknownField, maybeReviveUnknownField, recordUnknownFieldAccess} = goog.require('jspb.internal_unknown_fields');\nconst {cloneRaw, toJsonValue} = goog.require('jspb.internal_copy');\nconst {compareFields, compareMessages} = goog.require('jspb.internal_compare');\nconst {constructMessageArrayForMessageConstructor} = goog.require('jspb.internal_construct');\nconst {copyMutableIntoMessage, copyMutableWithImmutableFields, deserializeAsImmutable, messageToImmutable, messageToMutable} = goog.require('jspb.internal_immutability');\nconst {dumpInternal} = goog.require('jspb.internal_dump');\nconst {getDefaultImmutableInstance} = goog.require('jspb.internal_accessor_helpers');\nconst {hashCode} = goog.require('jspb.internal_j2cl_helpers');\nconst {logNewArray, logOperation, withoutLogging} = goog.require('jspb.internal_operations');\nconst {transferArray} = goog.require('jspb.internal.transfer_array');\n/** @suppress {extraRequire} used by TTL. */\ngoog.requireType('jspb.immutable_message.ImmutableMessage');\n/** @suppress {extraRequire} used by TTL. */\ngoog.requireType('jspb.mutable_message.MutableMessage');\n\n\n/**\n * @define {boolean} Whether to generate toString methods for objects. Turn\n *     this off if you do not use toString in your project and want to trim it\n *     from the compiled JS.\n */\nconst GENERATE_TO_STRING = goog.define('jspb.Message.GENERATE_TO_STRING', true);\n\n\n/**\n * Base class for all JsPb messages.\n *\n * Several common methods (toObject, serializeBinary, in particular) are not\n * defined on the prototype to encourage code patterns that minimize code bloat\n * due to otherwise unused code on all protos contained in the project.\n *\n * If you want to call these methods on a generic message, either\n * pass in your instance of method as a parameter:\n *     someFunction(instanceOfKnownProto,\n *                  KnownProtoClass.prototype.serializeBinary);\n * or use a lambda that knows the type:\n *     someFunction(()=>instanceOfKnownProto.serializeBinary());\n * or, if you don't care about code size, just suppress the\n *     WARNING - Property serializeBinary never defined on Message\n * and call it the intuitive way.\n *\n * @abstract\n * @struct\n * @implements {InternalMessage}\n * @implements {MutableMessageInterface<ImmutableMessage, MutableMessage>}\n */\nclass Message {\n  /**\n   * @param {?Array<?>|undefined} data An initial data array.\n   * @param {number=} suggestedPivot The field number at which to\n   *     firstFieldIndex putting fields into the extension object. This is only\n   *     used if data does not contain an extension object already. 0/undefined\n   *     if no extension object is required for this message type.\n   * @param {string=} messageId The jspb message_id if any\n   */\n  constructor(data, suggestedPivot, messageId) {\n    // We set this below if it's a property and not a symbol but we need to\n    // declare it here.\n    /** @const {undefined} */\n    this.messagePrototypeMarker;\n\n    if (goog.DEBUG) {\n      makeMessageUnpredicable(this);\n      disallowPassingToStructuredClone(this);\n\n      // Add some debug only consistency checks\n      // Were we directly called?\n      asserts.assertInstanceof(\n          this, Message,\n          'The message constructor should only be used by subclasses');\n\n      // Were we directly instantiated?\n      asserts.assert(\n          this.constructor !== Message,\n          'Message is an abstract class and cannot be directly constructed');\n\n      // Now check that we are an expected subclass, or explicitly exempted.\n      if (asserts.ENABLE_ASSERTS &&\n          // Cast is necessary to remove @struct\n          (/** @type {!Object} */ (this)[EXEMPTED_SUBCLASS_MARKER] !== true) &&\n          USE_DETAILED_MESSAGE_TYPE_HIERARCHY) {\n        // We could technically do both checks at once with the second assert,\n        // but this leads to slightly better error messages.\n\n        // Is this a subclass of GeneratedMessage?\n        asserts.assert(\n            // Cast is necessary to remove @struct\n            /** @type{!Object} */ (this)[GENERATED_SUBCLASS_MARKER] === true,\n            'Message can only be subclassed by proto gencode.');\n        const parentPrototype =\n            Object.getPrototypeOf(asserts.assert(Object.getPrototypeOf(this)));\n        // Is the concrete type a direct subclass of GeneratedMessage.\n        asserts.assert(\n            parentPrototype.hasOwnProperty(GENERATED_SUBCLASS_MARKER),\n            'Generated jspb classes should not be extended');\n      }\n    }\n\n    setInternalArrayForNewMessage(\n        this,\n        constructMessageArrayForMessageConstructor(\n            data, suggestedPivot, messageId));\n\n    if (goog.DEBUG && asserts.ENABLE_ASSERTS) {\n      const arrayState = getMessageArrayState(getInternalArray(this));\n      asserts.assert(arrayState & ArrayStateFlags.CONSTRUCTED);\n      asserts.assert(arrayState & ArrayStateFlags.HAS_WRAPPER);\n      if (DETAILED_JSPB_ASSERTS) logOperation({constructMessage: 1});\n    }\n  }\n\n  /**\n   * Returns the JsPb message_id of this proto.\n   * @deprecated using this can encourage changing the value of message_id on\n   *   the message, which is highly breaking per go/jspb-options#message_id.\n   * @override\n   * @return {string|undefined} the message id or undefined if this message\n   *     has no id.\n   */\n  getJsPbMessageId() {\n    return /** @type {{messageId: (string|undefined)}} */ (this.constructor)\n        .messageId;\n  }\n\n  /**\n   * Returns this JSPB as a JSON-compatible array.\n   *\n   * WARNING: The objects returned should be treated as opaque values and only\n   * used for passing data eventually to a supported JSPB parser. Dereferencing\n   * into these objects to retrieve data is not supported and subject to random\n   * breakages.\n   *\n   * See go/jspb-api-gotchas#toJsonValue for more information.\n   *\n   * This value is NOT the go/jsonpb format. For that, see go/jspb-json-interop.\n   *\n   * Generally, `serialize()` should be called instead, but this may be useful\n   * when a JSON stringifiable value is required for compatibility with other\n   * APIs.\n   *\n   * Note that this function performs a deep clone and converts internal\n   * Uint8Array objects to base64 strings, and therefore the function is fairly\n   * expensive, though not quite as expensive as serializing then deserializing.\n   *\n   * @param {!PivotSelector=} pivotSelector to use for selecting a pivot.\n   * @return {!Array<?>} The proto represented as an array.\n   * @override\n   */\n  toJsonValue(pivotSelector) {\n    return toJsonValue(this, pivotSelector);\n  }\n\n  /**\n   * Returns this JSPB as a JSON.stringify-compatible array.\n   *\n   * Generally, `serialize()` should be called instead, but this may be useful\n   * when a JSON stringifiable value is required for compatibility with other\n   * APIs.\n   *\n   * @return {!Array<?>} The proto represented as an array.\n   * @override\n   * @private\n   */\n  toJSON() {\n    // TODO(b/385213186): delete this method. The JSPB runtime no longer relies\n    // on it. Add an assert fail, then delete.\n    return toJsonValue(this);\n  }\n\n  /**\n   * Serializes a message to the go/jspb-wireformat for use in server requests.\n   *\n   * @override\n   * @this {!Message}\n   * @param {!PivotSelector=} pivotSelector to use for selecting a pivot.\n   * @return {string} The serialized proto.\n   */\n  serialize(pivotSelector) {\n    return JSON.stringify(toJsonValue(this, pivotSelector));\n  }\n\n  /**\n   * Deserialize a JsPb string.\n   * @param {function(new:JSPB, ?Array=)} ctor The constructor of the\n   *     message type.\n   * @param {string} data Our serialized data.\n   * @return {JSPB} The new message with the serialized data populating\n   *     its fields.\n   * @template JSPB\n   */\n  static deserializeWithCtor(ctor, data) {\n    // use asserts on parameters as a defense in depth for our type signatures\n    // use actual errors for issues related to data.\n    asserts.assertFunction(ctor);\n    // Treat null/undefined/'' as an empty message. This is heavily depended\n    // upon by tests and production applications.\n    //\n    // TODO(b/219382249): null/undefined is somewhat defensible but '' less so,\n    // try to eliminate that case.\n    if (data == null || data == '') {\n      return asserts.assertInstanceof(new ctor(), Message);\n    }\n\n    asserts.assertString(data);\n    const array = JSON.parse(data);\n    if (!Array.isArray(array)) {\n      throw new Error(\n          goog.DEBUG ? ('Expected to deserialize an Array but got ' +\n                        goog.typeOf(array) + ': ' + array) :\n                       'dnarr');\n    }\n\n    return new ctor(markMutableReferencesAreOwned(array));\n  }\n\n  /**\n   * Gets the value of the extension field from the extended object.\n   *\n   * This may actually return `null|undefined` (b/26920357) but is incorrectly\n   * typed: prefer using `getExtensionOrUndefined` which is more explicit. See\n   * go/jspb-api-gotchas#nullability\n   *\n   * @override\n   * @param {!ExtensionFieldInfo<M, I, EXTENDEE, IE>} fieldInfo Specifies the\n   *     field to get.\n   * @return {M} The value of the field.\n   * @template M, I, IE\n   * @template THIS\n   * Use TTL to force agreement between the extendee and this, otherwise the\n   * jscompiler may resolve mismatches with a union which may cause errors to go\n   * unnoticed or create odd error messages.\n   * @template EXTENDEE := THIS =:\n   * @this {THIS}\n   * @suppress {visibility} ExtensionFieldInfo internals.\n   * @tsType <\n   *   THIS,\n   *   MValue,\n   *   IValue,\n   *   MExtendee extends\n   *     | THIS\n   *     |\n   * import('google3/javascript/apps/jspb/mutable_message').MutableMessage<THIS>,\n   *   IExtendee extends\n   *     | THIS\n   *     | import('google3/javascript/apps/jspb/immutable_message')\n   *           .ImmutableMessage<THIS>\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     MValue,\n   *     IValue,\n   *     MExtendee,\n   *     IExtendee\n   *   >\n   * ): THIS extends\n   *     import('google3/javascript/apps/jspb/immutable_message').ImmutableMessage\n   *   ? IValue\n   *   : MValue\n   */\n  getExtension(fieldInfo) {\n    asserts.assertInstanceof(this, fieldInfo.extendeeCtor);\n    const self = /** @type {!MutableMessage<I>} */ (\n        asserts.assertInstanceof(this, Message));\n    recordUnknownFieldAccess(self, fieldInfo.fieldIndex);\n    maybeReviveUnknownField(self, fieldInfo.fieldIndex, fieldInfo.lazyParse);\n    const freezeOptOut = undefined;\n    const value = fieldInfo.ctor ?\n        (fieldInfo.isRepeated ? fieldInfo.getExtensionFn(\n                                    self, fieldInfo.ctor, fieldInfo.fieldIndex,\n                                    getRepeatedFieldReturnType(freezeOptOut),\n                                    fieldInfo.hasMessageId) :\n                                fieldInfo.getExtensionFn(\n                                    self, fieldInfo.ctor, fieldInfo.fieldIndex,\n                                    fieldInfo.hasMessageId)) :\n        (fieldInfo.isRepeated ?\n             fieldInfo.getExtensionFn(\n                 self, fieldInfo.fieldIndex,\n                 getRepeatedFieldReturnType(freezeOptOut),\n                 fieldInfo.hasMessageId) :\n             fieldInfo.getExtensionFn(\n                 self, fieldInfo.fieldIndex, fieldInfo.defaultValue,\n                 fieldInfo.hasMessageId));\n\n    // Otherwise, return.\n    return value;\n  }\n\n  /**\n   * Gets the value of the message-valued extension field from the extended\n   * object. This can be singular or repeated, if singular and not present, this\n   * accessor returns a default instance.\n   *\n   * This cannot be used with ImmutableJS extensions.\n   *\n   * @override\n   * @param {!ExtensionFieldInfo<M, I, EXTENDEE>} fieldInfo Specifies the field\n   *     to get.\n   * @return {READONLY_RESULT_WITHOUT_UNKNOWNS} The value of the field.\n   * @template M, I\n   * @template THIS\n   * Use TTL to force agreement between the extendee and this, otherwise the\n   * jscompiler may resolve mismatches with a union which may cause errors to go\n   * unnoticed or create odd error messages.\n   * @template EXTENDEE := THIS =:\n   * @template READONLY_RESULT :=\n   *   mapunion(union(M, I), (X) =>\n   *     cond(\n   *       sub(\n   *         cond(isTemplatized(X) && (\n   *           eq(rawTypeOf(X), 'Array') || eq(rawTypeOf(X), 'ReadonlyArray')),\n   *           templateTypeOf(X, 0),\n   *           X),\n   *         union(\n   *           'jspb.mutable_message.MutableMessage',\n   *           'jspb.immutable_message.ImmutableMessage')),\n   *       X,\n   *       none()))\n   * =:\n   * @template READONLY_RESULT_WITHOUT_UNKNOWNS :=\n   *   cond(isUnknown(READONLY_RESULT), 'undefined', READONLY_RESULT)\n   * =:\n   * @this {THIS}\n   * @tsType <\n   *   THIS,\n   *   MValue extends\n   *     | import('google3/javascript/apps/jspb/mutable_message').MutableMessage\n   *     | ReadonlyArray<\n   *         import('google3/javascript/apps/jspb/mutable_message').MutableMessage\n   *       >,\n   *   IValue extends\n   *     |\n   * import('google3/javascript/apps/jspb/immutable_message').ImmutableMessage\n   *     | ReadonlyArray<\n   *         import('google3/javascript/apps/jspb/immutable_message').ImmutableMessage\n   *       >,\n   *   MExtendee extends\n   *     THIS extends import('google3/javascript/apps/jspb/immutable_message')\n   *         .ImmutableMessage<unknown>\n   *       ?\n   * import('google3/javascript/apps/jspb/mutable_message').MutableMessage<THIS>\n   *       : THIS\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     MValue,\n   *     IValue,\n   *     MExtendee\n   *   >\n   * ): THIS extends import('google3/javascript/apps/jspb/immutable_message')\n   *     .ImmutableMessage<unknown>\n   *   ? IValue\n   *   : MValue | IValue\n   */\n  getReadonlyExtension(fieldInfo) {\n    asserts.assert(fieldInfo.ctor);\n    asserts.assertInstanceof(this, fieldInfo.extendeeCtor);\n    const self = /** @type {!Message} */ (this);\n    // TODO: b/397982381 - this is buggy with unknown fields, we only report\n    // for now to preserve existing behavior.\n    recordUnknownFieldAccess(self, fieldInfo.fieldIndex);\n    maybeReviveUnknownField(self, fieldInfo.fieldIndex, fieldInfo.lazyParse);\n    return fieldInfo.isRepeated ?\n        getReadonlyRepeatedWrapperField(\n            self, fieldInfo.ctor, fieldInfo.fieldIndex,\n            fieldInfo.hasMessageId) :\n        getReadonlyWrapperField(\n            self, fieldInfo.ctor, fieldInfo.fieldIndex, fieldInfo.hasMessageId);\n  }\n\n  /**\n   * Gets the value of the message-valued extension field from the extended\n   * object as a mutable message. The field must be singular, since getExtension\n   * will already return only truthy mutable values for repeated fields.\n   *\n   * This cannot be used with ImmutableJS extensions.\n   *\n   * @protected exposed on mutable messages\n   * @param {!ExtensionFieldInfo<M, I, EXTENDEE>} fieldInfo Specifies the field\n   *     to get.\n   * @return {MUTABLE_RESULT_WITHOUT_UNKNOWNS} The value of the field.\n   * @template M, I\n   * @template THIS\n   * Use TTL to force agreement between the extendee and this, otherwise the\n   * jscompiler may resolve mismatches with a union which may cause errors to go\n   * unnoticed or create odd error messages.\n   * @template EXTENDEE := THIS =:\n   * @template MUTABLE_RESULT :=\n   *   mapunion(union(M, I), (X) =>\n   *     cond(sub(X, 'jspb.mutable_message.MutableMessage'), X, none()))\n   * =:\n   * @template MUTABLE_RESULT_WITHOUT_UNKNOWNS :=\n   *   cond(isUnknown(MUTABLE_RESULT), 'undefined', MUTABLE_RESULT)\n   * =:\n   * @this {THIS}\n   * @tsType <\n   *   THIS,\n   *   MValue extends\n   *     import('google3/javascript/apps/jspb/mutable_message').MutableMessage,\n   *   IValue extends\n   *     import('google3/javascript/apps/jspb/immutable_message').ImmutableMessage,\n   *   MExtendee extends\n   *     THIS extends import('google3/javascript/apps/jspb/immutable_message')\n   *         .ImmutableMessage<unknown>\n   *       ?\n   * import('google3/javascript/apps/jspb/mutable_message').MutableMessage<THIS>\n   *       : THIS\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     MValue,\n   *     IValue,\n   *     MExtendee\n   *   >\n   * ): THIS extends import('google3/javascript/apps/jspb/immutable_message')\n   *     .ImmutableMessage<unknown>\n   *   ? never\n   *   : MValue\n   */\n  getMutableExtension(fieldInfo) {\n    asserts.assert(fieldInfo.ctor);\n    asserts.assertInstanceof(this, fieldInfo.extendeeCtor);\n    asserts.assert(!fieldInfo.isRepeated);\n    const self = /** @type {!Message} */ (this);\n    // TODO: b/397982381 - this is buggy with unknown fields, we only report\n    // for now to preserve existing behavior.\n    recordUnknownFieldAccess(self, fieldInfo.fieldIndex);\n    maybeReviveUnknownField(self, fieldInfo.fieldIndex, fieldInfo.lazyParse);\n    return getMutableWrapperField(\n        self, fieldInfo.ctor, fieldInfo.fieldIndex,\n        /* legacyOrUndefined= */ undefined, fieldInfo.hasMessageId);\n  }\n\n  /**\n   * Gets the value of the singular extension field from the extended object,\n   * returning `undefined` if it is not present.\n   *\n   * @param {!ExtensionFieldInfo<M, I, EXTENDEE, IE>} fieldInfo Specifies the\n   *     field to get.\n   * @return {MESSAGE_TYPE_NOT_ARRAY|undefined} The value of the field.\n   * @template M, I, IE\n   * @template THIS\n   * @this {THIS}\n   * Use TTL to force agreement between the extendee and this, otherwise the\n   * jscompiler may resolve mismatches with a union which may cause errors to go\n   * unnoticed or create odd error messages.\n   * @template EXTENDEE := THIS =:\n   * @template MESSAGE_TYPE_NOT_ARRAY :=\n   *     cond(isUnknown(M), unknown(),\n   *       mapunion(M, (X) =>\n   *         cond(eq(X, 'undefined'), none(),\n   *           cond(sub(X, 'ReadonlyArray'), none(),\n   *             X))))\n   * =:\n   * @suppress {visibility} ExtensionFieldInfo internals.\n   * @tsType <\n   *   THIS extends\n   *     import('google3/javascript/apps/jspb/mutable_message').MutableMessage,\n   *   MValue,\n   *   IValue,\n   *   MExtendee extends THIS,\n   *   IExtendee extends\n   *     import('google3/javascript/apps/jspb/immutable_message').ImmutableMessage<THIS>\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     Exclude<MValue, readonly unknown[]>,\n   *     Exclude<IValue, readonly unknown[]>,\n   *     MExtendee,\n   *     IExtendee\n   *   >\n   * ): MValue | undefined\n   * @tsType <\n   *   THIS extends\n   *     import('google3/javascript/apps/jspb/immutable_message').ImmutableMessage,\n   *   MValue,\n   *   IValue,\n   *   MExtendee extends\n   *     import('google3/javascript/apps/jspb/mutable_message').MutableMessage<THIS>,\n   *   IExtendee extends THIS\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     Exclude<MValue, readonly unknown[]>,\n   *     Exclude<IValue, readonly unknown[]>,\n   *     MExtendee,\n   *     IExtendee\n   *   >\n   * ): IValue | undefined\n   * @tsType <\n   *   THIS,\n   *   MValue,\n   *   IValue,\n   *   MExtendee extends\n   *     | THIS\n   *     |\n   * import('google3/javascript/apps/jspb/mutable_message').MutableMessage<THIS>,\n   *   IExtendee extends\n   *     | THIS\n   *     | import('google3/javascript/apps/jspb/immutable_message')\n   *           .ImmutableMessage<THIS>\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     Exclude<MValue, readonly unknown[]>,\n   *     Exclude<IValue, readonly unknown[]>,\n   *     MExtendee,\n   *     IExtendee\n   *   >\n   * ): MValue | IValue | undefined\n   */\n  getExtensionOrUndefined(fieldInfo) {\n    asserts.assert(\n        !fieldInfo.isRepeated,\n        'repeated extensions don\\'t support getExtensionOrUndefined');\n    asserts.assertInstanceof(this, fieldInfo.extendeeCtor);\n    const self = /** @type {!MutableMessage<I>} */ (\n        asserts.assertInstanceof(this, Message));\n    // TODO: b/397982381 - this is buggy with unknown fields, we only report\n    // for now to preserve existing behavior.\n    recordUnknownFieldAccess(self, fieldInfo.fieldIndex);\n    maybeReviveUnknownField(self, fieldInfo.fieldIndex, fieldInfo.lazyParse);\n    const result = fieldInfo.ctor ?\n        fieldInfo.getExtensionFn(\n            self, fieldInfo.ctor, fieldInfo.fieldIndex,\n            fieldInfo.hasMessageId) :\n        // Deliberately use null as the defaultValue to identify absence\n        fieldInfo.getExtensionFn(\n            self, fieldInfo.fieldIndex, /* defaultValue= */ null,\n            fieldInfo.hasMessageId);\n    return result === null ? undefined : result;\n  }\n\n  /**\n   * Returns whether the given singular extension is present.\n   *\n   * @override\n   * @param {!ExtensionFieldInfo<T, I, EXTENDEE, IE>} fieldInfo Specifies the\n   *     field to get.\n   * @return {boolean} Whether the extension is present.\n   * @template T, I, IE\n   * @template THIS\n   * @this {THIS}\n   * Use TTL to force agreement between the extendee and this, otherwise the\n   * jscompiler may resolve mismatches with a union which may cause errors to go\n   * unnoticed or create odd error messages.\n   * @template EXTENDEE := THIS =:\n   * @suppress {visibility} ExtensionFieldInfo internals.\n   * @tsType <\n   *   THIS,\n   *   MValue,\n   *   IValue,\n   *   MExtendee extends\n   *     | THIS\n   *     |\n   * import('google3/javascript/apps/jspb/mutable_message').MutableMessage<THIS>,\n   *   IExtendee extends\n   *     | THIS\n   *     | import('google3/javascript/apps/jspb/immutable_message')\n   *           .ImmutableMessage<THIS>\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     Exclude<MValue, readonly unknown[]>,\n   *     IValue,\n   *     MExtendee,\n   *     IExtendee\n   *   >\n   * ): boolean\n   */\n  hasExtension(fieldInfo) {\n    asserts.assert(\n        !fieldInfo.isRepeated,\n        'repeated extensions don\\'t support hasExtension');\n    const self = /** @type{!MutableMessage<I>} */ (\n        asserts.assertInstanceof(this, Message));\n    // TODO: b/397982381 - this is buggy with unknown fields, we only report\n    // for now to preserve existing behavior.\n    recordUnknownFieldAccess(self, fieldInfo.fieldIndex);\n    maybeReviveUnknownField(self, fieldInfo.fieldIndex, fieldInfo.lazyParse);\n    return fieldInfo.ctor ?\n        hasWrapperField(\n            self, fieldInfo.ctor, fieldInfo.fieldIndex,\n            fieldInfo.hasMessageId) :\n        (self.getExtensionOrUndefined(fieldInfo) !== undefined);\n  }\n\n  /**\n   * Gets a value in a repeated extension field.\n   *\n   * @override\n   * @param {!ExtensionFieldInfo<!ReadonlyArray<M>, !ReadonlyArray<I>,\n   *     EXTENDEE>} fieldInfo Specifies the field to get.\n   * @param {number} idx The index to read from this field.\n   * @return {M|I} The value of the field.\n   * @template M, I\n   * @template THIS\n   * Use TTL to force agreement between the extendee and this, otherwise the\n   * jscompiler may resolve mismatches with a union which may cause errors to go\n   * unnoticed or create odd error messages.\n   * @template EXTENDEE := THIS =:\n   * @this {THIS}\n   * @suppress {visibility} ExtensionFieldInfo internals.\n   * @tsType <\n   *   THIS,\n   *   MValue extends ReadonlyArray<any>,\n   *   IValue extends ReadonlyArray<any>,\n   *   MExtendee extends\n   *     | THIS\n   *     |\n   * import('google3/javascript/apps/jspb/mutable_message').MutableMessage<THIS>,\n   *   IExtendee extends\n   *     | THIS\n   *     | import('google3/javascript/apps/jspb/immutable_message')\n   *           .ImmutableMessage<THIS>\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     MValue,\n   *     IValue,\n   *     MExtendee,\n   *     IExtendee\n   *   >,\n   *   idx: number\n   * ): MValue[number] | IValue[number]\n   */\n  getExtensionAtIndex(fieldInfo, idx) {\n    const self = asserts.assertInstanceof(this, Message);\n    asserts.assertInstanceof(self, fieldInfo.extendeeCtor);\n    asserts.assert(fieldInfo.isRepeated);\n    // TODO: b/397982381 - this is buggy with unknown fields, we only report\n    // for now to preserve existing behavior.\n    recordUnknownFieldAccess(self, fieldInfo.fieldIndex);\n    maybeReviveUnknownField(self, fieldInfo.fieldIndex, fieldInfo.lazyParse);\n    return fieldInfo.ctor ?\n        fieldInfo.getExtensionAtIndexFn(\n            self, fieldInfo.fieldIndex, fieldInfo.ctor, idx,\n            fieldInfo.hasMessageId) :\n        fieldInfo.getExtensionAtIndexFn(\n            self, fieldInfo.fieldIndex, idx, fieldInfo.hasMessageId);\n  }\n\n  /**\n   * Gets the length of a repeated extension field.\n   *\n   * @override\n   * @param {!ExtensionFieldInfo<!ReadonlyArray<M>, !ReadonlyArray<I>,\n   *     EXTENDEE>} fieldInfo Specifies the field to get.\n   * @return {number} The number of values in this field.\n   * @template M, I\n   * @template THIS\n   * Use TTL to force agreement between the extendee and this, otherwise the\n   * jscompiler may resolve mismatches with a union which may cause errors to go\n   * unnoticed or create odd error messages.\n   * @template EXTENDEE := THIS =:\n   * @this {THIS}\n   * @suppress {visibility} ExtensionFieldInfo internals.\n   * @tsType <\n   *   THIS,\n   *   MValue extends ReadonlyArray<any>,\n   *   IValue extends ReadonlyArray<any>,\n   *   MExtendee extends\n   *     THIS extends import('google3/javascript/apps/jspb/immutable_message')\n   *         .ImmutableMessage<unknown>\n   *       ?\n   * import('google3/javascript/apps/jspb/mutable_message').MutableMessage<THIS>\n   *       : THIS\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     MValue,\n   *     IValue,\n   *     MExtendee\n   *   >\n   * ): number\n   */\n  getExtensionCount(fieldInfo) {\n    const self = /** @type {!Message} */ (this);\n    asserts.assertInstanceof(self, fieldInfo.extendeeCtor);\n    asserts.assertInstanceof(self, Message);\n    asserts.assert(fieldInfo.isRepeated);\n    // TODO: b/397982381 - this is buggy with unknown fields, we only report\n    // for now to preserve existing behavior.\n    recordUnknownFieldAccess(self, fieldInfo.fieldIndex);\n    maybeReviveUnknownField(self, fieldInfo.fieldIndex, fieldInfo.lazyParse);\n    return fieldInfo.ctor ?\n        fieldInfo.getExtensionCountFn(\n            self, fieldInfo.ctor, fieldInfo.fieldIndex,\n            fieldInfo.hasMessageId) :\n        fieldInfo.getExtensionCountFn(\n            self, fieldInfo.fieldIndex, fieldInfo.hasMessageId);\n  }\n\n  /**\n   * Creates a difference object between two messages.\n   *\n   * The result will contain the top-level fields of m2 that differ from those\n   * of m1 at any level of nesting.\n   *\n   * @param {MESSAGE_TYPE} m1 The first message object.\n   * @param {MESSAGE_TYPE} m2 The second message object.\n   * @return {MESSAGE_TYPE_NOT_UNDEFINED} The difference returned as a proto\n   *     message. Note that the returned message may be missing required fields.\n   *     This is currently tolerated in JS, but would cause an error if you\n   *     tried to send such a proto to the server.\n   * @throws {!Error} If the messages are responses with different types.\n   *\n   * Use go/closure-ttl to declare a non-undefined version of T_CHILD. Replace\n   * the undefined in blah|undefined with none. This is necessary because the\n   * compiler will infer MESSAGE_TYPE to be |undefined.\n   * @template MESSAGE_TYPE\n   * @template MESSAGE_TYPE_NOT_UNDEFINED :=\n   *     cond(isUnknown(MESSAGE_TYPE), unknown(),\n   *       mapunion(MESSAGE_TYPE, (X) =>\n   *         cond(eq(X, 'undefined'), none(), X)))\n   * =:\n   * @tsType <T extends\n   * import('google3/javascript/apps/jspb/message').Message>(m1: T, m2: T): T\n   * @deprecated Avoid using this method, consider tracking differences manually\n   *     or using APIs like `jspb.debug.messageEquals` to compare protos. See\n   *     go/jspb-api-gotchas#difference for more information.\n   */\n  static difference(m1, m2) {\n    if (!(m1 instanceof Message)) {\n      throw new Error('Message.difference called on non-Message.');\n    }\n    if (m1.constructor !== m2.constructor) {\n      throw new Error('Messages have different types.');\n    }\n    const isImmutable = isImmutableMessage(m1);\n    if (isImmutable !== isImmutableMessage(m2)) {\n      throw new Error('Messages must both be immutable or both be mutable.');\n    }\n    const arr1 = getInternalArray(m1);\n    // Convert to immutable to make field values safe to share.\n    const arr2 = getInternalArray(messageToImmutable(m2));\n    const res = logNewArray([]);\n    let firstFieldIndex = 0;\n    const length = Math.max(arr1.length, arr2.length);\n    const messageId = m1.getJsPbMessageId();\n    if (messageId) {\n      res[0] = messageId;\n      firstFieldIndex = 1;\n    }\n    for (let i = firstFieldIndex; i < length; i++) {\n      const v1 = arr1[i];\n      const v2 = arr2[i];\n      if (i === arr2.length - 1 && isSparseObject(v2)) {\n        // According to the implementation of compareFields, if one is a\n        // sparse object, they should both be.\n        const resObj = (res[i] = {});\n        const fromObj = isSparseObject(v1) ? v1 : {};\n        const toObj = arr2[i];\n        for (const key in toObj) {\n          if (!compareFields(fromObj[key], toObj[key])) {\n            resObj[key] = toObj[key];\n          }\n        }\n      } else if (!compareFields(v1, v2)) {\n        res[i] = v2;\n      }\n    }\n    if (isImmutable) {\n      markArrayImmutable(res);\n    }\n    return new m1.constructor(markMutableReferencesAreOwned(res));\n  }\n\n\n  /**\n   * Tests whether two messages are equal.\n   *\n   * See go/jspb-api-gotchas#equals for more information.\n   *\n   * @param {?Message|undefined} m1 The first message object.\n   * @param {?Message|undefined} m2 The second message object.\n   * @return {boolean} true if both messages are null/undefined, or if both are\n   *     of the same type and have the same field values.\n   */\n  static equals(m1, m2) {\n    const result = m1 === m2 || (m1 == null && m2 == null) ||\n        (!!(m1 && m2) && (m1 instanceof m2.constructor) &&\n         compareMessages(m1, m2));\n\n    // If the result of this comparison would've changed from type information\n    // being present, instruct the user to add a call to\n    // makeCrossSerializerComparisonsCompatible.\n    if (getCheckEqualsDoesNotChangeWithTypeInformation() && goog.DEBUG && m1 &&\n        m2 && (m1.constructor === m2.constructor) && !result) {\n      const ctor = m1.constructor;\n      const makeCrossSerializerComparisonsCompatible =\n          ctor['makeCrossSerializerComparisonsCompatible'];\n      if (makeCrossSerializerComparisonsCompatible) {\n        withoutLogging(() => {\n          const m1WithTypeInfo = new ctor(m1.toJsonValue());\n          makeCrossSerializerComparisonsCompatible(m1WithTypeInfo);\n          const resultWithLeftTypeInfo =\n              compareMessages(m1WithTypeInfo, asserts.assert(m2));\n          if (resultWithLeftTypeInfo) {\n            throw new Error(\n                'Comparison between protos had a false negative and would ' +\n                'have changed from false to true with type information. ' +\n                `Please add a call to ${\n                    ctor.displayName}.makeCrossSerializerComparisonsCompatible ` +\n                'to one or both sides of the comparison to ensure it is ' +\n                'reliable.\\n\\nCompared protos were:\\n' +\n                `${m1.serialize()} and ${m2.serialize()}\\n`);\n          }\n        });\n      }\n    }\n\n    // Test validity of our hash function when possible.\n    if (getCheckEqualsConsistentWithHashCode() && goog.DEBUG && m1 && result) {\n      const h1 = hashCode(m1);\n      const h2 = hashCode(m2);\n      if (h1 !== h2) {\n        asserts.fail(\n            'expect messages %s and %s to have the same hashCode, got %s and %s',\n            m1.serialize(), m2.serialize(), h1, h2);\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Makes a mutable copy of this message. This copies any mutable state.\n   *\n   * Named `clone` for compatibility with `goog.object.unsafeClone`\n   *\n   * @override\n   * @return {!MutableMessage}\n   * @tsType ():\n   * import('google3/javascript/apps/jspb/mutable_message').MutableMessage\n   */\n  clone() {\n    const self = asserts.assertInstanceof(this, Message);\n    return /** @type {!MutableMessage} */ (\n        copyMutableWithImmutableFields(self));\n  }\n\n  /**\n   * Returns whether this message is mutable.\n   *\n   * @return {boolean}\n   * @tsType <T>(\n   *   this: T\n   * ): this is T extends import('google3/javascript/apps/jspb/mutable_message')\n   *     .MutableMessage<any>\n   *   ? T\n   *   :\n   * import('google3/javascript/apps/jspb/mutable_message').MutableMessage<unknown>\n   */\n  isMutable() {\n    return !isImmutableMessage(/** @type {!Message} */ (this));\n  }\n\n  /**\n   * Returns whether this message is immutable.\n   *\n   * @return {boolean}\n   * @override\n   * @tsType <T>(\n   *   this: T\n   * ): this is T extends\n   * import('google3/javascript/apps/jspb/immutable_message')\n   *     .ImmutableMessage<any>\n   *   ? T\n   *   : import('google3/javascript/apps/jspb/immutable_message')\n   *         .ImmutableMessage<unknown>\n   */\n  isImmutable() {\n    return isImmutableMessage(/** @type {!Message} */ (this));\n  }\n\n  /**\n   * Coerces this message to a mutable message. Performs no copy if it is\n   * already mutable.\n   *\n   * @override\n   * @return {!MutableMessage<?>}\n   * @protected this is made public by subclasses with better types.\n   */\n  toMutable() {\n    return /** @type {!MutableMessage<?>} */ (messageToMutable(this));\n  }\n\n  /**\n   * Coerces this message to an immutable message. Performs no copy if it is\n   * already immutable.\n   *\n   * @override\n   * @return {!ImmutableMessage<?>}\n   */\n  toImmutable() {\n    return /** @type {!ImmutableMessage<?>} */ (messageToImmutable(this));\n  }\n\n  /**\n   * Sets the value of the extension field in the extended object.\n   *\n   * If you pass `undefined` to this method, it unsets the extension.\n   *\n   * @override\n   * @package will be presented only on MutableMessage or via J2CL\n   * @param {!ExtensionFieldInfo<EM, EI, EXTENDEE>} fieldInfo Specifies the\n   *     field to set.\n   * @param {M_OR_I_OR_NULL_OR_UNDEFINED} value The value to set.\n   * @return {THIS} For chaining\n   * @template THIS, EM, EI\n   * Use TTL to force agreement between the extendee and this, otherwise the\n   * jscompiler may resolve mismatches with a union which may cause errors to go\n   * unnoticed or create odd error messages.\n   * @template EXTENDEE := THIS =:\n   * Use TTL to prevent type inference on value\n   * @template M_OR_I_OR_NULL_OR_UNDEFINED := union(EM, EI, 'null', 'undefined')\n   *     =:\n   * @this {THIS}\n   * @suppress {visibility} ExtensionFieldInfo internals.\n   * @tsType <\n   *   THIS extends\n   *     import('google3/javascript/apps/jspb/mutable_message').MutableMessage<unknown>,\n   *   MValue,\n   *   IValue\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     MValue,\n   *     IValue,\n   *     THIS\n   *   >,\n   *   value: MValue | IValue | null | undefined\n   * ): this\n   */\n  setExtension(fieldInfo, value) {\n    const self = /** @type {!MutableMessage<?>} */ (this);\n    asserts.assertInstanceof(self, fieldInfo.extendeeCtor);\n    clearUnknownField(self, fieldInfo.fieldIndex);\n    return fieldInfo.ctor ?\n        fieldInfo.setExtensionFn(\n            self, fieldInfo.ctor, fieldInfo.fieldIndex, value,\n            fieldInfo.hasMessageId) :\n        fieldInfo.setExtensionFn(\n            self, fieldInfo.fieldIndex, value, fieldInfo.hasMessageId);\n  }\n\n  /**\n   * Clears the value of an extension field in the extended object.\n   *\n   * If you pass `undefined` to this method, it unsets the extension.\n   *\n   * @override\n   * @package will be presented only on MutableMessage or via J2CL\n   * @param {!ExtensionFieldInfo<EM, EI, EXTENDEE>} fieldInfo Specifies the\n   *     field to set.\n   * @return {THIS} For chaining\n   * @template THIS, EM, EI\n   * Use TTL to force agreement between the extendee and this, otherwise the\n   * jscompiler may resolve mismatches with a union which may cause errors to go\n   * unnoticed or create odd error messages.\n   * @template EXTENDEE := THIS =:\n   * Use TTL to prevent type inference on value\n   * @template M_OR_I_OR_NULL_OR_UNDEFINED := union(EM, EI, 'null', 'undefined')\n   *     =:\n   * @this {THIS}\n   * @suppress {visibility} ExtensionFieldInfo internals.\n   * @tsType <\n   *   THIS extends\n   *     import('google3/javascript/apps/jspb/mutable_message').MutableMessage<unknown>,\n   *   MValue,\n   *   IValue\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     MValue,\n   *     IValue,\n   *     THIS\n   *   >\n   * ): this\n   */\n  clearExtension(fieldInfo) {\n    const self = /** @type {!MutableMessage<?>} */ (this);\n    asserts.assertInstanceof(self, fieldInfo.extendeeCtor);\n    clearUnknownField(self, fieldInfo.fieldIndex);\n    return clearField(self, fieldInfo.fieldIndex, fieldInfo.hasMessageId);\n  }\n\n  /**\n   * Sets the value of the extension field in the extended object.\n   *\n   * If you pass `undefined` to this method, it unsets the extension.\n   *\n   * @override\n   * @package will be presented only on MutableMessage or via J2CL\n   * @param {!ExtensionFieldInfo<!ReadonlyArray<M>, !ReadonlyArray<I>,\n   *     EXTENDEE>} fieldInfo Specifies the field to get.\n   * @param {number} index The index of the value to set.\n   * @param {M_OR_I} value The value to set.\n   * @return {THIS} For chaining\n   * @template THIS, M, I\n   * Use TTL to force agreement between the extendee and this, otherwise the\n   * jscompiler may resolve mismatches with a union which may cause errors to go\n   * unnoticed or create odd error messages.\n   * @template EXTENDEE := THIS =:\n   * Use TTL to prevent type inference on value\n   * @template M_OR_I := union(M, I) =:\n   * @this {THIS}\n   * @suppress {visibility} ExtensionFieldInfo internals.\n   * @tsType <\n   *   THIS,\n   *   MValue extends ReadonlyArray<any>,\n   *   IValue extends ReadonlyArray<any>,\n   *   MExtendee extends\n   *     | THIS\n   *     |\n   * import('google3/javascript/apps/jspb/mutable_message').MutableMessage<THIS>,\n   *   IExtendee extends\n   *     | THIS\n   *     | import('google3/javascript/apps/jspb/immutable_message')\n   *           .ImmutableMessage<THIS>\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     MValue,\n   *     IValue,\n   *     MExtendee,\n   *     IExtendee\n   *   >,\n   *   idx: number,\n   *   value: MValue[number] | IValue[number]\n   * ): THIS\n   */\n  setExtensionAtIndex(fieldInfo, index, value) {\n    const self = /** @type {!MutableMessage<?>} */ (this);\n    // TODO: b/397982381 - this is buggy with unknown fields, we only report\n    // for now to preserve existing behavior.\n    recordUnknownFieldAccess(self, fieldInfo.fieldIndex);\n    maybeReviveUnknownField(\n        self, fieldInfo.fieldIndex, fieldInfo.lazyParse, /* orClear= */ true);\n    asserts.assertInstanceof(self, fieldInfo.extendeeCtor);\n    asserts.assert(fieldInfo.isRepeated);\n    if (fieldInfo.ctor) {\n      fieldInfo.setExtensionAtIndexFn(\n          self, fieldInfo.fieldIndex, fieldInfo.ctor, index, value,\n          fieldInfo.hasMessageId);\n    } else {\n      fieldInfo.setExtensionAtIndexFn(\n          self, fieldInfo.fieldIndex, index, value, fieldInfo.hasMessageId);\n    }\n    return self;\n  }\n\n  /**\n   * Gets a value in a repeated extension field.\n   *\n   * @package will be presented only on MutableMessage\n   * @param {!ExtensionFieldInfo<!ReadonlyArray<M>, !ReadonlyArray<I>,\n   *     EXTENDEE>} fieldInfo Specifies the field to get.\n   * @param {number} idx The index to read from this field.\n   * @return {M} The value of the field.\n   * @template M, I\n   * @template THIS\n   * Use TTL to force agreement between the extendee and this, otherwise the\n   * jscompiler may resolve mismatches with a union which may cause errors to go\n   * unnoticed or create odd error messages.\n   * @template EXTENDEE := THIS =:\n   * @this {THIS}\n   * @suppress {visibility} ExtensionFieldInfo internals.\n   * @tsType <\n   *   THIS,\n   *   MValue extends ReadonlyArray<\n   *         import('google3/javascript/apps/jspb/mutable_message').MutableMessage\n   *       >,\n   *   IValue extends ReadonlyArray<\n   *         import('google3/javascript/apps/jspb/immutable_message').ImmutableMessage\n   *       >,\n   *   MExtendee extends\n   *     | THIS\n   *     |\n   * import('google3/javascript/apps/jspb/mutable_message').MutableMessage<THIS>,\n   *   IExtendee extends\n   *     | THIS\n   *     | import('google3/javascript/apps/jspb/immutable_message')\n   *           .ImmutableMessage<THIS>\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     MValue,\n   *     IValue,\n   *     MExtendee,\n   *     IExtendee\n   *   >,\n   *   idx: number\n   * ): MValue[number]\n   */\n  getMutableExtensionAtIndex(fieldInfo, idx) {\n    const self = asserts.assertInstanceof(this, Message);\n    asserts.assert(fieldInfo.ctor);\n    asserts.assertInstanceof(self, fieldInfo.extendeeCtor);\n    asserts.assert(fieldInfo.isRepeated);\n    // TODO: b/397982381 - this is buggy with unknown fields, we only report\n    // for now to preserve existing behavior.\n    recordUnknownFieldAccess(self, fieldInfo.fieldIndex);\n    maybeReviveUnknownField(self, fieldInfo.fieldIndex, fieldInfo.lazyParse);\n    return getRepeatedIndexedMutableWrapper(\n        self, fieldInfo.fieldIndex, fieldInfo.ctor, idx,\n        fieldInfo.hasMessageId);\n  }\n\n  /**\n   * Sets the value of the extension field in the extended object.\n   *\n   * If you pass `undefined` to this method, it unsets the extension.\n   *\n   * @override\n   * @package will be presented only on MutableMessage or via J2CL\n   * @param {!ExtensionFieldInfo<!ReadonlyArray<EM>, !ReadonlyArray<EI>,\n   *     EXTENDEE>} fieldInfo Specifies the field to get.\n   * @param {M_OR_I} value The value to set.\n   * @return {THIS} For chaining\n   * @template THIS, EM, EI\n   * Use TTL to force agreement between the extendee and this, otherwise the\n   * jscompiler may resolve mismatches with a union which may cause errors to go\n   * unnoticed or create odd error messages.\n   * @template EXTENDEE := THIS =:\n   * Use TTL to prevent type inference on value\n   * @template M_OR_I := union(EM, EI) =:\n   * @this {THIS}\n   * @suppress {visibility} ExtensionFieldInfo internals.\n   * @tsType <\n   *   THIS,\n   *   MValue extends ReadonlyArray<any>,\n   *   IValue extends ReadonlyArray<any>,\n   *   MExtendee extends\n   *     | THIS\n   *     |\n   * import('google3/javascript/apps/jspb/mutable_message').MutableMessage<THIS>,\n   *   IExtendee extends\n   *     | THIS\n   *     | import('google3/javascript/apps/jspb/immutable_message')\n   *           .ImmutableMessage<THIS>\n   * >(\n   *   this: THIS,\n   *   fieldInfo: import('google3/javascript/apps/jspb/extension_field_info')\n   *       .ExtensionFieldInfo<\n   *     MValue,\n   *     IValue,\n   *     MExtendee,\n   *     IExtendee\n   *   >,\n   *   value: MValue[number] | IValue[number]\n   * ): THIS\n   */\n  addExtension(fieldInfo, value) {\n    const self = /** @type {!MutableMessage<?>} */ (this);\n    // TODO: b/397982381 - this is buggy with unknown fields, we only report\n    // for now to preserve existing behavior.\n    recordUnknownFieldAccess(self, fieldInfo.fieldIndex);\n    maybeReviveUnknownField(\n        self, fieldInfo.fieldIndex, fieldInfo.lazyParse, /* orClear= */ true);\n    asserts.assertInstanceof(self, fieldInfo.extendeeCtor);\n    asserts.assert(fieldInfo.isRepeated);\n    if (fieldInfo.ctor) {\n      fieldInfo.addExtensionFn(\n          self, fieldInfo.fieldIndex, fieldInfo.ctor, value,\n          fieldInfo.hasMessageId);\n    } else {\n      fieldInfo.addExtensionFn(\n          self, fieldInfo.fieldIndex, value, fieldInfo.hasMessageId);\n    }\n    return self;\n  }\n\n  /**\n   * Returns a function which deserializes the type of this message.\n   *\n   * Always deserializes values as immutable.\n   *\n   * @override\n   * @this {THIS}\n   * @template THIS\n   * @return {function(string): THIS}\n   * @tsType (): ((serialized: string) => this)\n   */\n  getParserForType() {\n    const self = /** @type {!Message} */ (this);\n    if (!self.isImmutable()) {\n      if (goog.DEBUG) {\n        throw new Error(\n            'getParserForType can only be called on immutable messages');\n      } else {\n        throw new Error('gpft');\n      }\n    }\n\n    const ctor = self.constructor;\n    const withCachedLambda =\n        /**\n           @type {{internalJspbCachedParserFn_: ((function(string):\n               THIS)|undefined)}}\n         */\n        (ctor);\n    if (withCachedLambda.internalJspbCachedParserFn_) {\n      return withCachedLambda.internalJspbCachedParserFn_;\n    }\n\n    return (\n        withCachedLambda.internalJspbCachedParserFn_ = (serialized) =>\n            deserializeAsImmutable(ctor, serialized));\n  }\n\n  /**\n   * Returns an immutable default instance for the type of this message.\n   *\n   * @override\n   * @protected exposed by subtypes\n   * @return {!ImmutableMessage}\n   */\n  getDefaultInstanceForType() {\n    const defaultInstance = getDefaultImmutableInstance(\n        /** function(new:MutableMessage<I>, ?Array<?>=) */ (\n            /** @type {!Message} */ (this).constructor));\n    asserts.assertInstanceof(\n        defaultInstance, Message,\n        'value was not a mutable message constructor');\n    return /** @type {!ImmutableMessage} */ (defaultInstance);\n  }\n\n  /**\n   * Converts this message to a mutable one.\n   *\n   * @override\n   * @private can only be called from poorly typed immutablejs code\n   * @return {?}\n   */\n  toBuilder() {\n    asserts.assert(this.isImmutable());\n    return /** @type {!MutableMessage} */ (messageToMutable(this));\n  }\n}\n\n// Inject our message constructor into internal.js so that we can ensure that\n// the result of isMessage is always correct.\nif (goog.DEBUG) {\n  setMessageCtorInDebug(Message);\n}\n\n/**\n * Forward declaration of an `equals` function for J2CL.\n *\n * This satisfies the subtyping relation with (Readonly|Mutable)MessageInterface\n * for subtypes. The real implementation is provided by\n * j2cl_accessor_patches_message.js.\n *\n * @private will only be called via interface from j2cl\n * @override\n * @param {?} other\n * @return {boolean}\n */\nMessage.prototype.equals;\n\n/**\n * Forward declaration of a `hashCode` function for J2CL.\n *\n * This satisfies the subtyping relation with MessageLike and BuilderLike for\n * subtypes. The real implementation is provided by\n * j2cl_accessor_patches_message.js.\n *\n * @override\n * @private will only be called via interface from j2cl\n * @return {number}\n */\nMessage.prototype.hashCode;\n\n/**\n * Forward declaration of `build` for j2cl.\n *\n * @override\n * @private can only be called from poorly typed immutablejs code\n * @return {?}\n */\nMessage.prototype.build;\n\n/**\n * Indicates to J2CL that equals and hashCode should be available.\n *\n * @private will only be accessed via interface from j2cl\n * @const {*}\n */\nMessage.prototype.equalsAndHashCodeShouldBeAvailable = 1;\n\nMessage.prototype[MESSAGE_PROTOTYPE_MARKER] = MESSAGE_PROTOTYPE_MARKER_VALUE;\n\n/**\n * The xid of this proto type (The same for all instances of a proto). Provides\n * a way to identify a proto by stable obfuscated name.\n * @see {xid}.\n * Available if {@link jspb.generate_xid} is added as a Message option to\n * a protocol buffer.\n * @type {!xid.String|undefined} The xid or undefined if message is\n *     annotated to generate the xid.\n * See go/const-js-library-faq\n */\nMessage.prototype.messageXid;\n\nif (GENERATE_TO_STRING) {\n  /**\n   * Creates a string representation of the internal data array of this proto.\n   *\n   * NOTE: This string is *not* suitable for use in server requests.\n   *\n   * @this {Message}\n   * @return {string} A string representation of this proto.\n   * @override\n   * @deprecated please use .serialize() instead.\n   */\n  Message.prototype.toString = function() {\n    // TODO(b/385213186): delete this method. The JSPB runtime does not rely on\n    // this method, it has undefined behavior and cannot be dead code eliminated\n    return getInternalArray(this).toString();\n  };\n}\n\n\n/**\n * Clear all fields of the message and set them to their default values.\n *\n * After this operation the message will be equivalent to a newly constructed\n * instance.\n *\n * You probably don't need this and are better off just constructing a new\n * message.\n *\n * @param {T} msg\n * @template T\n * @return {T}\n * @tsType <T extends\n * import('google3/javascript/apps/jspb/message').Message>(msg: T): T\n */\nfunction clearMessage(msg) {\n  asserts.assertInstanceof(msg, Message);\n  checkMutableMessage(msg);\n  let array = getInternalArray(msg);\n  const arrayState = getMessageArrayState(array);\n  if (getHasMessageId(arrayState)) {\n    array = [array[0]];\n  } else {\n    array = [];\n  }\n  setArrayState(array, copyArrayBitsClone(arrayState));\n  setInternalArray(msg, array);\n  return msg;\n}\n\n/**\n * Copies the content of the second argument into the first.\n *\n * This method takes two messages of the same type and copies the contents of\n * fromMessage into toMessage. After this call, both arguments will be\n * `Message.equals`, but will share no mutable state. All data in the\n * destination message will be overwritten.\n *\n * This function has equivalent functionality to `CopyFrom` found in other\n * proto implementations (C++, Python), and the signature is meant to match that\n * of core web methods like `Object.assign`.\n *\n * You probably don't need this and are better off just cloning and\n * constructing a new message.\n *\n * @param {MESSAGE} toMessage Message which will receive a copy of fromMessage\n * @param {MESSAGE} fromMessage Message that will be copied into toMessage.\n *     as its contents.\n * @template MESSAGE\n * @return {MESSAGE} toMessage\n * @tsType <\n *   M extends\n * import('google3/javascript/apps/jspb/mutable_message').MutableMessage\n * >(\n *   to: M,\n *   from:\n *     | M\n *     |\n * import('google3/javascript/apps/jspb/immutable_message').ImmutableMessage<M>\n * ): M\n */\nfunction copyMessage(toMessage, fromMessage) {\n  return copyMutableIntoMessage(toMessage, fromMessage);\n}\n\n/**\n * Copies the content of the second argument into the first.\n *\n * This method takes two messages of the same type and copies the contents of\n * fromMessage into toMessage. After this call, both arguments will be\n * `Message.equals`, but will share no mutable state. All data in the\n * destination message will be overwritten.\n *\n * When `fromMessage` is `null` or `undefined`, clears all fields of the message\n * and sets them to their default values. After this operation the message will\n * be equivalent to a newly constructed instance.\n *\n * This function has equivalent functionality to `CopyFrom` found in other\n * proto implementations (C++, Python), and the signature is meant to match that\n * of core web methods like `Object.assign`.\n *\n * @param {MESSAGE} toMessage Message which will receive a copy of fromMessage\n * @param {?MESSAGE|undefined} fromMessage Message that will be copied into\n *     toMessage. as its contents.\n * @template MESSAGE\n * @return {MESSAGE} toMessage\n * @tsType <\n *   M extends\n * import('google3/javascript/apps/jspb/mutable_message').MutableMessage\n * >(\n *   to: M,\n *   from:\n *     | M\n *     |\n * import('google3/javascript/apps/jspb/immutable_message').ImmutableMessage<M>\n *     | null\n *     | undefined\n * ): M\n */\nfunction copyMessageOrClear(toMessage, fromMessage) {\n  if (fromMessage != null) {\n    return copyMessage(toMessage, fromMessage);\n  }\n  return clearMessage(toMessage);\n}\n\n/** @type {number} */\nlet messageCounter = 0;\n\n/**\n * Adds a unique property to the message that will ensure that instances don't\n * compare structurally in tests.\n */\nfunction makeMessageUnpredicable(/** ? */ m) {\n  if (goog.DEBUG && !COMPILED) {\n    m['See go/jspb-testing for how to use protos in tests'] = messageCounter++;\n  }\n}\n\n/**\n * Constructs a mutable JSPB message from an array.\n *\n * The JSPB runtime takes ownership of the passed array, callers should not use\n * the array after passing it to this method.  Generally, messages should be\n * parsed with the `deserialize` or `deserializeBinary` functions, or\n * constructed from scratch using `new Foo()`.Consider using `cloneJspbArray` to\n * make a copy if you need the original array to be reused after calling this\n * method.\n *\n * @param {function(new:T, ?Array=)} ctor The constructor of the\n *     message type.\n * @param {!Array<?>|!OpaqueJspbArray|null|undefined} array Our serialized data.\n * @return {T} The new message with the serialized data populating\n *     its fields.\n * @template T\n * @noinline because these methods break coverage when inlined.\n * @tsType <\n *   T extends\n * import('google3/javascript/apps/jspb/mutable_message').MutableMessage\n * >(\n *   ctor: new (data?: unknown[] | null) => T,\n *   array:\n *     | unknown[]\n *     | import('google3/javascript/apps/jspb/message').OpaqueJspbArray\n *     | null\n *     | undefined\n * ): T\n */\n// TODO(b/271560370): remove the @noinline on this method\nfunction newMutableMessageFromTransferredArray(ctor, array) {\n  if (array == null) {\n    return new ctor();\n  }\n  array = transferArray(/** @type{!Array<?>} */ (array));\n  const newMessage = new ctor(markMutableReferencesAreOwned(array));\n  asserts.assertInstanceof(newMessage, Message);\n  return newMessage;\n}\n\n/**\n * Constructs an immutable JSPB message from an array.\n *\n * The JSPB runtime takes ownership of the passed array, callers should not use\n * the array after passing it to this method.  Generally, messages should be\n * parsed with the `deserialize` or `deserializeBinary` functions, or\n * constructed from scratch using `new Foo()`.Consider using `cloneJspbArray` to\n * make a copy if you need the original array to be reused after calling this\n * method.\n *\n * @param {T} defaultInstance The `defaultInstance` of the immutable message\n *     type.\n * @param {!Array<?>|!OpaqueJspbArray|null|undefined} array Our serialized data.\n * @return {T} The new message with the serialized data populating\n *     its fields.\n * @template T\n * @noinline because these methods break coverage when inlined.\n * @tsType <\n *   T extends\n * import('google3/javascript/apps/jspb/immutable_message').ImmutableMessage\n * >(\n *   defaultInstance: T,\n *   array:\n *     | unknown[]\n *     | import('google3/javascript/apps/jspb/message').OpaqueJspbArray\n *     | null\n *     | undefined\n * ): T\n */\n// TODO(b/271560370): remove the @noinline on this method\nfunction newImmutableMessageFromTransferredArray(defaultInstance, array) {\n  asserts.assertInstanceof(defaultInstance, Message);\n  asserts.assert(defaultInstance.isImmutable());\n  const newMessage = /** @type {!Message} */ (\n      (array == null) ?\n          getDefaultImmutableInstance(defaultInstance.constructor) :\n          new defaultInstance.constructor(\n              markArrayImmutable(transferArray(/** @type{!Array<?>} */ (\n                  /** @type{?} */ (array))))));\n  asserts.assertInstanceof(newMessage, Message);\n  return /** @type {!T} */ (newMessage);\n}\n\n// Do not export. Do not mark @private\n// The intent is just to be a type that is not externally instantiable and has\n// no useful properties/behaviors.\nclass InternalOpaqueJspbArray {}\n\n/**\n * An opaque type representing a jspb array.\n *\n * Should only be used as a marker for eventually passing to\n * `newImmutableMessageFromTransferredArray` and\n * `newMutableMessageFromTransferredArray`\n *\n * @typedef {typeof InternalOpaqueJspbArray}\n */\nlet OpaqueJspbArray;\n\n/**\n * Makes a deep copy of a jspb array.\n *\n * This is useful for passing to `newImmutableMessageFromTransferredArray` and\n * `newMutableMessageFromTransferredArray`.\n *\n * @param {!Array<?>} array\n * @return {!OpaqueJspbArray}\n */\nfunction cloneJspbArray(array) {\n  return /** @type {!OpaqueJspbArray} */ (/** @type {?} */ (cloneRaw(array)));\n}\n\nif (goog.DEBUG) {\n  // Constructs a debug-only representation. Do not call this in code.\n  Object.defineProperties(Message.prototype, {\n    urlToInspectInProtoshop: {\n      get: /** @return {?} */ function() {\n        const /** !Function|undefined */ inspect =\n            globalThis?.['top']?.['protoshop']?.['inspect'];\n        if (!inspect) {\n          return 'You need http://go/protoshop-browser-extension';\n        }\n\n        return inspect(\n            /** @type {?} */ (this),\n            GENERATE_TYPE_NAME_PROPERTIES ?\n                /**\n                   @type {{internalDoNotUse_debugOnlyProtoTypeName:\n                       (string|undefined)}}\n                 */\n                (\n                    /** @type {?} */ (this).constructor)\n                    .internalDoNotUse_debugOnlyProtoTypeName :\n                undefined);\n      },\n      enumerable: false,\n      configurable: false,\n    },\n    // DO NOT RENAME: this is used in\n    // javascript/apps/jspb/testing/install_jspb_custom_formatter.js\n    fieldsForDebugging: {\n      get: /** @return {?} */ function() {\n        return dumpInternal(/** @type {?} */ (this));\n      },\n      enumerable: false,\n      configurable: false,\n    }\n  });\n}\n\nexports = {\n  Message,\n  OpaqueJspbArray,\n  clearMessage,\n  cloneJspbArray,\n  copyMessage,\n  copyMessageOrClear,\n  newImmutableMessageFromTransferredArray,\n  newMutableMessageFromTransferredArray,\n};\n","/**\n * @fileoverview Implements special message construction utilities.\n * @package\n *\n * DO NOT USE THIS OUTSIDE OF THIS PACKAGE.\n */\n\ngoog.module('jspb.internal.transfer_array');\n\nconst {SUPPORTS_STRUCTURED_CLONE} = goog.require('jspb.internal_bytes');\nconst {cloneRaw} = goog.require('jspb.internal_copy');\n\n/** @type {boolean} */\nlet destroyTransferredArrays = goog.DEBUG;\n\n/** @type {!WeakMap<?, !Array<?>>|undefined} */\nlet allTransferredArrays = destroyTransferredArrays ? new WeakMap() : undefined;\n\n/** Reset the destroy status, for testing only. */\nfunction setDestroyTransferredArraysForTesting(/** boolean */ destroy) {\n  destroyTransferredArrays = destroy;\n  if (!allTransferredArrays && destroy) {\n    allTransferredArrays = new WeakMap();\n  } else if (!destroy) {\n    allTransferredArrays = undefined;\n  }\n}\n\n/**\n * Constructs a JSPB message from an array directly **and marks it as owned**.\n *\n * In order to ensure this operation is \"safe\", in debug we have std::move-like\n * semantics in which it destroys the existing array.\n *\n * @param {!Array<?>} array Our serialized data.\n * @return {!Array<?>}\n */\nfunction transferArray(array) {\n  if (goog.DEBUG && destroyTransferredArrays &&\n      allTransferredArrays.get(array)) {\n    throw new Error('this array was already transferred');\n  }\n  if (!Array.isArray(array)) {\n    throw goog.DEBUG ? new Error('must be an array') : new Error();\n  }\n  if (Object.isFrozen(array) || Object.isSealed(array) ||\n      !Object.isExtensible(array)) {\n    throw goog.DEBUG ?\n        new Error('arrays passed to jspb constructors must be mutable') :\n        new Error();\n  }\n\n  // If we are in DEBUG, we ensure that external code now cannot use the array,\n  // so as to implement std::move-like \"transfer\" semantics.\n  if (goog.DEBUG && destroyTransferredArrays) {\n    const oldArray = array;\n    array = cloneRaw(array);\n    makeArrayUnusable(oldArray);\n    allTransferredArrays.set(oldArray, array);\n  }\n  return array;\n}\n\n/**\n * Makes a value unusable.\n *\n * This checks that a mutable value will not be accessed again.\n *\n * @param {?} value\n */\nfunction makeValueUnusable(value) {\n  if (value == null) {\n    return;\n  }\n\n  if (Array.isArray(value)) {\n    makeArrayUnusable(value);\n  } else if (value instanceof Uint8Array) {\n    if (SUPPORTS_STRUCTURED_CLONE) {\n      // Transfer ownership to make this unusable.\n      structuredClone(value, {'transfer': [value.buffer]});\n    } else /* if (!SUPPORTS_STRUCTURED_CLONE) */ {\n      // Empty out this array to probably-invalid data (just ascii 'a').\n      value.fill(97, 0, value.length);\n    }\n  } else if (typeof value === 'object') {\n    makeObjectUnusable(/** @type {!Object} */ (value));\n  }\n}\n\n/** @type {!Object|undefined} */\nlet badPrototype;\n\nif (destroyTransferredArrays && (typeof Proxy !== 'undefined')) {\n  const /** ? */ untypedHandlerMethod = dontUseThisItBelongsToJspb;\n  badPrototype = new Proxy({}, {\n    getPrototypeOf: untypedHandlerMethod,\n    setPrototypeOf: untypedHandlerMethod,\n    isExtensible: untypedHandlerMethod,\n    preventExtensions: untypedHandlerMethod,\n    getOwnPropertyDescriptor: untypedHandlerMethod,\n    defineProperty: untypedHandlerMethod,\n    has: untypedHandlerMethod,\n    get: untypedHandlerMethod,\n    set: untypedHandlerMethod,\n    deleteProperty: untypedHandlerMethod,\n    // We intentionally skip the ownKeys handler due to\n    // https://bugs.chromium.org/p/chromium/issues/detail?id=1362010\n    // ownKeys: untypedHandlerMethod,\n    apply: untypedHandlerMethod,\n    construct: untypedHandlerMethod,\n  });\n}\n\n/**\n * Makes an array unusable.\n *\n * This checks that an array will not be accessed again.\n *\n * @param {!Array<?>} array Our serialized data.\n */\nfunction makeArrayUnusable(array) {\n  for (let i = 0; i < array.length; i++) {\n    makeValueUnusable(array[i]);\n  }\n\n  // If this array was already frozen, not much more we can do.\n  if (!Object.isExtensible(array)) {\n    throw new Error('cannot transfer a frozen or sealed array');\n  }\n\n  // Type cast to prevent jsc from preventing property assignments.\n  const arrayAsObject = /** @type {!Object} */ (array);\n\n  // Make sure any callers are aware of this change.\n  array.length = 1;\n  array[0] = dontUseThisItBelongsToJspb;\n  arrayAsObject['toJSON'] = dontUseThisItBelongsToJspb;\n  if (badPrototype) {\n    Object.setPrototypeOf(arrayAsObject, badPrototype);\n  }\n  Object.freeze(array);\n}\n\n/**\n * Makes an object unusable.\n *\n * This ensures that an object will not be accessed again.\n *\n * @param {!Object} obj\n */\nfunction makeObjectUnusable(obj) {\n  for (const k in obj) {\n    const value = obj[k];\n    if (obj.hasOwnProperty(k)) {\n      delete obj[k];\n      makeValueUnusable(value);\n    }\n  }\n\n  // Make sure any callers are aware of this change.\n  Object.defineProperty(\n      obj, 'dontUseThisItBelongsToJspb',\n      {enumerable: true, get: dontUseThisItBelongsToJspb});\n  obj['toJSON'] = dontUseThisItBelongsToJspb;\n  if (badPrototype) {\n    Object.setPrototypeOf(obj, badPrototype);\n  }\n  Object.freeze(obj);\n}\n\n/**\n * Indicates that this array has been \"moved\" to be owned by the JSPB runtime\n * and should NOT be reused.\n */\nfunction dontUseThisItBelongsToJspb() {\n  if (goog.DEBUG) {\n    throw new Error(\n        'this array or object is owned by JSPB and should not be reused, ' +\n        'did you mean to copy it with copyJspbArray? ' +\n        'See go/jspb-api-gotchas#construct_from_array');\n  }\n\n  // No message otherwise\n  throw new Error();\n}\n\n/**\n * Transfers ownership of a Uint8Array to the caller.\n *\n * In production, this does nothing except throw if the value is not a\n * Uint8Array.\n *\n * In debug, this will copy the array and then rewrite it with random data to\n * prevent callers from reusing it. It also patches on a broken prototype which\n * will cause most methods to throw (even instanceof), which should further\n * inhibit dependencies even if callers are not dependent on specific values.\n *\n * @return {!Uint8Array}\n */\nfunction transferUint8Array(/** !Uint8Array */ u8,\n                            /** boolean= */ dontDestroyBuffer = false) {\n  if (!(u8.constructor === Uint8Array && u8 instanceof Uint8Array)) {\n    throw goog.DEBUG ? new Error('must be a native Uint8Array') : new Error();\n  }\n\n  if (goog.DEBUG) {\n    if (allTransferredArrays?.get(u8)) {\n      throw new Error('this array was already transferred');\n    }\n    let cloned;\n    if (dontDestroyBuffer && (Math.random() < 0.5)) {\n      // If we aren't destroying the buffer, make reliance on\n      // effects or non-effects 50% flaky.\n      cloned = new Uint8Array(u8.buffer, u8.byteOffset, u8.length);\n    } else {\n      cloned = new Uint8Array(u8);\n      allTransferredArrays.set(u8, cloned);\n    }\n    if (destroyTransferredArrays) {\n      // Unfortunately Object.freeze is not allowed on Uint8Array but we'll\n      // do the best we can.\n      if (!dontDestroyBuffer) {\n        const v = Math.trunc(Math.random() * 256);\n        for (let i = 0; i < u8.length; i++) {\n          u8[i] = v;\n        }\n      }\n      u8.constructor = null;\n      if (badPrototype) Object.setPrototypeOf(u8, badPrototype);\n    }\n    return cloned;\n  }\n\n  return u8;\n}\n\nexports = {\n  transferArray,\n  transferUint8Array,\n  setDestroyTransferredArraysForTesting,\n};\n","// source: google/protobuf/timestamp.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$google$protobuf$MutableTimestamp');\ngoog.provide('jspb$ro.google$protobuf$ReadonlyTimestamp');\n\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$google$protobuf$ImmutableTimestamp');\ngoog.requireType('jspb$r$google$protobuf$Timestamp$internalDoNotUseReader');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$google$protobuf$ImmutableTimestamp>}\n * @implements {jspb$r$google$protobuf$Timestamp$internalDoNotUseReader}\n */\njspb$google$protobuf$MutableTimestamp = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional int64 seconds = 1;\n   * @override\n   * @return {!gbigint}\n   */\n  getSeconds() {\n    return jspb_internal_adapters.getInt64GbigintFieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * optional int64 seconds = 1;\n   * @override\n   * @return {number}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getSeconds_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64FieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * optional int64 seconds = 1;\n   * @override\n   * @return {string}\n   */\n  getSeconds_asString() {\n    return jspb_internal_adapters.getInt64FieldWithDefault_asString(this, 1);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$google$protobuf$MutableTimestamp} returns this\n   */\n  setSeconds(value) {\n    return jspb_internal_adapters.setProto3Int64Field(this, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$google$protobuf$MutableTimestamp} returns this\n   */\n  clearSeconds() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * optional int32 nanos = 2;\n   * @override\n   * @return {number}\n   */\n  getNanos() {\n    return jspb_internal_adapters.getInt32FieldWithDefault(this, 2);\n  }\n\n\n  /**\n   * @param {number|null|undefined} value\n   * @return {!jspb$google$protobuf$MutableTimestamp} returns this\n   */\n  setNanos(value) {\n    return jspb_internal_adapters.setProto3Int32Field(this, 2, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$google$protobuf$MutableTimestamp} returns this\n   */\n  clearNanos() {\n    return jspb_internal_adapters.clearField(this, 2);\n  }\n\n\n  /**\n   * Returns a JavaScript 'Date' object corresponding to this Timestamp.\n   * @return {!Date}\n   * @override\n   */\n  toDate() {\n    const seconds = Number(this.getSeconds_asString());\n    const nanos = this.getNanos();\n\n    return new Date((seconds * 1000) + (nanos / 1e6));\n  }\n\n  /**\n   * Sets the value of this Timestamp object to be the given Date.\n   * @param {!Date} value The value to set.\n   * @return {!jspb$google$protobuf$MutableTimestamp}\n   */\n  fromDate(value) {\n    return this.fromMillis(value.getTime());\n  }\n\n  /**\n   * Sets the value of this Timestamp object to be the given value in milliseconds.\n   * @param {number} value The value to set.\n   * @return {!jspb$google$protobuf$MutableTimestamp}\n   */\n  fromMillis(value) {\n    if (!Number.isFinite(value)) {\n      value = 0;\n    }\n    return this.setSeconds(Math.floor(value / 1000)).setNanos(((value % 1000 + 1000) % 1000) * 1e6);\n  }\n\n  /**\n   * Factory method that returns a Timestamp object with value equal to\n   * the given Date.\n   * @param {!Date} value The value to set.\n   * @return {!jspb$google$protobuf$MutableTimestamp}\n   */\n  static fromDate(value) {\n    const timestamp = new jspb$google$protobuf$MutableTimestamp();\n    return timestamp.fromDate(value);\n  }\n\n  /**\n   * Factory method that returns a Timestamp object with value equal to\n   * the given milliseconds.\n   * @param {number} value The value to set.\n   * @return {!jspb$google$protobuf$MutableTimestamp}\n   */\n  static fromMillis(value) {\n    const timestamp = new jspb$google$protobuf$MutableTimestamp();\n    return timestamp.fromMillis(value);\n  }\n};\n\n/**\n * @override\n * @return {!jspb$google$protobuf$ImmutableTimestamp}\n */\njspb$google$protobuf$MutableTimestamp.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$google$protobuf$MutableTimestamp}\n */\njspb$google$protobuf$MutableTimestamp.prototype.clone;\n/**\n * @const {function(string):!jspb$google$protobuf$MutableTimestamp}\n */\njspb$google$protobuf$MutableTimestamp.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$google$protobuf$MutableTimestamp));\n\n/**\n * Returns whether the given value is an instance of jspb$google$protobuf$MutableTimestamp.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$google$protobuf$MutableTimestamp>}\n */\njspb$google$protobuf$MutableTimestamp.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$google$protobuf$MutableTimestamp));\n\n/**\n * Object form of Timestamp as accepted by the `fromObject` method.\n * @typedef {{\n *  seconds: (?number|undefined),\n *  nanos: (?number|undefined)\n * }}\n */\njspb$google$protobuf$MutableTimestamp.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$google$protobuf$MutableTimestamp.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @return {!jspb$google$protobuf$MutableTimestamp.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$google$protobuf$MutableTimestamp.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for google$protobuf$MutableTimestamp.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$google$protobuf$MutableTimestamp.internalDoNotUse_debugOnlyProtoTypeName = \"google.protobuf.Timestamp\";\n}\n\n/**\n * @typedef {!jspb$google$protobuf$ImmutableTimestamp|!jspb$google$protobuf$MutableTimestamp}\n */\njspb$ro.google$protobuf$ReadonlyTimestamp = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$google$protobuf$MutableTimestamp.displayName = 'proto.google.protobuf.Timestamp';\n}\n/**\n * Interface form of Timestamp as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  seconds: (!gbigint|undefined),\n *  seconds_asLegacyNumberOrString: (number|string|undefined),\n *  nanos: (number|undefined)\n * }}\n */\njspb$google$protobuf$MutableTimestamp.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$google$protobuf$MutableTimestamp.FieldsInterface} record\n * @return {!jspb$google$protobuf$ImmutableTimestamp}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$google$protobuf$MutableTimestamp, \u0ca0_\u0ca0.clutz.jspb$google$protobuf$MutableTimestamp.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$google$protobuf$ImmutableTimestamp\n */\njspb$google$protobuf$MutableTimestamp.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$google$protobuf$MutableTimestamp));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.google$protobuf$ReadonlyTimestamp} value\n * @return {!jspb$google$protobuf$MutableTimestamp.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.google$protobuf$ReadonlyTimestamp): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$google$protobuf$MutableTimestamp, \u0ca0_\u0ca0.clutz.jspb$google$protobuf$MutableTimestamp.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$google$protobuf$MutableTimestamp.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","/**\n * @fileoverview Public APIs exposed purely for use by generated code.  Use of\n * these APIs outside of that context is not supported and actively discouraged.\n * @public\n *\n * DO NOT USE THIS OUTSIDE OF THIS PACKAGE.\n */\n\ngoog.module('jspb_internal_public_for_gencode');\ngoog.module.declareLegacyNamespace();\n\nconst asserts = goog.require('goog.asserts');\nconst garray = goog.require('goog.array');\nconst {ANY_PROTOTYPE_MARKER_VALUE, DoNotFreezeToken, GENERATED_SUBCLASS_MARKER, HAS_MESSAGE_ID, NO_MESSAGE_ID, OrUndefinedToken, SUPPORTS_HAS_INSTANCE, SerializeBinaryFnHolder, getInternalArray, invisiblePropValue, isImmutableMessage, isInternalMessage, registerExtensionsForDebugging} = goog.require('jspb.internal');\nconst {ArrayState, ArrayStateFlags, TypeSpecificApiFormat, getMessageArrayState, hasFlagBit} = goog.require('jspb.internal_array_state');\nconst {BinaryReader, BinaryReaderOptions} = goog.require('jspb.binary.reader');\nconst {ByteSource} = goog.requireType('jspb.binary.bytesource');\nconst {ByteString} = goog.require('jspb.bytestring');\nconst {DescriptorTypeReference, EnumDescriptorTypeReference} = goog.require('google3.javascript.apps.jspb.descriptor');\nconst {ExtensionReference, makeDescriptorGetter, makeEnumDescriptorGetter, makeExtensionReference} = goog.require('google3.javascript.apps.jspb.internal_descriptor');\nconst {GENERATE_FIELDS_INTERFACE_FOR_TESTING, GENERATE_TYPE_NAME_PROPERTIES, USE_DETAILED_MESSAGE_TYPE_HIERARCHY, getUnsafeDisableJspbAnyTypeChecks} = goog.require('jspb.internal_options');\nconst {LAZILY_PARSE_LATE_LOADED_EXTENSIONS_SYMBOL} = goog.require('jspb.internal_symbols');\nconst {Message} = goog.require('jspb');\nconst {MutableMessage} = goog.require('jspb.mutable_message');\nconst {OpaqueTypeTable} = goog.require('google3.javascript.apps.jspb.opaque_type_table_internal');\nconst {RecordExtensionRegistry, createMessageExtension, createPrimitiveExtension, createRepeatedMessageExtension, createRepeatedPrimitiveExtension} = goog.require('jspb.internal_extension_field_info');\nconst {coerceToNullishBytes, getDefaultImmutableInstance, messageFromInlineStorage} = goog.require('jspb.internal_accessor_helpers');\nconst {defineTypeGuard} = goog.require('google3.javascript.common.asserts.asserts');\nconst {deserializeAsImmutable, leakedMutableSubstructures, maybeCopyOnWrite} = goog.require('jspb.internal_immutability');\nconst {deserializeBinary, makeCrossSerializerComparisonsCompatible, makeDeserializeBinaryFromReaderFromBinaryFields, serializeBinary, serializeBinaryToByteString} = goog.require('jspb_internal_binary');\nconst {fromFieldsForTestingGeneric, getFieldsForTestingGeneric} = goog.require('google3.javascript.apps.jspb.internal_records');\nconst {fromObjectAnyValue, toObjectAnyValue} = goog.require('jspb.internal_dump');\nconst {getBytesFieldWithDefault, getFieldNullable, getFieldNullableInternal, getStringFieldWithDefault, setFieldIgnoringImmutability, setProto3BytesField, setProto3StringField, setWrapperField} = goog.require('jspb_internal_adapters');\nconst {getCtorTypeName, installTypeNameExport} = goog.require('jspb.internal_get_type_name');\nconst {logNewArray} = goog.require('jspb.internal_operations');\nconst {toGbigint} = goog.require('google3.javascript.common.bigint.index');\nconst {wrappedTypeTableForBinaryFields} = goog.require('google3.javascript.apps.jspb.internal_binary_table');\n\n// Install jspbGetTypeName for debugging. All generated messages require this\n// file so this ensures it's available.\ninstallTypeNameExport();\n\n/**\n * @define {boolean} Whether to generate toObject methods for objects. Turn\n *     this off, if you do not want toObject to be ever used in your project.\n *     When turning off this flag, consider adding a conformance test that bans\n *     calling toObject. Enabling this will disable the JSCompiler's ability to\n *     dead code eliminate fields used in protocol buffers that are never used\n *     in an application.\n */\nconst GENERATE_TO_OBJECT = goog.define('jspb.Message.GENERATE_TO_OBJECT', true);\n\n\n/**\n * @define {boolean} Whether to generate fromObject methods for objects. Turn\n *     this off, if you do not want fromObject to be ever used in your project.\n *     When turning off this flag, consider adding a conformance test that bans\n *     calling fromObject. Enabling this might disable the JSCompiler's ability\n *     to dead code eliminate fields used in protocol buffers that are never\n *     used in an application.\n *     By default this is enabled for test code only.\n */\nconst GENERATE_FROM_OBJECT = goog.define(\n    'jspb.Message.GENERATE_FROM_OBJECT', !goog.DISALLOW_TEST_ONLY_CODE);\n\n\n/**\n * Converts a JsPb repeated message field into an object list.\n * @param {!ReadonlyArray<T>} field The repeated message field to be\n *     converted.\n * @param {function(T_OR_NULL_UNDEFINED):(!O|undefined)}\n *     toObjectFn The toObject function for this field.  We need to pass this\n *     for effective dead code removal.\n * @return {!Array<O>} An array of converted message objects.\n * @template T, O\n * Use go/closure-ttl  to create a `?T|undefined` type\n * @template T_OR_NULL_UNDEFINED := union(T, 'null', 'undefined') =:\n */\nfunction toObjectList(field, toObjectFn) {\n  // Not using array.map in the generated code to keep it small.\n  // And not using it here to avoid a function call.\n  const result = logNewArray([]);\n  for (let i = 0; i < field.length; i++) {\n    result.push(toObjectFn(field[i]));\n  }\n  return result;\n}\n\n/**\n * Converts an object-formatted list into a repeated message field.\n *\n * @param {?Array<!O_ALIAS>|undefined} field The repeated message\n *     field to be converted.\n * @param {function(!O):!T} fromObjectFn The fromObject function for type T.\n * @return {?Array<!T>|undefined} An array of converted message objects.\n * @template T, O\n * Use go/closure-ttl  to create a `?O|undefined` type\n * @template O_ALIAS := O =:\n */\nfunction fromObjectList(field, fromObjectFn) {\n  // Not using array.map in the generated code to keep it small.\n  // And not using it here to avoid a function call.\n  const result = logNewArray([]);\n  if (field == null) {\n    return field;\n  }\n  for (let i = 0; i < field.length; i++) {\n    if (field[i] != null) {\n      result.push(fromObjectFn(field[i]));\n    }\n  }\n  return result;\n}\n\n/**\n * Converts an object-formatted message field into a JSPB message.\n *\n * @param {?O_OR_NULL_OR_UNDEFINED} field The object field to be converted.\n * @param {function(!O):!T} fromObjectFn The fromObject function for type T.\n * @return {?T|undefined} A converted message object, if any.\n * @template T, O\n * Use go/closure-ttl to create a `?O|undefined` type\n * @template O_OR_NULL_OR_UNDEFINED := union(O, 'null', 'undefined') =:\n */\nfunction fromObjectNullable(field, fromObjectFn) {\n  return field == null ? field : fromObjectFn(field);\n}\n\n/**\n * Coerce a 'bytes' field to base 64 or Uint8Array.\n * @param {string|!Uint8Array|!ByteString|null} value\n * @return {string|!Uint8Array|null} The field's coerced value.\n */\nfunction bytesAsBase64OrUint8Array(value) {\n  return value instanceof ByteString ? value.legacyUnwrap() : value;\n}\n\n\n/** @return {string} */\nfunction nonNullByteStringAsB64(/** !ByteString*/ b) {\n  return b.asBase64();\n}\n\n/** @return {string|null|undefined} */\nfunction byteStringAsB64(/** !ByteString|null|undefined */ b) {\n  return b == null ? b : b.asBase64();\n}\n\n/**\n * Coerce a repeated 'bytes' field to an array of base 64 strings.\n * Note: the returned array should be treated as immutable.\n * @param {!Array<!ByteString>} value\n * @return {!Array<string>} The field's coerced value.\n */\nfunction byteStringListAsB64(value) {\n  return logNewArray(garray.map(value, nonNullByteStringAsB64));\n}\n\n/** @return {!Uint8Array} */\nfunction nonNullByteStringAsU8(/** !ByteString*/ b) {\n  return b.asUint8Array();\n}\n\n/** @return {!Uint8Array|null|undefined} */\nfunction byteStringAsU8(/** !ByteString|null|undefined */ b) {\n  return b == null ? b : b.asUint8Array();\n}\n\n/**\n * Coerce a repeated 'bytes' field to an array of Uint8Array byte buffers.\n * Note: the returned array should be treated as immutable.\n * Note that Uint8Array is not supported on IE versions before 10 nor on Opera\n * Mini. @see http://caniuse.com/Uint8Array\n * @param {!Array<!ByteString>} value\n * @return {!Array<!Uint8Array>} The field's coerced value.\n */\nfunction byteStringListAsU8(value) {\n  return logNewArray(garray.map(value, nonNullByteStringAsU8));\n}\n\n/** @return {string|!Uint8Array} */\nfunction nonNullByteStringLegacyUnwrap(/** !ByteString*/ b) {\n  return b.legacyUnwrap();\n}\n\n/** @return {string|!Uint8Array|null|undefined} */\nfunction byteStringAsBase64OrUint8Array(/** null|undefined|!ByteString*/ b) {\n  return b == null ? b : b.legacyUnwrap();\n}\n\n/**\n * @param {?} v The value to normalize. True bigints will be converted to\n *     numbers when within the safe integer range and strings otherwise.\n *     Non-bigints will be returned as-is.\n * @return {?}\n */\nfunction normalizeBigInt(v) {\n  if (typeof v === 'bigint') {\n    const num = Number(v);\n    return Number.isSafeInteger(num) ? num : '' + v;\n  }\n\n  return v;\n}\n\n/**\n * Returns the map formatted as an array of key-value pairs, suitable for the\n * toObject() form of a message.\n *\n * @template K, V\n * Use go/closure-ttl  to create a `?V|undefined` type\n * @template V_OR_NULL_UNDEFINED := union(V, 'null', 'undefined') =:\n * @param {!Map<K,V>} map\n * @param {function(V_OR_NULL_UNDEFINED):(!Object|undefined)=}\n *     valueToObject\n *    The static toObject() method, if V is a message type.\n * @return {!Array<!Array<!Object>>}\n */\nfunction mapToObject(map, valueToObject) {\n  // this would be more natural as a call to Array.from passing a mapper\n  // but that is disallowed by some applications.\n  const entries = logNewArray([]);\n  map.forEach(valueToObject ? (v, k) => {\n    entries.push(logNewArray([normalizeBigInt(k), valueToObject(v)]));\n  } : (v, k) => {\n    entries.push(logNewArray([normalizeBigInt(k), normalizeBigInt(v)]));\n  });\n  return entries;\n}\n\n/**\n * Normalize `null` -> `undefined`, and slice arrays, for the `ObjectFormat` of\n * a message.\n * @return {?}\n */\nfunction toObjectPrimitive(/** ? */ v) {\n  if (Array.isArray(v)) {\n    return logNewArray(v.map(normalizeBigInt));\n  }\n\n  return v == null ? undefined : normalizeBigInt(v);\n}\n\n/**\n * Normalizes a bytes field for toObject. Returns base64 string, array of\n * string (for repeated field), or normalizes null to undefined.\n * @return {string|!Array<string>|undefined}\n */\nfunction toObjectBytes(/** ?ByteString|!ReadonlyArray<!ByteString> */ value) {\n  return value == null     ? undefined :\n      Array.isArray(value) ? logNewArray(value.map(b => b.asBase64())) :\n                             /** @type {!ByteString} */ (value).asBase64();\n}\n\n/**\n * Returns a Map from the given array of key-value pairs when the values are\n * of message type. The values in the array must match the format returned by\n * their message type's toObject() method.\n *\n * @template K, V\n * @template V_OR_NULL_UNDEFINED := union(V, 'null', 'undefined') =:\n * @param {!Map<K,V>} map\n * @param {!Array<!Array<?>>} entries\n * @param {(function(?):V_OR_NULL_UNDEFINED)=} valueFromObject\n *    The fromObject function for type V.\n * @return {!Map<K, V>}\n */\nfunction mapFromObject(map, entries, valueFromObject) {\n  for (let i = 0; i < entries.length; i++) {\n    const key = entries[i][0];\n    const value =\n        valueFromObject ? valueFromObject(entries[i][1]) : entries[i][1];\n    map.set(key, value);\n  }\n  return map;\n}\n\n/**\n * Virtual baseclass used by generated code.\n *\n * This class does not exist at runtime in compiled code: do not reference it.\n *\n * @extends {MutableMessage<I>}\n * @template I\n */\nclass GeneratedMessageImpl extends MutableMessage {\n  /**\n   * Builds this message into an immutable one.\n   *\n   * @public\n   * @return {!I}\n   * @override\n   * @tsType (): I\n   */\n  toImmutable() {\n    return super.toImmutable();\n  }\n\n  /**\n   * Returns a mutable copy of this message.\n   *\n   * @protected\n   * @return {!THIS}\n   * @this {THIS}\n   * @template THIS\n   * @override\n   * @tsType (): this\n   */\n  toMutable() {\n    return super.toMutable();\n  }\n}\n\nif (asserts.ENABLE_ASSERTS && USE_DETAILED_MESSAGE_TYPE_HIERARCHY) {\n  GeneratedMessageImpl.prototype[GENERATED_SUBCLASS_MARKER] = true;\n}\n\n/*\n * Install hasInstance handlers.\n *\n * Technically, the runtime instances declared as `ImmutableMessage` will\n * have `MutableMessage` in their prototype chain; so an `instanceof` check\n * will be a highly incorrect means to decide a value's immutability. For this\n * reason, we should prevent `instanceof` checks on `MutableMessage`, but we\n * have to revert the handler on `GeneratedMessage`.\n */\nif (SUPPORTS_HAS_INSTANCE && USE_DETAILED_MESSAGE_TYPE_HIERARCHY) {\n  // TODO(b/219105470): use defineProperty once JSC supports it\n  Object.defineProperties(GeneratedMessageImpl, {\n    [Symbol.hasInstance]: invisiblePropValue(Object[Symbol.hasInstance]),\n  });\n  asserts.assert(\n      GeneratedMessageImpl[Symbol.hasInstance] === Object[Symbol.hasInstance],\n      'broken defineProperties implementation');\n}\n\n/**\n * Virtual baseclass used by generated code.\n *\n * This class does not exist at runtime in compiled code: do not reference it.\n *\n * This is conditional so that we get detailed type overrides in DEBUG but\n * they do not incur additional costs due to the length of their prototype\n * chain in production (especially during message construction.\n *\n * @type {typeof GeneratedMessageImpl}\n */\nconst GeneratedMessage = /** @type {typeof GeneratedMessageImpl} */ (\n    USE_DETAILED_MESSAGE_TYPE_HIERARCHY ? GeneratedMessageImpl : Message);\n\n/** Field number for the `type_url` field. */\nconst ANY_TYPE_URL_FIELD_NUMBER = 1;\n\n/** Field number for the `value` field. */\nconst ANY_VALUE_FIELD_NUMBER = 2;\n\n/** @return {!ByteString} */\nfunction getAnyValueField(/** !Message */ any) {\n  const value = getFieldNullable(any, ANY_VALUE_FIELD_NUMBER, NO_MESSAGE_ID);\n  if (Array.isArray(value) || (value instanceof Message)) {\n    throw new Error(\n        'Cannot access the Any.value field on Any protos encoded using the jspb format, call unpackJspb instead');\n  }\n  return getBytesFieldWithDefault(any, ANY_VALUE_FIELD_NUMBER);\n}\n\n/**\n * Implementation of pack()\n * `T` is really proto.google.protobuf.Any, but we can't reference that type\n * here for circular deps reasons\n * @template T\n * @return {T}\n */\nfunction packAnyValueBinary(\n    /** T */ any, /** !Uint8Array|string|!ByteString*/ bytes, /** string*/ name,\n    /** string= */ typeUrlPrefix) {\n  asserts.assertInstanceof(any, Message);\n  setAnyTypeName(any, name, typeUrlPrefix);\n  return setProto3BytesField(any, ANY_VALUE_FIELD_NUMBER, bytes);\n}\n\n\n/**\n * Sets the type URL on an Any.\n *\n * `T` is really proto.google.protobuf.Any, but we can't reference that type\n * here for circular deps reasons.\n *\n * @template T\n * @return {T}\n */\nfunction setAnyTypeUrl(/** T */ any, /** string */ type_url) {\n  return setProto3StringField(any, ANY_TYPE_URL_FIELD_NUMBER, type_url);\n}\n\n/**\n * Sets the type name on an Any.\n *\n * `T` is really proto.google.protobuf.Any, but we can't reference that type\n * here for circular deps reasons.\n *\n * @template T\n * @return {T}\n */\nfunction setAnyTypeName(\n    /** T */ any, /** string */ name,\n    /** string= */ typeUrlPrefix = 'type.googleapis.com/') {\n  if (typeUrlPrefix.substr(-1) !== '/') {\n    typeUrlPrefix += '/';\n  }\n  return setAnyTypeUrl(any, typeUrlPrefix + name);\n}\n\n/**\n * Packs a message into an Any.\n *\n * `T` is really proto.google.protobuf.Any, but we can't reference that type\n * here for circular deps reasons.\n *\n * @template T\n * @return {T}\n */\nfunction packAnyValueJspb(\n    /** T */ any, /** !Message */ value, /** string */ name,\n    /** function(?):!Uint8Array= */ serializeBinaryFn,\n    /** string= */ typeUrlPrefix) {\n  asserts.assertInstanceof(any, Message);\n  asserts.assertInstanceof(value, Message);\n  const ctor = value.constructor;\n  assertCorrectAnyType(ctor, name, /* isPack = */ true);\n  // Store serializer as a new function on the any proto\n  // Note: must cast to ? first to avoid disambiguation invalidation\n  const holder =\n      /** @type{!SerializeBinaryFnHolder} */ (/** @type{?} */ (value));\n  // TODO(varomodt): copy this property in clone and toImmutable, and\n  // maybe also attach it to the ctor as well.\n  holder.serializeBinaryFnForAnyProto_ = serializeBinaryFn;\n  setAnyTypeName(any, name, typeUrlPrefix);\n  setWrapperField(any, ctor, ANY_VALUE_FIELD_NUMBER, value, NO_MESSAGE_ID);\n  return any;\n}\n\n/**\n * @return {string}\n */\nfunction getAnyTypeName(/** !Message */ msg) {\n  return getStringFieldWithDefault(msg, ANY_TYPE_URL_FIELD_NUMBER)\n      .split('/')\n      .pop();\n}\n\n/**\n * @template M, I\n * @return {function(new:M,?Array<?>=)}\n */\nfunction ctorFromCtorOrDefaultInstance(\n    /** function(new:M, !Array<?>=)|I */ ctorOrDefaultInstance) {\n  return typeof ctorOrDefaultInstance === 'function' ?\n      ctorOrDefaultInstance :\n      ctorOrDefaultInstance.constructor;\n}\n\n/**\n * @template M,I\n * @return {!M|I}\n */\nfunction unpackAnyJspbCompat(\n    /** !Message */ msg,\n    /** function(new:M, !Array<?>=)|I|undefined */ ctorOrDefaultInstance,\n    /** (function(!Uint8Array):M)|undefined */ deserializeFn,\n    /** string */ typeName) {\n  // If we have a deserialize function, we can derive a ctor.\n  if (deserializeFn != null) {\n    ctorOrDefaultInstance ??=\n        /** @type {!DeserializeFnWithCtorAndTypeName} */ (deserializeFn)\n            .internalDoNotUse_ctor;\n  }\n\n  // If this Any did not have the expected type name, return null.\n  if (getAnyTypeName(msg) != typeName) return null;\n\n  // Derive a constructor from the passed in value, since we use default\n  // instances for immutable protos.\n  const ctor = ctorFromCtorOrDefaultInstance(ctorOrDefaultInstance);\n\n  // Assert that the passed in type name matches the type name on the Any.\n  //\n  // This should be a throw but for now we only do this in debug mode because\n  // for JSPB unpacks we do not have a type name on the constructor at runtime.\n  assertCorrectAnyType(ctor, typeName, /* isPack = */ false);\n\n  // Retrieve the value field from the Any.\n  let messageArray = getInternalArray(msg);\n  let messageArrayState = getMessageArrayState(messageArray);\n  const value = getFieldNullableInternal(\n      messageArray, messageArrayState, ANY_VALUE_FIELD_NUMBER, NO_MESSAGE_ID);\n  let result;\n  if (!deserializeFn || value == null || isArrayOrMessage(value)) {\n    // If the parent is mutable we must CoW: if we had an immutable value we\n    // would have to write it back as mutable anyway to obey the types.\n    if (maybeCopyOnWrite(msg)) {\n      messageArray = getInternalArray(msg);\n      messageArrayState = getMessageArrayState(messageArray);\n    }\n\n    // If the value was JSPB-formatted, use the inline value to construct\n    // a JSPB message. We follow this path for `null` as it should be a little\n    // faster than deserializing an empty byte string.\n    result = getInlineAnyValue(messageArray, messageArrayState, ctor, value);\n  } else {\n    // Otherwise the value must be binary-formatted.\n    //\n    // TODO(varomodt): should we write this back? It would save the\n    // deserialization cost of subsequent reads and we could attach a binary\n    // serializer to avoid dropping the value (though serializeBinary would\n    // get a bit more expensive).\n    result = deserializeFn(\n        (coerceToNullishBytes(value) ?? ByteString.empty())\n            // TODO(varomodt): change deserializeFn to `function(ByteString):M`\n            // so we don't have to convert ByteStrings. And enforce that it is\n            // our generated deserializer.\n            .asUint8Array());\n\n    // Ensure our mutabilities match.\n    if (isImmutableMessage(msg)) {\n      if (!isImmutableMessage(result)) result = result.toImmutable();\n    } else {\n      if (isImmutableMessage(result)) result = result.toMutable();\n    }\n  }\n\n  // According to the types our result should have the parent's mutability.\n  asserts.assert(isImmutableMessage(result) === isImmutableMessage(msg));\n  return result;\n}\n\n/**\n * Asserts that this message is mutable.\n * @param {!Message} msg\n */\nfunction assertMutable(msg) {\n  if (isImmutableMessage(msg)) {\n    throw new Error('message must be mutable');\n  }\n}\n\n/**\n * @param {*} value\n * @return {boolean}\n */\nfunction isArrayOrMessage(value) {\n  return Array.isArray(value) || isInternalMessage(value);\n}\n\n/**\n * Gets and wraps an inline proto field on access, with the mutability of the\n * parent message. Returns the literal value if null or undefined.\n *\n * If the value in the message is immutable and its parent is mutable, this\n * method will coerce and copy back to the parent message.\n *\n * @param {!Array<?>} parentArray\n * @param {!ArrayState} parentArrayState\n * @param {function(new:T, ?Array<?>=)} ctor\n * @param {?} inlineValue\n * @return {!T} The message field, or else null or undefined.\n * @template T\n * @suppress {visibility}\n */\nfunction getInlineAnyValue(parentArray, parentArrayState, ctor, inlineValue) {\n  // We specifically throw on invalid values (instead of treating them as\n  // missing a la messageFromInlineStorage) to guard against accidentally having\n  // a binary wire proto in the payload\n  if (inlineValue != null && !isArrayOrMessage(inlineValue)) {\n    throw new Error(`saw an invalid value of type '${\n        goog.typeOf(inlineValue)}' in the Any.value field`);\n  }\n\n  // Construct a new value if we need to.\n  let value = messageFromInlineStorage(\n      inlineValue, ctor,\n      /* constructMissing = */ true,\n      /* parentArrayState = */ parentArrayState);\n  if (!(value instanceof ctor)) {\n    throw new Error(`incorrect type in any value: got ${\n        value.constructor.displayName}, expected ${ctor.displayName}`);\n  }\n\n  // We always return a mutable value from a mutable parent.\n  const isParentImmutable =\n      hasFlagBit(parentArrayState, ArrayStateFlags.IS_IMMUTABLE_ARRAY);\n  if (!isParentImmutable) {\n    value = /** @type {!Message} */ (value).toMutable();\n  }\n\n  // Write back if we constructed a new message.\n  if (inlineValue !== value) {\n    setFieldIgnoringImmutability(\n        parentArray, parentArrayState, ANY_VALUE_FIELD_NUMBER, value,\n        NO_MESSAGE_ID);\n    // The value is always mutable so we have always leaked.\n    if (!isParentImmutable) leakedMutableSubstructures(parentArray);\n  }\n  return value;\n}\n\n/** @typedef {!ByteString|!ByteSource} */\nlet BinarySource;\n\n/** @return {string} */\nfunction getTypeName(/** function(new:Message, !Array<?>=) */ ctor) {\n  let name;\n  if (GENERATE_TYPE_NAME_PROPERTIES) {\n    name = getCtorTypeName(ctor);\n    if (name) {\n      return name;\n    }\n  }\n  name = ctor.displayName;\n  if (name) {\n    return name;\n  }\n  return ctor.name || '';\n}\n\n/**\n * Asserts that the given constructor represents the type described by the given\n * type.\n *\n * @param {function(new:Message, !Array<?>=)} ctor\n * @param {string} typeName\n * @param {boolean} isPack\n */\nfunction assertCorrectAnyType(ctor, typeName, isPack) {\n  // To be extra sure we don't retain the type name.\n  if (!GENERATE_TYPE_NAME_PROPERTIES || getUnsafeDisableJspbAnyTypeChecks()) {\n    return;\n  }\n  const ctorType = getCtorTypeName(ctor);\n  if (ctorType !== typeName) {\n    if (isPack) {\n      throw new Error(`tried to pack type ${\n          ctorType} into an Any with type label ${typeName}`);\n    } else {\n      throw new Error(`tried to unpack type ${\n          ctorType} out of an Any with type label ${typeName}`);\n    }\n  }\n}\n\n// NOTE: for nearly all the factory functions below we mark the return type as\n// `?` to avoid needing casts in the gencode\n// For some of these it is possible to write valid types, but not all (e.g.\n// `makeGetDefaultInstanceFunction`), so for simplicity we just don't bother.\n\n/**\n * Returns a `getDefaultInstance` function implementation.\n * @return {?}\n * @nosideeffects\n */\nfunction makeGetDefaultInstanceFunction(\n    /** function(new:Message, ?Array<?>=)*/ ctor) {\n  return () => getDefaultImmutableInstance(ctor);\n}\n\n\n/** @record */\nfunction DeserializeFnWithCtorAndTypeName() {\n  /** @type {!Function} */\n  this.internalDoNotUse_ctor;\n}\n\n/**\n * Returns a `deserializeBinary` function for an immutable message\n * @return {?}\n * @nosideeffects\n */\nfunction makeDeserializeBinaryImmutableFunction(\n    /** function(!BinarySource, !BinaryReaderOptions=):!Message */\n    deserializeBinaryFn) {\n  const fn = /** @return {!Message} */ (\n      /** !BinarySource */ source,\n      /** !BinaryReaderOptions= */ options) => {\n    return deserializeBinaryFn(source, options).toImmutable();\n  };\n  /** @type {!DeserializeFnWithCtorAndTypeName} */ (fn).internalDoNotUse_ctor =\n      /** @type {!DeserializeFnWithCtorAndTypeName} */ (deserializeBinaryFn)\n          .internalDoNotUse_ctor;\n  return fn;\n}\n\n/**\n * Returns a `deserializeBinary` function for a mutable message.\n * @return {function(?BinarySource,!BinaryReaderOptions=):T}\n * @template T\n * @nosideeffects\n */\nfunction makeDeserializeBinaryFunction(\n    /** function(new:T, ?Array<?>=) */ ctor, /** !Array<?> */ binaryFields) {\n  const fn = /** @return {!T} */ (\n      /** ?BinarySource */ source,\n      /** !BinaryReaderOptions= */ options) =>\n      deserializeBinary(source, ctor, binaryFields, options);\n  /** @type {!DeserializeFnWithCtorAndTypeName} */ (fn).internalDoNotUse_ctor =\n      ctor;\n  return fn;\n}\n\n/**\n * Returns a `deserializeBinaryFromReader` function implementation.\n * @return {?}\n * @suppress{visibility} accesses private properties of message\n * @nosideeffects\n */\nfunction makeDeserializeBinaryFromReaderFunction(\n    /** !Array<?> */ binaryFields) {\n  return /** @return {T} @template T */ (\n             /** !T */ msg, /** !BinaryReader*/ reader) => {\n    maybeCopyOnWrite(msg);\n    makeDeserializeBinaryFromReaderFromBinaryFields(binaryFields)(\n        getInternalArray(/** @type{!Message}*/ (msg)), reader);\n    return msg;\n  };\n}\n\n/**\n * Returns a `serializeBinary` static function for a message.\n * @return {?}\n * @nosideeffects\n */\nfunction makeSerializeBinaryFunction(/** !Array<?> */ binaryFields) {\n  return (/** !Message */ msg) => serializeBinary(msg, binaryFields);\n}\n\n/**\n * Returns a `serializeBinaryToByteString` static function for a message.\n * @return {?}\n * @nosideeffects\n */\nfunction makeSerializeBinaryToByteStringFunction(\n    /** !Array<?> */ binaryFields) {\n  return (/** !Message */ msg) =>\n             serializeBinaryToByteString(msg, binaryFields);\n}\n\n/**\n * Returns an opaque binary type table for a message.\n * @template T\n * @return {function(): !OpaqueTypeTable<T>}\n * @nosideeffects\n * @tsType <\n *   T extends\n * import('google3/javascript/apps/jspb/mutable_message').MutableMessage\n * >(\n *   messageType: new (data?: unknown[] | null) => T,\n *   binaryFields: unknown[],\n * ): () => OpaqueTypeTable<T>\n */\nfunction makeGetTypeTable(\n    /** function(new:T, ?Array<?>=) */ messageType,\n    /** !Array<?> */ binaryFields) {\n  let /** ? */ table;\n  return () => /** @type {!OpaqueTypeTable<T>} */ (\n             table ??=\n                 wrappedTypeTableForBinaryFields(messageType, binaryFields));\n}\n\n/**\n * Returns a `serializeBinary` instance method for a message.\n * @return {?}\n * @nosideeffects\n */\nfunction makePrototypeSerializeBinaryFunction(/** !Array<?> */ binaryFields) {\n  return (/**\n           * @this {!Message}\n           * @return {!Uint8Array}\n           */\n          function() {\n            return serializeBinary(this, binaryFields);\n          });\n}\n\n/**\n * Returns a `makeCrossSerializerComparisonsCompatible` static function for a\n * message.\n * @return {?}\n * @nosideeffects\n */\nfunction makeCrossSerializerComparisonsCompatibleFunction(\n    /** !Function*/ ctor, /** !Array<?> */ binaryFields) {\n  const fn = (/** !Message */ msg) => makeCrossSerializerComparisonsCompatible(\n      asserts.assertInstanceof(asserts.assertInstanceof(msg, ctor), Message),\n      binaryFields);\n  if (goog.DEBUG) {\n    // In debug mode we can leverage this property to improve an error message.\n    ctor['makeCrossSerializerComparisonsCompatible'] = fn;\n  }\n  return fn;\n}\n\n/**\n * Returns a `hasInstance` function for an ImmutableMessage\n * @return {?}\n * @nosideeffects\n */\nfunction makeHasImmutableInstance(\n    /** function(new:Message, ?Array<?>=) */ ctor) {\n  return defineTypeGuard(\n      /**\n       * @param {*} value\n       * @return {boolean}\n       */\n      (value) => value instanceof ctor && isImmutableMessage(value),\n      () => 'ImmutableMessage:' + getTypeName(ctor));\n}\n\n/**\n * Returns a `hasInstance` function for a MutableMessage\n * @return {?}\n * @nosideeffects\n */\nfunction makeHasMutableInstance(\n    /** function(new:Message, ?Array<?>=) */ ctor) {\n  return defineTypeGuard(\n      /**\n       * @param {*} value\n       * @return {boolean}\n       */\n      (value) => value instanceof ctor && !isImmutableMessage(value),\n      () => 'MutableMessage:' + getTypeName(ctor));\n}\n\n\n/**\n * Returns a `deserialize` function for an immutable message.\n * @param {function(new:?, ?Array=)} ctor Constructor for the message.\n * @return {!Function} a deserializeFunction\n * @nosideeffects\n */\nfunction makeImmutableDeserializeFunction(ctor) {\n  return (/** string */ data) => deserializeAsImmutable(ctor, data);\n}\n\n/**\n * Returns a `deserialize` function for a message.\n * @return {?}\n * @nosideeffects\n */\nfunction makeMutableDeserializeFunction(\n    /** function(new:Message, ?Array<?>=) */ ctor) {\n  return (/** string */ data) => Message.deserializeWithCtor(ctor, data);\n}\n\n/**\n * Returns a `fromFields` function for a message.\n * @return {?}\n * @nosideeffects\n */\nfunction makeFromFieldsForTesting(\n    /** function(new:Message, ?Array<?>=) */ ctor) {\n  if (COMPILED || !GENERATE_FIELDS_INTERFACE_FOR_TESTING) {\n    return undefined;\n  }\n  return /** @return {?} */ (/** !Object */ fields) => {\n    triggerLeakTest(ctor);\n    return fromFieldsForTestingGeneric(ctor, fields);\n  };\n}\n\n/**\n * Returns a `getFields` function for a message.\n * @return {?}\n * @nosideeffects\n */\nfunction makeGetFieldsForTesting() {\n  if (COMPILED || !GENERATE_FIELDS_INTERFACE_FOR_TESTING) {\n    return undefined;\n  }\n  return /** @return {?} */ (/** !Message */ msg) => {\n    triggerLeakTest(msg.constructor);\n    return getFieldsForTestingGeneric(msg);\n  };\n}\n\n/** @return {!Object<number, *>} */\nfunction makeExtensionsObject(/** function(new:Message, ?Array<?>=) */ ctor) {\n  const extensions = {};\n  if (goog.DEBUG) {\n    registerExtensionsForDebugging(ctor, extensions);\n  }\n  return extensions;\n}\n\n\n/** Triggers leak tests if this code ever ends up in an optimized binary. */\nfunction triggerLeakTest(/** ? */ ctor) {\n  if (ctor['property_that_will_never_exist_do_not_use_jspb-syntax-that-must-be-optimized']) {\n    throw new Error(\n        'jspb-syntax-that-must-be-optimized: see go/closure-js-conformance#jspbRecords');\n  }\n}\n\n/**\n * This is a constant which will compile to `false` but will not trigger useless\n * code checks.\n *\n * @const {boolean}\n */\nconst ALWAYS_FALSE = !COMPILED && (Math.random() < 0);\n\n/**\n * An empty record type.\n *\n * We use this in fromObject so that the JSCompiler does not degrade the\n * receiver type and emit JSConformance violations from gencode.\n *\n * @record\n */\nfunction EmptyRecord() {}\n\nexports = {\n  ALWAYS_FALSE,\n  ANY_PROTOTYPE_MARKER_VALUE,\n  BinaryReaderOptions,\n  BinarySource,\n  DescriptorTypeReference,\n  DoNotFreezeToken,\n  EmptyRecord,\n  EnumDescriptorTypeReference,\n  ExtensionReference,\n  GENERATE_FROM_OBJECT,\n  GENERATE_TO_OBJECT,\n  GENERATE_TYPE_NAME_PROPERTIES,  // Re-export for gencode\n  GeneratedMessage,\n  HAS_MESSAGE_ID,\n  LAZILY_PARSE_LATE_LOADED_EXTENSIONS_SYMBOL,\n  OpaqueTypeTable,\n  OrUndefinedToken,\n  RecordExtensionRegistry,\n  assertCorrectAnyType,\n  assertMutable,\n  byteStringAsB64,\n  byteStringAsBase64OrUint8Array,\n  byteStringAsU8,\n  byteStringListAsB64,\n  byteStringListAsU8,\n  checkCanCallToObject: assertMutable,\n  registerExtensionsForDebugging,\n  createMessageExtension,\n  createPrimitiveExtension,\n  createRepeatedMessageExtension,\n  createRepeatedPrimitiveExtension,\n  fromObjectAnyValue,\n  fromObjectBytes: coerceToNullishBytes,\n  fromObjectList,\n  fromObjectNullable,\n  getAnyTypeName,\n  getAnyValueField,\n  makeCrossSerializerComparisonsCompatibleFunction,\n  makeDeserializeBinaryFromReaderFunction,\n  makeDeserializeBinaryFunction,\n  makeDeserializeBinaryImmutableFunction,\n  makeExtensionsObject,\n  makeFromFieldsForTesting,\n  makeGetDefaultInstanceFunction,\n  makeGetFieldsForTesting,\n  makeHasImmutableInstance,\n  makeHasMutableInstance,\n  makeImmutableDeserializeFunction,\n  makeMutableDeserializeFunction,\n  makePrototypeSerializeBinaryFunction,\n  makeSerializeBinaryFunction,\n  makeSerializeBinaryToByteStringFunction,\n  mapFromObject,\n  mapToObject,\n  packAnyValueBinary,\n  packAnyValueJspb,\n  makeDescriptorGetter,\n  makeEnumDescriptorGetter,\n  makeExtensionReference,\n  makeGetTypeTable,\n  setAnyTypeName,\n  setAnyTypeUrl,\n  toGbigint,\n  toObjectAnyValue,\n  toObjectBytes,\n  toObjectList,\n  toObjectPrimitive,\n  TypeSpecificApiFormat,\n  unpackAnyJspbCompat,\n};\n","// source: google/rpc/status.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$google$rpc$MutableStatus');\ngoog.provide('jspb$ro.google$rpc$ReadonlyStatus');\n\ngoog.require('jspb$google$protobuf$MutableAny');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$google$rpc$ImmutableStatus');\ngoog.requireType('jspb$r$google$rpc$Status$internalDoNotUseReader');\ngoog.requireType('jspb$ro.google$protobuf$ReadonlyAny');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$google$rpc$ImmutableStatus>}\n * @implements {jspb$r$google$rpc$Status$internalDoNotUseReader}\n */\njspb$google$rpc$MutableStatus = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional int32 code = 1;\n   * @override\n   * @return {number}\n   */\n  getCode() {\n    return jspb_internal_adapters.getInt32FieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * @param {number|null|undefined} value\n   * @return {!jspb$google$rpc$MutableStatus} returns this\n   */\n  setCode(value) {\n    return jspb_internal_adapters.setProto3Int32Field(this, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$google$rpc$MutableStatus} returns this\n   */\n  clearCode() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * optional string message = 2;\n   * @override\n   * @return {string}\n   */\n  getMessage() {\n    return jspb_internal_adapters.getStringFieldWithDefault(this, 2);\n  }\n\n\n  /**\n   * @param {string|null|undefined} value\n   * @return {!jspb$google$rpc$MutableStatus} returns this\n   */\n  setMessage(value) {\n    return jspb_internal_adapters.setProto3StringField(this, 2, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$google$rpc$MutableStatus} returns this\n   */\n  clearMessage() {\n    return jspb_internal_adapters.clearField(this, 2);\n  }\n\n\n  /**\n   * repeated google.protobuf.Any details = 3;\n   * @param {!jspb_internal_public_for_gencode.DoNotFreezeToken=} freezeOptOut\n   * @tsType (freezeOptOut: import('google3/javascript/apps/jspb/internal_public').DoNotFreezeToken): \u0ca0_\u0ca0.clutz.jspb$google$protobuf$MutableAny[]\n   * @tsType (): readonly \u0ca0_\u0ca0.clutz.jspb$google$protobuf$MutableAny[]\n   * @override\n   * @return {!ReadonlyArray<!jspb$google$protobuf$MutableAny>}\n   */\n  getDetailsList(freezeOptOut) {\n    return jspb_internal_adapters.getRepeatedWrapperField(this, jspb$google$protobuf$MutableAny, 3, jspb_internal_adapters.getRepeatedFieldReturnType(freezeOptOut));\n  }\n\n\n  /**\n   * repeated google.protobuf.Any details = 3;\n   * @override\n   * @return {!ReadonlyArray<!jspb$ro.google$protobuf$ReadonlyAny>}\n   */\n  getReadonlyDetailsList() {\n    return jspb_internal_adapters.getReadonlyRepeatedWrapperField(this, jspb$google$protobuf$MutableAny, 3);\n  }\n\n\n  /**\n   * @param {!ReadonlyArray<!jspb$ro.google$protobuf$ReadonlyAny>|null|undefined} value\n   * @return {!jspb$google$rpc$MutableStatus} returns this\n   */\n  setDetailsList(value) {\n    return jspb_internal_adapters.setRepeatedWrapperField(this, jspb$google$protobuf$MutableAny, 3, value);\n  }\n\n\n  /**\n   * Gets mutable repeated field reference.\n   * @param {number} index\n   * @return {!jspb$google$protobuf$MutableAny}\n   */\n  getMutableDetails(index) {\n    return jspb_internal_adapters.getRepeatedIndexedMutableWrapper(this, 3, jspb$google$protobuf$MutableAny, index);\n  }\n\n\n  /**\n   * Gets readonly repeated field reference.\n   * @override\n   * @param {number} index\n   * @return {!jspb$ro.google$protobuf$ReadonlyAny}\n   */\n  getReadonlyDetails(index) {\n    return jspb_internal_adapters.getRepeatedIndexedReadonlyWrapper(this, 3, jspb$google$protobuf$MutableAny, index);\n  }\n\n\n  /**\n   * Adds repeated field and returns `this`.\n   * @param {!jspb$ro.google$protobuf$ReadonlyAny} value\n   * @param {number=} index\n   * @return {!jspb$google$rpc$MutableStatus} returns this\n   */\n  addDetails(value, index) {\n    return jspb_internal_adapters.addToRepeatedWrapperField(this, 3, jspb$google$protobuf$MutableAny, value, index);\n  }\n\n\n  /**\n   * Adds repeated field and returns newly added submessage.\n   * @param {!jspb$google$protobuf$MutableAny=} value\n   * @param {number=} index\n   * @return {!jspb$google$protobuf$MutableAny} the value that was added\n   */\n  addAndReturnDetails(value, index) {\n    return jspb_internal_adapters.addAndReturnRepeatedWrapperField(this, 3, jspb$google$protobuf$MutableAny, value, index);\n  }\n\n\n  /**\n   * Adds multiple values to a repeated field and returns `this`.\n   * @param {!Iterable<!jspb$ro.google$protobuf$ReadonlyAny>} values\n   * @return {!jspb$google$rpc$MutableStatus} returns this\n   */\n  addAllDetails(values) {\n    return jspb_internal_adapters.addAllToRepeatedWrapperField(this, 3, jspb$google$protobuf$MutableAny, values);\n  }\n\n\n  /**\n   * Sets repeated field value at `index` and returns `this`.\n   * @param {number} index\n   * @param {!jspb$ro.google$protobuf$ReadonlyAny} value\n   * @return {!jspb$google$rpc$MutableStatus} returns this\n   */\n  setDetails(index, value) {\n    return jspb_internal_adapters.setRepeatedIndexedWrapper(this, 3, jspb$google$protobuf$MutableAny, index, value);\n  }\n\n\n  /**\n   * Removes a value from a repeated field and returns `this`.\n   * @param {number=} index defaults to the end\n   * @return {!jspb$google$rpc$MutableStatus} returns this\n   */\n  removeDetails(index) {\n    return jspb_internal_adapters.removeFromRepeatedWrapperField(this, 3, jspb$google$protobuf$MutableAny, index);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$google$rpc$MutableStatus} returns this\n   */\n  clearDetailsList() {\n    return jspb_internal_adapters.clearField(this, 3);\n  }\n\n\n  /**\n   * Returns the size of this field.\n   * @override\n   * @return {number}\n   */\n  getDetailsCount() {\n    return jspb_internal_adapters.getRepeatedWrapperCount(this, jspb$google$protobuf$MutableAny, 3);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$google$rpc$ImmutableStatus}\n */\njspb$google$rpc$MutableStatus.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$google$rpc$MutableStatus}\n */\njspb$google$rpc$MutableStatus.prototype.clone;\n/**\n * @const {function(string):!jspb$google$rpc$MutableStatus}\n */\njspb$google$rpc$MutableStatus.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$google$rpc$MutableStatus));\n\n/**\n * Returns whether the given value is an instance of jspb$google$rpc$MutableStatus.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$google$rpc$MutableStatus>}\n */\njspb$google$rpc$MutableStatus.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$google$rpc$MutableStatus));\n\n/**\n * Object form of Status as accepted by the `fromObject` method.\n * @typedef {{\n *  code: (?number|undefined),\n *  message: (?string|undefined),\n *  detailsList: (?Array<!jspb$google$protobuf$MutableAny.ObjectFormat>|undefined)\n * }}\n */\njspb$google$rpc$MutableStatus.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$google$rpc$MutableStatus.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @return {!jspb$google$rpc$MutableStatus.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$google$rpc$MutableStatus.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for google$rpc$MutableStatus.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$google$rpc$MutableStatus.internalDoNotUse_debugOnlyProtoTypeName = \"google.rpc.Status\";\n}\n\n/**\n * @typedef {!jspb$google$rpc$ImmutableStatus|!jspb$google$rpc$MutableStatus}\n */\njspb$ro.google$rpc$ReadonlyStatus = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$google$rpc$MutableStatus.displayName = 'proto.google.rpc.Status';\n}\n/**\n * Interface form of Status as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  code: (number|undefined),\n *  message: (string|undefined),\n *  detailsList: (!ReadonlyArray<!jspb$ro.google$protobuf$ReadonlyAny>|undefined)\n * }}\n */\njspb$google$rpc$MutableStatus.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$google$rpc$MutableStatus.FieldsInterface} record\n * @return {!jspb$google$rpc$ImmutableStatus}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$google$rpc$MutableStatus, \u0ca0_\u0ca0.clutz.jspb$google$rpc$MutableStatus.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$google$rpc$ImmutableStatus\n */\njspb$google$rpc$MutableStatus.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$google$rpc$MutableStatus));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.google$rpc$ReadonlyStatus} value\n * @return {!jspb$google$rpc$MutableStatus.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.google$rpc$ReadonlyStatus): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$google$rpc$MutableStatus, \u0ca0_\u0ca0.clutz.jspb$google$rpc$MutableStatus.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$google$rpc$MutableStatus.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","goog.provide('gapix.util.getOrigin');\n\n// TODO(fargo,bsittler): b/17584085 Move to abc in this implementation of\n// gapix.util.getOrigin\n\n/**\n * Gets the origin of the given URL.\n * @param {?string} url URL whose origin to calculate.\n * @return {string} schema://authority of the url.\n */\ngapix.util.getOrigin = function(url) {\n  if (!url) {\n    return '';\n  }\n  // Handle inherited origin.\n  if (/^about:(?:blank|srcdoc)$/.test(url)) {\n    return window.origin || '';\n  }\n  // Handle blob URLs.\n  if (url.indexOf('blob:') === 0) {\n    url = url.substring(5);\n  }\n  // Remove fragment and query as they might otherwise confuse parsing\n  url = ((url.split('#'))[0].split('?'))[0];\n  url = url.toLowerCase();\n  if (url.indexOf('//') == 0) {\n    url = window.location.protocol + url;\n  }\n  if (!/^[\\w\\-]*:\\/\\//.test(url)) {\n    // Assumed to be relative url. Default to current url.\n    url = window.location.href;\n  }\n  // At this point we guarantee that \"://\" is in the URL and defines\n  // current protocol. Skip past this to search for host:port.\n  var host = url.substring(url.indexOf('://') + 3);\n\n  // Find the first slash char, delimiting the host:port.\n  // TODO: Account for username:pw@host:port parsing.\n  var slashPos = host.indexOf('/');\n  if (slashPos != -1) {\n    host = host.substring(0, slashPos);\n  }\n\n  var protocol = url.substring(0, url.indexOf('://'));\n  if (!protocol) {\n    throw new Error('URI is missing protocol: ' + url);\n  }\n  if (protocol !== 'http' && protocol !== 'https' &&\n      protocol !== 'chrome-extension' && protocol !== 'moz-extension' &&\n      protocol !== 'file' && protocol !== 'android-app' &&\n      protocol !== 'chrome-search' && protocol !== 'chrome-untrusted' &&\n      protocol !== 'chrome' && protocol !== 'app' /* KaiOS App */ &&\n      protocol !== 'devtools') {\n    throw new Error('Invalid URI scheme in origin: ' + protocol);\n  }\n\n  // Use port only if it's not default for the protocol.\n  var portStr = '';\n  var portPos = host.indexOf(':');\n  if (portPos != -1) {\n    var port = host.substring(portPos + 1);\n    host = host.substring(0, portPos);\n    if ((protocol === 'http' && port !== '80') ||\n        (protocol === 'https' && port !== '443')) {\n      portStr = ':' + port;\n    }\n  }\n\n  // Return <protocol>://<host>[<port>]\n  return protocol + '://' + host + portStr;\n};\n","// Copyright 2011 Google Inc. All rights reserved.v\n\n/**\n * @fileoverview Class that generates successive intervals for random\n * exponential backoff. Class tracks a \"high water mark\" which increases by a\n * factor of the exponential backoff base eachtime `getNextDelay` is called;\n * each call to `getNextDelay` returns a value uniformly randomly distributed\n * between high_water_mark * (1 - max_random_jitter_fraction) (exclusive) and\n * the high_water_mark (inclusive). Although this class doesn't interact\n * directly with timers, and therefore doesn't interpret time values in a\n * specific unit, callers are strongly encouraged to follow the JavaScript\n * convention of specifying durations in milliseconds. Variables in this class\n * are named and documented according to that assumption.\n *\n * @author adya@google.com (Atul Adya)\n */\n\ngoog.module('invalidation.ExponentialBackoffDelayGenerator');\n\nconst asserts = goog.require('goog.asserts');\n\nconst DEFAULT_EXPONENTIAL_BACKOFF_BASE = 2;\n\nconst DEFAULT_MAX_RANDOM_JITTER_FRACTION = 0.2;\n\n/**\n * Creates a generator with the given initial delay and maximum backoff\n * multiplier.\n *\n * @param {function(): number} random Random number generator that returns a\n *     number between 0 and 1.\n * @param {number} initialMaxDelayMs Initial max delay for delay computation, in\n *     milliseconds.\n * @param {number} maxBackoffMultiplier The maximum backoff multiplier (the\n *     maximum delay time is the product of this value and `initialMaxDelay`).\n * @param {number=} exponentialBackoffBase The base of the exponential backoff\n *     function.\n * @param {number=} maxRandomJitterFraction The maximum fraction of jitter to\n *     deduct from the high water mark.\n * @constructor\n */\nfunction ExponentialBackoffDelayGenerator(\n    random, initialMaxDelayMs, maxBackoffMultiplier,\n    exponentialBackoffBase = DEFAULT_EXPONENTIAL_BACKOFF_BASE,\n    maxRandomJitterFraction = DEFAULT_MAX_RANDOM_JITTER_FRACTION) {\n  asserts.assert(maxBackoffMultiplier > 1);\n  asserts.assert(initialMaxDelayMs > 0);\n\n  /**\n   * Initial allowed delay time, in milliseconds.\n   * @private {number}\n   * @const\n   */\n  this.initialMaxDelayMs_ = initialMaxDelayMs;\n\n  /**\n   * The maximum delay time before adding jitter, in milliseconds.\n   * @private {number}\n   * @const\n   */\n  this.maxDelayMs_ = initialMaxDelayMs * maxBackoffMultiplier;\n\n  /**\n   * The base of the exponential backoff function.\n   * @private {number}\n   * @const\n   */\n  this.exponentialBackoffBase_ = exponentialBackoffBase;\n\n  /**\n   * The maximum fraction of jitter to deduct from the currentMaxDelayMs_.\n   * @private {number}\n   * @const\n   */\n  this.maxRandomJitterFraction_ = maxRandomJitterFraction;\n\n  /**\n   * Random number generator that returns a number between 0 and 1.\n   * @private {function(): number}\n   * @const\n   */\n  this.random_ = random;\n\n  /**\n   * Next delay time to use, in milliseconds.\n   * @private {number}\n   */\n  this.currentMaxDelayMs_;\n\n  /**\n   * If the first call to getNextDelay has been made after reset.\n   * @private {boolean}\n   */\n  this.inRetryMode_;\n\n  asserts.assert(this.initialMaxDelayMs_ > 0);\n\n  this.reset();\n}\n\n/**\n * Resets the exponential backoff generator to start delays to the initial\n * delay.\n */\nExponentialBackoffDelayGenerator.prototype.reset = function() {\n  this.currentMaxDelayMs_ = this.initialMaxDelayMs_;\n  this.inRetryMode_ = false;\n};\n\n/**\n * Gets the next delay interval to use.\n *\n * @return {number} The next delay interval.\n */\nExponentialBackoffDelayGenerator.prototype.getNextDelay = function() {\n  let delay = 0;  // After a reset, the delay is 0.\n  if (this.inRetryMode_) {\n    // Jitter is uniformly distributed between 1 - maxRandomJitterFraction and\n    // maxRandomJitterFraction.\n    let jitter = this.random_() * this.maxRandomJitterFraction_;\n    delay = Math.ceil((1 - jitter) * this.currentMaxDelayMs_);\n\n    // Adjust the max for the next run.\n    if (this.currentMaxDelayMs_ < this.maxDelayMs_) {\n      this.currentMaxDelayMs_ *= this.exponentialBackoffBase_;\n      // Guard against overflow.\n      if (this.currentMaxDelayMs_ > this.maxDelayMs_) {\n        this.currentMaxDelayMs_ = this.maxDelayMs_;\n      }\n    }\n  }\n  this.inRetryMode_ = true;\n  return delay;\n};\n\nexports.ExponentialBackoffDelayGenerator = ExponentialBackoffDelayGenerator;\nexports.DEFAULT_EXPONENTIAL_BACKOFF_BASE = DEFAULT_EXPONENTIAL_BACKOFF_BASE;\nexports.DEFAULT_MAX_RANDOM_JITTER_FRACTION = DEFAULT_MAX_RANDOM_JITTER_FRACTION;\n","import FetchXmlHttpFactory from 'goog:goog.net.FetchXmlHttpFactory'; // from //third_party/javascript/closure/net:fetchxmlhttpfactory\nimport {Code} from 'google3/google/rpc/code.proto';\nimport {Status} from 'google3/google/rpc/status.proto';\nimport {ExponentialBackoffDelayGenerator} from 'google3/ipc/invalidation/javascript/utils/exponentialbackoffdelaygenerator';\nimport {\n  ObjectIdPrefix,\n  ObjectId as ObjectIdProto,\n  ObjectOwner,\n  ObjectPath as ObjectPathProto,\n  Project,\n} from 'google3/ipc/invalidation/punctual/client/proto/common.proto';\nimport {\n  Affinitization,\n  ChooseServerRequest,\n  ChooseServerResponse,\n  MultiWatchRequest,\n  MultiWatchRequestBatch,\n  MultiWatchResponse,\n  ReadonlyStreamStatus,\n  ReadonlyWatchRequest,\n  RefreshCredentialsRequest,\n  RefreshCredentialsResponse,\n  StreamStatus,\n  WatchRequest,\n  WatchResponse,\n} from 'google3/ipc/invalidation/punctual/client/proto/punctual.proto';\nimport {Environment} from 'google3/ipc/invalidation/punctual/typescript/impl/project_path';\nimport {\n  Advance,\n  Change,\n  Client,\n  Start,\n  WatchOptions,\n} from 'google3/ipc/invalidation/punctual/typescript/public/client';\nimport {\n  ObjectId,\n  ObjectIdPart,\n  ObjectIdTree,\n  decreasing,\n  increasing,\n  interestSetsEqual,\n} from 'google3/ipc/invalidation/punctual/typescript/public/object_id';\nimport {Time} from 'google3/ipc/invalidation/punctual/typescript/public/time';\nimport {\n  AuthMethod,\n  AuthMethodAnonymous,\n  DomainType,\n  buildRequestOpts,\n} from 'google3/ipc/invalidation/typescript/auth_method';\nimport {\n  JspbClient,\n  XhrError,\n} from 'google3/ipc/invalidation/typescript/jspb_client';\nimport {codeForHttpStatus} from 'google3/ipc/invalidation/typescript/util';\nimport {\n  XhrIoInterface,\n  makeRealXhrIo,\n} from 'google3/ipc/invalidation/typescript/xhrio';\nimport {assumeExhaustive} from 'google3/javascript/typescript/contrib/check';\nimport {WebChannel} from 'google3/third_party/javascript/closure/labs/net/webchannel';\nimport {createWebChannelTransport} from 'google3/third_party/javascript/closure/labs/net/webchanneltransportfactory';\nimport * as log from 'google3/third_party/javascript/closure/log/log';\nimport {Long} from 'google3/third_party/javascript/closure/math/long';\nimport {HttpStatus} from 'google3/third_party/javascript/closure/net/httpstatus';\nimport {Timer} from 'google3/third_party/javascript/closure/timer/timer';\nimport {Uri} from 'google3/third_party/javascript/closure/uri/uri';\nimport {StatusProto} from 'google3/util/task/status.proto';\nimport {\n  BehaviorSubject,\n  NEVER,\n  Observable,\n  Observer,\n  Subject,\n  firstValueFrom,\n} from 'rxjs';\nimport {\n  catchError,\n  concatWith,\n  debounce,\n  first,\n  raceWith,\n} from 'rxjs/operators';\n\nimport {\n  ChannelClose,\n  ChannelError,\n  ChannelEvent,\n  ChannelOpen,\n  ChannelTryOpen,\n  ChooseServerFailure,\n  ChooseServerStart,\n  ChooseServerSuccess,\n  ServerError,\n} from 'google3/ipc/invalidation/punctual/typescript/public/channel_internal';\nimport {EventHandler} from 'google3/third_party/javascript/closure/events/eventhandler';\nimport * as requestStats from 'google3/third_party/javascript/closure/labs/net/webchannel/requeststats';\nimport {\n  Channel,\n  ChannelCreator,\n  ChannelHandler,\n  ChannelStatusHandler,\n} from './channel';\nimport {ChannelConfig, ChannelImpl} from './channel_impl';\nimport {HEADER} from './header';\nimport {OpaquePart} from './object_id_impl';\nimport {TokenBucket} from './tokenbucket';\n\nimport PartCase = ObjectPathProto.Part.PartCase;\nimport SignalCase = WatchResponse.SignalCase;\nimport StreamInitiationReason = WatchRequest.StreamInitiationReason;\n\nconst logger = log.getLogger('invalidation.punctual.clientimpl');\n\n/** Time interval to wait before resetting the delay generator. */\nexport const GENERATOR_RESET_DELAY_MS: number = 45 * 1000; // 45 seconds\n\n/** Initial max exponential backoff delay. */\nconst INITIAL_MAX_DELAY_MS = 500;\n\n/** Max backoff factor. Max Delay = INITIAL_MAX_DELAY_MS * MAX_BACKOFF_FACTOR */\nconst MAX_BACKOFF_FACTOR = 1024;\n\n/**\n * The period at which the token bucket refills (a single token) for skipping\n * the backoff delay in response to a reconnect.\n */\nconst SKIP_BACKOFF_REFRESH_PERIOD_MS = 5 * 60 * 1000; // 5 minutes\n\n/** Throttling period for error statuses. */\nexport const ERROR_STATUS_THROTTLE_PERIOD_MS = 500;\n\n/** How long interest sets are tracked for having recent resync errors. */\nexport const TRACK_RECENT_RESYNC_MS: number = 60 * 1000; // 1 minute\n\n/**\n * When synthesizing a local resync for an interest set that's had a recent\n * resync error, how long to wait before terminating the stream.\n */\nexport const SYNTHETIC_RESYNC_DELAY_MS: number = 60 * 1000; // 1 minute\n\n/**\n * The maximum (and initial) number of tokens in the bucket for skipping the\n * backoff in response to reconnect hints.\n */\nexport const SKIP_BACKOFF_MAX_TOKENS = 8;\n\n/** The minimum target interval between credential refreshes. */\nexport const REFRESH_CREDENTIALS_MIN_DELAY_MS: number = 240 * 1000;\n\n/** The maximum target interval between credential refreshes. */\nexport const REFRESH_CREDENTIALS_MAX_DELAY_MS: number = 280 * 1000;\n\n/** The URL path suffix for the MultiWatch WebChannel API. */\nconst WEBCHANNEL_PATH_SUFFIX = '/multi-watch/channel';\n\n/** The URL path suffix for the ChooseServer API call. */\nconst CHOOSE_SERVER_PATH_SUFFIX = '/v1/chooseServer';\n\n/** The URL path suffix for the RefreshCredentials API call. */\nconst REFRESH_CREDENTIALS_PATH_SUFFIX = '/v1/refreshCreds';\n\n/** Wrapper for a batch of changes. See explanation above for usage. */\nclass ChangeBatchResponse {\n  private readonly changeList = new Array<Change>();\n\n  /** Adds validated changes to the ChangeBatchResponse. */\n  add(response: Change) {\n    this.changeList.push(response);\n  }\n\n  /** Returns the change list. */\n  getChangeList(): Change[] {\n    return this.changeList;\n  }\n}\n\n/**\n * Returns an observable that fires once, after the given delay from the time\n * at which it's subscribed. We use this instead of RxJS's `timer` to facilitate\n * testing with the Jasmine mock clock.\n */\nfunction timer(delayMs: number): Observable<{}> {\n  return new Observable<{}>((observer: Observer<{}>) => {\n    const timerId = Timer.callOnce(() => {\n      observer.next({});\n      observer.complete();\n    }, delayMs);\n    return () => {\n      Timer.clear(timerId);\n    };\n  });\n}\n\n/**\n * Validates an 'advance' response from the client proxy. If the advance is\n * null or there is no timestamp (which is required of an advance), then it an\n * invalid advance response and validateAdvance will return undefined.\n */\nfunction validateAdvance(\n  advance: WatchResponse.ReadonlyAdvance | null | undefined,\n): Advance | undefined {\n  if (!advance) {\n    log.info(\n      logger,\n      'WatchResponse has no advance although the signal case is ADVANCE',\n    );\n    return;\n  }\n  const timestamp = advance.getTimestampMicrosOrUndefined_asString();\n  if (timestamp == null) {\n    log.info(logger, 'Advance requires a timestamp');\n    return;\n  }\n  return new Advance(Long.fromString(timestamp));\n}\n\n/**\n * Validates an 'change' response from the client proxy by checking each\n * change in the change batch. If a change is invalid (i.e. it does not have\n * a version or object id), then it will not be added to the list of changes\n * in the ChangeBatch wrapper.\n */\nfunction validateChanges(\n  watchSpec: ObjectId | ObjectIdTree,\n  changes: WatchResponse.ChangeBatch | null | undefined,\n): ChangeBatchResponse | undefined {\n  if (!changes) {\n    log.info(\n      logger,\n      'WatchResponse has no changes although the signal case is CHANGE',\n    );\n    return;\n  }\n  const response = new ChangeBatchResponse();\n  for (const change of changes.getChangesList()) {\n    const objectPath = change.getObjectPath();\n    const version = change.getVersionOrUndefined_asString();\n    if (!objectPath || version == null) {\n      log.info(logger, 'Each change requires an object path and a version.');\n      continue;\n    }\n    const changePayload = change.getPayloadOrUndefined()?.asUint8Array();\n    const payload = changePayload == null ? undefined : changePayload;\n    const validatedObjectId = objectIdFromContextualProto(\n      watchSpec,\n      objectPath,\n    );\n    if (validatedObjectId) {\n      response.add(\n        new Change(\n          validatedObjectId,\n          Long.fromString(version),\n          payload,\n          !!change.getIsReplayOrUndefined(),\n        ),\n      );\n    } else {\n      log.info(logger, 'Invalid object id in change');\n    }\n  }\n  return response;\n}\n\n/**\n * Validates a 'close' response from the client proxy and returns its status\n * proto. If the close is null or there is no status (which is required of a\n * close), then it is an invalid close response and validateClose will return\n * undefined.\n */\nfunction validateClose(\n  close: MultiWatchResponse.Close | null,\n): StatusProto | undefined {\n  if (!close) {\n    log.info(\n      logger,\n      'MultiWatchResponse has no close although the response case is CLOSE',\n    );\n    return;\n  }\n  const status = close.getStatus();\n  if (!status) {\n    log.info(logger, 'Close requires a status.');\n    return;\n  }\n  return status;\n}\n\n/** Configuration for the client's exponential backoff behavior. */\nexport class BackoffConfig {\n  constructor(\n    /**\n     * Initial delay for delay computation in the exponential backoff delay\n     * generator in milliseconds.\n     */\n    readonly initialMaxDelayMs: number,\n    /**\n     * The max backoff multiplier used to calculate the maximum delay time in\n     * the ExponentialBackoffDelayGenerator (which is the max backoff\n     * multiplier times the initial max delay).\n     */\n    readonly maxBackoffMultiplier: number,\n  ) {}\n}\n\n/** The outcome of a {@code ChooseServer} call. */\nexport interface ChosenServer {\n  /** The gsessionid of the server that was chosen. */\n  gsessionid: string;\n\n  /**\n   * The way that we're being affinitized. This should be specified when opening\n   * logical watch streams.\n   */\n  affinitization: Affinitization;\n\n  /**\n   * How long the server requests that the client wait before its first\n   * connection attempt, in milliseconds.\n   */\n  initialConnectionDelayMillis: number;\n\n  /**\n   * Estimates the server's current time (and network RTT) from client and\n   * server timestamps in a {@code ChooseServer} interaction.\n   */\n  timeEstimator: ServerTimeEstimator;\n}\n\n/**\n * A utility for choosing a server that's affinitized to handle a particular\n * watch spec.\n */\nexport interface ServerChooser {\n  /**\n   * Chooses a server that's affinitized for the given watch request and returns\n   * its gsessionid. Does not perform retries. If the returned promise is\n   * rejected, then the caller should retry at a higher level.\n   * <p>\n   * `consecutiveThrottledConnections` is the number of consecutive times this\n   * client has failed to establish a connection because the chosen server\n   * appeared to be overloaded.\n   * <p>\n   * If `previousTimeEstimator` is provided, then its estimate of the server's\n   * current time and network RTT will be included in the `ChooseServer` request\n   * for purposes of server-side monitoring.\n   */\n  choose(\n    watchRequest: WatchRequest,\n    consecutiveThrottledConnections: number,\n    previousTimeEstimator?: ServerTimeEstimator,\n  ): Promise<ChosenServer>;\n}\n\n/**\n * A utility for estimating the server's current time based on a client clock\n * and information about timing of a request processed by the server.\n * <p>\n * Example usage:\n * <pre>\n *   const timeEstimator = new ServerTimeEstimator();\n *   // Send a request to the server.\n *   const response = await this.chooseServer(...);\n *\n *   // Feed server timestamps to the time estimator so it can compute an\n *   // estimate of the network RTT and the time on the server's clock.\n *   timeEstimator.computeEstimates(\n *     Long.fromString(response.getStartTimeMicros_asString()),\n *     Long.fromString(response.getFinishTimeMicros_asString()),\n *   );\n *   // ... Later, use the time estimator to estimate the server's current time.\n *   const serverTimeMicros = timeEstimator.estimateServerTimeMicros();\n * </pre>\n */\nexport class ServerTimeEstimator {\n  /**\n   * An estimate of the round-trip time between the client and the server.\n   * (Undefined until `computeEstimates` is called.)\n   */\n  private rttMicros?: Long;\n\n  /**\n   * An estimate of the offset to be applied to the client's clock to get the\n   * server's clock. (Undefined until `computeEstimates` is called.)\n   */\n  private clockOffsetMicros?: Long;\n\n  constructor(\n    /**\n     * An object with a `now` function that returns the time elapsed since some\n     * arbitrary, fixed starting point, in milliseconds. Although `Date` is not\n     * without potential problems, `self.performance` suffers from a bug that\n     * makes it even less reliable as an indicator of real time:\n     * https://developer.mozilla.org/en-US/docs/Web/API/Performance/now#ticking_during_sleep\n     */\n    private readonly clock: {now(): number} = Date,\n\n    /**\n     * The approximate time at which the client sent a request to the server\n     * (according to `clock`), but converted to microseconds.\n     */\n    private readonly clientStartMicros: Long = Long.fromNumber(\n      clock.now() * 1000,\n    ),\n  ) {}\n\n  /**\n   * Computes estimates of the network RTT and the offset between the client's\n   * clock and the server's clock, based on the given (microsecond-granularity)\n   * server-reported times and the current time on the `clock`.\n   * <p>\n   * This method should only be called once on a given `ServerTimeEstimator`.\n   */\n  computeEstimates(serverStartMicros: Long, serverFinishMicros: Long): void {\n    const clientFinishMicros = Long.fromNumber(this.clock.now() * 1000);\n    const serverProcessingMicros =\n      serverFinishMicros.subtract(serverStartMicros);\n    this.rttMicros = clientFinishMicros\n      .subtract(this.clientStartMicros)\n      .subtract(serverProcessingMicros);\n    this.clockOffsetMicros = serverStartMicros\n      .subtract(this.clientStartMicros)\n      .add(serverFinishMicros)\n      .subtract(clientFinishMicros)\n      .div(Long.fromNumber(2));\n  }\n\n  /**\n   * Returns an estimate of the server's current time, in microseconds, or\n   * `undefined` if `computeEstimates` has not yet been called.\n   */\n  estimateServerTimeMicros(): Long | undefined {\n    if (this.clockOffsetMicros == null) {\n      return;\n    }\n    return Long.fromNumber(this.clock.now() * 1000).add(this.clockOffsetMicros);\n  }\n\n  /**\n   * Returns an estimate of the network RTT, in seconds, or `undefined` if\n   * `computeEstimates` has not yet been called.\n   */\n  estimateNetworkRttSeconds(): number | undefined {\n    if (this.rttMicros == null) {\n      throw new Error('Network RTT estimate not available');\n    }\n    return this.rttMicros.toNumber() / 1_000_000.0;\n  }\n}\n\n/** The real implementation of ServerChooser. */\nexport class ServerChooserImpl implements ServerChooser {\n  private readonly jspbClient: JspbClient;\n\n  constructor(\n    /** The base URI for Punctual. */\n    baseUri: Uri,\n\n    private readonly authMethod: AuthMethod,\n\n    xhrIo: XhrIoInterface,\n  ) {\n    this.jspbClient = new JspbClient(baseUri, xhrIo);\n  }\n\n  async choose(\n    watchRequest: ReadonlyWatchRequest,\n    consecutiveThrottledConnections: number,\n    previousTimeEstimator?: ServerTimeEstimator,\n  ): Promise<ChosenServer> {\n    const timeEstimator = new ServerTimeEstimator();\n    const request = new ChooseServerRequest()\n      .setWatchRequest(watchRequest)\n      .setConsecutiveThrottledConnections(consecutiveThrottledConnections);\n    if (previousTimeEstimator) {\n      request\n        .setEstimatedRttSeconds(\n          previousTimeEstimator.estimateNetworkRttSeconds(),\n        )\n        .setEstimatedServerClockMicros(\n          previousTimeEstimator.estimateServerTimeMicros()?.toString(),\n        );\n    }\n    const response = await this.jspbClient.post(\n      CHOOSE_SERVER_PATH_SUFFIX,\n      request,\n      ChooseServerResponse,\n      buildRequestOpts(this.authMethod),\n    );\n    timeEstimator.computeEstimates(\n      Long.fromString(response.getStartTimeMicros_asString()),\n      Long.fromString(response.getFinishTimeMicros_asString()),\n    );\n\n    const gsessionid = response.getGsessionidOrUndefined();\n    if (gsessionid == null) {\n      throw new Error('ChooseServer response is missing gsessionid');\n    }\n    return {\n      gsessionid,\n      affinitization:\n        response.getAffinitizationOrUndefined() ?? Affinitization.UNKNOWN,\n      initialConnectionDelayMillis:\n        response.getInitialConnectionDelayMillisOrUndefined() ?? 0,\n      timeEstimator,\n    };\n  }\n}\n\n/**\n * Interface for a utility to send requests to refresh the client's auth\n * credentials.\n */\nexport interface CredentialRefresher {\n  /**\n   * Refreshes credentials for the given channel.\n   *\n   * @param gsessionid The gsessionid of the channel.\n   * @param channelId The id of the channel, which is assigned by the server\n   *     after the channel opens.\n   */\n  refreshCreds(gsessionid: string, channelId: string): Promise<void>;\n}\n\n/** The real implementation of CredentialRefresher. */\nexport class CredentialRefresherImpl implements CredentialRefresher {\n  private readonly jspbClient: JspbClient;\n\n  constructor(\n    /** The scheme, host, and port for Punctual. The path is ignored. */\n    baseUri: Uri,\n\n    private readonly authMethod: AuthMethod,\n\n    xhrIo: XhrIoInterface,\n  ) {\n    this.jspbClient = new JspbClient(baseUri, xhrIo);\n  }\n\n  async refreshCreds(gsessionid: string, channelId: string): Promise<void> {\n    if (this.authMethod instanceof AuthMethodAnonymous) {\n      // For anonymous clients, there are no credentials to refresh.\n      return Promise.resolve();\n    }\n    const request = new RefreshCredentialsRequest().setChannelId(channelId);\n    const opts = buildRequestOpts(this.authMethod);\n    if (opts.queryParams == null) {\n      opts.queryParams = {};\n    }\n    opts.queryParams['gsessionid'] = gsessionid;\n    opts.timeoutMs = 10000; // 10 seconds\n    try {\n      await this.jspbClient.post(\n        REFRESH_CREDENTIALS_PATH_SUFFIX,\n        request,\n        RefreshCredentialsResponse,\n        opts,\n      );\n    } catch (ex: unknown) {\n      // Ignores request failures.\n    }\n  }\n}\n\n/** State for the currently open MultiWatch channel. */\ninterface ChannelState {\n  /** The channel over which we receive messages from Punctual. */\n  readonly channel: Channel;\n\n  /** How the channel was affinitized. */\n  readonly affinitization: Affinitization;\n\n  /**\n   * The 'gsessionid' parameter value identifying the server hosting the\n   * channel.\n   */\n  readonly gsessionid: string;\n\n  /**\n   * The ID of the channel, which is assigned by the server after the channel\n   * opens.\n   */\n  channelId?: string;\n\n  /**\n   * Approximately the last time (in milliseconds, as per `Date.now()`) that we\n   * tried to refresh credentials for this channel, or the time at which\n   * `channelId` was populated.\n   */\n  lastRefreshTime?: number;\n\n  /**\n   * Whether a response has been received on this channel.\n   */\n  hasReceivedMessage: boolean;\n}\n\n/** Objects needed for channel creation. */\ninterface ChannelDeps {\n  /**\n   * Selects a `gsessionid` for a server affinitized to a project whose objects\n   * are being watched.\n   */\n  readonly serverChooser: ServerChooser;\n\n  /**\n   * Allows the user credentials associated with the channel to be refreshed\n   * periodically for a long-lived channel.\n   */\n  readonly credentialRefresher: CredentialRefresher;\n\n  /** Abstracts details involved in creation of a WebChannel. */\n  readonly channelCreator: ChannelCreator;\n}\n\nclass RecentResync {\n  /**\n   * Whether a resync for the associated interest set has occurred (again) while\n   * it was tracked as having recently observed a resync error.\n   */\n  hasRecurred = false;\n\n  /**\n   * The last time we recorded a resync error for the associated project and\n   * interest set.\n   */\n  resyncMillis = Date.now();\n\n  constructor(\n    /** The project that was being watched. */\n    readonly project: string | undefined,\n    /** The object id (tree) that was being watched. */\n    readonly interestSet: ObjectId | ObjectIdTree,\n    /**\n     * The knowledge time at which the stream was terminated with a resync\n     * error.\n     */\n    public knowledgeTimestamp: Long,\n  ) {}\n}\n\n/** Optional parameters for the Punctual client implementation. */\nexport interface ClientImplOptions {\n  /**\n   * An optional stream of (currently opaque) signals indicating that an attempt\n   * to establish a network connection is more likely to succeed now than it was\n   * in the recent past.\n   */\n  reconnectHint?: Observable<{}>;\n\n  /**\n   * The name of the project using this client. If not specified, then the\n   * project name will be inferred from the Pantheon project associated with\n   * the authentication parameters supplied by the application.\n   * <p>\n   * This may be overridden by {@code watch} calls.\n   */\n  defaultProject?: string;\n\n  /**\n   * An optional factory for creating XmlHttpRequest-like objects. If defined,\n   * the assumption is that the application intends to use the Fetch API, so\n   * that option will also be enabled for the WebChannel.\n   */\n  xmlHttpFactory?: FetchXmlHttpFactory;\n\n  /**\n   * An optional callback to be invoked whenever anything interesting happens on\n   * the channel.\n   */\n  channelEventCallback?: (event: ChannelEvent) => void;\n}\n\n/** Implementation of the Punctual client interface. */\nexport class ClientImpl implements Client, ChannelStatusHandler {\n  /** State for the currently open channel (if any). */\n  private channelState?: ChannelState;\n\n  /**\n   * Whether a timer task to refresh credentials has been scheduled. The task\n   * reschedules itself, so once this becomes true, it remains true. This helps\n   * us avoid scheduling multiple such tasks.\n   */\n  private refreshCredsTimerScheduled = false;\n\n  /** Causal watch streams that are awaiting Start signals. */\n  private readonly causalStreams = new Map<number, CausalStream>();\n\n  /**\n   * Causal watch streams that have started but not yet received any Advance\n   * signals.\n   */\n  private readonly limboStreams = new Map<number, LimboStream>();\n\n  /**\n   * Watch streams that have a knowledge timestamp at which they may be resumed\n   * after a reconnection.\n   */\n  private readonly nonCausalStreams = new Map<number, NonCausalStream>();\n\n  /** A subject that is written to whenever a new logical stream is opened. */\n  private readonly newStreamSubject = new Subject<{}>();\n\n  /**\n   * Keeps track of the number of streams to the client proxy. Also used to\n   * generate a unique id for each stream.\n   */\n  private streamNumber = 0;\n\n  /** A subject that receives all status updates. */\n  private readonly rawStatus = new Subject<Status>();\n\n  /**\n   * A processed view of `rawStatus` that starts with `OK`, remembers and\n   * replays the latest value for new subscribers, and applies throttling to\n   * error statuses to avoid noise around short interruptions to connectivity.\n   */\n  readonly status: BehaviorSubject<Status> = new BehaviorSubject(new Status());\n\n  /**\n   * Optional signals from the application or environment that it might be a\n   * good time to try to reconnect.\n   */\n  private readonly reconnectHint: Observable<{}>;\n\n  /** A rate limiter for eager reconnections. */\n  private readonly skipBackoff = new TokenBucket(\n    SKIP_BACKOFF_REFRESH_PERIOD_MS,\n    SKIP_BACKOFF_MAX_TOKENS,\n    SKIP_BACKOFF_MAX_TOKENS,\n  );\n\n  /** Generates delays for exponential backoff. */\n  private readonly delayGenerator: ExponentialBackoffDelayGenerator;\n\n  /** Streams that terminated recently with resync errors. */\n  private readonly recentResyncs: RecentResync[] = [];\n\n  /** Whether this client has connected to the service yet. */\n  private hasConnected = false;\n\n  /**\n   * The number of consecutive times this client has failed to establish a\n   * connection because the chosen server appeared to be overloaded.\n   */\n  private consecutiveThrottledConnections = 0;\n\n  /**\n   * A utility to estimate the current time on the server's clock (and the\n   * network RTT to the server).\n   */\n  private serverTimeEstimator?: ServerTimeEstimator;\n\n  /**\n   * A wrapped callback to be invoked when the channel experiences a noteworthy\n   * event. This is used to ensure that the callback is invoked asynchronously\n   * to avoid blocking other work, dealing with thrown exceptions, etc.\n   */\n  private readonly channelEventCallback: (event: ChannelEvent) => void;\n\n  /** A handler for stat events from the WebChannel. */\n  private readonly channelStatHandler = new EventHandler();\n\n  /**\n   * Creates a client that uses a real WebChannel for the given environment\n   * with the given options.\n   */\n  static create(\n    env: Environment,\n    authMethodPromise: Promise<AuthMethod>,\n    options: ClientImplOptions,\n  ): ClientImpl {\n    const channelDeps = authMethodPromise.then((authMethod) => {\n      let baseUri;\n      let addDomainPrefix = false;\n      const domainType = authMethod.domainType();\n      switch (domainType) {\n        case DomainType.YOUTUBE:\n        case DomainType.FIRST_PARTY:\n          baseUri = env.firstPartyUri;\n          addDomainPrefix = env.addDomainPrefix;\n          break;\n        case DomainType.THIRD_PARTY:\n          baseUri = env.thirdPartyUri;\n          // Never add a domain prefix for third-party URIs.\n          break;\n        default:\n          assumeExhaustive(domainType);\n          baseUri = new Uri(); // Unreachable.\n      }\n\n      const channelUri = baseUri\n        .clone()\n        .setPath(\n          JspbClient.concatPaths(baseUri.getPath(), WEBCHANNEL_PATH_SUFFIX),\n        );\n      const channelConfig = new ChannelConfig(\n        channelUri,\n        authMethod,\n        /*useFetchApi=*/ options.xmlHttpFactory !== undefined,\n        addDomainPrefix,\n      );\n      const channelCreator = (\n        onMessage: ChannelHandler,\n        onStatus: ChannelStatusHandler,\n        gsessionid: string,\n      ) => {\n        const channel = new ChannelImpl(\n          onMessage,\n          onStatus,\n          channelConfig,\n          // Creates the WebChannel\n          (path: string, options: WebChannel.Options) => {\n            return createWebChannelTransport().createWebChannel(path, options);\n          },\n          gsessionid,\n        );\n        channel.open();\n        return channel;\n      };\n      return {\n        serverChooser: new ServerChooserImpl(\n          baseUri,\n          authMethod,\n          makeRealXhrIo(options.xmlHttpFactory),\n        ),\n        credentialRefresher: new CredentialRefresherImpl(\n          baseUri,\n          authMethod,\n          makeRealXhrIo(options.xmlHttpFactory),\n        ),\n        channelCreator,\n      };\n    });\n    const backoffConfig = new BackoffConfig(\n      INITIAL_MAX_DELAY_MS,\n      MAX_BACKOFF_FACTOR,\n    );\n    return new ClientImpl(channelDeps, backoffConfig, options);\n  }\n\n  /** Visible for testing. */\n  constructor(\n    private readonly channelDeps: Promise<ChannelDeps>,\n    backoffConfig: BackoffConfig,\n\n    /** Optional parameters for the client. */\n    private readonly options: ClientImplOptions,\n  ) {\n    this.channelEventCallback = (event: ChannelEvent) => {\n      // Invoke the callback asynchronously to avoid blocking other work,\n      // dealing with thrown exceptions, etc.\n      Promise.resolve()\n        .then(() => {\n          this.options.channelEventCallback?.(event);\n        })\n        .catch((e) => {\n          // Ignore any errors thrown by the callback.\n        });\n    };\n    // Only listen for stat events if a callback is provided.\n    if (this.options.channelEventCallback) {\n      this.channelStatHandler.listen(\n        requestStats.getStatEventTarget(),\n        requestStats.Event.STAT_EVENT,\n        (statEvent: requestStats.StatEvent) => {\n          this.channelEventCallback(statEvent);\n        },\n      );\n    }\n    this.rawStatus\n      .pipe(\n        debounce((currentStatus) =>\n          // To avoid surfacing brief disconnections to the application,\n          // debounce using a minimal duration for OK and a non-trivial\n          // duration for error statuses.\n          currentStatus.getCode() === Code.OK\n            ? Promise.resolve()\n            : new Promise<void>((resolve) => {\n                Timer.callOnce(resolve, ERROR_STATUS_THROTTLE_PERIOD_MS);\n              }),\n        ),\n      )\n      .subscribe(this.status);\n\n    this.delayGenerator = new ExponentialBackoffDelayGenerator(\n      Math.random,\n      backoffConfig.initialMaxDelayMs,\n      backoffConfig.maxBackoffMultiplier,\n    );\n\n    // Ensure that the `reconnectHint` observable never ends, to avoid problems\n    // when racing it with the backoff delay timer.\n    this.reconnectHint =\n      options.reconnectHint?.pipe(\n        catchError(() => NEVER),\n        concatWith(NEVER),\n      ) ?? NEVER;\n\n    // Note that this will not actually establish the channel until the first\n    // object is watched.\n    this.openChannelWhenSubscribed();\n  }\n\n  /**\n   * Returns a target delay (in milliseconds) for the next refresh-credentials\n   * attempt.\n   * @param nowMs The current time.\n   * @param lastRefreshTimeMs An optional time (overriding `nowMs`) to which the\n   *     overall delay should be relative. I.e., if a scheduled task runs after\n   *     the returned delay, then the total time since `lastRefreshTimeMs`\n   *     should be between the min and max refresh delays.\n   * @param randomness A value in the range [0, 1] that smears the delay between\n   *     the min and max allowed values.\n   */\n  static getNextRefreshDelayMs(\n    nowMs: number,\n    lastRefreshTimeMs: number | undefined,\n    randomness: number,\n  ): number {\n    const startMs = Math.min(nowMs, lastRefreshTimeMs ?? nowMs);\n    const delayMs =\n      REFRESH_CREDENTIALS_MIN_DELAY_MS +\n      (REFRESH_CREDENTIALS_MAX_DELAY_MS - REFRESH_CREDENTIALS_MIN_DELAY_MS) *\n        randomness;\n    const targetMs = startMs + delayMs;\n    return Math.max(targetMs - nowMs, 0);\n  }\n\n  private scheduleRefreshCredentials() {\n    Timer.callOnce(\n      () => {\n        this.channelDeps.then((channelDeps) => {\n          if (\n            this.channelState?.channelId != null &&\n            this.channelState?.lastRefreshTime != null &&\n            Date.now() >=\n              this.channelState.lastRefreshTime +\n                REFRESH_CREDENTIALS_MIN_DELAY_MS\n          ) {\n            // This request is best-effort. If it fails, the worst that can\n            // happen is that the channel will close when the credentials\n            // expire.\n            channelDeps.credentialRefresher\n              .refreshCreds(\n                this.channelState.gsessionid,\n                this.channelState.channelId,\n              )\n              .catch(() => {\n                // Closing and reopening the channel is somewhat wasteful but\n                // not a correctness issue. (And, if this request fails, it\n                // suggests a network problem, so the channel might end up\n                // closing anyway.) Hence we don't bother with retry logic here,\n                // since that would increase complexity and add risk of load\n                // amplification.\n              });\n            this.channelState.lastRefreshTime = Date.now();\n            this.scheduleRefreshCredentials();\n          } else {\n            this.refreshCredsTimerScheduled = false;\n          }\n        });\n      },\n      ClientImpl.getNextRefreshDelayMs(\n        Date.now(),\n        this.channelState?.lastRefreshTime,\n        Math.random(),\n      ),\n    );\n  }\n\n  /**\n   * Starts a causal stream, which promotes it to a 'limbo' causal stream.\n   * Updates maps of stream state accordingly.\n   */\n  private startCausalStream(causalStream: CausalStream, streamId: number) {\n    this.causalStreams.delete(streamId);\n    this.limboStreams.set(streamId, causalStream.start());\n  }\n\n  /**\n   * Advances a stream that's in 'limbo' to a non-causal stream with the given\n   * advance time as its knowledge timestamp. Updates maps of stream state and\n   * returns the updated stream.\n   */\n  private advanceLimboStream(\n    stream: LimboStream,\n    streamId: number,\n    advanceTime: Long,\n  ): NonCausalStream {\n    const result = stream.advance(advanceTime);\n    this.limboStreams.delete(streamId);\n    this.nonCausalStreams.set(streamId, result);\n    return result;\n  }\n\n  /** Handles 'start' responses from the client proxy. */\n  private handleStart(streamId: number) {\n    // Start signals are only interesting (and legal) for causal streams (that\n    // have not yet received a Start signal). If the destination is not such a\n    // stream, ignore the message.\n    const causalStream = this.causalStreams.get(streamId);\n    if (!causalStream) {\n      return;\n    }\n    try {\n      causalStream.observer.next(new Start());\n    } catch (e) {\n      log.info(logger, `Observer error: ${e}`);\n    }\n    // Receipt of the Start signal promotes the stream to the 'limbo' state.\n    this.startCausalStream(causalStream, streamId);\n  }\n\n  /** Handles 'close' responses from the client proxy. */\n  private handleClose(streamId: number, status: StatusProto) {\n    const stream =\n      this.causalStreams.get(streamId) ||\n      this.limboStreams.get(streamId) ||\n      this.nonCausalStreams.get(streamId);\n    if (!stream) {\n      // This Close message was in response to a client Close request.\n      return;\n    }\n\n    if (status.getCodeOrUndefined() === Code.OK) {\n      stream.observer.complete();\n    } else {\n      stream.observer.error(status);\n    }\n\n    this.causalStreams.delete(streamId);\n    this.limboStreams.delete(streamId);\n    this.nonCausalStreams.delete(streamId);\n  }\n\n  /** Handles 'advance' responses from the client proxy. */\n  private handleAdvance(streamId: number, advance: Advance) {\n    // If the stream is in limbo, promote it to non-causal.\n    const limboStream = this.limboStreams.get(streamId);\n    const stream = limboStream\n      ? this.advanceLimboStream(limboStream, streamId, advance.timestampMicros)\n      : this.nonCausalStreams.get(streamId);\n\n    if (!stream) {\n      log.warning(\n        logger,\n        `No stream with id ${streamId} available to accept advance signal`,\n      );\n      return;\n    }\n    stream.updateKnowledgeTimestamp(advance.timestampMicros);\n    try {\n      stream.observer.next(advance);\n    } catch (e) {\n      log.info(logger, `Observer error: ${e}`);\n    }\n  }\n\n  /** Handles 'change' responses from the client proxy. */\n  private handleChanges(\n    stream: NonCausalStream | LimboStream,\n    changes: ChangeBatchResponse,\n  ) {\n    for (const change of changes.getChangeList()) {\n      const signal = new Change(\n        change.objectId,\n        change.version,\n        change.payload,\n        change.isReplay,\n      );\n      try {\n        stream.observer.next(signal);\n      } catch (e) {\n        log.info(logger, `Observer error: ${e}`);\n      }\n    }\n  }\n\n  /** Handles 'resync' responses from the client proxy. */\n  private handleResync(streamId: number) {\n    const stream =\n      this.causalStreams.get(streamId) ||\n      this.limboStreams.get(streamId) ||\n      this.nonCausalStreams.get(streamId);\n    if (!stream) {\n      log.warning(logger, `No active stream with id ${streamId}`);\n      return;\n    }\n    if (stream instanceof NonCausalStream) {\n      this.deleteOldResyncs();\n      const earlierResync = this.findMatchingResync(stream);\n      if (earlierResync) {\n        earlierResync.hasRecurred = true;\n        earlierResync.knowledgeTimestamp = stream.knowledgeTimestamp;\n        earlierResync.resyncMillis = Date.now();\n      } else {\n        this.recentResyncs.push(\n          new RecentResync(\n            stream.project,\n            stream.interestSet,\n            stream.knowledgeTimestamp,\n          ),\n        );\n      }\n    }\n    try {\n      stream.observer.complete();\n    } catch (e) {\n      log.info(logger, `Observer error: ${e}`);\n    }\n  }\n\n  /** Removes entries for \"recent resyncs\" that are no longer very recent. */\n  private deleteOldResyncs() {\n    let i = 0;\n    const now = Date.now();\n    while (i < this.recentResyncs.length) {\n      if (now >= this.recentResyncs[i].resyncMillis + TRACK_RECENT_RESYNC_MS) {\n        this.recentResyncs.splice(i);\n      } else {\n        ++i;\n      }\n    }\n  }\n\n  /**\n   * Attempts to find information about any recent resync error on the interest\n   * set of the given stream.\n   */\n  private findMatchingResync(\n    stream: NonCausalStream,\n  ): RecentResync | undefined {\n    return this.recentResyncs.find((resync: RecentResync) => {\n      return (\n        resync.project === stream.project &&\n        interestSetsEqual(resync.interestSet, stream.interestSet)\n      );\n    });\n  }\n\n  // Begin implementation of ChannelStatusHandler interface.\n\n  onOpen(): void {\n    this.channelEventCallback(new ChannelOpen());\n    const status = new Status().setCode(Code.OK);\n    try {\n      this.rawStatus.next(status);\n    } catch (e) {\n      log.info(logger, `Observer error: ${e}`);\n    }\n  }\n\n  onClose(): void {\n    this.channelEventCallback(new ChannelClose());\n    this.channelState = undefined;\n    // Re-open the channel.\n    this.openChannelWhenSubscribed();\n  }\n  onError(error: WebChannel.ErrorEvent, httpStatusCode: number): void {\n    this.channelEventCallback(new ChannelError(error, httpStatusCode));\n    const status = new Status().setCode(codeForHttpStatus(httpStatusCode));\n    this.handleError(status);\n  }\n\n  onServerError(status: Status): void {\n    if (status.getCode() === Code.OK) {\n      return;\n    }\n    this.channelEventCallback(new ServerError(status.toImmutable()));\n    this.handleError(status);\n  }\n\n  private handleError(status: Status) {\n    // If we failed to connect due to Service Unavailable, the server we're\n    // connecting to might be throttling incoming connections.\n    if (\n      this.channelState != null &&\n      !this.channelState.hasReceivedMessage &&\n      status.getCode() === Code.UNAVAILABLE\n    ) {\n      this.consecutiveThrottledConnections++;\n    }\n\n    try {\n      this.rawStatus.next(status);\n    } catch (e) {\n      log.info(logger, `Observer error: ${e}`);\n    }\n\n    // We will resume these streams when we re-open the channel. Record our\n    // reason for re-opening them now (to distinguish them from new streams\n    // that are started for the first time when we're in the process of\n    // re-opening the channel, and from streams closed due to a RECONNECT\n    // message).\n    for (const stream of this.causalStreams.values()) {\n      stream.streamInitiationReason =\n        StreamInitiationReason.REASON_TRANSIENT_ERROR;\n    }\n    for (const stream of this.nonCausalStreams.values()) {\n      stream.streamInitiationReason =\n        StreamInitiationReason.REASON_TRANSIENT_ERROR;\n    }\n  }\n\n  // End implementation of ChannelStatusHandler interface.\n\n  /** Handles status responses from the client proxy. */\n  private handleStatus(status: ReadonlyStreamStatus) {\n    switch (status.getCodeOrUndefined()) {\n      case StreamStatus.Code.RECONNECT:\n        // The server requested that we re-establish our channel. The onClose\n        // handler will reopen the channel after we close it here.\n        for (const stream of this.causalStreams.values()) {\n          stream.streamInitiationReason =\n            StreamInitiationReason.REASON_FORCED_RECONNECT;\n        }\n        for (const stream of this.nonCausalStreams.values()) {\n          stream.streamInitiationReason =\n            StreamInitiationReason.REASON_FORCED_RECONNECT;\n        }\n        if (this.channelState) {\n          this.channelState.channel.close();\n        }\n        break;\n      default:\n    }\n  }\n\n  /** Manages messages from the client proxy. */\n  private handleMessage(message: MultiWatchResponse) {\n    if (this.channelState != null) {\n      this.channelState.hasReceivedMessage = true;\n    }\n    this.consecutiveThrottledConnections = 0;\n\n    const streamIdString = message.getStreamIdOrUndefined_asString();\n    if (streamIdString == null) {\n      log.warning(logger, 'Ignoring message without stream id');\n      return;\n    }\n    const streamId = Number(streamIdString);\n    if (message.hasClose()) {\n      const status = validateClose(message.getClose()!);\n      status && this.handleClose(streamId, status);\n      return;\n    }\n    const watchResponse = message.getWatchResponse();\n    if (!watchResponse) {\n      log.warning(logger, 'Ignoring message without watch response');\n      return;\n    }\n    switch (watchResponse.getSignalCase()) {\n      case SignalCase.START:\n        this.handleStart(streamId);\n        break;\n      case SignalCase.ADVANCE:\n        const advance = validateAdvance(watchResponse.getAdvance()!);\n        advance && this.handleAdvance(streamId, advance);\n        break;\n      case SignalCase.CHANGES:\n        const stream =\n          this.nonCausalStreams.get(streamId) ||\n          this.limboStreams.get(streamId);\n        if (!stream) {\n          log.warning(\n            logger,\n            'Ignoring changes for unrecognized (or unready) stream',\n          );\n          return;\n        }\n        const changes = validateChanges(\n          stream.interestSet,\n          watchResponse.getChanges()!,\n        );\n        changes && this.handleChanges(stream, changes);\n        break;\n      case SignalCase.RESYNC:\n        this.handleResync(streamId);\n        break;\n      default:\n        break;\n    }\n  }\n\n  /**\n   * Makes and sends watch requests to the client proxy (if the channel is\n   * open).\n   */\n  private sendOpenMultiWatchRequest(\n    streamId: number,\n    streamInfo: CausalStream | NonCausalStream,\n  ) {\n    if (!this.channelState) {\n      // We don't currently have a channel open. If the subscriber is still\n      // active when we reopen the channel, then we will send a watch request\n      // for it at that time.\n      return;\n    }\n    const watchRequest = this.buildWatchRequest(\n      streamInfo.project,\n      streamInfo.interestSet,\n    );\n    if (streamInfo instanceof NonCausalStream) {\n      watchRequest\n        .setStartTimeMicros(streamInfo.knowledgeTimestamp.toString())\n        .setStartTimeChosenByPunctual(\n          streamInfo.knowledgeTimestampChosenByPunctual,\n        );\n    }\n    watchRequest.setStreamInitiationReason(streamInfo.streamInitiationReason);\n\n    // Clear the stream's `StreamInitiationReason`, now that it's been captured\n    // in the `WatchRequest`, to make it easier to detect any bugs in setting\n    // this field on the various reconnection paths.\n    streamInfo.streamInitiationReason =\n      StreamInitiationReason.REASON_UNSPECIFIED;\n\n    const requestBatch = new MultiWatchRequestBatch();\n    requestBatch\n      .addAndReturnRequests()\n      .setStreamId(streamId.toString())\n      .setOpen(watchRequest)\n      .setAffinitization(this.channelState.affinitization);\n    this.channelState.channel.send(requestBatch);\n  }\n\n  private buildWatchRequest(\n    project: string | undefined,\n    interestSet: ObjectId | ObjectIdTree,\n  ) {\n    const watchRequest = new WatchRequest().setHeader(HEADER);\n    if (interestSet instanceof ObjectId) {\n      const objectId = objectIdToProto(project, interestSet);\n      watchRequest.setPoint(objectId);\n    } else {\n      const objectIdPrefix = new ObjectIdPrefix();\n      if (project != null) {\n        objectIdPrefix.setProject(projectProto(project));\n      }\n      objectIdPrefix\n        .setOwner(objectIdToOwnerProto(interestSet.root))\n        .setPrefix(objectIdToPathProto(interestSet.root));\n      watchRequest.setPrefix(objectIdPrefix);\n    }\n    return watchRequest;\n  }\n\n  private closeStream(streamId: number) {\n    const requestBatch = new MultiWatchRequestBatch();\n    requestBatch\n      .addAndReturnRequests()\n      .setStreamId(streamId.toString())\n      .setClose(new MultiWatchRequest.Close());\n    if (this.channelState) {\n      this.channelState.channel.send(requestBatch);\n    }\n\n    this.causalStreams.delete(streamId);\n    this.limboStreams.delete(streamId);\n    this.nonCausalStreams.delete(streamId);\n  }\n\n  /**\n   * Opens a new channel after waiting out an exponential backoff delay and\n   * waiting for at least one object/prefix to be watched.\n   */\n  private openChannelWhenSubscribed() {\n    const delayMs = this.delayGenerator.getNextDelay();\n    timer(delayMs)\n      .pipe(\n        raceWith(\n          this.reconnectHint.pipe(first(() => this.skipBackoff.isPermitted())),\n        ),\n      )\n      .subscribe(() => {\n        this.channelDeps.then(\n          (deps) => {\n            this.channelEventCallback(new ChooseServerStart());\n            this.chooseServer(deps.serverChooser).then(\n              (chosenServer) => {\n                this.channelEventCallback(new ChooseServerSuccess());\n                this.serverTimeEstimator = chosenServer.timeEstimator;\n                Timer.callOnce(\n                  () => {\n                    this.hasConnected = true;\n                    this.openChannelInternal(deps.channelCreator, chosenServer);\n                  },\n                  this.hasConnected\n                    ? 0\n                    : chosenServer.initialConnectionDelayMillis,\n                );\n              },\n              (e) => {\n                const status = new Status().setCode(Code.UNKNOWN);\n                let httpStatusCode: number | undefined;\n                if (e instanceof XhrError) {\n                  status.setMessage(e.message);\n                  if (e.status) {\n                    httpStatusCode = e.status;\n                    status.setCode(codeForHttpStatus(e.status));\n                  }\n                  // If the ChooseServer request returns Service Unavailable,\n                  // that might indicate that there are no available servers and\n                  // we should increase `consecutiveThrottledConnections` to get\n                  // a fallback server.\n                  if (e.status === HttpStatus.SERVICE_UNAVAILABLE) {\n                    this.consecutiveThrottledConnections++;\n                  }\n                } else {\n                  status.setMessage(e.toString());\n                }\n                this.channelEventCallback(\n                  new ChooseServerFailure(httpStatusCode),\n                );\n                try {\n                  this.rawStatus.next(status);\n                } catch (e) {\n                  log.info(logger, `Observer error: ${e}`);\n                }\n                log.info(logger, `Failed to choose server: ${e}; will retry`);\n                this.openChannelWhenSubscribed();\n              },\n            );\n          },\n          (e) => {\n            const errStatus = new Status()\n              .setCode(Code.INTERNAL)\n              .setMessage(e.toString());\n            this.rawStatus.next(errStatus);\n            log.error(logger, 'Failed to resolve channel dependencies', e);\n          },\n        );\n      });\n  }\n\n  /**\n   * Returns a {@code ChosenServer} containing the gsessionid of the server to\n   * which the channel should be opened. The returned promise may be rejected if\n   * the ChooseServer request fails.\n   */\n  private async chooseServer(\n    serverChooser: ServerChooser,\n  ): Promise<ChosenServer> {\n    const choice = await this.chooseWatchSpecForAffinity();\n    // This must not be collapsed into the previous line, or else JSCompiler\n    // will raise a JSC_PARTIAL_NAMESPACE error.\n    const [project, watchSpec] = choice;\n    return serverChooser.choose(\n      this.buildWatchRequest(project, watchSpec),\n      this.consecutiveThrottledConnections,\n      this.serverTimeEstimator,\n    );\n  }\n\n  /**\n   * Chooses an arbitrary logical stream's watch spec to use for channel\n   * affinity. If there are no logical streams currently open, then the returned\n   * promise will not resolve until one is opened.\n   * <p>\n   * The promise's result is a tuple of the project name and the objects being\n   * watched.\n   */\n  private async chooseWatchSpecForAffinity(): Promise<\n    [string | undefined, ObjectId | ObjectIdTree]\n  > {\n    while (true) {\n      const streamMaps = [\n        this.causalStreams,\n        this.limboStreams,\n        this.nonCausalStreams,\n      ];\n      for (const streamMap of streamMaps) {\n        for (const stream of streamMap.values()) {\n          return [stream.project, stream.interestSet];\n        }\n      }\n\n      // There are currently no logical streams, so wait for a new one to be\n      // opened.\n      await firstValueFrom(this.newStreamSubject.asObservable().pipe(first()));\n    }\n  }\n\n  /**\n   * Opens a new channel and sends requests to establish logical streams for the\n   * currently active watch specs.\n   */\n  private openChannelInternal(\n    channelCreator: ChannelCreator,\n    chosenServer: ChosenServer,\n  ) {\n    this.channelEventCallback(new ChannelTryOpen());\n    const channel = channelCreator(\n      (message) => {\n        for (const resp of message.getResponsesList()) {\n          this.handleMessage(resp);\n        }\n        if (message.hasStatus()) {\n          this.handleStatus(message.getStatus()!);\n        }\n        if (message.hasHandshake() && this.channelState) {\n          this.channelState.channelId = message.getHandshake()!.getChannelId();\n          this.channelState.lastRefreshTime = Date.now();\n          if (!this.refreshCredsTimerScheduled) {\n            this.scheduleRefreshCredentials();\n            this.refreshCredsTimerScheduled = true;\n          }\n        }\n      },\n      this,\n      chosenServer.gsessionid,\n    );\n    this.channelState = {\n      channel,\n      affinitization: chosenServer.affinitization,\n      gsessionid: chosenServer.gsessionid,\n      hasReceivedMessage: false,\n    };\n\n    // A stream can be resumed automatically across a reconnect if either:\n    // 1. It's causal and hasn't yet received a Start signal, or\n    // 2. It's non-causal.\n    // The protocol requires that streams have monotonically increasing ids, so\n    // we need to sort them.\n    type ResumableStream = CausalStream | NonCausalStream;\n    const streamsToReopen = new Array<[number, ResumableStream]>()\n      .concat(Array.from(this.causalStreams.entries()))\n      .concat(Array.from(this.nonCausalStreams.entries()));\n    streamsToReopen.sort((entry1, entry2) => entry1[0] - entry2[0]);\n    for (const [key, value] of streamsToReopen) {\n      this.sendOpenMultiWatchRequest(key, value);\n    }\n\n    // Causal streams that were unlucky enough to start but not obtain an\n    // Advance signal before the disconnection need to be restarted by the\n    // application.\n    for (const [, value] of this.limboStreams) {\n      value.observer.complete();\n    }\n    this.limboStreams.clear();\n\n    // Reset the delay generator if the channel remains open for the generator\n    // reset delay.\n    const expectedChannelState = this.channelState;\n    Timer.callOnce(() => {\n      if (this.channelState === expectedChannelState) {\n        this.delayGenerator.reset();\n      }\n    }, GENERATOR_RESET_DELAY_MS);\n  }\n\n  watch(\n    interestSet: ObjectId | ObjectIdTree,\n    opts: WatchOptions = {},\n  ): Observable<Start | Change | Advance> {\n    return new Observable<Start | Change | Advance>(\n      (observer: Observer<Start | Change | Advance>) => {\n        // Get unique stream ID.\n        const streamId = ++this.streamNumber;\n\n        // Record stream information in the appropriate map.\n        const project = opts.projectOverride ?? this.options.defaultProject;\n        const streamInfo = new CausalStream(observer, project, interestSet);\n        this.causalStreams.set(streamId, streamInfo);\n        this.newStreamSubject.next({});\n        this.sendOpenMultiWatchRequest(streamId, streamInfo);\n\n        return () => {\n          this.closeStream(streamId);\n        };\n      },\n    );\n  }\n\n  watchWithStartTime(\n    interestSet: ObjectId | ObjectIdTree,\n    startTimeMicros: Long,\n    opts: WatchOptions = {},\n  ): Observable<Change | Advance> {\n    return new Observable<Change | Advance>(\n      (observer: Observer<Change | Advance>) => {\n        // Get unique stream ID.\n        const streamId = ++this.streamNumber;\n\n        // Record stream information in the appropriate map.\n        const project = opts.projectOverride ?? this.options.defaultProject;\n        const streamInfo = new NonCausalStream(\n          observer,\n          project,\n          interestSet,\n          startTimeMicros,\n          /*knowledgeTimestampChosenByPunctual=*/ false,\n          StreamInitiationReason.REASON_WATCH_SESSION_START,\n        );\n        this.deleteOldResyncs();\n        const recentResync = this.findMatchingResync(streamInfo);\n\n        // If this interest set has experienced multiple resync errors\n        // recently, or the start time is not advancing beyond the knowledge\n        // timestamp at which we previously observed a resync error, then\n        // fail locally after a delay (don't send a request to the server).\n        if (\n          recentResync &&\n          (recentResync.hasRecurred ||\n            startTimeMicros.lessThanOrEqual(recentResync.knowledgeTimestamp))\n        ) {\n          let subscribed = true;\n          Timer.callOnce(() => {\n            if (subscribed) {\n              streamInfo.observer.complete();\n            }\n          }, SYNTHETIC_RESYNC_DELAY_MS);\n          return () => {\n            subscribed = false;\n          };\n        }\n        this.nonCausalStreams.set(streamId, streamInfo);\n        this.newStreamSubject.next({});\n        this.sendOpenMultiWatchRequest(streamId, streamInfo);\n        return () => {\n          this.closeStream(streamId);\n        };\n      },\n    );\n  }\n}\n\n/** A watch stream in causal mode that has not yet received a Start signal. */\nclass CausalStream {\n  /** The reason for initiating this stream's next incarnation. */\n  streamInitiationReason: StreamInitiationReason =\n    StreamInitiationReason.REASON_WATCH_SESSION_START;\n\n  constructor(\n    /** Observer of the watch stream. */\n    readonly observer: Observer<Start | Change | Advance>,\n\n    /** The name of the Punctual project being watched. */\n    readonly project: string | undefined,\n\n    /** ObjectId or ObjectIdTree associated with the watch stream. */\n    readonly interestSet: ObjectId | ObjectIdTree,\n  ) {}\n\n  /**\n   * Returns an instance reflecting the state of the stream after receipt of a\n   * Start signal. The returned instance is intended to replace this.\n   */\n  start(): LimboStream {\n    return new LimboStream(this.observer, this.project, this.interestSet);\n  }\n}\n\n/**\n * A watch stream in causal mode that has received a Start signal but not yet\n * any Advance signals. It's in 'limbo' because it can be automatically resumed\n * from either the predecessor or the successor state, but not from this state.\n */\nclass LimboStream {\n  constructor(\n    /** Observer of the watch stream. */\n    readonly observer: Observer<Change | Advance>,\n\n    /** The name of the Punctual project being watched. */\n    readonly project: string | undefined,\n\n    /** ObjectId or ObjectIdTree associated with the watch stream. */\n    readonly interestSet: ObjectId | ObjectIdTree,\n  ) {}\n\n  /**\n   * Returns an instance reflecting the state of the stream after receiving an\n   * Advance signal at the given timestamp. The returned instance is intended to\n   * replace this.\n   */\n  advance(advanceTimeMicros: Long): NonCausalStream {\n    // A limbo stream cannot be automatically resumed itself, so we do not need\n    // to retain its `StreamInitiationReason` when promoting it to a non-causal\n    // stream. (The promotion will always happen when the stream is active, and\n    // the stream's `StreamInitiationReason` will be updated if it terminates in\n    // a recoverable way in the future.)\n    const streamInitiationReason =\n      StreamInitiationReason.REASON_WATCH_SESSION_START;\n    return new NonCausalStream(\n      this.observer,\n      this.project,\n      this.interestSet,\n      advanceTimeMicros,\n      /*knowledgeTimestampChosenByPunctual=*/ true,\n      streamInitiationReason,\n    );\n  }\n}\n\n/** A watch stream with a knowledge timestamp. */\nclass NonCausalStream {\n  constructor(\n    /** Observer of the watch stream. */\n    readonly observer: Observer<Change | Advance>,\n\n    /** The name of the Punctual project being watched. */\n    readonly project: string | undefined,\n\n    /** ObjectId or ObjectIdTree associated with the watch stream. */\n    readonly interestSet: ObjectId | ObjectIdTree,\n\n    /**\n     * The latest time for which the interest set has learned about all\n     * changes.\n     */\n    public knowledgeTimestamp: Long,\n\n    /**\n     * True if `knowledgeTimestamp` was chosen by Punctual based on the latest\n     * `Advance` signal received on the stream. False if the timestamp was\n     * explicitly chosen by the caller.\n     */\n    public knowledgeTimestampChosenByPunctual: boolean,\n\n    /** The reason for initiating this stream's next incarnation. */\n    public streamInitiationReason: StreamInitiationReason,\n  ) {}\n\n  /** Updates the knowledge timestamp of the associated stream. */\n  updateKnowledgeTimestamp(timestamp: Long) {\n    if (timestamp > this.knowledgeTimestamp) {\n      this.knowledgeTimestamp = timestamp;\n      this.knowledgeTimestampChosenByPunctual = true;\n    }\n  }\n}\n\n/**\n * Converts an object id as defined in the client library to an object id as\n * defined in the punctual client proto.\n */\nexport function objectIdToProto(\n  projectName: string | undefined,\n  object: ObjectId,\n): ObjectIdProto {\n  const idToReturn = new ObjectIdProto();\n  if (projectName != null) {\n    idToReturn.setProject(projectProto(projectName));\n  }\n  idToReturn\n    .setOwner(objectIdToOwnerProto(object))\n    .setPath(objectIdToPathProto(object));\n  return idToReturn;\n}\n\n/** Returns the proto representation of the given project. */\nexport function projectProto(projectName: string): Project {\n  return new Project().setName(projectName);\n}\n\n/** Returns the proto representation of the given object's owner. */\nfunction objectIdToOwnerProto(object: ObjectId): ObjectOwner {\n  if (object.isPrivateToUser()) {\n    return privateOwnerProto();\n  } else {\n    return publicOwnerProto();\n  }\n}\n\n/** Returns a public ObjectOwner proto. */\nexport function publicOwnerProto(): ObjectOwner {\n  return new ObjectOwner().setIsPublic(true);\n}\n\n/** Returns a private ObjectOwner proto. */\nexport function privateOwnerProto(): ObjectOwner {\n  return new ObjectOwner().setIsPrivateToUser(true);\n}\n\n/**\n * Encodes the given ObjectId as an ObjectPath proto, possibly appending an END\n * sentinel if requested.\n */\nexport function objectIdToPathProto(object: ObjectId): ObjectPathProto {\n  const path = new ObjectPathProto();\n  for (const part of object.parts) {\n    let partToAdd = new ObjectPathProto.Part();\n    if (part.value === null) {\n      partToAdd.setNullPart(new ObjectPathProto.NullPart());\n    } else if (part.value instanceof Long) {\n      if (part.isDecreasing) {\n        partToAdd.setSignedNumDecreasing(part.value.toString());\n      } else {\n        partToAdd.setSignedNumIncreasing(part.value.toString());\n      }\n    } else if (typeof part.value === 'string') {\n      if (part.isDecreasing) {\n        partToAdd.setStringDecreasing(part.value);\n      } else {\n        partToAdd.setString(part.value);\n      }\n    } else if (typeof part.value === 'number') {\n      if (part.isDecreasing) {\n        partToAdd.setDoubleDecreasing(part.value);\n      } else {\n        partToAdd.setDoubleIncreasing(part.value);\n      }\n    } else if (part.value instanceof Uint8Array) {\n      if (part.isDecreasing) {\n        partToAdd.setBytesDecreasing(part.value);\n      } else {\n        partToAdd.setBytes(part.value);\n      }\n    } else if (part.value instanceof Time) {\n      if (part.isDecreasing) {\n        partToAdd.setTimestampDecreasing(part.value.asTimestamp());\n      } else {\n        partToAdd.setTimestampIncreasing(part.value.asTimestamp());\n      }\n    } else if (part.value instanceof OpaquePart) {\n      // Since we don't provide a way for customers to construct OpaqueParts,\n      // the only way for this to be reachable is if a customer watches a\n      // prefix, posts a change with a non-TypeScript-supported part in the\n      // suffix, and then turns around and starts watching that received object\n      // id.\n      partToAdd = OpaquePart.getRep(part.value);\n    } else {\n      assumeExhaustive(part.value);\n    }\n    path.addParts(partToAdd);\n  }\n  return path;\n}\n\n/**\n * Creates an object id defined in the client library from the path in the\n * change message. The function returns null if the path is malformed, or\n * contains any unsupported or unrecognized part types.\n */\nexport function objectIdFromContextualProto(\n  watchSpec: ObjectId | ObjectIdTree,\n  path: ObjectPathProto,\n): ObjectId | null {\n  // Handle point watcher.\n  if (watchSpec instanceof ObjectId) {\n    if (path.getPartsList().length > 0) {\n      // Point watcher's change response should not contain any parts.\n      log.info(logger, 'Point watcher change response contains parts');\n      return null;\n    }\n    return ObjectId.of(...watchSpec.parts);\n  }\n\n  // Handle prefix watcher: prefix comes from watch spec.\n  const parts = Array.of(...watchSpec.root.parts);\n  // Suffix comes from ObjectChange::object_path.\n  for (const part of path.getPartsList()) {\n    const partCase = part.getPartCase();\n    switch (partCase) {\n      case PartCase.SIGNED_NUM_DECREASING:\n        parts.push(\n          decreasing(\n            Long.fromString(part.getSignedNumDecreasingOrUndefined_asString()!),\n          ),\n        );\n        break;\n      case PartCase.SIGNED_NUM_INCREASING:\n        parts.push(\n          increasing(\n            Long.fromString(part.getSignedNumIncreasingOrUndefined_asString()!),\n          ),\n        );\n        break;\n      case PartCase.NUM_INCREASING:\n      case PartCase.DOUBLE_INCREASING:\n      case PartCase.NUM_DECREASING:\n      case PartCase.DOUBLE_DECREASING:\n        parts.push(ObjectIdPart.of(OpaquePart.create(part)));\n        break;\n      case PartCase.STRING_DECREASING:\n        parts.push(decreasing(part.getStringDecreasingOrUndefined()!));\n        break;\n      case PartCase.STRING:\n        parts.push(increasing(part.getStringOrUndefined()!));\n        break;\n      case PartCase.BYTES:\n        parts.push(increasing(part.getBytesOrUndefined()?.asUint8Array()!));\n        break;\n      case PartCase.BYTES_DECREASING:\n        parts.push(\n          decreasing(part.getBytesDecreasingOrUndefined()?.asUint8Array()!),\n        );\n        break;\n      case PartCase.TIMESTAMP_INCREASING:\n        {\n          const t = Time.fromTimestamp(part.getTimestampIncreasing()!);\n          if (t === null) {\n            log.info(logger, 'Invalid timestamp');\n            return null;\n          }\n          parts.push(increasing(t));\n        }\n        break;\n      case PartCase.TIMESTAMP_DECREASING:\n        {\n          const t = Time.fromTimestamp(part.getTimestampDecreasing()!);\n          if (t === null) {\n            log.info(logger, 'Invalid timestamp');\n            return null;\n          }\n          parts.push(decreasing(t));\n        }\n        break;\n      case PartCase.NULL_PART:\n        parts.push(ObjectIdPart.of(null));\n        break;\n      case PartCase.PART_NOT_SET:\n        log.info(logger, 'Missing or unsupported object part');\n        parts.push(ObjectIdPart.of(OpaquePart.create(part)));\n        break;\n      default:\n        // Always throws, but we need to return below to satisfy the type\n        // system.\n        assumeExhaustive(partCase);\n        return null;\n    }\n  }\n\n  return ObjectId.of(...parts);\n}\n","goog.module('gapix.crypto.sha1');\ngoog.module.declareLegacyNamespace();\n\n/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations under the License.\n */\n\n// File copied directly from Closure Library\n///(http://code.google.com/p/closure-library)\n// Imported into Shindig w/ slight namespacing modifications and change from\n// prototype-style to closure (ironically) style JS objects. Then\n// re-imported into javascript/abc/libs/gapi/client/auth/ for\n// compatibility with a bug in Chrome M36.  See\n// b/17953983 for details.\n\n/**\n * @fileoverview SHA-1 cryptographic hash.\n * Variable names follow the notation in FIPS PUB 180-3:\n * http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf.\n *\n * Usage:\n *   var sha1 = sha1();\n *   sha1.update(bytes);\n *   var hash = sha1.digest();\n */\n\n/**\n * SHA-1 cryptographic hash constructor.\n *\n * The properties declared here are discussed in the above algorithm document.\n * @return {{\n *   reset: function(),\n *   update: function((!Array<number>|string)),\n *   digest: function(): !Array<number>,\n *   digestString: function(): string\n * }}\n */\nfunction sha1() {\n  var hex = '0123456789ABCDEF';\n\n  /**\n   * Holds the previous values of accumulated variables a-e in the compress\n   * function.\n   * @type {!Array.<number>}\n   */\n  var chain = [];\n\n  /**\n   * A buffer holding the partially computed hash result.\n   * @type {!Array.<number>}\n   */\n  var bufInternal = [];\n\n  /**\n   * An array of 80 bytes, each a part of the message to be hashed.  Referred to\n   * as the message schedule in the docs.\n   * @type {!Array.<number>}\n   */\n  var WInternal = [];\n\n  /**\n   * Contains data needed to pad messages less than 64 bytes.\n   * @type {!Array.<number>}\n   */\n  var pad = [];\n\n  pad[0] = 128;\n  for (var i = 1; i < 64; ++i) {\n    pad[i] = 0;\n  }\n\n  /** @type {number} */\n  var inbuf;\n\n  /** @type {number} */\n  var total;\n\n  /**\n   * Resets the internal accumulator.\n   */\n  function reset() {\n    chain[0] = 0x67452301;\n    chain[1] = 0xefcdab89;\n    chain[2] = 0x98badcfe;\n    chain[3] = 0x10325476;\n    chain[4] = 0xc3d2e1f0;\n\n    inbuf = 0;\n    total = 0;\n  }\n\n  /**\n   * Internal helper performing 32 bit left rotate.\n   * @param {number} w 32-bit integer to rotate.\n   * @param {number} r Bits to rotate left by.\n   * @return {number} w rotated left by r bits.\n   */\n  function rotl(w, r) {\n    return ((w << r) | (w >>> (32 - r))) & 0xffffffff;\n  }\n\n  /**\n   * Internal compress helper function.\n   * @param {!Array} buf containing block to compress.\n   */\n  function compress(buf) {\n    var W = WInternal;\n\n    // get 16 big endian words\n    for (var i = 0; i < 64; i += 4) {\n      var w = (buf[i] << 24) |\n              (buf[i + 1] << 16) |\n              (buf[i + 2] << 8) |\n              (buf[i + 3]);\n      W[i / 4] = w;\n    }\n\n    // expand to 80 words\n    for (var i = 16; i < 80; i++) {\n      W[i] = rotl(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);\n    }\n\n    var a = chain[0];\n    var b = chain[1];\n    var c = chain[2];\n    var d = chain[3];\n    var e = chain[4];\n    var f, k;\n\n    for (var i = 0; i < 80; i++) {\n      if (i < 40) {\n        if (i < 20) {\n          f = d ^ (b & (c ^ d));\n          k = 0x5a827999;\n        } else {\n          f = b ^ c ^ d;\n          k = 0x6ed9eba1;\n        }\n      } else {\n        if (i < 60) {\n          f = (b & c) | (d & (b | c));\n          k = 0x8f1bbcdc;\n        } else {\n          f = b ^ c ^ d;\n          k = 0xca62c1d6;\n        }\n      }\n\n      var t = (rotl(a, 5) + f + e + k + W[i]) & 0xffffffff;\n      e = d;\n      d = c;\n      c = rotl(b, 30);\n      b = a;\n      a = t;\n    }\n\n    chain[0] = (chain[0] + a) & 0xffffffff;\n    chain[1] = (chain[1] + b) & 0xffffffff;\n    chain[2] = (chain[2] + c) & 0xffffffff;\n    chain[3] = (chain[3] + d) & 0xffffffff;\n    chain[4] = (chain[4] + e) & 0xffffffff;\n  }\n\n  /**\n   * Adds a byte array to internal accumulator.\n   * @param {!Array.<number>|string} bytes to add to digest.\n   * @param {number=} opt_length is # of bytes to compress.\n   */\n  function update(bytes, opt_length) {\n    if (typeof(bytes) === 'string') {\n      // convert Unicode to UTF-8 bytes\n      bytes = unescape(encodeURIComponent(bytes));\n      var byteArray = [];\n      for (var i = 0, maxi = bytes.length; i < maxi; ++i) {\n        byteArray.push(bytes.charCodeAt(i));\n      }\n      bytes = byteArray;\n    }\n\n    if (!opt_length) {\n      opt_length = bytes.length;\n    }\n\n    var n = 0;\n\n    // Optimize for 64 byte chunks at 64 byte boundaries.\n    if (inbuf == 0) {\n      while (n + 64 < opt_length) {\n        compress(bytes.slice(n, n + 64));\n        n += 64;\n        total += 64;\n      }\n    }\n\n    while (n < opt_length) {\n      bufInternal[inbuf++] = bytes[n++];\n      total++;\n\n      if (inbuf == 64) {\n        inbuf = 0;\n        compress(bufInternal);\n\n        // Pick up 64 byte chunks.\n        while (n + 64 < opt_length) {\n          compress(bytes.slice(n, n + 64));\n          n += 64;\n          total += 64;\n        }\n      }\n    }\n  }\n\n  /**\n   * @return {!Array} byte[20] containing finalized hash.\n   */\n  function digest() {\n    var digest = [];\n    var totalBits = total * 8;\n\n    // Add pad 0x80 0x00*.\n    if (inbuf < 56) {\n      update(pad, 56 - inbuf);\n    } else {\n      update(pad, 64 - (inbuf - 56));\n    }\n\n    // Add # bits.\n    for (var i = 63; i >= 56; i--) {\n      bufInternal[i] = totalBits & 255;\n      totalBits >>>= 8;\n    }\n\n    compress(bufInternal);\n\n    var n = 0;\n    for (var i = 0; i < 5; i++) {\n      for (var j = 24; j >= 0; j -= 8) {\n        digest[n++] = (chain[i] >> j) & 255;\n      }\n    }\n\n    return digest;\n  }\n\n  /**\n   * @return {string} Hex-encoded string containing finalized hash.\n   */\n  function digestString() {\n    var arr = digest();\n    var hash = '';\n    for (var i = 0; i < arr.length; i++) {\n      hash += hex.charAt(Math.floor(arr[i] / 16)) + hex.charAt(arr[i] % 16);\n    }\n    return hash;\n  }\n\n  reset();\n\n  return {\n    reset: reset,\n    update: update,\n    digest: digest,\n    digestString: digestString\n  };\n}\n\nexports = sha1;\n","goog.provide('gapix.auth_firstparty.tokencrafter');\n\ngoog.require('gapix.crypto.sha1');\ngoog.require('gapix.util.getOrigin');\ngoog.require('goog.array');\n\n\n/**\n * If the user is logged in, this will return a value for\n * the Authorization header used in First-Party authentication and OAuth 2\n * session_state.\n *\n * @param {string} location window.location.href of the first party request.\n * @param {string} apiSessionCookieValue the value of the API session cookie.\n * @param {string} authScheme auth scheme to use while crafting the  token.\n * @param {?Array<{key:string,value:string}>=} opt_userIdentifiers an\n * array of {key:, value:} objects where 'key' is: <li>\n * <ul>'e': denotes that the corresponding 'value' is the user's email address\n * <ul>'u': denotes that the corresponding 'value' is the user's\n *          focus-obfuscated Gaia ID\n * <ul>'a': denotes that the corresponding 'value' is the user account's\n *          app domain (required only for dasher accounts)\n * </li> Providing this optional argument will make the function compute a\n * time-varying First-Party authentication v2 Authorization header instead of\n * v1.\n * @param {?Array<string>=} opt_extraFields Additional hash input fields.\n *\n * @return {?string} the computed header value or null.\n */\ngapix.auth_firstparty.tokencrafter.createAuthHeaderValueForFirstParty =\n    function(location, apiSessionCookieValue, authScheme, opt_userIdentifiers,\n             opt_extraFields) {\n  if (!!location && !!apiSessionCookieValue && !!authScheme) {\n    return [authScheme,\n      gapix.auth_firstparty.tokencrafter.getFirstPartyAuthToken_(\n        gapix.util.getOrigin(location),\n        apiSessionCookieValue,\n        opt_userIdentifiers || null,\n        opt_extraFields || [])].join(' ');\n  }\n  return null;\n};\n\n\n/**\n * @param {string} origin The origin.\n * @param {string} sessionCookie The session cookie.\n * @param {?Array<{key:string,value:string}>} userIdentifiers The user\n *    identifiers; an Array here will trigger v2 time-varying token format.\n * @param {!Array<string>} extraFields Additional hash input fields.\n * @return {string} the auth token.\n * @private\n */\ngapix.auth_firstparty.tokencrafter.getFirstPartyAuthToken_ = function(\n    origin, sessionCookie, userIdentifiers, extraFields) {\n  const version = Array.isArray(userIdentifiers) ? 2 : 1;\n  /** @type {!Array<string>} */\n  let sha1Parts = [];\n\n  if (version == 1) {\n    sha1Parts = [sessionCookie, origin];\n    goog.array.forEach(extraFields, function(element, index, array) {\n      sha1Parts.push(element);\n    });\n    return gapix.auth_firstparty.tokencrafter.computeSha1_(sha1Parts.join(' '));\n  } else {\n    const identifiers = [];\n    const suffix = [];\n    goog.array.forEach(userIdentifiers,\n        function(element, index, array) {\n          suffix.push(element['key']);\n          identifiers.push(element['value']);\n        }\n    );\n\n    const timestamp = Math.floor(new Date().getTime() / 1000);\n    if (goog.array.isEmpty(identifiers)) {\n      sha1Parts = [timestamp, sessionCookie, origin];\n    } else {\n      sha1Parts = [identifiers.join(':'), timestamp, sessionCookie, origin];\n    }\n    goog.array.forEach(extraFields, function(element, index, array) {\n      sha1Parts.push(element);\n    });\n    const sha1 =\n        gapix.auth_firstparty.tokencrafter.computeSha1_(sha1Parts.join(' '));\n\n    const tokenParts = [timestamp, sha1];\n    if (!goog.array.isEmpty(suffix)) {\n      tokenParts.push(suffix.join(''));\n    }\n    return tokenParts.join('_');\n  }\n};\n\n\n/**\n * Compute four-hex-digits digest used to validate versionInfos in the LSOLH\n * cookie used in OAuth 2 approval-state invalidations. See go/lsolh for\n * details and background.\n * @param {?string=} opt_versionInfos The versionInfos from the LSOLH cookie.\n * @param {?string=} opt_sessionCookie The value of SAPISID, if present.\n * @return {?string} four-hex-digit digest (truncated SHA-1) used to validate\n *     session_state or null if opt_versionInfos is empty or missing.\n */\ngapix.auth_firstparty.tokencrafter.computeVersionInfoDigest =\n    function(opt_versionInfos, opt_sessionCookie) {\n  if (!opt_versionInfos) return null;\n  const versionInfoDigestParts = [opt_versionInfos];\n  if (!!opt_sessionCookie) versionInfoDigestParts.push(opt_sessionCookie);\n  const versionInfoDigest = gapix.auth_firstparty.tokencrafter.computeSha1_(\n      versionInfoDigestParts.join(' '));\n  return versionInfoDigest.substr(0, 4);\n};\n\n\n/**\n * Helper function to compute lowercase SHA1 hash of a given string.\n * TODO(bsittler,vvidya) to switch to goog.crypt.Sha1 once Chrome M36 is no\n * longer live or once goog.crypt.Sha1 grows a workaround for the V8 bug.\n * @param {string} toHash value to hash.\n * @return {string} lowercase hexadecimal SHA1 hash digest of toHash.\n * @private\n */\ngapix.auth_firstparty.tokencrafter.computeSha1_ = function(toHash) {\n  const sha1 = gapix.crypto.sha1();\n  sha1.update(toHash);\n  return sha1.digestString().toLowerCase();\n};\n","goog.provide('gapix.auth_firstparty');\n\ngoog.require('gapix.auth_firstparty.tokencrafter');\ngoog.require('gapix.util.getOrigin');\ngoog.require('goog.net.Cookies');\n\n\n/**\n * Name of the gaia API session cookie for secure connections.\n * @type {string}\n * @private\n */\ngapix.auth_firstparty.SAPISID_3P_NAME_ = '__Secure-3PAPISID';\n\n\n/**\n * Name of the gaia API session cookie for secure connections.\n * @type {string}\n * @private\n */\ngapix.auth_firstparty.SAPISID_1P_NAME_ = '__Secure-1PAPISID';\n\n\n/**\n * Name of the gaia API session cookie for secure connections. Pre-Potassium -\n * does not contain the appropriate SameSite value and thus might not be\n * readable.\n * @type {string}\n * @private\n */\ngapix.auth_firstparty.PRE_K_SAPISID_NAME_ = 'SAPISID';\n\n\n/**\n * Name of authorization scheme for secure first-party authentication.\n * @type {string}\n * @private\n */\ngapix.auth_firstparty.SECURE_FIRST_PARTY_AUTH_SCHEME_ = 'SAPISIDHASH';\n\n\n/**\n * Name of authorization scheme for secure first-party authentication for\n * 3P cookies.\n * @type {string}\n * @private\n */\ngapix.auth_firstparty.SECURE_FIRST_PARTY_AUTH_3P_SCHEME_ = 'SAPISID3PHASH';\n\n\n/**\n * Name of authorization scheme for secure first-party authentication for\n * 1P cookies.\n * @type {string}\n * @private\n */\ngapix.auth_firstparty.SECURE_FIRST_PARTY_AUTH_1P_SCHEME_ = 'SAPISID1PHASH';\n\n\n/**\n * Name of the gaia API session cookie for unsecured connections. Pre-Potassium,\n * will be removed in the end game.\n * @type {string}\n * @private\n */\ngapix.auth_firstparty.PRE_K_APISID_NAME_ = 'APISID';\n\n\n/**\n * Name of authorization scheme for unsecured first-party authentication.\n * @type {string}\n * @private\n */\ngapix.auth_firstparty.UNSECURED_FIRST_PARTY_AUTH_SCHEME_ = 'APISIDHASH';\n\n\n/**\n * Name of the global flag to override SID cookie check for whether or not\n * the user has logged in. This is needed for +1 Chrome extension, because\n * it cannot set cookie in incognito mode.\n * @type {string}\n * @private\n */\ngapix.auth_firstparty.OVERRIDE_SID_VAR_ = '__OVERRIDE_SID';\n\n\n/**\n * Name of the global flag to override the SAPISID cookie. This is\n * needed for Chrome extensions using OAuth 2 so that they can avoid\n * being confused by cookies from the domains whose cookies they\n * read.\n * @type {string}\n */\ngapix.auth_firstparty.OVERRIDE_SECURE_API_SESSION_COOKIE_VAR = '__SAPISID';\n\n\n/**\n * Name of the global flag to override the SAPISID cookie. This is\n * needed for Chrome extensions using OAuth 2 so that they can avoid\n * being confused by cookies from the domains whose cookies they\n * read.\n * @type {string}\n */\ngapix.auth_firstparty.OVERRIDE_SECURE_API_SESSION_COOKIE_1P_VAR = '__1PSAPISID';\n\n\n/**\n * Name of the global flag to override the SAPISID cookie. This is\n * needed for Chrome extensions using OAuth 2 so that they can avoid\n * being confused by cookies from the domains whose cookies they\n * read.\n * @type {string}\n */\ngapix.auth_firstparty.OVERRIDE_SECURE_API_SESSION_COOKIE_3P_VAR = '__3PSAPISID';\n\n\n/**\n * Name of the global flag to override the APISID cookie. This is\n * needed for Chrome extensions using OAuth 2 so that they can avoid\n * being confused by cookies from the domains whose cookies they\n * read.\n * @type {string}\n */\ngapix.auth_firstparty.OVERRIDE_UNSECURED_API_SESSION_COOKIE_VAR = '__APISID';\n\n/**\n * Reference to the window object which can be overridden in tests.\n * @type {Window?}\n * @private\n */\ngapix.auth_firstparty.internalWindowRef_;\n\n/**\n * Tests if a collection of HTTP headers imply 1st party authentication.\n * @param {Object.<string,*>} headers the headers to check.\n * @return {boolean}\n */\ngapix.auth_firstparty.hasFirstPartyAuthHeader = function(headers) {\n  const isAuthorizationSchemeFirstParty = {};\n  isAuthorizationSchemeFirstParty[gapix.auth_firstparty\n                                      .SECURE_FIRST_PARTY_AUTH_SCHEME_] = true;\n  isAuthorizationSchemeFirstParty[gapix.auth_firstparty\n                                      .SECURE_FIRST_PARTY_AUTH_3P_SCHEME_] =\n      true;\n  isAuthorizationSchemeFirstParty[gapix.auth_firstparty\n                                      .SECURE_FIRST_PARTY_AUTH_1P_SCHEME_] =\n      true;\n  isAuthorizationSchemeFirstParty[gapix.auth_firstparty\n                                      .UNSECURED_FIRST_PARTY_AUTH_SCHEME_] =\n      true;\n\n  if (headers &&\n      (headers['OriginToken'] ||\n       headers['Authorization'] &&\n           isAuthorizationSchemeFirstParty[String(headers['Authorization'])\n                                               .split(' ')[0]])) {\n    return true;\n  }\n  return false;\n};\n\n/**\n * Returns the sign-in state. Note that the sign-in state is determined by\n * looking at the existence of certain Gaia cookies. Returning true does not\n * necessarily mean these cookies are valid.\n *\n * @return {boolean} Whether or not the user is considered logged in based\n *     on the existence of Gaia cookies.\n */\ngapix.auth_firstparty.isLoggedIn = function() {\n  let sessionCookie =\n      goog.global[gapix.auth_firstparty\n                      .OVERRIDE_SECURE_API_SESSION_COOKIE_VAR] ||\n      goog.global[gapix.auth_firstparty\n                      .OVERRIDE_UNSECURED_API_SESSION_COOKIE_VAR] ||\n      goog.global[gapix.auth_firstparty\n                      .OVERRIDE_SECURE_API_SESSION_COOKIE_3P_VAR] ||\n      goog.global[gapix.auth_firstparty\n                      .OVERRIDE_SECURE_API_SESSION_COOKIE_1P_VAR] ||\n      // Some clients may only bootstrap the SID cookie to simply check if the\n      // user is logged in. In this case the api session id may not be\n      // overridden.\n      goog.global[gapix.auth_firstparty.OVERRIDE_SID_VAR_];\n\n  if (sessionCookie) {\n    return true;\n  }\n\n  if (typeof document !== 'undefined') {\n    const cookies = new goog.net.Cookies(document);\n    sessionCookie = cookies.get(gapix.auth_firstparty.PRE_K_SAPISID_NAME_) ||\n        cookies.get(gapix.auth_firstparty.PRE_K_APISID_NAME_) ||\n        cookies.get(gapix.auth_firstparty.SAPISID_3P_NAME_) ||\n        cookies.get(gapix.auth_firstparty.SAPISID_1P_NAME_);\n  }\n\n  return !!sessionCookie;\n};\n\n/**\n * If the user is logged in, this will return a value for\n * the Authorization header used in First-Party authentication. To generate the\n * authorization header, the method will use the following in the given order\n * <li>\n * <ol> any overrides set on the global object\n * <ol> the legacy cookies (S)APISID\n * <ol> the new 3P cookie __Secure-3PAPISID. b/142413485\n * </li> If none of the above are available, It would return null.\n *\n * @param {boolean} isSecure whether this is a secure browsing context.\n * @param {?Array<{key:string,value:string}>=} opt_userIdentifiers an array\n *     of {key:, value:} objects. See getAuthHeaderValueForFirstParty for\n *     details.\n *\n * @return {?string} the computed header value or null.\n * @private\n */\ngapix.auth_firstparty.getLegacyAuthHeaderValue_ = function(\n    isSecure, opt_userIdentifiers) {\n  let apiSessionCookieValue = isSecure ?\n      goog.global[gapix.auth_firstparty\n                      .OVERRIDE_SECURE_API_SESSION_COOKIE_VAR] :\n      goog.global[gapix.auth_firstparty\n                      .OVERRIDE_UNSECURED_API_SESSION_COOKIE_VAR];\n  if (!apiSessionCookieValue && typeof document !== 'undefined') {\n    const sessionCookieName = isSecure ?\n        gapix.auth_firstparty.PRE_K_SAPISID_NAME_ :\n        gapix.auth_firstparty.PRE_K_APISID_NAME_;\n\n    const cookies = new goog.net.Cookies(document);\n    apiSessionCookieValue = cookies.get(sessionCookieName) ||\n        cookies.get(gapix.auth_firstparty.SAPISID_3P_NAME_);\n  }\n  if (apiSessionCookieValue) {\n    const authScheme = isSecure ?\n        gapix.auth_firstparty.SECURE_FIRST_PARTY_AUTH_SCHEME_ :\n        gapix.auth_firstparty.UNSECURED_FIRST_PARTY_AUTH_SCHEME_;\n    return gapix.auth_firstparty.tokencrafter\n        .createAuthHeaderValueForFirstParty(\n            String(goog.global.location.href), apiSessionCookieValue,\n            authScheme, opt_userIdentifiers);\n  }\n  return null;\n};\n\n/**\n * Browsing context must be secure to call this method.\n * Returns an FPA auth header component for the new cookies introduced after\n * SameSite changes.\n *\n * @param {string} overrideVarName the name of the overridden cookie.\n * @param {string} sessionCookieName the name of the secure session cookie name.\n * @param {string} authSchemeName the name of the auth scheme.\n * @param {?Array<{key:string,value:string}>=} opt_userIdentifiers an array\n *     of {key:, value:} objects. See getAuthHeaderValueForFirstParty for\n *     details.\n *\n * @return {?string} the computed header value or null.\n * @private\n */\ngapix.auth_firstparty.getNewAuthHeaderValue_ = function(\n    overrideVarName, sessionCookieName, authSchemeName, opt_userIdentifiers) {\n  let apiSessionCookieValue = goog.global[overrideVarName];\n  if (!apiSessionCookieValue && typeof document !== 'undefined') {\n    const cookies = new goog.net.Cookies(document);\n    apiSessionCookieValue = cookies.get(sessionCookieName);\n  }\n  if (apiSessionCookieValue) {\n    return gapix.auth_firstparty.tokencrafter\n        .createAuthHeaderValueForFirstParty(\n            String(goog.global.location.href), apiSessionCookieValue,\n            authSchemeName, opt_userIdentifiers);\n  }\n  return null;\n};\n\n/**\n * Sets the window reference for testing purposes.\n * @param {!Window} windowRef The window reference to use for testing.\n */\ngapix.auth_firstparty.setWindowRefForTesting = function(windowRef) {\n  if (!goog.DEBUG) return;\n\n  gapix.auth_firstparty.internalWindowRef_ = windowRef;\n};\n\n/**\n * If the user is logged in, this will return a value for the Authorization\n * header used in First-Party authentication.\n *\n * @param {?Array<{key:string,value:string}>=} opt_userIdentifiers an array\n *     of {key:, value:} objects\n * where 'key' is: <li>\n * <ul>'e': denotes that the corresponding 'value' is the user's email address\n * <ul>'u': denotes that the corresponding 'value' is the user's\n *          focus-obfuscated Gaia ID\n * <ul>'a': denotes that the corresponding 'value' is the user account's\n *          app domain (required only for dasher accounts)\n * </li> Providing this optional argument will make the function compute a\n * v2 Authorization header instead of v1.\n * TODO: b/322811712 - Remove this parameter.\n * @param {boolean=} useNewGaiaCookies no longer used, pending cleanup.\n *\n * @return {?string} the computed header value or null.\n */\ngapix.auth_firstparty.getAuthHeaderValueForFirstParty = function(\n    opt_userIdentifiers, useNewGaiaCookies = false) {\n  const origin = gapix.util.getOrigin(\n      (gapix.auth_firstparty.internalWindowRef_ || goog.global)?.location.href);\n  const hashes = [];\n  if (gapix.auth_firstparty.isLoggedIn()) {\n    const isSecure = origin.indexOf('https:') == 0 ||\n        origin.indexOf('chrome-extension:') == 0 ||\n        // Chrome New Tab Page (AKA NTP) is a 1P page that may have access to\n        // cookie values, via the OneGoogle Bar.\n        origin.indexOf('chrome-untrusted://new-tab-page') == 0 ||\n        origin.indexOf('moz-extension:') == 0;\n    const legacyHashValue = gapix.auth_firstparty.getLegacyAuthHeaderValue_(\n        isSecure, opt_userIdentifiers);\n    if (legacyHashValue) {\n      hashes.push(legacyHashValue);\n    }\n    if (isSecure) {\n      const new1PHashValue = gapix.auth_firstparty.getNewAuthHeaderValue_(\n          gapix.auth_firstparty.OVERRIDE_SECURE_API_SESSION_COOKIE_1P_VAR,\n          gapix.auth_firstparty.SAPISID_1P_NAME_,\n          gapix.auth_firstparty.SECURE_FIRST_PARTY_AUTH_1P_SCHEME_,\n          opt_userIdentifiers);\n      if (new1PHashValue) {\n        hashes.push(new1PHashValue);\n      }\n      const new3PHashValue = gapix.auth_firstparty.getNewAuthHeaderValue_(\n          gapix.auth_firstparty.OVERRIDE_SECURE_API_SESSION_COOKIE_3P_VAR,\n          gapix.auth_firstparty.SAPISID_3P_NAME_,\n          gapix.auth_firstparty.SECURE_FIRST_PARTY_AUTH_3P_SCHEME_,\n          opt_userIdentifiers);\n      if (new3PHashValue) {\n        hashes.push(new3PHashValue);\n      }\n    }\n  }\n  if (hashes.length == 0) {\n    return null;\n  }\n  return hashes.join(' ');\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Functions for setting, getting and deleting cookies.\n */\n\ngoog.module('goog.net.Cookies');\ngoog.module.declareLegacyNamespace();\n\nconst googString = goog.require('goog.string');\n\n/**\n * A class for handling browser cookies.\n * @param {?Document} context The context document to get/set cookies on.\n * @constructor\n * @final\n */\nfunction Cookies(context) {\n  /**\n   * The context document to get/set cookies on. If no document context is\n   * passed, use a fake one with only the \"cookie\" attribute. This allows\n   * this class to be instantiated safely in web worker environments.\n   * @private {{cookie: string}}\n   */\n  this.document_ = context || {cookie: ''};\n}\n\n/**\n * Static constant for the size of cookies. Per the spec, there's a 4K limit\n * to the size of a cookie. To make sure users can't break this limit, we\n * should truncate long cookies at 3950 bytes, to be extra careful with dumb\n * browsers/proxies that interpret 4K as 4000 rather than 4096.\n * @const {number}\n */\nCookies.MAX_COOKIE_LENGTH = 3950;\n\n/**\n * The name of the test cookie to set.\n *\n * MOE:begin_intracomment_strip\n * Test cookie and isEnabled logic adapted from original GWS implementation:\n * google3/javascript/apps/storagecache/cookies.js (cl/59414503)\n *\n * Cookie approved in http://b/11748450.\n * MOE:end_intracomment_strip\n *\n * @private @const {string}\n */\nCookies.TEST_COOKIE_NAME_ = 'TESTCOOKIESENABLED';\n\n/**\n * The value of the test cookie to set.\n * @private @const {string}\n */\nCookies.TEST_COOKIE_VALUE_ = '1';\n\n/**\n * Max age of the test cookie in seconds.\n * @private @const {number}\n */\nCookies.TEST_COOKIE_MAX_AGE_ = 60;\n\n/**\n * Returns true if cookies are enabled.\n *\n * navigator.cookieEnabled is an unreliable API in some browsers such as\n * Internet Explorer. It will return true even when cookies are actually\n * blocked. To work around this, check for the presence of cookies, or attempt\n * to manually set and retrieve a cookie, which is the ultimate test of whether\n * or not a browser supports cookies.\n *\n * @return {boolean} True if cookies are enabled.\n */\nCookies.prototype.isEnabled = function() {\n  if (!goog.global.navigator.cookieEnabled) {\n    return false;\n  }\n\n  if (!this.isEmpty()) {\n    // There are some cookies already set for the current domain, so cookies\n    // can't be totally blocked.\n    return true;\n  }\n\n  // Try setting and reading back a cookie to see if cookies are enabled.\n  this.set(\n      Cookies.TEST_COOKIE_NAME_, Cookies.TEST_COOKIE_VALUE_,\n      {maxAge: Cookies.TEST_COOKIE_MAX_AGE_});\n  if (this.get(Cookies.TEST_COOKIE_NAME_) !== Cookies.TEST_COOKIE_VALUE_) {\n    return false;\n  }\n\n  // Clean up the test cookie.\n  this.remove(Cookies.TEST_COOKIE_NAME_);\n\n  return true;\n};\n\n/**\n * We do not allow '=', ';', or white space in the name.\n *\n * NOTE: The following are allowed by this method, but should be avoided for\n * cookies handled by the server.\n * - any name starting with '$'\n * - 'Comment'\n * - 'Domain'\n * - 'Expires'\n * - 'Max-Age'\n * - 'Path'\n * - 'Secure'\n * - 'Version'\n *\n * @param {string} name Cookie name.\n * @return {boolean} Whether name is valid.\n *\n * @see <a href=\"http://tools.ietf.org/html/rfc2109\">RFC 2109</a>\n * @see <a href=\"http://tools.ietf.org/html/rfc2965\">RFC 2965</a>\n */\nCookies.prototype.isValidName = function(name) {\n  return !(/[;=\\s]/.test(name));\n};\n\n/**\n * We do not allow ';' or line break in the value.\n *\n * Spec does not mention any illegal characters, but in practice semi-colons\n * break parsing and line breaks truncate the name.\n *\n * @param {string} value Cookie value.\n * @return {boolean} Whether value is valid.\n *\n * @see <a href=\"http://tools.ietf.org/html/rfc2109\">RFC 2109</a>\n * @see <a href=\"http://tools.ietf.org/html/rfc2965\">RFC 2965</a>\n */\nCookies.prototype.isValidValue = function(value) {\n  return !(/[;\\r\\n]/.test(value));\n};\n\n/**\n * Sets a cookie.  The max_age can be -1 to set a session cookie. To remove and\n * expire cookies, use remove() instead.\n *\n * Neither the `name` nor the `value` are encoded in any way. It is\n * up to the callers of `get` and `set` (as well as all the other\n * methods) to handle any possible encoding and decoding.\n *\n * @throws {!Error} If the `name` fails #goog.net.cookies.isValidName.\n * @throws {!Error} If the `value` fails #goog.net.cookies.isValidValue.\n *\n * @param {string} name  The cookie name.\n * @param {string} value  The cookie value.\n * @param {!Cookies.SetOptions=} options  The options object.\n */\nCookies.prototype.set = function(name, value, options) {\n  /** @type {number|undefined} */\n  let maxAge;\n  /** @type {string|undefined} */\n  let path;\n  /** @type {string|undefined} */\n  let domain;\n  /** @type {boolean} */\n  let secure = false;\n  /** @type {!Cookies.SameSite|undefined} */\n  let sameSite;\n\n  if (typeof options === 'object') {\n    sameSite = options.sameSite;\n    secure = options.secure || false;\n    domain = options.domain || undefined;\n    path = options.path || undefined;\n    maxAge = options.maxAge;\n  }\n  if (!this.isValidName(name)) {\n    throw new Error('Invalid cookie name \"' + name + '\"');\n  }\n  if (!this.isValidValue(value)) {\n    throw new Error('Invalid cookie value \"' + value + '\"');\n  }\n\n  if (maxAge === undefined) {\n    maxAge = -1;\n  }\n\n  const domainStr = domain ? ';domain=' + domain : '';\n  const pathStr = path ? ';path=' + path : '';\n  const secureStr = secure ? ';secure' : '';\n\n  let expiresStr;\n\n  // Case 1: Set a session cookie.\n  if (maxAge < 0) {\n    expiresStr = '';\n\n    // Case 2: Remove the cookie.\n    // Note: We don't tell people about this option in the function doc because\n    // we prefer people to use remove() to remove cookies.\n  } else if (maxAge == 0) {\n    // Note: Don't use Jan 1, 1970 for date because NS 4.76 will try to convert\n    // it to local time, and if the local time is before Jan 1, 1970, then the\n    // browser will ignore the Expires attribute altogether.\n    const pastDate = new Date(1970, 1 /*Feb*/, 1);  // Feb 1, 1970\n    expiresStr = ';expires=' + pastDate.toUTCString();\n\n    // Case 3: Set a persistent cookie.\n  } else {\n    const futureDate = new Date(Date.now() + maxAge * 1000);\n    expiresStr = ';expires=' + futureDate.toUTCString();\n  }\n\n  const sameSiteStr = sameSite != null ? ';samesite=' + sameSite : '';\n\n  this.setCookie_(\n      name + '=' + value + domainStr + pathStr + expiresStr + secureStr +\n      sameSiteStr);\n};\n\n/**\n * Returns the value for the first cookie with the given name.\n * @param {string} name  The name of the cookie to get.\n * @param {string=} opt_default  If not found this is returned instead.\n * @return {string|undefined}  The value of the cookie. If no cookie is set this\n *     returns opt_default or undefined if opt_default is not provided.\n */\nCookies.prototype.get = function(name, opt_default) {\n  const nameEq = name + '=';\n  const parts = this.getParts_();\n  for (let i = 0, part; i < parts.length; i++) {\n    part = googString.trim(parts[i]);\n    // startsWith\n    if (part.lastIndexOf(nameEq, 0) == 0) {\n      return part.slice(nameEq.length);\n    }\n    if (part == name) {\n      return '';\n    }\n  }\n  return opt_default;\n};\n\n/**\n * Removes and expires a cookie.\n * @param {string} name  The cookie name.\n * @param {?string=} opt_path  The path of the cookie. If null or not present,\n *     expires the cookie set at the full request path.\n * @param {?string=} opt_domain  The domain of the cookie, or null to expire a\n *     cookie set at the full request host name. If not provided, the default is\n *     null (i.e. cookie at full request host name).\n * @return {boolean} Whether the cookie existed before it was removed.\n */\nCookies.prototype.remove = function(name, opt_path, opt_domain) {\n  const rv = this.containsKey(name);\n  this.set(name, '', {maxAge: 0, path: opt_path, domain: opt_domain});\n  return rv;\n};\n\n/**\n * Gets the names for all the cookies.\n * @return {!Array<string>} An array with the names of the cookies.\n */\nCookies.prototype.getKeys = function() {\n  return this.getKeyValues_().keys;\n};\n\n/**\n * Gets the values for all the cookies.\n * @return {!Array<string>} An array with the values of the cookies.\n */\nCookies.prototype.getValues = function() {\n  return this.getKeyValues_().values;\n};\n\n/**\n * @return {boolean} Whether there are any cookies for this document.\n */\nCookies.prototype.isEmpty = function() {\n  return !this.getCookie_();\n};\n\n/**\n * @return {number} The number of cookies for this document.\n */\nCookies.prototype.getCount = function() {\n  const cookie = this.getCookie_();\n  if (!cookie) {\n    return 0;\n  }\n  return this.getParts_().length;\n};\n\n/**\n * Returns whether there is a cookie with the given name.\n * @param {string} key The name of the cookie to test for.\n * @return {boolean} Whether there is a cookie by that name.\n */\nCookies.prototype.containsKey = function(key) {\n  // substring will return empty string if the key is not found, so the get\n  // function will only return undefined\n  return this.get(key) !== undefined;\n};\n\n/**\n * Returns whether there is a cookie with the given value. (This is an O(n)\n * operation.)\n * @param {string} value  The value to check for.\n * @return {boolean} Whether there is a cookie with that value.\n */\nCookies.prototype.containsValue = function(value) {\n  // this O(n) in any case so lets do the trivial thing.\n  const values = this.getKeyValues_().values;\n  for (let i = 0; i < values.length; i++) {\n    if (values[i] == value) {\n      return true;\n    }\n  }\n  return false;\n};\n\n/**\n * Removes all cookies for this document.  Note that this will only remove\n * cookies from the current path and domain.  If there are cookies set using a\n * subpath and/or another domain these will still be there.\n */\nCookies.prototype.clear = function() {\n  const keys = this.getKeyValues_().keys;\n  for (let i = keys.length - 1; i >= 0; i--) {\n    this.remove(keys[i]);\n  }\n};\n\n/**\n * Private helper function to allow testing cookies without depending on the\n * browser.\n * @param {string} s The cookie string to set.\n * @private\n */\nCookies.prototype.setCookie_ = function(s) {\n  this.document_.cookie = s;\n};\n\n/**\n * Private helper function to allow testing cookies without depending on the\n * browser. IE6 can return null here.\n * @return {string} Returns the `document.cookie`.\n * @private\n */\nCookies.prototype.getCookie_ = function() {\n  return this.document_.cookie;\n};\n\n/**\n * @return {!Array<string>} The cookie split on semi colons.\n * @private\n */\nCookies.prototype.getParts_ = function() {\n  return (this.getCookie_() || '').split(';');\n};\n\n/**\n * Gets the names and values for all the cookies.\n * @return {{keys:!Array<string>, values:!Array<string>}} An object with keys\n *     and values.\n * @private\n */\nCookies.prototype.getKeyValues_ = function() {\n  const parts = this.getParts_();\n  const keys = [];\n  const values = [];\n  let index;\n  let part;\n  for (let i = 0; i < parts.length; i++) {\n    part = googString.trim(parts[i]);\n    index = part.indexOf('=');\n\n    if (index == -1) {  // empty name\n      keys.push('');\n      values.push(part);\n    } else {\n      keys.push(part.substring(0, index));\n      values.push(part.substring(index + 1));\n    }\n  }\n  return {keys: keys, values: values};\n};\n\n/**\n * Options object for calls to Cookies.prototype.set.\n * @record\n */\nCookies.SetOptions = function() {\n  /**\n   * The max age in seconds (from now). Use -1 to set a session cookie. If not\n   * provided, the default is -1 (i.e. set a session cookie).\n   * @type {number|undefined}\n   */\n  this.maxAge;\n  /**\n   * The path of the cookie. If not present then this uses the full request\n   * path.\n   * @type {?string|undefined}\n   */\n  this.path;\n  /**\n   * The domain of the cookie, or null to not specify a domain attribute\n   * (browser will use the full request host name). If not provided, the default\n   * is null (i.e. let browser use full request host name).\n   * @type {?string|undefined}\n   */\n  this.domain;\n  /**\n   * Whether the cookie should only be sent over a secure channel.\n   * @type {boolean|undefined}\n   */\n  this.secure;\n  /**\n   * The SameSite attribute for the cookie (default is NONE).\n   * @type {!Cookies.SameSite|undefined}\n   */\n  this.sameSite;\n};\n\n/**\n * Valid values for the SameSite cookie attribute.  In 2019, browsers began the\n * process of changing the default from NONE to LAX.\n *\n * @see https://web.dev/samesite-cookies-explained\n * @see https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-5.3.7\n * @enum {string}\n */\nCookies.SameSite = {\n  /**\n   * The cookie will be sent in first-party contexts, including initial\n   * navigation from external referrers.\n   */\n  LAX: 'lax',\n  /**\n   * The cookie will be sent in all first-party or third-party contexts. This\n   * was the original default behavior of the web, but will need to be set\n   * explicitly starting in 2020.\n   */\n  NONE: 'none',\n  /**\n   * The cookie will only be sent in first-party contexts. It will not be sent\n   * on initial navigation from external referrers.\n   */\n  STRICT: 'strict',\n};\n\n/**\n * A static default instance.\n * @const {!Cookies}\n * @private\n */\nCookies.instance_ =\n    new Cookies(typeof document == 'undefined' ? null : document);\n\n/**\n * Getter for the static instance of Cookies.\n * @return {!Cookies}\n */\nCookies.getInstance = function() {\n  return Cookies.instance_;\n};\n\nexports = Cookies;\n","// source: ipc/invalidation/punctual/client/proto/common.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableHeader');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyHeader');\n\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$e.punctual$proto$Header$Library');\ngoog.requireType('jspb$punctual$proto$ImmutableHeader');\ngoog.requireType('jspb$r$punctual$proto$Header$internalDoNotUseReader');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableHeader>}\n * @implements {jspb$r$punctual$proto$Header$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableHeader = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional int32 version = 1;\n   * @override\n   * @return {number|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getVersionOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getVersion() {\n    return jspb_internal_adapters.getInt32FieldLegacyNullable(this, 1);\n  }\n\n\n  /**\n   * optional int32 version = 1;\n   * @override\n   * @return {number|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getVersionOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getVersion_legacyNullable() {\n    return jspb_internal_adapters.getInt32FieldLegacyNullable(this, 1);\n  }\n\n\n  /**\n   * @param {number|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableHeader} returns this\n   */\n  setVersion(value) {\n    return jspb_internal_adapters.setInt32Field(this, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableHeader} returns this\n   */\n  clearVersion() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasVersion() {\n    return jspb_internal_adapters.hasInt32Field(this, 1);\n  }\n\n\n  /**\n   * optional int32 version = 1;\n   * @override\n   * @return {number|undefined}\n   */\n  getVersionOrUndefined() {\n    return jspb_internal_adapters.getInt32FieldOrUndefined(this, 1);\n  }\n\n\n  /**\n   * optional Library library = 2;\n   * @override\n   * @return {!jspb$e.punctual$proto$Header$Library}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getLibraryOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getLibrary() {\n    return /** @type {!jspb$e.punctual$proto$Header$Library} */ (jspb_internal_adapters.getEnumFieldLegacyNullable(this, 2));\n  }\n\n\n  /**\n   * optional Library library = 2;\n   * @override\n   * @return {!jspb$e.punctual$proto$Header$Library}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getLibraryOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getLibrary_legacyNullable() {\n    return /** @type {!jspb$e.punctual$proto$Header$Library} */ (jspb_internal_adapters.getEnumFieldLegacyNullable(this, 2));\n  }\n\n\n  /**\n   * @param {!jspb$e.punctual$proto$Header$Library|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableHeader} returns this\n   */\n  setLibrary(value) {\n    return jspb_internal_adapters.setEnumField(this, 2, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableHeader} returns this\n   */\n  clearLibrary() {\n    return jspb_internal_adapters.clearField(this, 2);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasLibrary() {\n    return jspb_internal_adapters.hasEnumField(this, 2);\n  }\n\n\n  /**\n   * optional Library library = 2;\n   * @override\n   * @return {!jspb$e.punctual$proto$Header$Library|undefined}\n   */\n  getLibraryOrUndefined() {\n    return /** @type {!jspb$e.punctual$proto$Header$Library|undefined} */ (jspb_internal_adapters.getEnumFieldOrUndefined(this, 2));\n  }\n\n\n  /**\n   * optional int64 build_baseline_changelist = 3;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getBuildBaselineChangelistOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getBuildBaselineChangelist() {\n    return jspb_internal_adapters.getInt64GbigintFieldLegacyNullable(this, 3);\n  }\n\n\n  /**\n   * optional int64 build_baseline_changelist = 3;\n   * @override\n   * @return {number|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getBuildBaselineChangelist_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64FieldLegacyNullable(this, 3);\n  }\n\n\n  /**\n   * optional int64 build_baseline_changelist = 3;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getBuildBaselineChangelistOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getBuildBaselineChangelist_legacyNullable() {\n    return jspb_internal_adapters.getInt64GbigintFieldLegacyNullable(this, 3);\n  }\n\n\n  /**\n   * optional int64 build_baseline_changelist = 3;\n   * @override\n   * @return {number|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getBuildBaselineChangelist_legacyNullable_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64FieldLegacyNullable(this, 3);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableHeader} returns this\n   */\n  setBuildBaselineChangelist(value) {\n    return jspb_internal_adapters.setInt64Field(this, 3, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableHeader} returns this\n   */\n  clearBuildBaselineChangelist() {\n    return jspb_internal_adapters.clearField(this, 3);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasBuildBaselineChangelist() {\n    return jspb_internal_adapters.hasInt64Field(this, 3);\n  }\n\n\n  /**\n   * optional int64 build_baseline_changelist = 3;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getBuildBaselineChangelistOrUndefined() {\n    return jspb_internal_adapters.getInt64GbigintFieldOrUndefined(this, 3);\n  }\n\n\n  /**\n   * optional int64 build_baseline_changelist = 3;\n   * @override\n   * @return {number|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getBuildBaselineChangelistOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64FieldOrUndefined(this, 3);\n  }\n\n\n  /**\n   * optional int64 build_baseline_changelist = 3;\n   * @override\n   * @return {string|undefined}\n   */\n  getBuildBaselineChangelistOrUndefined_asString() {\n    return jspb_internal_adapters.getInt64FieldOrUndefined_asString(this, 3);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableHeader}\n */\njspb$punctual$proto$MutableHeader.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableHeader}\n */\njspb$punctual$proto$MutableHeader.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableHeader}\n */\njspb$punctual$proto$MutableHeader.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableHeader));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableHeader.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableHeader>}\n */\njspb$punctual$proto$MutableHeader.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableHeader));\n\n/**\n * Object form of Header as accepted by the `fromObject` method.\n * @typedef {{\n *  version: (?number|undefined),\n *  library: (?number|undefined),\n *  buildBaselineChangelist: (?number|undefined)\n * }}\n */\njspb$punctual$proto$MutableHeader.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableHeader.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableHeader.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableHeader.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableHeader.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableHeader.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.Header\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableHeader|!jspb$punctual$proto$MutableHeader}\n */\njspb$ro.punctual$proto$ReadonlyHeader = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableHeader.displayName = 'proto.punctual.proto.Header';\n}\n/**\n * Interface form of Header as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  version: (number|undefined),\n *  library: (!jspb$e.punctual$proto$Header$Library|undefined),\n *  buildBaselineChangelist: (!gbigint|undefined),\n *  buildBaselineChangelist_asLegacyNumberOrString: (number|string|undefined)\n * }}\n */\njspb$punctual$proto$MutableHeader.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableHeader.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableHeader}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableHeader, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableHeader.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableHeader\n */\njspb$punctual$proto$MutableHeader.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableHeader));\n","// source: ipc/invalidation/punctual/client/proto/common.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableObjectOwner');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyObjectOwner');\n\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$e.punctual$proto$ObjectOwner$OwnerCase');\ngoog.requireType('jspb$punctual$proto$ImmutableObjectOwner');\ngoog.requireType('jspb$r$punctual$proto$ObjectOwner$internalDoNotUseReader');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableObjectOwner>}\n * @implements {jspb$r$punctual$proto$ObjectOwner$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableObjectOwner = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * @override\n   * @return {!jspb$e.punctual$proto$ObjectOwner$OwnerCase}\n   */\n  getOwnerCase() {\n    return /** @type {!jspb$e.punctual$proto$ObjectOwner$OwnerCase} */(jspb_internal_adapters.computeOneofCase(this, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_));\n  }\n\n\n  /**\n   * @return {!jspb$punctual$proto$MutableObjectOwner}\n   */\n  clearOwner() {\n    return jspb_internal_adapters.clearAllFieldsInOneof(this, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional bool is_public = 1;\n   * @override\n   * @return {boolean|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getIsPublicOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getIsPublic() {\n    return jspb_internal_adapters.getOneofBooleanFieldLegacyNullable(this, 1, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional bool is_public = 1;\n   * @override\n   * @return {boolean|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getIsPublicOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getIsPublic_legacyNullable() {\n    return jspb_internal_adapters.getOneofBooleanFieldLegacyNullable(this, 1, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * @param {boolean|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectOwner} returns this\n   */\n  setIsPublic(value) {\n    return jspb_internal_adapters.setOneofBooleanField(this, 1, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectOwner} returns this\n   */\n  clearIsPublic() {\n    return jspb_internal_adapters.clearOneofField(this, 1, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasIsPublic() {\n    return jspb_internal_adapters.hasOneofBooleanField(this, 1, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional bool is_public = 1;\n   * @override\n   * @return {boolean|undefined}\n   */\n  getIsPublicOrUndefined() {\n    return jspb_internal_adapters.getOneofBooleanFieldOrUndefined(this, 1, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional bool is_private_to_user = 2;\n   * @override\n   * @return {boolean|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getIsPrivateToUserOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getIsPrivateToUser() {\n    return jspb_internal_adapters.getOneofBooleanFieldLegacyNullable(this, 2, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional bool is_private_to_user = 2;\n   * @override\n   * @return {boolean|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getIsPrivateToUserOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getIsPrivateToUser_legacyNullable() {\n    return jspb_internal_adapters.getOneofBooleanFieldLegacyNullable(this, 2, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * @param {boolean|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectOwner} returns this\n   */\n  setIsPrivateToUser(value) {\n    return jspb_internal_adapters.setOneofBooleanField(this, 2, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectOwner} returns this\n   */\n  clearIsPrivateToUser() {\n    return jspb_internal_adapters.clearOneofField(this, 2, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasIsPrivateToUser() {\n    return jspb_internal_adapters.hasOneofBooleanField(this, 2, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional bool is_private_to_user = 2;\n   * @override\n   * @return {boolean|undefined}\n   */\n  getIsPrivateToUserOrUndefined() {\n    return jspb_internal_adapters.getOneofBooleanFieldOrUndefined(this, 2, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional int64 private_user_gaia_id_for_test = 3;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getPrivateUserGaiaIdForTestOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getPrivateUserGaiaIdForTest() {\n    return jspb_internal_adapters.getOneofInt64GbigintFieldLegacyNullable(this, 3, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional int64 private_user_gaia_id_for_test = 3;\n   * @override\n   * @return {number|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getPrivateUserGaiaIdForTest_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofInt64FieldLegacyNullable(this, 3, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional int64 private_user_gaia_id_for_test = 3;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getPrivateUserGaiaIdForTestOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getPrivateUserGaiaIdForTest_legacyNullable() {\n    return jspb_internal_adapters.getOneofInt64GbigintFieldLegacyNullable(this, 3, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional int64 private_user_gaia_id_for_test = 3;\n   * @override\n   * @return {number|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getPrivateUserGaiaIdForTest_legacyNullable_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofInt64FieldLegacyNullable(this, 3, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectOwner} returns this\n   */\n  setPrivateUserGaiaIdForTest(value) {\n    return jspb_internal_adapters.setOneofInt64Field(this, 3, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectOwner} returns this\n   */\n  clearPrivateUserGaiaIdForTest() {\n    return jspb_internal_adapters.clearOneofField(this, 3, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasPrivateUserGaiaIdForTest() {\n    return jspb_internal_adapters.hasOneofInt64Field(this, 3, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional int64 private_user_gaia_id_for_test = 3;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getPrivateUserGaiaIdForTestOrUndefined() {\n    return jspb_internal_adapters.getOneofInt64GbigintFieldOrUndefined(this, 3, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional int64 private_user_gaia_id_for_test = 3;\n   * @override\n   * @return {number|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getPrivateUserGaiaIdForTestOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getOneofInt64FieldOrUndefined(this, 3, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional int64 private_user_gaia_id_for_test = 3;\n   * @override\n   * @return {string|undefined}\n   */\n  getPrivateUserGaiaIdForTestOrUndefined_asString() {\n    return jspb_internal_adapters.getOneofInt64FieldOrUndefined_asString(this, 3, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional bool is_end = 15;\n   * @override\n   * @return {boolean|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getIsEndOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getIsEnd() {\n    return jspb_internal_adapters.getOneofBooleanFieldLegacyNullable(this, 15, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional bool is_end = 15;\n   * @override\n   * @return {boolean|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getIsEndOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getIsEnd_legacyNullable() {\n    return jspb_internal_adapters.getOneofBooleanFieldLegacyNullable(this, 15, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * @param {boolean|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectOwner} returns this\n   */\n  setIsEnd(value) {\n    return jspb_internal_adapters.setOneofBooleanField(this, 15, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectOwner} returns this\n   */\n  clearIsEnd() {\n    return jspb_internal_adapters.clearOneofField(this, 15, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasIsEnd() {\n    return jspb_internal_adapters.hasOneofBooleanField(this, 15, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n  /**\n   * optional bool is_end = 15;\n   * @override\n   * @return {boolean|undefined}\n   */\n  getIsEndOrUndefined() {\n    return jspb_internal_adapters.getOneofBooleanFieldOrUndefined(this, 15, jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableObjectOwner}\n */\njspb$punctual$proto$MutableObjectOwner.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableObjectOwner}\n */\njspb$punctual$proto$MutableObjectOwner.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableObjectOwner}\n */\njspb$punctual$proto$MutableObjectOwner.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableObjectOwner));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableObjectOwner.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableObjectOwner>}\n */\njspb$punctual$proto$MutableObjectOwner.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableObjectOwner));\n\n/**\n * Object form of ObjectOwner as accepted by the `fromObject` method.\n * @typedef {{\n *  isPublic: (?boolean|undefined),\n *  isPrivateToUser: (?boolean|undefined),\n *  privateUserGaiaIdForTest: (?number|undefined),\n *  isEnd: (?boolean|undefined)\n * }}\n */\njspb$punctual$proto$MutableObjectOwner.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableObjectOwner.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableObjectOwner.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableObjectOwner.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableObjectOwner.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableObjectOwner.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.ObjectOwner\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableObjectOwner|!jspb$punctual$proto$MutableObjectOwner}\n */\njspb$ro.punctual$proto$ReadonlyObjectOwner = {};\n\n/**\n * Oneof group definition.\n * @private {!ReadonlyArray<number>}\n * @const\n * @nodts\n */\njspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_ = [1,2,3,15];\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableObjectOwner.displayName = 'proto.punctual.proto.ObjectOwner';\n}\n/**\n * Interface form of ObjectOwner as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  isPublic: (boolean|undefined),\n *  isPrivateToUser: (boolean|undefined),\n *  privateUserGaiaIdForTest: (!gbigint|undefined),\n *  privateUserGaiaIdForTest_asLegacyNumberOrString: (number|string|undefined),\n *  isEnd: (boolean|undefined)\n * }}\n */\njspb$punctual$proto$MutableObjectOwner.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableObjectOwner.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableObjectOwner}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectOwner, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectOwner.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableObjectOwner\n */\njspb$punctual$proto$MutableObjectOwner.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableObjectOwner));\n","// source: ipc/invalidation/punctual/client/proto/common.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$ObjectPath$MutableNullPart');\ngoog.provide('jspb$ro.punctual$proto$ObjectPath$ReadonlyNullPart');\n\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$ObjectPath$ImmutableNullPart');\ngoog.requireType('jspb$r$punctual$proto$ObjectPath$NullPart$internalDoNotUseReader');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ObjectPath$ImmutableNullPart>}\n * @implements {jspb$r$punctual$proto$ObjectPath$NullPart$internalDoNotUseReader}\n */\njspb$punctual$proto$ObjectPath$MutableNullPart = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ObjectPath$ImmutableNullPart}\n */\njspb$punctual$proto$ObjectPath$MutableNullPart.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$ObjectPath$MutableNullPart}\n */\njspb$punctual$proto$ObjectPath$MutableNullPart.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$ObjectPath$MutableNullPart}\n */\njspb$punctual$proto$ObjectPath$MutableNullPart.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$ObjectPath$MutableNullPart));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$ObjectPath$MutableNullPart.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$ObjectPath$MutableNullPart>}\n */\njspb$punctual$proto$ObjectPath$MutableNullPart.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$ObjectPath$MutableNullPart));\n\n/**\n * Object form of NullPart as accepted by the `fromObject` method.\n * @typedef {!jspb_internal_public_for_gencode.EmptyRecord}\n */\njspb$punctual$proto$ObjectPath$MutableNullPart.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$ObjectPath$MutableNullPart.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$ObjectPath$MutableNullPart.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$ObjectPath$MutableNullPart.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$ObjectPath$MutableNullPart.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$ObjectPath$MutableNullPart.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.ObjectPath.NullPart\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ObjectPath$ImmutableNullPart|!jspb$punctual$proto$ObjectPath$MutableNullPart}\n */\njspb$ro.punctual$proto$ObjectPath$ReadonlyNullPart = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$ObjectPath$MutableNullPart.displayName = 'proto.punctual.proto.ObjectPath.NullPart';\n}\n/**\n * Interface form of NullPart as accepted by `fromFields` and produced by `getFields`.\n * @typedef {!jspb_internal_public_for_gencode.EmptyRecord}\n */\njspb$punctual$proto$ObjectPath$MutableNullPart.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$ObjectPath$MutableNullPart.FieldsInterface} record\n * @return {!jspb$punctual$proto$ObjectPath$ImmutableNullPart}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$ObjectPath$MutableNullPart, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ObjectPath$MutableNullPart.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ObjectPath$ImmutableNullPart\n */\njspb$punctual$proto$ObjectPath$MutableNullPart.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$ObjectPath$MutableNullPart));\n","// source: ipc/invalidation/punctual/client/proto/common.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableProject');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyProject');\n\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$e.punctual$proto$Project$ProjectCase');\ngoog.requireType('jspb$punctual$proto$ImmutableProject');\ngoog.requireType('jspb$r$punctual$proto$Project$internalDoNotUseReader');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableProject>}\n * @implements {jspb$r$punctual$proto$Project$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableProject = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * @override\n   * @return {!jspb$e.punctual$proto$Project$ProjectCase}\n   */\n  getProjectCase() {\n    return /** @type {!jspb$e.punctual$proto$Project$ProjectCase} */(jspb_internal_adapters.computeOneofCase(this, jspb$punctual$proto$MutableProject.oneofGroup_project_));\n  }\n\n\n  /**\n   * @return {!jspb$punctual$proto$MutableProject}\n   */\n  clearProject() {\n    return jspb_internal_adapters.clearAllFieldsInOneof(this, jspb$punctual$proto$MutableProject.oneofGroup_project_);\n  }\n\n\n  /**\n   * optional string name = 1;\n   * @override\n   * @return {string|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getNameOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getName() {\n    return jspb_internal_adapters.getOneofStringFieldLegacyNullable(this, 1, jspb$punctual$proto$MutableProject.oneofGroup_project_);\n  }\n\n\n  /**\n   * optional string name = 1;\n   * @override\n   * @return {string|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getNameOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getName_legacyNullable() {\n    return jspb_internal_adapters.getOneofStringFieldLegacyNullable(this, 1, jspb$punctual$proto$MutableProject.oneofGroup_project_);\n  }\n\n\n  /**\n   * @param {string|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableProject} returns this\n   */\n  setName(value) {\n    return jspb_internal_adapters.setOneofStringField(this, 1, jspb$punctual$proto$MutableProject.oneofGroup_project_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableProject} returns this\n   */\n  clearName() {\n    return jspb_internal_adapters.clearOneofField(this, 1, jspb$punctual$proto$MutableProject.oneofGroup_project_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasName() {\n    return jspb_internal_adapters.hasOneofStringField(this, 1, jspb$punctual$proto$MutableProject.oneofGroup_project_);\n  }\n\n\n  /**\n   * optional string name = 1;\n   * @override\n   * @return {string|undefined}\n   */\n  getNameOrUndefined() {\n    return jspb_internal_adapters.getOneofStringFieldOrUndefined(this, 1, jspb$punctual$proto$MutableProject.oneofGroup_project_);\n  }\n\n\n  /**\n   * optional bool is_end = 2;\n   * @override\n   * @return {boolean|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getIsEndOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getIsEnd() {\n    return jspb_internal_adapters.getOneofBooleanFieldLegacyNullable(this, 2, jspb$punctual$proto$MutableProject.oneofGroup_project_);\n  }\n\n\n  /**\n   * optional bool is_end = 2;\n   * @override\n   * @return {boolean|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getIsEndOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getIsEnd_legacyNullable() {\n    return jspb_internal_adapters.getOneofBooleanFieldLegacyNullable(this, 2, jspb$punctual$proto$MutableProject.oneofGroup_project_);\n  }\n\n\n  /**\n   * @param {boolean|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableProject} returns this\n   */\n  setIsEnd(value) {\n    return jspb_internal_adapters.setOneofBooleanField(this, 2, jspb$punctual$proto$MutableProject.oneofGroup_project_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableProject} returns this\n   */\n  clearIsEnd() {\n    return jspb_internal_adapters.clearOneofField(this, 2, jspb$punctual$proto$MutableProject.oneofGroup_project_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasIsEnd() {\n    return jspb_internal_adapters.hasOneofBooleanField(this, 2, jspb$punctual$proto$MutableProject.oneofGroup_project_);\n  }\n\n\n  /**\n   * optional bool is_end = 2;\n   * @override\n   * @return {boolean|undefined}\n   */\n  getIsEndOrUndefined() {\n    return jspb_internal_adapters.getOneofBooleanFieldOrUndefined(this, 2, jspb$punctual$proto$MutableProject.oneofGroup_project_);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableProject}\n */\njspb$punctual$proto$MutableProject.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableProject}\n */\njspb$punctual$proto$MutableProject.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableProject}\n */\njspb$punctual$proto$MutableProject.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableProject));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableProject.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableProject>}\n */\njspb$punctual$proto$MutableProject.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableProject));\n\n/**\n * Object form of Project as accepted by the `fromObject` method.\n * @typedef {{\n *  name: (?string|undefined),\n *  isEnd: (?boolean|undefined)\n * }}\n */\njspb$punctual$proto$MutableProject.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableProject.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableProject.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableProject.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableProject.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableProject.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.Project\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableProject|!jspb$punctual$proto$MutableProject}\n */\njspb$ro.punctual$proto$ReadonlyProject = {};\n\n/**\n * Oneof group definition.\n * @private {!ReadonlyArray<number>}\n * @const\n * @nodts\n */\njspb$punctual$proto$MutableProject.oneofGroup_project_ = [1,2];\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableProject.displayName = 'proto.punctual.proto.Project';\n}\n/**\n * Interface form of Project as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  name: (string|undefined),\n *  isEnd: (boolean|undefined)\n * }}\n */\njspb$punctual$proto$MutableProject.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableProject.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableProject}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableProject, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableProject.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableProject\n */\njspb$punctual$proto$MutableProject.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableProject));\n","// source: ipc/invalidation/punctual/client/proto/common.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableObjectId');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyObjectId');\n\ngoog.require('jspb$punctual$proto$MutableObjectOwner');\ngoog.require('jspb$punctual$proto$MutableObjectPath');\ngoog.require('jspb$punctual$proto$MutableProject');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$ImmutableObjectId');\ngoog.requireType('jspb$r$punctual$proto$ObjectId$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyObjectOwner');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyObjectPath');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyProject');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableObjectId>}\n * @implements {jspb$r$punctual$proto$ObjectId$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableObjectId = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional Project project = 1;\n   * @override\n   * @return {!jspb$punctual$proto$MutableProject|undefined}\n   */\n  getProject() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableProject, 1);\n  }\n\n\n  /**\n   * optional Project project = 1;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyProject}\n   */\n  getReadonlyProject() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$punctual$proto$MutableProject, 1);\n  }\n\n\n  /**\n   * optional Project project = 1;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableProject|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableProject') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableProject|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableProject\n   */\n  getMutableProject(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$punctual$proto$MutableProject, 1, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyProject|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectId} returns this\n   */\n  setProject(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$punctual$proto$MutableProject, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectId} returns this\n   */\n  clearProject() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasProject() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$punctual$proto$MutableProject, 1);\n  }\n\n\n  /**\n   * optional Project project = 1;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyProject|undefined}\n   */\n  getProjectOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableProject, 1);\n  }\n\n\n  /**\n   * optional ObjectOwner owner = 2;\n   * @override\n   * @return {!jspb$punctual$proto$MutableObjectOwner|undefined}\n   */\n  getOwner() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectOwner, 2);\n  }\n\n\n  /**\n   * optional ObjectOwner owner = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectOwner}\n   */\n  getReadonlyOwner() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$punctual$proto$MutableObjectOwner, 2);\n  }\n\n\n  /**\n   * optional ObjectOwner owner = 2;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableObjectOwner|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableObjectOwner') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectOwner|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectOwner\n   */\n  getMutableOwner(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$punctual$proto$MutableObjectOwner, 2, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyObjectOwner|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectId} returns this\n   */\n  setOwner(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$punctual$proto$MutableObjectOwner, 2, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectId} returns this\n   */\n  clearOwner() {\n    return jspb_internal_adapters.clearField(this, 2);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasOwner() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$punctual$proto$MutableObjectOwner, 2);\n  }\n\n\n  /**\n   * optional ObjectOwner owner = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectOwner|undefined}\n   */\n  getOwnerOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectOwner, 2);\n  }\n\n\n  /**\n   * optional ObjectPath path = 3;\n   * @override\n   * @return {!jspb$punctual$proto$MutableObjectPath|undefined}\n   */\n  getPath() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectPath, 3);\n  }\n\n\n  /**\n   * optional ObjectPath path = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectPath}\n   */\n  getReadonlyPath() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$punctual$proto$MutableObjectPath, 3);\n  }\n\n\n  /**\n   * optional ObjectPath path = 3;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableObjectPath|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableObjectPath') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectPath|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectPath\n   */\n  getMutablePath(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$punctual$proto$MutableObjectPath, 3, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyObjectPath|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectId} returns this\n   */\n  setPath(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$punctual$proto$MutableObjectPath, 3, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectId} returns this\n   */\n  clearPath() {\n    return jspb_internal_adapters.clearField(this, 3);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasPath() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$punctual$proto$MutableObjectPath, 3);\n  }\n\n\n  /**\n   * optional ObjectPath path = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectPath|undefined}\n   */\n  getPathOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectPath, 3);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableObjectId}\n */\njspb$punctual$proto$MutableObjectId.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableObjectId}\n */\njspb$punctual$proto$MutableObjectId.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableObjectId}\n */\njspb$punctual$proto$MutableObjectId.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableObjectId));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableObjectId.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableObjectId>}\n */\njspb$punctual$proto$MutableObjectId.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableObjectId));\n\n/**\n * Object form of ObjectId as accepted by the `fromObject` method.\n * @typedef {{\n *  project: (?jspb$punctual$proto$MutableProject.ObjectFormat|undefined),\n *  owner: (?jspb$punctual$proto$MutableObjectOwner.ObjectFormat|undefined),\n *  path: (?jspb$punctual$proto$MutableObjectPath.ObjectFormat|undefined)\n * }}\n */\njspb$punctual$proto$MutableObjectId.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableObjectId.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableObjectId.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableObjectId.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableObjectId.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableObjectId.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.ObjectId\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableObjectId|!jspb$punctual$proto$MutableObjectId}\n */\njspb$ro.punctual$proto$ReadonlyObjectId = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableObjectId.displayName = 'proto.punctual.proto.ObjectId';\n}\n/**\n * Interface form of ObjectId as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  project: (!jspb$ro.punctual$proto$ReadonlyProject|undefined),\n *  owner: (!jspb$ro.punctual$proto$ReadonlyObjectOwner|undefined),\n *  path: (!jspb$ro.punctual$proto$ReadonlyObjectPath|undefined)\n * }}\n */\njspb$punctual$proto$MutableObjectId.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableObjectId.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableObjectId}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectId, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectId.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableObjectId\n */\njspb$punctual$proto$MutableObjectId.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableObjectId));\n","// source: ipc/invalidation/punctual/client/proto/common.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableObjectIdPrefix');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyObjectIdPrefix');\n\ngoog.require('jspb$punctual$proto$MutableObjectOwner');\ngoog.require('jspb$punctual$proto$MutableObjectPath');\ngoog.require('jspb$punctual$proto$MutableProject');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$ImmutableObjectIdPrefix');\ngoog.requireType('jspb$r$punctual$proto$ObjectIdPrefix$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyObjectOwner');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyObjectPath');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyProject');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableObjectIdPrefix>}\n * @implements {jspb$r$punctual$proto$ObjectIdPrefix$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableObjectIdPrefix = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional Project project = 1;\n   * @override\n   * @return {!jspb$punctual$proto$MutableProject|undefined}\n   */\n  getProject() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableProject, 1);\n  }\n\n\n  /**\n   * optional Project project = 1;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyProject}\n   */\n  getReadonlyProject() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$punctual$proto$MutableProject, 1);\n  }\n\n\n  /**\n   * optional Project project = 1;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableProject|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableProject') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableProject|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableProject\n   */\n  getMutableProject(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$punctual$proto$MutableProject, 1, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyProject|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectIdPrefix} returns this\n   */\n  setProject(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$punctual$proto$MutableProject, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectIdPrefix} returns this\n   */\n  clearProject() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasProject() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$punctual$proto$MutableProject, 1);\n  }\n\n\n  /**\n   * optional Project project = 1;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyProject|undefined}\n   */\n  getProjectOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableProject, 1);\n  }\n\n\n  /**\n   * optional ObjectOwner owner = 2;\n   * @override\n   * @return {!jspb$punctual$proto$MutableObjectOwner|undefined}\n   */\n  getOwner() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectOwner, 2);\n  }\n\n\n  /**\n   * optional ObjectOwner owner = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectOwner}\n   */\n  getReadonlyOwner() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$punctual$proto$MutableObjectOwner, 2);\n  }\n\n\n  /**\n   * optional ObjectOwner owner = 2;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableObjectOwner|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableObjectOwner') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectOwner|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectOwner\n   */\n  getMutableOwner(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$punctual$proto$MutableObjectOwner, 2, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyObjectOwner|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectIdPrefix} returns this\n   */\n  setOwner(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$punctual$proto$MutableObjectOwner, 2, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectIdPrefix} returns this\n   */\n  clearOwner() {\n    return jspb_internal_adapters.clearField(this, 2);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasOwner() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$punctual$proto$MutableObjectOwner, 2);\n  }\n\n\n  /**\n   * optional ObjectOwner owner = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectOwner|undefined}\n   */\n  getOwnerOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectOwner, 2);\n  }\n\n\n  /**\n   * optional ObjectPath prefix = 3;\n   * @override\n   * @return {!jspb$punctual$proto$MutableObjectPath|undefined}\n   */\n  getPrefix() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectPath, 3);\n  }\n\n\n  /**\n   * optional ObjectPath prefix = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectPath}\n   */\n  getReadonlyPrefix() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$punctual$proto$MutableObjectPath, 3);\n  }\n\n\n  /**\n   * optional ObjectPath prefix = 3;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableObjectPath|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableObjectPath') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectPath|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectPath\n   */\n  getMutablePrefix(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$punctual$proto$MutableObjectPath, 3, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyObjectPath|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectIdPrefix} returns this\n   */\n  setPrefix(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$punctual$proto$MutableObjectPath, 3, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectIdPrefix} returns this\n   */\n  clearPrefix() {\n    return jspb_internal_adapters.clearField(this, 3);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasPrefix() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$punctual$proto$MutableObjectPath, 3);\n  }\n\n\n  /**\n   * optional ObjectPath prefix = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectPath|undefined}\n   */\n  getPrefixOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectPath, 3);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableObjectIdPrefix}\n */\njspb$punctual$proto$MutableObjectIdPrefix.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableObjectIdPrefix}\n */\njspb$punctual$proto$MutableObjectIdPrefix.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableObjectIdPrefix}\n */\njspb$punctual$proto$MutableObjectIdPrefix.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableObjectIdPrefix));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableObjectIdPrefix.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableObjectIdPrefix>}\n */\njspb$punctual$proto$MutableObjectIdPrefix.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableObjectIdPrefix));\n\n/**\n * Object form of ObjectIdPrefix as accepted by the `fromObject` method.\n * @typedef {{\n *  project: (?jspb$punctual$proto$MutableProject.ObjectFormat|undefined),\n *  owner: (?jspb$punctual$proto$MutableObjectOwner.ObjectFormat|undefined),\n *  prefix: (?jspb$punctual$proto$MutableObjectPath.ObjectFormat|undefined)\n * }}\n */\njspb$punctual$proto$MutableObjectIdPrefix.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableObjectIdPrefix.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableObjectIdPrefix.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableObjectIdPrefix.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableObjectIdPrefix.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableObjectIdPrefix.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.ObjectIdPrefix\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableObjectIdPrefix|!jspb$punctual$proto$MutableObjectIdPrefix}\n */\njspb$ro.punctual$proto$ReadonlyObjectIdPrefix = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableObjectIdPrefix.displayName = 'proto.punctual.proto.ObjectIdPrefix';\n}\n/**\n * Interface form of ObjectIdPrefix as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  project: (!jspb$ro.punctual$proto$ReadonlyProject|undefined),\n *  owner: (!jspb$ro.punctual$proto$ReadonlyObjectOwner|undefined),\n *  prefix: (!jspb$ro.punctual$proto$ReadonlyObjectPath|undefined)\n * }}\n */\njspb$punctual$proto$MutableObjectIdPrefix.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableObjectIdPrefix.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableObjectIdPrefix}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectIdPrefix, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectIdPrefix.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableObjectIdPrefix\n */\njspb$punctual$proto$MutableObjectIdPrefix.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableObjectIdPrefix));\n","// source: ipc/invalidation/punctual/client/proto/common.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableObjectChange');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyObjectChange');\n\ngoog.require('jspb$punctual$proto$MutableObjectPath');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$ImmutableObjectChange');\ngoog.requireType('jspb$r$punctual$proto$ObjectChange$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyObjectPath');\ngoog.requireType('jspb.bytestring');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableObjectChange>}\n * @implements {jspb$r$punctual$proto$ObjectChange$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableObjectChange = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional ObjectPath object_path = 6;\n   * @override\n   * @return {!jspb$punctual$proto$MutableObjectPath|undefined}\n   */\n  getObjectPath() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectPath, 6);\n  }\n\n\n  /**\n   * optional ObjectPath object_path = 6;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectPath}\n   */\n  getReadonlyObjectPath() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$punctual$proto$MutableObjectPath, 6);\n  }\n\n\n  /**\n   * optional ObjectPath object_path = 6;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableObjectPath|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableObjectPath') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectPath|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectPath\n   */\n  getMutableObjectPath(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$punctual$proto$MutableObjectPath, 6, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyObjectPath|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectChange} returns this\n   */\n  setObjectPath(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$punctual$proto$MutableObjectPath, 6, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectChange} returns this\n   */\n  clearObjectPath() {\n    return jspb_internal_adapters.clearField(this, 6);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasObjectPath() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$punctual$proto$MutableObjectPath, 6);\n  }\n\n\n  /**\n   * optional ObjectPath object_path = 6;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectPath|undefined}\n   */\n  getObjectPathOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectPath, 6);\n  }\n\n\n  /**\n   * optional bytes payload = 2;\n   * @override\n   * @return {!jspb.bytestring.ByteString|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getPayloadOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getPayload() {\n    return jspb_internal_adapters.getBytesFieldLegacyNullable(this, 2);\n  }\n\n\n  /**\n   * optional bytes payload = 2;\n   * @override\n   * @return {!jspb.bytestring.ByteString|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getPayloadOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getPayload_legacyNullable() {\n    return jspb_internal_adapters.getBytesFieldLegacyNullable(this, 2);\n  }\n\n\n  /**\n   * optional bytes payload = 2;\n   * @deprecated Use getPayload() instead. See go/jspb-gencode#bytes\n   * @return {string|null}\n   * @override\n   */\n  getPayload_asB64() {\n    return /** @type {string|null} */ (jspb_internal_public_for_gencode.byteStringAsB64(\n      jspb_internal_adapters.getBytesFieldLegacyNullable(this, 2)));\n  }\n\n\n  /**\n   * optional bytes payload = 2;\n   * @deprecated Use getPayload() instead. See go/jspb-gencode#bytes\n   * @return {string|null}\n   * @override\n   */\n  getPayload_asBase64OrUint8Array() {\n    return /** @type {string|null} */ (jspb_internal_public_for_gencode.byteStringAsBase64OrUint8Array(\n      jspb_internal_adapters.getBytesFieldLegacyNullable(this, 2)));\n  }\n\n\n  /**\n   * optional bytes payload = 2;\n   * @deprecated Use getPayload() instead. See go/jspb-gencode#bytes\n   * @return {!Uint8Array|null}\n   */\n  getPayload_asU8() {\n    jspb_internal_public_for_gencode.assertMutable(this);\n    return /** @type {!Uint8Array|null} */ (jspb_internal_public_for_gencode.byteStringAsU8(\n      jspb_internal_adapters.getBytesFieldLegacyNullable(this, 2)));\n  }\n\n\n  /**\n   * @param {!(string|!Uint8Array|!jspb.bytestring.ByteString)|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectChange} returns this\n   */\n  setPayload(value) {\n    return jspb_internal_adapters.setBytesField(this, 2, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectChange} returns this\n   */\n  clearPayload() {\n    return jspb_internal_adapters.clearField(this, 2);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasPayload() {\n    return jspb_internal_adapters.hasBytesField(this, 2);\n  }\n\n\n  /**\n   * optional bytes payload = 2;\n   * @override\n   * @return {!jspb.bytestring.ByteString|undefined}\n   */\n  getPayloadOrUndefined() {\n    return jspb_internal_adapters.getBytesFieldOrUndefined(this, 2);\n  }\n\n\n  /**\n   * optional int64 version = 3;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getVersionOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getVersion() {\n    return jspb_internal_adapters.getInt64GbigintFieldLegacyNullable(this, 3);\n  }\n\n\n  /**\n   * optional int64 version = 3;\n   * @override\n   * @return {string|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getVersion_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldLegacyNullable(this, 3);\n  }\n\n\n  /**\n   * optional int64 version = 3;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getVersionOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getVersion_legacyNullable() {\n    return jspb_internal_adapters.getInt64GbigintFieldLegacyNullable(this, 3);\n  }\n\n\n  /**\n   * optional int64 version = 3;\n   * @override\n   * @return {string|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getVersion_legacyNullable_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldLegacyNullable(this, 3);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectChange} returns this\n   */\n  setVersion(value) {\n    return jspb_internal_adapters.setInt64StringField(this, 3, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectChange} returns this\n   */\n  clearVersion() {\n    return jspb_internal_adapters.clearField(this, 3);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasVersion() {\n    return jspb_internal_adapters.hasInt64StringField(this, 3);\n  }\n\n\n  /**\n   * optional int64 version = 3;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getVersionOrUndefined() {\n    return jspb_internal_adapters.getInt64GbigintFieldOrUndefined(this, 3);\n  }\n\n\n  /**\n   * optional int64 version = 3;\n   * @override\n   * @return {string|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getVersionOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldOrUndefined(this, 3);\n  }\n\n\n  /**\n   * optional int64 version = 3;\n   * @override\n   * @return {string|undefined}\n   */\n  getVersionOrUndefined_asString() {\n    return jspb_internal_adapters.getInt64StringFieldOrUndefined_asString(this, 3);\n  }\n\n\n  /**\n   * optional sfixed64 change_time_micros = 4;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getChangeTimeMicrosOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getChangeTimeMicros() {\n    return jspb_internal_adapters.getInt64GbigintFieldLegacyNullable(this, 4);\n  }\n\n\n  /**\n   * optional sfixed64 change_time_micros = 4;\n   * @override\n   * @return {string|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getChangeTimeMicros_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldLegacyNullable(this, 4);\n  }\n\n\n  /**\n   * optional sfixed64 change_time_micros = 4;\n   * @override\n   * @return {!gbigint|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getChangeTimeMicrosOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getChangeTimeMicros_legacyNullable() {\n    return jspb_internal_adapters.getInt64GbigintFieldLegacyNullable(this, 4);\n  }\n\n\n  /**\n   * optional sfixed64 change_time_micros = 4;\n   * @override\n   * @return {string|null}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getChangeTimeMicros_legacyNullable_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldLegacyNullable(this, 4);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectChange} returns this\n   */\n  setChangeTimeMicros(value) {\n    return jspb_internal_adapters.setInt64StringField(this, 4, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectChange} returns this\n   */\n  clearChangeTimeMicros() {\n    return jspb_internal_adapters.clearField(this, 4);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasChangeTimeMicros() {\n    return jspb_internal_adapters.hasInt64StringField(this, 4);\n  }\n\n\n  /**\n   * optional sfixed64 change_time_micros = 4;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getChangeTimeMicrosOrUndefined() {\n    return jspb_internal_adapters.getInt64GbigintFieldOrUndefined(this, 4);\n  }\n\n\n  /**\n   * optional sfixed64 change_time_micros = 4;\n   * @override\n   * @return {string|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getChangeTimeMicrosOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldOrUndefined(this, 4);\n  }\n\n\n  /**\n   * optional sfixed64 change_time_micros = 4;\n   * @override\n   * @return {string|undefined}\n   */\n  getChangeTimeMicrosOrUndefined_asString() {\n    return jspb_internal_adapters.getInt64StringFieldOrUndefined_asString(this, 4);\n  }\n\n\n  /**\n   * optional bool is_replay = 7;\n   * @override\n   * @return {boolean|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getIsReplayOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getIsReplay() {\n    return jspb_internal_adapters.getBooleanFieldLegacyNullable(this, 7);\n  }\n\n\n  /**\n   * optional bool is_replay = 7;\n   * @override\n   * @return {boolean|null}\n   * @deprecated This accessor may unexpectedly return `null|undefined` because the proto file sets `jspb_use_correct_proto2_semantics = false`. Please use getIsReplayOrUndefined if you want undefined for absent fields, or delete the annotation from your proto file to get a normal default value.  See go/jspb-api-gotchas#nullability for more information.\n   */\n  getIsReplay_legacyNullable() {\n    return jspb_internal_adapters.getBooleanFieldLegacyNullable(this, 7);\n  }\n\n\n  /**\n   * @param {boolean|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableObjectChange} returns this\n   */\n  setIsReplay(value) {\n    return jspb_internal_adapters.setBooleanField(this, 7, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableObjectChange} returns this\n   */\n  clearIsReplay() {\n    return jspb_internal_adapters.clearField(this, 7);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasIsReplay() {\n    return jspb_internal_adapters.hasBooleanField(this, 7);\n  }\n\n\n  /**\n   * optional bool is_replay = 7;\n   * @override\n   * @return {boolean|undefined}\n   */\n  getIsReplayOrUndefined() {\n    return jspb_internal_adapters.getBooleanFieldOrUndefined(this, 7);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableObjectChange}\n */\njspb$punctual$proto$MutableObjectChange.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableObjectChange}\n */\njspb$punctual$proto$MutableObjectChange.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableObjectChange}\n */\njspb$punctual$proto$MutableObjectChange.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableObjectChange));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableObjectChange.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableObjectChange>}\n */\njspb$punctual$proto$MutableObjectChange.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableObjectChange));\n\n/**\n * Object form of ObjectChange as accepted by the `fromObject` method.\n * @typedef {{\n *  objectPath: (?jspb$punctual$proto$MutableObjectPath.ObjectFormat|undefined),\n *  payload: (?string|undefined),\n *  version: (?string|undefined),\n *  changeTimeMicros: (?string|undefined),\n *  isReplay: (?boolean|undefined)\n * }}\n */\njspb$punctual$proto$MutableObjectChange.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableObjectChange.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableObjectChange.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableObjectChange.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableObjectChange.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableObjectChange.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.ObjectChange\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableObjectChange|!jspb$punctual$proto$MutableObjectChange}\n */\njspb$ro.punctual$proto$ReadonlyObjectChange = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableObjectChange.displayName = 'proto.punctual.proto.ObjectChange';\n}\n/**\n * Interface form of ObjectChange as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  objectPath: (!jspb$ro.punctual$proto$ReadonlyObjectPath|undefined),\n *  payload: (!jspb.bytestring.ByteString|undefined),\n *  version: (!gbigint|undefined),\n *  version_asString: (string|undefined),\n *  changeTimeMicros: (!gbigint|undefined),\n *  changeTimeMicros_asString: (string|undefined),\n *  isReplay: (boolean|undefined)\n * }}\n */\njspb$punctual$proto$MutableObjectChange.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableObjectChange.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableObjectChange}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectChange, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectChange.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableObjectChange\n */\njspb$punctual$proto$MutableObjectChange.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableObjectChange));\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableWatchRequest');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyWatchRequest');\n\ngoog.require('jspb$punctual$proto$MutableHeader');\ngoog.require('jspb$punctual$proto$MutableObjectId');\ngoog.require('jspb$punctual$proto$MutableObjectIdPrefix');\ngoog.require('jspb$punctual$proto$MutableObjectIdRange');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$e.punctual$proto$WatchRequest$ObjectIdsCase');\ngoog.requireType('jspb$e.punctual$proto$WatchRequest$StreamInitiationReason');\ngoog.requireType('jspb$punctual$proto$ImmutableWatchRequest');\ngoog.requireType('jspb$r$punctual$proto$WatchRequest$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyHeader');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyObjectId');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyObjectIdPrefix');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyObjectIdRange');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableWatchRequest>}\n * @implements {jspb$r$punctual$proto$WatchRequest$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableWatchRequest = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * @override\n   * @return {!jspb$e.punctual$proto$WatchRequest$ObjectIdsCase}\n   */\n  getObjectIdsCase() {\n    return /** @type {!jspb$e.punctual$proto$WatchRequest$ObjectIdsCase} */(jspb_internal_adapters.computeOneofCase(this, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_));\n  }\n\n\n  /**\n   * @return {!jspb$punctual$proto$MutableWatchRequest}\n   */\n  clearObjectIds() {\n    return jspb_internal_adapters.clearAllFieldsInOneof(this, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional Header header = 4;\n   * @override\n   * @return {!jspb$punctual$proto$MutableHeader|undefined}\n   */\n  getHeader() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableHeader, 4);\n  }\n\n\n  /**\n   * optional Header header = 4;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyHeader}\n   */\n  getReadonlyHeader() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$punctual$proto$MutableHeader, 4);\n  }\n\n\n  /**\n   * optional Header header = 4;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableHeader|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableHeader') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableHeader|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableHeader\n   */\n  getMutableHeader(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$punctual$proto$MutableHeader, 4, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyHeader|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  setHeader(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$punctual$proto$MutableHeader, 4, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  clearHeader() {\n    return jspb_internal_adapters.clearField(this, 4);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasHeader() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$punctual$proto$MutableHeader, 4);\n  }\n\n\n  /**\n   * optional Header header = 4;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyHeader|undefined}\n   */\n  getHeaderOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableHeader, 4);\n  }\n\n\n  /**\n   * optional sfixed64 start_time_micros = 1;\n   * @override\n   * @return {!gbigint}\n   */\n  getStartTimeMicros() {\n    return jspb_internal_adapters.getInt64GbigintFieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * optional sfixed64 start_time_micros = 1;\n   * @override\n   * @return {string}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getStartTimeMicros_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * optional sfixed64 start_time_micros = 1;\n   * @override\n   * @return {string}\n   */\n  getStartTimeMicros_asString() {\n    return jspb_internal_adapters.getInt64StringFieldWithDefault_asString(this, 1);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  setStartTimeMicros(value) {\n    return jspb_internal_adapters.setInt64StringField(this, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  clearStartTimeMicros() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasStartTimeMicros() {\n    return jspb_internal_adapters.hasInt64StringField(this, 1);\n  }\n\n\n  /**\n   * optional sfixed64 start_time_micros = 1;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getStartTimeMicrosOrUndefined() {\n    return jspb_internal_adapters.getInt64GbigintFieldOrUndefined(this, 1);\n  }\n\n\n  /**\n   * optional sfixed64 start_time_micros = 1;\n   * @override\n   * @return {string|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getStartTimeMicrosOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldOrUndefined(this, 1);\n  }\n\n\n  /**\n   * optional sfixed64 start_time_micros = 1;\n   * @override\n   * @return {string|undefined}\n   */\n  getStartTimeMicrosOrUndefined_asString() {\n    return jspb_internal_adapters.getInt64StringFieldOrUndefined_asString(this, 1);\n  }\n\n\n  /**\n   * optional ObjectId point = 2;\n   * @override\n   * @return {!jspb$punctual$proto$MutableObjectId|undefined}\n   */\n  getPoint() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectId, 2, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional ObjectId point = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectId}\n   */\n  getReadonlyPoint() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$MutableObjectId, 2, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional ObjectId point = 2;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableObjectId|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableObjectId') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectId|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectId\n   */\n  getMutablePoint(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$MutableObjectId, 2, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyObjectId|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  setPoint(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$MutableObjectId, 2, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  clearPoint() {\n    return jspb_internal_adapters.clearOneofField(this, 2, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasPoint() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$MutableObjectId, 2, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional ObjectId point = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectId|undefined}\n   */\n  getPointOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectId, 2, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional ObjectIdRange range = 3;\n   * @override\n   * @return {!jspb$punctual$proto$MutableObjectIdRange|undefined}\n   */\n  getRange() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectIdRange, 3, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional ObjectIdRange range = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectIdRange}\n   */\n  getReadonlyRange() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$MutableObjectIdRange, 3, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional ObjectIdRange range = 3;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableObjectIdRange|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableObjectIdRange') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectIdRange|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectIdRange\n   */\n  getMutableRange(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$MutableObjectIdRange, 3, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyObjectIdRange|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  setRange(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$MutableObjectIdRange, 3, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  clearRange() {\n    return jspb_internal_adapters.clearOneofField(this, 3, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasRange() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$MutableObjectIdRange, 3, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional ObjectIdRange range = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectIdRange|undefined}\n   */\n  getRangeOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectIdRange, 3, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional ObjectIdPrefix prefix = 6;\n   * @override\n   * @return {!jspb$punctual$proto$MutableObjectIdPrefix|undefined}\n   */\n  getPrefix() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectIdPrefix, 6, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional ObjectIdPrefix prefix = 6;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectIdPrefix}\n   */\n  getReadonlyPrefix() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$MutableObjectIdPrefix, 6, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional ObjectIdPrefix prefix = 6;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableObjectIdPrefix|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableObjectIdPrefix') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectIdPrefix|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectIdPrefix\n   */\n  getMutablePrefix(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$MutableObjectIdPrefix, 6, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyObjectIdPrefix|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  setPrefix(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$MutableObjectIdPrefix, 6, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  clearPrefix() {\n    return jspb_internal_adapters.clearOneofField(this, 6, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasPrefix() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$MutableObjectIdPrefix, 6, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional ObjectIdPrefix prefix = 6;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectIdPrefix|undefined}\n   */\n  getPrefixOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableObjectIdPrefix, 6, jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_);\n  }\n\n\n  /**\n   * optional string monitoring_tag = 5;\n   * @override\n   * @return {string}\n   */\n  getMonitoringTag() {\n    return jspb_internal_adapters.getStringFieldWithDefault(this, 5);\n  }\n\n\n  /**\n   * @param {string|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  setMonitoringTag(value) {\n    return jspb_internal_adapters.setStringField(this, 5, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  clearMonitoringTag() {\n    return jspb_internal_adapters.clearField(this, 5);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasMonitoringTag() {\n    return jspb_internal_adapters.hasStringField(this, 5);\n  }\n\n\n  /**\n   * optional string monitoring_tag = 5;\n   * @override\n   * @return {string|undefined}\n   */\n  getMonitoringTagOrUndefined() {\n    return jspb_internal_adapters.getStringFieldOrUndefined(this, 5);\n  }\n\n\n  /**\n   * optional bool start_time_chosen_by_punctual = 8;\n   * @override\n   * @return {boolean}\n   */\n  getStartTimeChosenByPunctual() {\n    return jspb_internal_adapters.getBooleanFieldWithDefault(this, 8);\n  }\n\n\n  /**\n   * @param {boolean|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  setStartTimeChosenByPunctual(value) {\n    return jspb_internal_adapters.setBooleanField(this, 8, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  clearStartTimeChosenByPunctual() {\n    return jspb_internal_adapters.clearField(this, 8);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasStartTimeChosenByPunctual() {\n    return jspb_internal_adapters.hasBooleanField(this, 8);\n  }\n\n\n  /**\n   * optional bool start_time_chosen_by_punctual = 8;\n   * @override\n   * @return {boolean|undefined}\n   */\n  getStartTimeChosenByPunctualOrUndefined() {\n    return jspb_internal_adapters.getBooleanFieldOrUndefined(this, 8);\n  }\n\n\n  /**\n   * optional StreamInitiationReason stream_initiation_reason = 9;\n   * @override\n   * @return {!jspb$e.punctual$proto$WatchRequest$StreamInitiationReason}\n   */\n  getStreamInitiationReason() {\n    return /** @type {!jspb$e.punctual$proto$WatchRequest$StreamInitiationReason} */ (jspb_internal_adapters.getEnumFieldWithDefault(this, 9));\n  }\n\n\n  /**\n   * @param {!jspb$e.punctual$proto$WatchRequest$StreamInitiationReason|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  setStreamInitiationReason(value) {\n    return jspb_internal_adapters.setEnumField(this, 9, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableWatchRequest} returns this\n   */\n  clearStreamInitiationReason() {\n    return jspb_internal_adapters.clearField(this, 9);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasStreamInitiationReason() {\n    return jspb_internal_adapters.hasEnumField(this, 9);\n  }\n\n\n  /**\n   * optional StreamInitiationReason stream_initiation_reason = 9;\n   * @override\n   * @return {!jspb$e.punctual$proto$WatchRequest$StreamInitiationReason|undefined}\n   */\n  getStreamInitiationReasonOrUndefined() {\n    return /** @type {!jspb$e.punctual$proto$WatchRequest$StreamInitiationReason|undefined} */ (jspb_internal_adapters.getEnumFieldOrUndefined(this, 9));\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableWatchRequest}\n */\njspb$punctual$proto$MutableWatchRequest.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableWatchRequest}\n */\njspb$punctual$proto$MutableWatchRequest.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableWatchRequest}\n */\njspb$punctual$proto$MutableWatchRequest.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableWatchRequest));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableWatchRequest.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableWatchRequest>}\n */\njspb$punctual$proto$MutableWatchRequest.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableWatchRequest));\n\n/**\n * Object form of WatchRequest as accepted by the `fromObject` method.\n * @typedef {{\n *  header: (?jspb$punctual$proto$MutableHeader.ObjectFormat|undefined),\n *  startTimeMicros: (?string|undefined),\n *  point: (?jspb$punctual$proto$MutableObjectId.ObjectFormat|undefined),\n *  range: (?jspb$punctual$proto$MutableObjectIdRange.ObjectFormat|undefined),\n *  prefix: (?jspb$punctual$proto$MutableObjectIdPrefix.ObjectFormat|undefined),\n *  monitoringTag: (?string|undefined),\n *  startTimeChosenByPunctual: (?boolean|undefined),\n *  streamInitiationReason: (?number|undefined)\n * }}\n */\njspb$punctual$proto$MutableWatchRequest.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableWatchRequest.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableWatchRequest.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableWatchRequest.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableWatchRequest.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableWatchRequest.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.WatchRequest\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableWatchRequest|!jspb$punctual$proto$MutableWatchRequest}\n */\njspb$ro.punctual$proto$ReadonlyWatchRequest = {};\n\n/**\n * Oneof group definition.\n * @private {!ReadonlyArray<number>}\n * @const\n * @nodts\n */\njspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_ = [2,3,6];\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableWatchRequest.displayName = 'proto.punctual.proto.WatchRequest';\n}\n/**\n * Interface form of WatchRequest as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  header: (!jspb$ro.punctual$proto$ReadonlyHeader|undefined),\n *  startTimeMicros: (!gbigint|undefined),\n *  startTimeMicros_asString: (string|undefined),\n *  point: (!jspb$ro.punctual$proto$ReadonlyObjectId|undefined),\n *  range: (!jspb$ro.punctual$proto$ReadonlyObjectIdRange|undefined),\n *  prefix: (!jspb$ro.punctual$proto$ReadonlyObjectIdPrefix|undefined),\n *  monitoringTag: (string|undefined),\n *  startTimeChosenByPunctual: (boolean|undefined),\n *  streamInitiationReason: (!jspb$e.punctual$proto$WatchRequest$StreamInitiationReason|undefined)\n * }}\n */\njspb$punctual$proto$MutableWatchRequest.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableWatchRequest.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableWatchRequest}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchRequest, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchRequest.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableWatchRequest\n */\njspb$punctual$proto$MutableWatchRequest.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableWatchRequest));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$ReadonlyWatchRequest} value\n * @return {!jspb$punctual$proto$MutableWatchRequest.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$ReadonlyWatchRequest): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchRequest, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchRequest.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MutableWatchRequest.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableChooseServerRequest');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyChooseServerRequest');\n\ngoog.require('jspb$punctual$proto$MutableWatchRequest');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$ImmutableChooseServerRequest');\ngoog.requireType('jspb$r$punctual$proto$ChooseServerRequest$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyWatchRequest');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableChooseServerRequest>}\n * @implements {jspb$r$punctual$proto$ChooseServerRequest$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableChooseServerRequest = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional WatchRequest watch_request = 1;\n   * @override\n   * @return {!jspb$punctual$proto$MutableWatchRequest|undefined}\n   */\n  getWatchRequest() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableWatchRequest, 1);\n  }\n\n\n  /**\n   * optional WatchRequest watch_request = 1;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyWatchRequest}\n   */\n  getReadonlyWatchRequest() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$punctual$proto$MutableWatchRequest, 1);\n  }\n\n\n  /**\n   * optional WatchRequest watch_request = 1;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableWatchRequest|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableWatchRequest') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchRequest|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchRequest\n   */\n  getMutableWatchRequest(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$punctual$proto$MutableWatchRequest, 1, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyWatchRequest|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableChooseServerRequest} returns this\n   */\n  setWatchRequest(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$punctual$proto$MutableWatchRequest, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableChooseServerRequest} returns this\n   */\n  clearWatchRequest() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasWatchRequest() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$punctual$proto$MutableWatchRequest, 1);\n  }\n\n\n  /**\n   * optional WatchRequest watch_request = 1;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyWatchRequest|undefined}\n   */\n  getWatchRequestOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableWatchRequest, 1);\n  }\n\n\n  /**\n   * optional int32 consecutive_throttled_connections = 4;\n   * @override\n   * @return {number}\n   */\n  getConsecutiveThrottledConnections() {\n    return jspb_internal_adapters.getInt32FieldWithDefault(this, 4);\n  }\n\n\n  /**\n   * @param {number|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableChooseServerRequest} returns this\n   */\n  setConsecutiveThrottledConnections(value) {\n    return jspb_internal_adapters.setInt32Field(this, 4, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableChooseServerRequest} returns this\n   */\n  clearConsecutiveThrottledConnections() {\n    return jspb_internal_adapters.clearField(this, 4);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasConsecutiveThrottledConnections() {\n    return jspb_internal_adapters.hasInt32Field(this, 4);\n  }\n\n\n  /**\n   * optional int32 consecutive_throttled_connections = 4;\n   * @override\n   * @return {number|undefined}\n   */\n  getConsecutiveThrottledConnectionsOrUndefined() {\n    return jspb_internal_adapters.getInt32FieldOrUndefined(this, 4);\n  }\n\n\n  /**\n   * optional double estimated_rtt_seconds = 2;\n   * @override\n   * @return {number}\n   */\n  getEstimatedRttSeconds() {\n    return jspb_internal_adapters.getFloatingPointFieldWithDefault(this, 2);\n  }\n\n\n  /**\n   * @param {number|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableChooseServerRequest} returns this\n   */\n  setEstimatedRttSeconds(value) {\n    return jspb_internal_adapters.setFloatingPointField(this, 2, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableChooseServerRequest} returns this\n   */\n  clearEstimatedRttSeconds() {\n    return jspb_internal_adapters.clearField(this, 2);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasEstimatedRttSeconds() {\n    return jspb_internal_adapters.hasFloatingPointField(this, 2);\n  }\n\n\n  /**\n   * optional double estimated_rtt_seconds = 2;\n   * @override\n   * @return {number|undefined}\n   */\n  getEstimatedRttSecondsOrUndefined() {\n    return jspb_internal_adapters.getFloatingPointFieldOrUndefined(this, 2);\n  }\n\n\n  /**\n   * optional int64 estimated_server_clock_micros = 3;\n   * @override\n   * @return {!gbigint}\n   */\n  getEstimatedServerClockMicros() {\n    return jspb_internal_adapters.getInt64GbigintFieldWithDefault(this, 3);\n  }\n\n\n  /**\n   * optional int64 estimated_server_clock_micros = 3;\n   * @override\n   * @return {number}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getEstimatedServerClockMicros_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64FieldWithDefault(this, 3);\n  }\n\n\n  /**\n   * optional int64 estimated_server_clock_micros = 3;\n   * @override\n   * @return {string}\n   */\n  getEstimatedServerClockMicros_asString() {\n    return jspb_internal_adapters.getInt64FieldWithDefault_asString(this, 3);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableChooseServerRequest} returns this\n   */\n  setEstimatedServerClockMicros(value) {\n    return jspb_internal_adapters.setInt64Field(this, 3, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableChooseServerRequest} returns this\n   */\n  clearEstimatedServerClockMicros() {\n    return jspb_internal_adapters.clearField(this, 3);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasEstimatedServerClockMicros() {\n    return jspb_internal_adapters.hasInt64Field(this, 3);\n  }\n\n\n  /**\n   * optional int64 estimated_server_clock_micros = 3;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getEstimatedServerClockMicrosOrUndefined() {\n    return jspb_internal_adapters.getInt64GbigintFieldOrUndefined(this, 3);\n  }\n\n\n  /**\n   * optional int64 estimated_server_clock_micros = 3;\n   * @override\n   * @return {number|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getEstimatedServerClockMicrosOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64FieldOrUndefined(this, 3);\n  }\n\n\n  /**\n   * optional int64 estimated_server_clock_micros = 3;\n   * @override\n   * @return {string|undefined}\n   */\n  getEstimatedServerClockMicrosOrUndefined_asString() {\n    return jspb_internal_adapters.getInt64FieldOrUndefined_asString(this, 3);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableChooseServerRequest}\n */\njspb$punctual$proto$MutableChooseServerRequest.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableChooseServerRequest}\n */\njspb$punctual$proto$MutableChooseServerRequest.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableChooseServerRequest}\n */\njspb$punctual$proto$MutableChooseServerRequest.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableChooseServerRequest));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableChooseServerRequest.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableChooseServerRequest>}\n */\njspb$punctual$proto$MutableChooseServerRequest.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableChooseServerRequest));\n\n/**\n * Object form of ChooseServerRequest as accepted by the `fromObject` method.\n * @typedef {{\n *  watchRequest: (?jspb$punctual$proto$MutableWatchRequest.ObjectFormat|undefined),\n *  consecutiveThrottledConnections: (?number|undefined),\n *  estimatedRttSeconds: (?number|undefined),\n *  estimatedServerClockMicros: (?number|undefined)\n * }}\n */\njspb$punctual$proto$MutableChooseServerRequest.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableChooseServerRequest.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableChooseServerRequest.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableChooseServerRequest.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableChooseServerRequest.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableChooseServerRequest.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.ChooseServerRequest\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableChooseServerRequest|!jspb$punctual$proto$MutableChooseServerRequest}\n */\njspb$ro.punctual$proto$ReadonlyChooseServerRequest = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableChooseServerRequest.displayName = 'proto.punctual.proto.ChooseServerRequest';\n}\n/**\n * Interface form of ChooseServerRequest as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  watchRequest: (!jspb$ro.punctual$proto$ReadonlyWatchRequest|undefined),\n *  consecutiveThrottledConnections: (number|undefined),\n *  estimatedRttSeconds: (number|undefined),\n *  estimatedServerClockMicros: (!gbigint|undefined),\n *  estimatedServerClockMicros_asLegacyNumberOrString: (number|string|undefined)\n * }}\n */\njspb$punctual$proto$MutableChooseServerRequest.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableChooseServerRequest.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableChooseServerRequest}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableChooseServerRequest, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableChooseServerRequest.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableChooseServerRequest\n */\njspb$punctual$proto$MutableChooseServerRequest.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableChooseServerRequest));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$ReadonlyChooseServerRequest} value\n * @return {!jspb$punctual$proto$MutableChooseServerRequest.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$ReadonlyChooseServerRequest): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableChooseServerRequest, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableChooseServerRequest.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MutableChooseServerRequest.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableChooseServerResponse');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyChooseServerResponse');\n\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$e.punctual$proto$Affinitization');\ngoog.requireType('jspb$punctual$proto$ImmutableChooseServerResponse');\ngoog.requireType('jspb$r$punctual$proto$ChooseServerResponse$internalDoNotUseReader');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableChooseServerResponse>}\n * @implements {jspb$r$punctual$proto$ChooseServerResponse$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableChooseServerResponse = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional string gsessionid = 1;\n   * @override\n   * @return {string}\n   */\n  getGsessionid() {\n    return jspb_internal_adapters.getStringFieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * @param {string|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableChooseServerResponse} returns this\n   */\n  setGsessionid(value) {\n    return jspb_internal_adapters.setStringField(this, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableChooseServerResponse} returns this\n   */\n  clearGsessionid() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasGsessionid() {\n    return jspb_internal_adapters.hasStringField(this, 1);\n  }\n\n\n  /**\n   * optional string gsessionid = 1;\n   * @override\n   * @return {string|undefined}\n   */\n  getGsessionidOrUndefined() {\n    return jspb_internal_adapters.getStringFieldOrUndefined(this, 1);\n  }\n\n\n  /**\n   * optional Affinitization affinitization = 2;\n   * @override\n   * @return {!jspb$e.punctual$proto$Affinitization}\n   */\n  getAffinitization() {\n    return /** @type {!jspb$e.punctual$proto$Affinitization} */ (jspb_internal_adapters.getEnumFieldWithDefault(this, 2));\n  }\n\n\n  /**\n   * @param {!jspb$e.punctual$proto$Affinitization|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableChooseServerResponse} returns this\n   */\n  setAffinitization(value) {\n    return jspb_internal_adapters.setEnumField(this, 2, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableChooseServerResponse} returns this\n   */\n  clearAffinitization() {\n    return jspb_internal_adapters.clearField(this, 2);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasAffinitization() {\n    return jspb_internal_adapters.hasEnumField(this, 2);\n  }\n\n\n  /**\n   * optional Affinitization affinitization = 2;\n   * @override\n   * @return {!jspb$e.punctual$proto$Affinitization|undefined}\n   */\n  getAffinitizationOrUndefined() {\n    return /** @type {!jspb$e.punctual$proto$Affinitization|undefined} */ (jspb_internal_adapters.getEnumFieldOrUndefined(this, 2));\n  }\n\n\n  /**\n   * optional int32 initial_connection_delay_millis = 3;\n   * @override\n   * @return {number}\n   */\n  getInitialConnectionDelayMillis() {\n    return jspb_internal_adapters.getInt32FieldWithDefault(this, 3);\n  }\n\n\n  /**\n   * @param {number|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableChooseServerResponse} returns this\n   */\n  setInitialConnectionDelayMillis(value) {\n    return jspb_internal_adapters.setInt32Field(this, 3, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableChooseServerResponse} returns this\n   */\n  clearInitialConnectionDelayMillis() {\n    return jspb_internal_adapters.clearField(this, 3);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasInitialConnectionDelayMillis() {\n    return jspb_internal_adapters.hasInt32Field(this, 3);\n  }\n\n\n  /**\n   * optional int32 initial_connection_delay_millis = 3;\n   * @override\n   * @return {number|undefined}\n   */\n  getInitialConnectionDelayMillisOrUndefined() {\n    return jspb_internal_adapters.getInt32FieldOrUndefined(this, 3);\n  }\n\n\n  /**\n   * optional int64 start_time_micros = 4;\n   * @override\n   * @return {!gbigint}\n   */\n  getStartTimeMicros() {\n    return jspb_internal_adapters.getInt64GbigintFieldWithDefault(this, 4);\n  }\n\n\n  /**\n   * optional int64 start_time_micros = 4;\n   * @override\n   * @return {number}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getStartTimeMicros_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64FieldWithDefault(this, 4);\n  }\n\n\n  /**\n   * optional int64 start_time_micros = 4;\n   * @override\n   * @return {string}\n   */\n  getStartTimeMicros_asString() {\n    return jspb_internal_adapters.getInt64FieldWithDefault_asString(this, 4);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableChooseServerResponse} returns this\n   */\n  setStartTimeMicros(value) {\n    return jspb_internal_adapters.setInt64Field(this, 4, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableChooseServerResponse} returns this\n   */\n  clearStartTimeMicros() {\n    return jspb_internal_adapters.clearField(this, 4);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasStartTimeMicros() {\n    return jspb_internal_adapters.hasInt64Field(this, 4);\n  }\n\n\n  /**\n   * optional int64 start_time_micros = 4;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getStartTimeMicrosOrUndefined() {\n    return jspb_internal_adapters.getInt64GbigintFieldOrUndefined(this, 4);\n  }\n\n\n  /**\n   * optional int64 start_time_micros = 4;\n   * @override\n   * @return {number|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getStartTimeMicrosOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64FieldOrUndefined(this, 4);\n  }\n\n\n  /**\n   * optional int64 start_time_micros = 4;\n   * @override\n   * @return {string|undefined}\n   */\n  getStartTimeMicrosOrUndefined_asString() {\n    return jspb_internal_adapters.getInt64FieldOrUndefined_asString(this, 4);\n  }\n\n\n  /**\n   * optional int64 finish_time_micros = 5;\n   * @override\n   * @return {!gbigint}\n   */\n  getFinishTimeMicros() {\n    return jspb_internal_adapters.getInt64GbigintFieldWithDefault(this, 5);\n  }\n\n\n  /**\n   * optional int64 finish_time_micros = 5;\n   * @override\n   * @return {number}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getFinishTimeMicros_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64FieldWithDefault(this, 5);\n  }\n\n\n  /**\n   * optional int64 finish_time_micros = 5;\n   * @override\n   * @return {string}\n   */\n  getFinishTimeMicros_asString() {\n    return jspb_internal_adapters.getInt64FieldWithDefault_asString(this, 5);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableChooseServerResponse} returns this\n   */\n  setFinishTimeMicros(value) {\n    return jspb_internal_adapters.setInt64Field(this, 5, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableChooseServerResponse} returns this\n   */\n  clearFinishTimeMicros() {\n    return jspb_internal_adapters.clearField(this, 5);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasFinishTimeMicros() {\n    return jspb_internal_adapters.hasInt64Field(this, 5);\n  }\n\n\n  /**\n   * optional int64 finish_time_micros = 5;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getFinishTimeMicrosOrUndefined() {\n    return jspb_internal_adapters.getInt64GbigintFieldOrUndefined(this, 5);\n  }\n\n\n  /**\n   * optional int64 finish_time_micros = 5;\n   * @override\n   * @return {number|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getFinishTimeMicrosOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64FieldOrUndefined(this, 5);\n  }\n\n\n  /**\n   * optional int64 finish_time_micros = 5;\n   * @override\n   * @return {string|undefined}\n   */\n  getFinishTimeMicrosOrUndefined_asString() {\n    return jspb_internal_adapters.getInt64FieldOrUndefined_asString(this, 5);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableChooseServerResponse}\n */\njspb$punctual$proto$MutableChooseServerResponse.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableChooseServerResponse}\n */\njspb$punctual$proto$MutableChooseServerResponse.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableChooseServerResponse}\n */\njspb$punctual$proto$MutableChooseServerResponse.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableChooseServerResponse));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableChooseServerResponse.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableChooseServerResponse>}\n */\njspb$punctual$proto$MutableChooseServerResponse.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableChooseServerResponse));\n\n/**\n * Object form of ChooseServerResponse as accepted by the `fromObject` method.\n * @typedef {{\n *  gsessionid: (?string|undefined),\n *  affinitization: (?number|undefined),\n *  initialConnectionDelayMillis: (?number|undefined),\n *  startTimeMicros: (?number|undefined),\n *  finishTimeMicros: (?number|undefined)\n * }}\n */\njspb$punctual$proto$MutableChooseServerResponse.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableChooseServerResponse.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableChooseServerResponse.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableChooseServerResponse.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableChooseServerResponse.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableChooseServerResponse.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.ChooseServerResponse\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableChooseServerResponse|!jspb$punctual$proto$MutableChooseServerResponse}\n */\njspb$ro.punctual$proto$ReadonlyChooseServerResponse = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableChooseServerResponse.displayName = 'proto.punctual.proto.ChooseServerResponse';\n}\n/**\n * Interface form of ChooseServerResponse as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  gsessionid: (string|undefined),\n *  affinitization: (!jspb$e.punctual$proto$Affinitization|undefined),\n *  initialConnectionDelayMillis: (number|undefined),\n *  startTimeMicros: (!gbigint|undefined),\n *  startTimeMicros_asLegacyNumberOrString: (number|string|undefined),\n *  finishTimeMicros: (!gbigint|undefined),\n *  finishTimeMicros_asLegacyNumberOrString: (number|string|undefined)\n * }}\n */\njspb$punctual$proto$MutableChooseServerResponse.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableChooseServerResponse.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableChooseServerResponse}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableChooseServerResponse, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableChooseServerResponse.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableChooseServerResponse\n */\njspb$punctual$proto$MutableChooseServerResponse.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableChooseServerResponse));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$ReadonlyChooseServerResponse} value\n * @return {!jspb$punctual$proto$MutableChooseServerResponse.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$ReadonlyChooseServerResponse): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableChooseServerResponse, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableChooseServerResponse.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MutableChooseServerResponse.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MultiWatchRequest$MutableClose');\ngoog.provide('jspb$ro.punctual$proto$MultiWatchRequest$ReadonlyClose');\n\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$MultiWatchRequest$ImmutableClose');\ngoog.requireType('jspb$r$punctual$proto$MultiWatchRequest$Close$internalDoNotUseReader');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$MultiWatchRequest$ImmutableClose>}\n * @implements {jspb$r$punctual$proto$MultiWatchRequest$Close$internalDoNotUseReader}\n */\njspb$punctual$proto$MultiWatchRequest$MutableClose = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$MultiWatchRequest$ImmutableClose}\n */\njspb$punctual$proto$MultiWatchRequest$MutableClose.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MultiWatchRequest$MutableClose}\n */\njspb$punctual$proto$MultiWatchRequest$MutableClose.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MultiWatchRequest$MutableClose}\n */\njspb$punctual$proto$MultiWatchRequest$MutableClose.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MultiWatchRequest$MutableClose));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MultiWatchRequest$MutableClose.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MultiWatchRequest$MutableClose>}\n */\njspb$punctual$proto$MultiWatchRequest$MutableClose.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MultiWatchRequest$MutableClose));\n\n/**\n * Object form of Close as accepted by the `fromObject` method.\n * @typedef {!jspb_internal_public_for_gencode.EmptyRecord}\n */\njspb$punctual$proto$MultiWatchRequest$MutableClose.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MultiWatchRequest$MutableClose.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MultiWatchRequest$MutableClose.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MultiWatchRequest$MutableClose.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MultiWatchRequest$MutableClose.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MultiWatchRequest$MutableClose.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.MultiWatchRequest.Close\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$MultiWatchRequest$ImmutableClose|!jspb$punctual$proto$MultiWatchRequest$MutableClose}\n */\njspb$ro.punctual$proto$MultiWatchRequest$ReadonlyClose = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MultiWatchRequest$MutableClose.displayName = 'proto.punctual.proto.MultiWatchRequest.Close';\n}\n/**\n * Interface form of Close as accepted by `fromFields` and produced by `getFields`.\n * @typedef {!jspb_internal_public_for_gencode.EmptyRecord}\n */\njspb$punctual$proto$MultiWatchRequest$MutableClose.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MultiWatchRequest$MutableClose.FieldsInterface} record\n * @return {!jspb$punctual$proto$MultiWatchRequest$ImmutableClose}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchRequest$MutableClose, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchRequest$MutableClose.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchRequest$ImmutableClose\n */\njspb$punctual$proto$MultiWatchRequest$MutableClose.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MultiWatchRequest$MutableClose));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$MultiWatchRequest$ReadonlyClose} value\n * @return {!jspb$punctual$proto$MultiWatchRequest$MutableClose.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$MultiWatchRequest$ReadonlyClose): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchRequest$MutableClose, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchRequest$MutableClose.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MultiWatchRequest$MutableClose.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableMultiWatchRequestBatch');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyMultiWatchRequestBatch');\n\ngoog.require('jspb$punctual$proto$MutableMultiWatchRequest');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$ImmutableMultiWatchRequestBatch');\ngoog.requireType('jspb$r$punctual$proto$MultiWatchRequestBatch$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyMultiWatchRequest');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableMultiWatchRequestBatch>}\n * @implements {jspb$r$punctual$proto$MultiWatchRequestBatch$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableMultiWatchRequestBatch = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * repeated MultiWatchRequest requests = 1;\n   * @param {!jspb_internal_public_for_gencode.DoNotFreezeToken=} freezeOptOut\n   * @tsType (freezeOptOut: import('google3/javascript/apps/jspb/internal_public').DoNotFreezeToken): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchRequest[]\n   * @tsType (): readonly \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchRequest[]\n   * @override\n   * @return {!ReadonlyArray<!jspb$punctual$proto$MutableMultiWatchRequest>}\n   */\n  getRequestsList(freezeOptOut) {\n    return jspb_internal_adapters.getRepeatedWrapperField(this, jspb$punctual$proto$MutableMultiWatchRequest, 1, jspb_internal_adapters.getRepeatedFieldReturnType(freezeOptOut));\n  }\n\n\n  /**\n   * repeated MultiWatchRequest requests = 1;\n   * @override\n   * @return {!ReadonlyArray<!jspb$ro.punctual$proto$ReadonlyMultiWatchRequest>}\n   */\n  getReadonlyRequestsList() {\n    return jspb_internal_adapters.getReadonlyRepeatedWrapperField(this, jspb$punctual$proto$MutableMultiWatchRequest, 1);\n  }\n\n\n  /**\n   * @param {!ReadonlyArray<!jspb$ro.punctual$proto$ReadonlyMultiWatchRequest>|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequestBatch} returns this\n   */\n  setRequestsList(value) {\n    return jspb_internal_adapters.setRepeatedWrapperField(this, jspb$punctual$proto$MutableMultiWatchRequest, 1, value);\n  }\n\n\n  /**\n   * Gets mutable repeated field reference.\n   * @param {number} index\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequest}\n   */\n  getMutableRequests(index) {\n    return jspb_internal_adapters.getRepeatedIndexedMutableWrapper(this, 1, jspb$punctual$proto$MutableMultiWatchRequest, index);\n  }\n\n\n  /**\n   * Gets readonly repeated field reference.\n   * @override\n   * @param {number} index\n   * @return {!jspb$ro.punctual$proto$ReadonlyMultiWatchRequest}\n   */\n  getReadonlyRequests(index) {\n    return jspb_internal_adapters.getRepeatedIndexedReadonlyWrapper(this, 1, jspb$punctual$proto$MutableMultiWatchRequest, index);\n  }\n\n\n  /**\n   * Adds repeated field and returns `this`.\n   * @param {!jspb$ro.punctual$proto$ReadonlyMultiWatchRequest} value\n   * @param {number=} index\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequestBatch} returns this\n   */\n  addRequests(value, index) {\n    return jspb_internal_adapters.addToRepeatedWrapperField(this, 1, jspb$punctual$proto$MutableMultiWatchRequest, value, index);\n  }\n\n\n  /**\n   * Adds repeated field and returns newly added submessage.\n   * @param {!jspb$punctual$proto$MutableMultiWatchRequest=} value\n   * @param {number=} index\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequest} the value that was added\n   */\n  addAndReturnRequests(value, index) {\n    return jspb_internal_adapters.addAndReturnRepeatedWrapperField(this, 1, jspb$punctual$proto$MutableMultiWatchRequest, value, index);\n  }\n\n\n  /**\n   * Adds multiple values to a repeated field and returns `this`.\n   * @param {!Iterable<!jspb$ro.punctual$proto$ReadonlyMultiWatchRequest>} values\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequestBatch} returns this\n   */\n  addAllRequests(values) {\n    return jspb_internal_adapters.addAllToRepeatedWrapperField(this, 1, jspb$punctual$proto$MutableMultiWatchRequest, values);\n  }\n\n\n  /**\n   * Sets repeated field value at `index` and returns `this`.\n   * @param {number} index\n   * @param {!jspb$ro.punctual$proto$ReadonlyMultiWatchRequest} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequestBatch} returns this\n   */\n  setRequests(index, value) {\n    return jspb_internal_adapters.setRepeatedIndexedWrapper(this, 1, jspb$punctual$proto$MutableMultiWatchRequest, index, value);\n  }\n\n\n  /**\n   * Removes a value from a repeated field and returns `this`.\n   * @param {number=} index defaults to the end\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequestBatch} returns this\n   */\n  removeRequests(index) {\n    return jspb_internal_adapters.removeFromRepeatedWrapperField(this, 1, jspb$punctual$proto$MutableMultiWatchRequest, index);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableMultiWatchRequestBatch} returns this\n   */\n  clearRequestsList() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns the size of this field.\n   * @override\n   * @return {number}\n   */\n  getRequestsCount() {\n    return jspb_internal_adapters.getRepeatedWrapperCount(this, jspb$punctual$proto$MutableMultiWatchRequest, 1);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableMultiWatchRequestBatch}\n */\njspb$punctual$proto$MutableMultiWatchRequestBatch.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableMultiWatchRequestBatch}\n */\njspb$punctual$proto$MutableMultiWatchRequestBatch.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableMultiWatchRequestBatch}\n */\njspb$punctual$proto$MutableMultiWatchRequestBatch.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableMultiWatchRequestBatch));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableMultiWatchRequestBatch.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableMultiWatchRequestBatch>}\n */\njspb$punctual$proto$MutableMultiWatchRequestBatch.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableMultiWatchRequestBatch));\n\n/**\n * Object form of MultiWatchRequestBatch as accepted by the `fromObject` method.\n * @typedef {{\n *  requestsList: (?Array<!jspb$punctual$proto$MutableMultiWatchRequest.ObjectFormat>|undefined)\n * }}\n */\njspb$punctual$proto$MutableMultiWatchRequestBatch.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableMultiWatchRequestBatch.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableMultiWatchRequestBatch.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableMultiWatchRequestBatch.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableMultiWatchRequestBatch.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableMultiWatchRequestBatch.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.MultiWatchRequestBatch\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableMultiWatchRequestBatch|!jspb$punctual$proto$MutableMultiWatchRequestBatch}\n */\njspb$ro.punctual$proto$ReadonlyMultiWatchRequestBatch = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableMultiWatchRequestBatch.displayName = 'proto.punctual.proto.MultiWatchRequestBatch';\n}\n/**\n * Interface form of MultiWatchRequestBatch as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  requestsList: (!ReadonlyArray<!jspb$ro.punctual$proto$ReadonlyMultiWatchRequest>|undefined)\n * }}\n */\njspb$punctual$proto$MutableMultiWatchRequestBatch.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableMultiWatchRequestBatch.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableMultiWatchRequestBatch}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchRequestBatch, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchRequestBatch.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableMultiWatchRequestBatch\n */\njspb$punctual$proto$MutableMultiWatchRequestBatch.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableMultiWatchRequestBatch));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$ReadonlyMultiWatchRequestBatch} value\n * @return {!jspb$punctual$proto$MutableMultiWatchRequestBatch.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$ReadonlyMultiWatchRequestBatch): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchRequestBatch, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchRequestBatch.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MutableMultiWatchRequestBatch.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: util/task/status.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$ro.util$ReadonlyStatusProto');\ngoog.provide('jspb$util$MutableStatusProto');\n\ngoog.require('jspb$proto2$bridge$MutableMessageSet');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$r$util$StatusProto$internalDoNotUseReader');\ngoog.requireType('jspb$ro.proto2$bridge$ReadonlyMessageSet');\ngoog.requireType('jspb$util$ImmutableStatusProto');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$util$ImmutableStatusProto>}\n * @implements {jspb$r$util$StatusProto$internalDoNotUseReader}\n */\njspb$util$MutableStatusProto = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional int32 code = 1;\n   * @override\n   * @return {number}\n   */\n  getCode() {\n    return jspb_internal_adapters.getInt32FieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * @param {number|null|undefined} value\n   * @return {!jspb$util$MutableStatusProto} returns this\n   */\n  setCode(value) {\n    return jspb_internal_adapters.setInt32Field(this, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$util$MutableStatusProto} returns this\n   */\n  clearCode() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasCode() {\n    return jspb_internal_adapters.hasInt32Field(this, 1);\n  }\n\n\n  /**\n   * optional int32 code = 1;\n   * @override\n   * @return {number|undefined}\n   */\n  getCodeOrUndefined() {\n    return jspb_internal_adapters.getInt32FieldOrUndefined(this, 1);\n  }\n\n\n  /**\n   * optional string space = 2;\n   * @override\n   * @return {string}\n   */\n  getSpace() {\n    return jspb_internal_adapters.getStringFieldWithDefault(this, 2);\n  }\n\n\n  /**\n   * @param {string|null|undefined} value\n   * @return {!jspb$util$MutableStatusProto} returns this\n   */\n  setSpace(value) {\n    return jspb_internal_adapters.setStringField(this, 2, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$util$MutableStatusProto} returns this\n   */\n  clearSpace() {\n    return jspb_internal_adapters.clearField(this, 2);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasSpace() {\n    return jspb_internal_adapters.hasStringField(this, 2);\n  }\n\n\n  /**\n   * optional string space = 2;\n   * @override\n   * @return {string|undefined}\n   */\n  getSpaceOrUndefined() {\n    return jspb_internal_adapters.getStringFieldOrUndefined(this, 2);\n  }\n\n\n  /**\n   * optional string message = 3;\n   * @override\n   * @return {string}\n   */\n  getMessage() {\n    return jspb_internal_adapters.getStringFieldWithDefault(this, 3);\n  }\n\n\n  /**\n   * @param {string|null|undefined} value\n   * @return {!jspb$util$MutableStatusProto} returns this\n   */\n  setMessage(value) {\n    return jspb_internal_adapters.setStringField(this, 3, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$util$MutableStatusProto} returns this\n   */\n  clearMessage() {\n    return jspb_internal_adapters.clearField(this, 3);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasMessage() {\n    return jspb_internal_adapters.hasStringField(this, 3);\n  }\n\n\n  /**\n   * optional string message = 3;\n   * @override\n   * @return {string|undefined}\n   */\n  getMessageOrUndefined() {\n    return jspb_internal_adapters.getStringFieldOrUndefined(this, 3);\n  }\n\n\n  /**\n   * optional int32 canonical_code = 6;\n   * @override\n   * @return {number}\n   */\n  getCanonicalCode() {\n    return jspb_internal_adapters.getInt32FieldWithDefault(this, 6);\n  }\n\n\n  /**\n   * @param {number|null|undefined} value\n   * @return {!jspb$util$MutableStatusProto} returns this\n   */\n  setCanonicalCode(value) {\n    return jspb_internal_adapters.setInt32Field(this, 6, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$util$MutableStatusProto} returns this\n   */\n  clearCanonicalCode() {\n    return jspb_internal_adapters.clearField(this, 6);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasCanonicalCode() {\n    return jspb_internal_adapters.hasInt32Field(this, 6);\n  }\n\n\n  /**\n   * optional int32 canonical_code = 6;\n   * @override\n   * @return {number|undefined}\n   */\n  getCanonicalCodeOrUndefined() {\n    return jspb_internal_adapters.getInt32FieldOrUndefined(this, 6);\n  }\n\n\n  /**\n   * optional proto2.bridge.MessageSet message_set = 5;\n   * @override\n   * @return {!jspb$proto2$bridge$MutableMessageSet|undefined}\n   */\n  getMessageSet() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$proto2$bridge$MutableMessageSet, 5);\n  }\n\n\n  /**\n   * optional proto2.bridge.MessageSet message_set = 5;\n   * @override\n   * @return {!jspb$ro.proto2$bridge$ReadonlyMessageSet}\n   */\n  getReadonlyMessageSet() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$proto2$bridge$MutableMessageSet, 5);\n  }\n\n\n  /**\n   * optional proto2.bridge.MessageSet message_set = 5;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$proto2$bridge$MutableMessageSet|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$proto2$bridge$MutableMessageSet') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$proto2$bridge$MutableMessageSet|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$proto2$bridge$MutableMessageSet\n   */\n  getMutableMessageSet(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$proto2$bridge$MutableMessageSet, 5, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.proto2$bridge$ReadonlyMessageSet|null|undefined} value\n   * @return {!jspb$util$MutableStatusProto} returns this\n   */\n  setMessageSet(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$proto2$bridge$MutableMessageSet, 5, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$util$MutableStatusProto} returns this\n   */\n  clearMessageSet() {\n    return jspb_internal_adapters.clearField(this, 5);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasMessageSet() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$proto2$bridge$MutableMessageSet, 5);\n  }\n\n\n  /**\n   * optional proto2.bridge.MessageSet message_set = 5;\n   * @override\n   * @return {!jspb$ro.proto2$bridge$ReadonlyMessageSet|undefined}\n   */\n  getMessageSetOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$proto2$bridge$MutableMessageSet, 5);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$util$ImmutableStatusProto}\n */\njspb$util$MutableStatusProto.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$util$MutableStatusProto}\n */\njspb$util$MutableStatusProto.prototype.clone;\n/**\n * @const {function(string):!jspb$util$MutableStatusProto}\n */\njspb$util$MutableStatusProto.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$util$MutableStatusProto));\n\n/**\n * Returns whether the given value is an instance of jspb$util$MutableStatusProto.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$util$MutableStatusProto>}\n */\njspb$util$MutableStatusProto.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$util$MutableStatusProto));\n\n/**\n * Object form of StatusProto as accepted by the `fromObject` method.\n * @typedef {{\n *  code: (?number|undefined),\n *  space: (?string|undefined),\n *  message: (?string|undefined),\n *  canonicalCode: (?number|undefined),\n *  messageSet: (?jspb$proto2$bridge$MutableMessageSet.ObjectFormat|undefined)\n * }}\n */\njspb$util$MutableStatusProto.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$util$MutableStatusProto.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @return {!jspb$util$MutableStatusProto.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$util$MutableStatusProto.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for util$MutableStatusProto.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$util$MutableStatusProto.internalDoNotUse_debugOnlyProtoTypeName = \"util.StatusProto\";\n}\n\n/**\n * @typedef {!jspb$util$ImmutableStatusProto|!jspb$util$MutableStatusProto}\n */\njspb$ro.util$ReadonlyStatusProto = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$util$MutableStatusProto.displayName = 'proto.util.StatusProto';\n}\n/**\n * Interface form of StatusProto as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  code: (number|undefined),\n *  space: (string|undefined),\n *  message: (string|undefined),\n *  canonicalCode: (number|undefined),\n *  messageSet: (!jspb$ro.proto2$bridge$ReadonlyMessageSet|undefined)\n * }}\n */\njspb$util$MutableStatusProto.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$util$MutableStatusProto.FieldsInterface} record\n * @return {!jspb$util$ImmutableStatusProto}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$util$MutableStatusProto, \u0ca0_\u0ca0.clutz.jspb$util$MutableStatusProto.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$util$ImmutableStatusProto\n */\njspb$util$MutableStatusProto.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$util$MutableStatusProto));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.util$ReadonlyStatusProto} value\n * @return {!jspb$util$MutableStatusProto.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.util$ReadonlyStatusProto): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$util$MutableStatusProto, \u0ca0_\u0ca0.clutz.jspb$util$MutableStatusProto.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$util$MutableStatusProto.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MultiWatchResponse$MutableClose');\ngoog.provide('jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyClose');\n\ngoog.require('jspb$util$MutableStatusProto');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$MultiWatchResponse$ImmutableClose');\ngoog.requireType('jspb$r$punctual$proto$MultiWatchResponse$Close$internalDoNotUseReader');\ngoog.requireType('jspb$ro.util$ReadonlyStatusProto');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$MultiWatchResponse$ImmutableClose>}\n * @implements {jspb$r$punctual$proto$MultiWatchResponse$Close$internalDoNotUseReader}\n */\njspb$punctual$proto$MultiWatchResponse$MutableClose = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional util.StatusProto status = 1;\n   * @override\n   * @return {!jspb$util$MutableStatusProto|undefined}\n   */\n  getStatus() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$util$MutableStatusProto, 1);\n  }\n\n\n  /**\n   * optional util.StatusProto status = 1;\n   * @override\n   * @return {!jspb$ro.util$ReadonlyStatusProto}\n   */\n  getReadonlyStatus() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$util$MutableStatusProto, 1);\n  }\n\n\n  /**\n   * optional util.StatusProto status = 1;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$util$MutableStatusProto|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$util$MutableStatusProto') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$util$MutableStatusProto|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$util$MutableStatusProto\n   */\n  getMutableStatus(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$util$MutableStatusProto, 1, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.util$ReadonlyStatusProto|null|undefined} value\n   * @return {!jspb$punctual$proto$MultiWatchResponse$MutableClose} returns this\n   */\n  setStatus(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$util$MutableStatusProto, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MultiWatchResponse$MutableClose} returns this\n   */\n  clearStatus() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasStatus() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$util$MutableStatusProto, 1);\n  }\n\n\n  /**\n   * optional util.StatusProto status = 1;\n   * @override\n   * @return {!jspb$ro.util$ReadonlyStatusProto|undefined}\n   */\n  getStatusOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$util$MutableStatusProto, 1);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$MultiWatchResponse$ImmutableClose}\n */\njspb$punctual$proto$MultiWatchResponse$MutableClose.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MultiWatchResponse$MutableClose}\n */\njspb$punctual$proto$MultiWatchResponse$MutableClose.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MultiWatchResponse$MutableClose}\n */\njspb$punctual$proto$MultiWatchResponse$MutableClose.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MultiWatchResponse$MutableClose));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MultiWatchResponse$MutableClose.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MultiWatchResponse$MutableClose>}\n */\njspb$punctual$proto$MultiWatchResponse$MutableClose.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MultiWatchResponse$MutableClose));\n\n/**\n * Object form of Close as accepted by the `fromObject` method.\n * @typedef {{\n *  status: (?jspb$util$MutableStatusProto.ObjectFormat|undefined)\n * }}\n */\njspb$punctual$proto$MultiWatchResponse$MutableClose.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MultiWatchResponse$MutableClose.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MultiWatchResponse$MutableClose.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MultiWatchResponse$MutableClose.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MultiWatchResponse$MutableClose.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MultiWatchResponse$MutableClose.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.MultiWatchResponse.Close\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$MultiWatchResponse$ImmutableClose|!jspb$punctual$proto$MultiWatchResponse$MutableClose}\n */\njspb$ro.punctual$proto$MultiWatchResponse$ReadonlyClose = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MultiWatchResponse$MutableClose.displayName = 'proto.punctual.proto.MultiWatchResponse.Close';\n}\n/**\n * Interface form of Close as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  status: (!jspb$ro.util$ReadonlyStatusProto|undefined)\n * }}\n */\njspb$punctual$proto$MultiWatchResponse$MutableClose.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MultiWatchResponse$MutableClose.FieldsInterface} record\n * @return {!jspb$punctual$proto$MultiWatchResponse$ImmutableClose}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponse$MutableClose, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponse$MutableClose.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponse$ImmutableClose\n */\njspb$punctual$proto$MultiWatchResponse$MutableClose.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MultiWatchResponse$MutableClose));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyClose} value\n * @return {!jspb$punctual$proto$MultiWatchResponse$MutableClose.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyClose): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponse$MutableClose, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponse$MutableClose.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MultiWatchResponse$MutableClose.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$WatchResponse$MutableAdvance');\ngoog.provide('jspb$ro.punctual$proto$WatchResponse$ReadonlyAdvance');\n\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$WatchResponse$ImmutableAdvance');\ngoog.requireType('jspb$r$punctual$proto$WatchResponse$Advance$internalDoNotUseReader');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$WatchResponse$ImmutableAdvance>}\n * @implements {jspb$r$punctual$proto$WatchResponse$Advance$internalDoNotUseReader}\n */\njspb$punctual$proto$WatchResponse$MutableAdvance = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional int64 timestamp_micros = 1;\n   * @override\n   * @return {!gbigint}\n   */\n  getTimestampMicros() {\n    return jspb_internal_adapters.getInt64GbigintFieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * optional int64 timestamp_micros = 1;\n   * @override\n   * @return {string}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getTimestampMicros_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * optional int64 timestamp_micros = 1;\n   * @override\n   * @return {string}\n   */\n  getTimestampMicros_asString() {\n    return jspb_internal_adapters.getInt64StringFieldWithDefault_asString(this, 1);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$WatchResponse$MutableAdvance} returns this\n   */\n  setTimestampMicros(value) {\n    return jspb_internal_adapters.setInt64StringField(this, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$WatchResponse$MutableAdvance} returns this\n   */\n  clearTimestampMicros() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasTimestampMicros() {\n    return jspb_internal_adapters.hasInt64StringField(this, 1);\n  }\n\n\n  /**\n   * optional int64 timestamp_micros = 1;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getTimestampMicrosOrUndefined() {\n    return jspb_internal_adapters.getInt64GbigintFieldOrUndefined(this, 1);\n  }\n\n\n  /**\n   * optional int64 timestamp_micros = 1;\n   * @override\n   * @return {string|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getTimestampMicrosOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldOrUndefined(this, 1);\n  }\n\n\n  /**\n   * optional int64 timestamp_micros = 1;\n   * @override\n   * @return {string|undefined}\n   */\n  getTimestampMicrosOrUndefined_asString() {\n    return jspb_internal_adapters.getInt64StringFieldOrUndefined_asString(this, 1);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$WatchResponse$ImmutableAdvance}\n */\njspb$punctual$proto$WatchResponse$MutableAdvance.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$WatchResponse$MutableAdvance}\n */\njspb$punctual$proto$WatchResponse$MutableAdvance.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$WatchResponse$MutableAdvance}\n */\njspb$punctual$proto$WatchResponse$MutableAdvance.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$WatchResponse$MutableAdvance));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$WatchResponse$MutableAdvance.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$WatchResponse$MutableAdvance>}\n */\njspb$punctual$proto$WatchResponse$MutableAdvance.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$WatchResponse$MutableAdvance));\n\n/**\n * Object form of Advance as accepted by the `fromObject` method.\n * @typedef {{\n *  timestampMicros: (?string|undefined)\n * }}\n */\njspb$punctual$proto$WatchResponse$MutableAdvance.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$WatchResponse$MutableAdvance.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$WatchResponse$MutableAdvance.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$WatchResponse$MutableAdvance.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$WatchResponse$MutableAdvance.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$WatchResponse$MutableAdvance.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.WatchResponse.Advance\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$WatchResponse$ImmutableAdvance|!jspb$punctual$proto$WatchResponse$MutableAdvance}\n */\njspb$ro.punctual$proto$WatchResponse$ReadonlyAdvance = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$WatchResponse$MutableAdvance.displayName = 'proto.punctual.proto.WatchResponse.Advance';\n}\n/**\n * Interface form of Advance as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  timestampMicros: (!gbigint|undefined),\n *  timestampMicros_asString: (string|undefined)\n * }}\n */\njspb$punctual$proto$WatchResponse$MutableAdvance.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$WatchResponse$MutableAdvance.FieldsInterface} record\n * @return {!jspb$punctual$proto$WatchResponse$ImmutableAdvance}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableAdvance, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableAdvance.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$ImmutableAdvance\n */\njspb$punctual$proto$WatchResponse$MutableAdvance.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$WatchResponse$MutableAdvance));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$WatchResponse$ReadonlyAdvance} value\n * @return {!jspb$punctual$proto$WatchResponse$MutableAdvance.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$WatchResponse$ReadonlyAdvance): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableAdvance, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableAdvance.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$WatchResponse$MutableAdvance.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$WatchResponse$MutableChangeBatch');\ngoog.provide('jspb$ro.punctual$proto$WatchResponse$ReadonlyChangeBatch');\n\ngoog.require('jspb$punctual$proto$MutableObjectChange');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$WatchResponse$ImmutableChangeBatch');\ngoog.requireType('jspb$r$punctual$proto$WatchResponse$ChangeBatch$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyObjectChange');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$WatchResponse$ImmutableChangeBatch>}\n * @implements {jspb$r$punctual$proto$WatchResponse$ChangeBatch$internalDoNotUseReader}\n */\njspb$punctual$proto$WatchResponse$MutableChangeBatch = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * repeated ObjectChange changes = 1;\n   * @param {!jspb_internal_public_for_gencode.DoNotFreezeToken=} freezeOptOut\n   * @tsType (freezeOptOut: import('google3/javascript/apps/jspb/internal_public').DoNotFreezeToken): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectChange[]\n   * @tsType (): readonly \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableObjectChange[]\n   * @override\n   * @return {!ReadonlyArray<!jspb$punctual$proto$MutableObjectChange>}\n   */\n  getChangesList(freezeOptOut) {\n    return jspb_internal_adapters.getRepeatedWrapperField(this, jspb$punctual$proto$MutableObjectChange, 1, jspb_internal_adapters.getRepeatedFieldReturnType(freezeOptOut));\n  }\n\n\n  /**\n   * repeated ObjectChange changes = 1;\n   * @override\n   * @return {!ReadonlyArray<!jspb$ro.punctual$proto$ReadonlyObjectChange>}\n   */\n  getReadonlyChangesList() {\n    return jspb_internal_adapters.getReadonlyRepeatedWrapperField(this, jspb$punctual$proto$MutableObjectChange, 1);\n  }\n\n\n  /**\n   * @param {!ReadonlyArray<!jspb$ro.punctual$proto$ReadonlyObjectChange>|null|undefined} value\n   * @return {!jspb$punctual$proto$WatchResponse$MutableChangeBatch} returns this\n   */\n  setChangesList(value) {\n    return jspb_internal_adapters.setRepeatedWrapperField(this, jspb$punctual$proto$MutableObjectChange, 1, value);\n  }\n\n\n  /**\n   * Gets mutable repeated field reference.\n   * @param {number} index\n   * @return {!jspb$punctual$proto$MutableObjectChange}\n   */\n  getMutableChanges(index) {\n    return jspb_internal_adapters.getRepeatedIndexedMutableWrapper(this, 1, jspb$punctual$proto$MutableObjectChange, index);\n  }\n\n\n  /**\n   * Gets readonly repeated field reference.\n   * @override\n   * @param {number} index\n   * @return {!jspb$ro.punctual$proto$ReadonlyObjectChange}\n   */\n  getReadonlyChanges(index) {\n    return jspb_internal_adapters.getRepeatedIndexedReadonlyWrapper(this, 1, jspb$punctual$proto$MutableObjectChange, index);\n  }\n\n\n  /**\n   * Adds repeated field and returns `this`.\n   * @param {!jspb$ro.punctual$proto$ReadonlyObjectChange} value\n   * @param {number=} index\n   * @return {!jspb$punctual$proto$WatchResponse$MutableChangeBatch} returns this\n   */\n  addChanges(value, index) {\n    return jspb_internal_adapters.addToRepeatedWrapperField(this, 1, jspb$punctual$proto$MutableObjectChange, value, index);\n  }\n\n\n  /**\n   * Adds repeated field and returns newly added submessage.\n   * @param {!jspb$punctual$proto$MutableObjectChange=} value\n   * @param {number=} index\n   * @return {!jspb$punctual$proto$MutableObjectChange} the value that was added\n   */\n  addAndReturnChanges(value, index) {\n    return jspb_internal_adapters.addAndReturnRepeatedWrapperField(this, 1, jspb$punctual$proto$MutableObjectChange, value, index);\n  }\n\n\n  /**\n   * Adds multiple values to a repeated field and returns `this`.\n   * @param {!Iterable<!jspb$ro.punctual$proto$ReadonlyObjectChange>} values\n   * @return {!jspb$punctual$proto$WatchResponse$MutableChangeBatch} returns this\n   */\n  addAllChanges(values) {\n    return jspb_internal_adapters.addAllToRepeatedWrapperField(this, 1, jspb$punctual$proto$MutableObjectChange, values);\n  }\n\n\n  /**\n   * Sets repeated field value at `index` and returns `this`.\n   * @param {number} index\n   * @param {!jspb$ro.punctual$proto$ReadonlyObjectChange} value\n   * @return {!jspb$punctual$proto$WatchResponse$MutableChangeBatch} returns this\n   */\n  setChanges(index, value) {\n    return jspb_internal_adapters.setRepeatedIndexedWrapper(this, 1, jspb$punctual$proto$MutableObjectChange, index, value);\n  }\n\n\n  /**\n   * Removes a value from a repeated field and returns `this`.\n   * @param {number=} index defaults to the end\n   * @return {!jspb$punctual$proto$WatchResponse$MutableChangeBatch} returns this\n   */\n  removeChanges(index) {\n    return jspb_internal_adapters.removeFromRepeatedWrapperField(this, 1, jspb$punctual$proto$MutableObjectChange, index);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$WatchResponse$MutableChangeBatch} returns this\n   */\n  clearChangesList() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns the size of this field.\n   * @override\n   * @return {number}\n   */\n  getChangesCount() {\n    return jspb_internal_adapters.getRepeatedWrapperCount(this, jspb$punctual$proto$MutableObjectChange, 1);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$WatchResponse$ImmutableChangeBatch}\n */\njspb$punctual$proto$WatchResponse$MutableChangeBatch.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$WatchResponse$MutableChangeBatch}\n */\njspb$punctual$proto$WatchResponse$MutableChangeBatch.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$WatchResponse$MutableChangeBatch}\n */\njspb$punctual$proto$WatchResponse$MutableChangeBatch.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$WatchResponse$MutableChangeBatch));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$WatchResponse$MutableChangeBatch.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$WatchResponse$MutableChangeBatch>}\n */\njspb$punctual$proto$WatchResponse$MutableChangeBatch.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$WatchResponse$MutableChangeBatch));\n\n/**\n * Object form of ChangeBatch as accepted by the `fromObject` method.\n * @typedef {{\n *  changesList: (?Array<!jspb$punctual$proto$MutableObjectChange.ObjectFormat>|undefined)\n * }}\n */\njspb$punctual$proto$WatchResponse$MutableChangeBatch.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$WatchResponse$MutableChangeBatch.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$WatchResponse$MutableChangeBatch.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$WatchResponse$MutableChangeBatch.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$WatchResponse$MutableChangeBatch.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$WatchResponse$MutableChangeBatch.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.WatchResponse.ChangeBatch\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$WatchResponse$ImmutableChangeBatch|!jspb$punctual$proto$WatchResponse$MutableChangeBatch}\n */\njspb$ro.punctual$proto$WatchResponse$ReadonlyChangeBatch = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$WatchResponse$MutableChangeBatch.displayName = 'proto.punctual.proto.WatchResponse.ChangeBatch';\n}\n/**\n * Interface form of ChangeBatch as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  changesList: (!ReadonlyArray<!jspb$ro.punctual$proto$ReadonlyObjectChange>|undefined)\n * }}\n */\njspb$punctual$proto$WatchResponse$MutableChangeBatch.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$WatchResponse$MutableChangeBatch.FieldsInterface} record\n * @return {!jspb$punctual$proto$WatchResponse$ImmutableChangeBatch}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableChangeBatch, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableChangeBatch.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$ImmutableChangeBatch\n */\njspb$punctual$proto$WatchResponse$MutableChangeBatch.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$WatchResponse$MutableChangeBatch));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$WatchResponse$ReadonlyChangeBatch} value\n * @return {!jspb$punctual$proto$WatchResponse$MutableChangeBatch.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$WatchResponse$ReadonlyChangeBatch): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableChangeBatch, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableChangeBatch.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$WatchResponse$MutableChangeBatch.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableWatchResponse');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyWatchResponse');\n\ngoog.require('jspb$punctual$proto$WatchResponse$MutableAdvance');\ngoog.require('jspb$punctual$proto$WatchResponse$MutableChangeBatch');\ngoog.require('jspb$punctual$proto$WatchResponse$MutableResync');\ngoog.require('jspb$punctual$proto$WatchResponse$MutableStart');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$e.punctual$proto$WatchResponse$SignalCase');\ngoog.requireType('jspb$punctual$proto$ImmutableWatchResponse');\ngoog.requireType('jspb$r$punctual$proto$WatchResponse$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$WatchResponse$ReadonlyAdvance');\ngoog.requireType('jspb$ro.punctual$proto$WatchResponse$ReadonlyChangeBatch');\ngoog.requireType('jspb$ro.punctual$proto$WatchResponse$ReadonlyResync');\ngoog.requireType('jspb$ro.punctual$proto$WatchResponse$ReadonlyStart');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableWatchResponse>}\n * @implements {jspb$r$punctual$proto$WatchResponse$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableWatchResponse = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * @override\n   * @return {!jspb$e.punctual$proto$WatchResponse$SignalCase}\n   */\n  getSignalCase() {\n    return /** @type {!jspb$e.punctual$proto$WatchResponse$SignalCase} */(jspb_internal_adapters.computeOneofCase(this, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_));\n  }\n\n\n  /**\n   * @return {!jspb$punctual$proto$MutableWatchResponse}\n   */\n  clearSignal() {\n    return jspb_internal_adapters.clearAllFieldsInOneof(this, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional Start start = 1;\n   * @override\n   * @return {!jspb$punctual$proto$WatchResponse$MutableStart|undefined}\n   */\n  getStart() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$WatchResponse$MutableStart, 1, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional Start start = 1;\n   * @override\n   * @return {!jspb$ro.punctual$proto$WatchResponse$ReadonlyStart}\n   */\n  getReadonlyStart() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableStart, 1, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional Start start = 1;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$WatchResponse$MutableStart|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$WatchResponse$MutableStart') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableStart|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableStart\n   */\n  getMutableStart(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableStart, 1, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$WatchResponse$ReadonlyStart|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableWatchResponse} returns this\n   */\n  setStart(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableStart, 1, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableWatchResponse} returns this\n   */\n  clearStart() {\n    return jspb_internal_adapters.clearOneofField(this, 1, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasStart() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableStart, 1, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional Start start = 1;\n   * @override\n   * @return {!jspb$ro.punctual$proto$WatchResponse$ReadonlyStart|undefined}\n   */\n  getStartOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$WatchResponse$MutableStart, 1, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional ChangeBatch changes = 2;\n   * @override\n   * @return {!jspb$punctual$proto$WatchResponse$MutableChangeBatch|undefined}\n   */\n  getChanges() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$WatchResponse$MutableChangeBatch, 2, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional ChangeBatch changes = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$WatchResponse$ReadonlyChangeBatch}\n   */\n  getReadonlyChanges() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableChangeBatch, 2, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional ChangeBatch changes = 2;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$WatchResponse$MutableChangeBatch|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$WatchResponse$MutableChangeBatch') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableChangeBatch|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableChangeBatch\n   */\n  getMutableChanges(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableChangeBatch, 2, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$WatchResponse$ReadonlyChangeBatch|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableWatchResponse} returns this\n   */\n  setChanges(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableChangeBatch, 2, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableWatchResponse} returns this\n   */\n  clearChanges() {\n    return jspb_internal_adapters.clearOneofField(this, 2, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasChanges() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableChangeBatch, 2, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional ChangeBatch changes = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$WatchResponse$ReadonlyChangeBatch|undefined}\n   */\n  getChangesOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$WatchResponse$MutableChangeBatch, 2, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional Advance advance = 3;\n   * @override\n   * @return {!jspb$punctual$proto$WatchResponse$MutableAdvance|undefined}\n   */\n  getAdvance() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$WatchResponse$MutableAdvance, 3, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional Advance advance = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$WatchResponse$ReadonlyAdvance}\n   */\n  getReadonlyAdvance() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableAdvance, 3, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional Advance advance = 3;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$WatchResponse$MutableAdvance|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$WatchResponse$MutableAdvance') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableAdvance|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableAdvance\n   */\n  getMutableAdvance(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableAdvance, 3, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$WatchResponse$ReadonlyAdvance|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableWatchResponse} returns this\n   */\n  setAdvance(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableAdvance, 3, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableWatchResponse} returns this\n   */\n  clearAdvance() {\n    return jspb_internal_adapters.clearOneofField(this, 3, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasAdvance() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableAdvance, 3, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional Advance advance = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$WatchResponse$ReadonlyAdvance|undefined}\n   */\n  getAdvanceOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$WatchResponse$MutableAdvance, 3, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional Resync resync = 5;\n   * @override\n   * @return {!jspb$punctual$proto$WatchResponse$MutableResync|undefined}\n   */\n  getResync() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$WatchResponse$MutableResync, 5, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional Resync resync = 5;\n   * @override\n   * @return {!jspb$ro.punctual$proto$WatchResponse$ReadonlyResync}\n   */\n  getReadonlyResync() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableResync, 5, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional Resync resync = 5;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$WatchResponse$MutableResync|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$WatchResponse$MutableResync') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableResync|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$WatchResponse$MutableResync\n   */\n  getMutableResync(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableResync, 5, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$WatchResponse$ReadonlyResync|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableWatchResponse} returns this\n   */\n  setResync(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableResync, 5, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableWatchResponse} returns this\n   */\n  clearResync() {\n    return jspb_internal_adapters.clearOneofField(this, 5, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasResync() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$WatchResponse$MutableResync, 5, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n  /**\n   * optional Resync resync = 5;\n   * @override\n   * @return {!jspb$ro.punctual$proto$WatchResponse$ReadonlyResync|undefined}\n   */\n  getResyncOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$WatchResponse$MutableResync, 5, jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableWatchResponse}\n */\njspb$punctual$proto$MutableWatchResponse.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableWatchResponse}\n */\njspb$punctual$proto$MutableWatchResponse.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableWatchResponse}\n */\njspb$punctual$proto$MutableWatchResponse.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableWatchResponse));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableWatchResponse.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableWatchResponse>}\n */\njspb$punctual$proto$MutableWatchResponse.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableWatchResponse));\n\n/**\n * Object form of WatchResponse as accepted by the `fromObject` method.\n * @typedef {{\n *  start: (?jspb$punctual$proto$WatchResponse$MutableStart.ObjectFormat|undefined),\n *  changes: (?jspb$punctual$proto$WatchResponse$MutableChangeBatch.ObjectFormat|undefined),\n *  advance: (?jspb$punctual$proto$WatchResponse$MutableAdvance.ObjectFormat|undefined),\n *  resync: (?jspb$punctual$proto$WatchResponse$MutableResync.ObjectFormat|undefined)\n * }}\n */\njspb$punctual$proto$MutableWatchResponse.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableWatchResponse.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableWatchResponse.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableWatchResponse.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableWatchResponse.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableWatchResponse.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.WatchResponse\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableWatchResponse|!jspb$punctual$proto$MutableWatchResponse}\n */\njspb$ro.punctual$proto$ReadonlyWatchResponse = {};\n\n/**\n * Oneof group definition.\n * @private {!ReadonlyArray<number>}\n * @const\n * @nodts\n */\njspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_ = [1,2,3,5];\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableWatchResponse.displayName = 'proto.punctual.proto.WatchResponse';\n}\n/**\n * Interface form of WatchResponse as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  start: (!jspb$ro.punctual$proto$WatchResponse$ReadonlyStart|undefined),\n *  changes: (!jspb$ro.punctual$proto$WatchResponse$ReadonlyChangeBatch|undefined),\n *  advance: (!jspb$ro.punctual$proto$WatchResponse$ReadonlyAdvance|undefined),\n *  resync: (!jspb$ro.punctual$proto$WatchResponse$ReadonlyResync|undefined)\n * }}\n */\njspb$punctual$proto$MutableWatchResponse.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableWatchResponse.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableWatchResponse}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchResponse, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchResponse.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableWatchResponse\n */\njspb$punctual$proto$MutableWatchResponse.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableWatchResponse));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$ReadonlyWatchResponse} value\n * @return {!jspb$punctual$proto$MutableWatchResponse.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$ReadonlyWatchResponse): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchResponse, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchResponse.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MutableWatchResponse.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableMultiWatchResponse');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyMultiWatchResponse');\n\ngoog.require('jspb$punctual$proto$MultiWatchResponse$MutableClose');\ngoog.require('jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions');\ngoog.require('jspb$punctual$proto$MutableWatchResponse');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$e.punctual$proto$MultiWatchResponse$ResponseCase');\ngoog.requireType('jspb$punctual$proto$ImmutableMultiWatchResponse');\ngoog.requireType('jspb$r$punctual$proto$MultiWatchResponse$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyClose');\ngoog.requireType('jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyTooManyWatchSessions');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyWatchResponse');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableMultiWatchResponse>}\n * @implements {jspb$r$punctual$proto$MultiWatchResponse$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableMultiWatchResponse = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * @override\n   * @return {!jspb$e.punctual$proto$MultiWatchResponse$ResponseCase}\n   */\n  getResponseCase() {\n    return /** @type {!jspb$e.punctual$proto$MultiWatchResponse$ResponseCase} */(jspb_internal_adapters.computeOneofCase(this, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_));\n  }\n\n\n  /**\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponse}\n   */\n  clearResponse() {\n    return jspb_internal_adapters.clearAllFieldsInOneof(this, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * optional int64 stream_id = 1;\n   * @override\n   * @return {!gbigint}\n   */\n  getStreamId() {\n    return jspb_internal_adapters.getInt64GbigintFieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * optional int64 stream_id = 1;\n   * @override\n   * @return {string}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getStreamId_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * optional int64 stream_id = 1;\n   * @override\n   * @return {string}\n   */\n  getStreamId_asString() {\n    return jspb_internal_adapters.getInt64StringFieldWithDefault_asString(this, 1);\n  }\n\n\n  /**\n   * @param {number|string|!gbigint|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponse} returns this\n   */\n  setStreamId(value) {\n    return jspb_internal_adapters.setInt64StringField(this, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponse} returns this\n   */\n  clearStreamId() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasStreamId() {\n    return jspb_internal_adapters.hasInt64StringField(this, 1);\n  }\n\n\n  /**\n   * optional int64 stream_id = 1;\n   * @override\n   * @return {!gbigint|undefined}\n   */\n  getStreamIdOrUndefined() {\n    return jspb_internal_adapters.getInt64GbigintFieldOrUndefined(this, 1);\n  }\n\n\n  /**\n   * optional int64 stream_id = 1;\n   * @override\n   * @return {string|undefined}\n   * @deprecated unsafe int64 behavior: go/jspb-api-gotchas#int64\n   */\n  getStreamIdOrUndefined_asLegacyNumberOrString() {\n    return jspb_internal_adapters.getInt64StringFieldOrUndefined(this, 1);\n  }\n\n\n  /**\n   * optional int64 stream_id = 1;\n   * @override\n   * @return {string|undefined}\n   */\n  getStreamIdOrUndefined_asString() {\n    return jspb_internal_adapters.getInt64StringFieldOrUndefined_asString(this, 1);\n  }\n\n\n  /**\n   * optional WatchResponse watch_response = 2;\n   * @override\n   * @return {!jspb$punctual$proto$MutableWatchResponse|undefined}\n   */\n  getWatchResponse() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableWatchResponse, 2, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * optional WatchResponse watch_response = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyWatchResponse}\n   */\n  getReadonlyWatchResponse() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$MutableWatchResponse, 2, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * optional WatchResponse watch_response = 2;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableWatchResponse|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableWatchResponse') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchResponse|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableWatchResponse\n   */\n  getMutableWatchResponse(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$MutableWatchResponse, 2, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyWatchResponse|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponse} returns this\n   */\n  setWatchResponse(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$MutableWatchResponse, 2, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponse} returns this\n   */\n  clearWatchResponse() {\n    return jspb_internal_adapters.clearOneofField(this, 2, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasWatchResponse() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$MutableWatchResponse, 2, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * optional WatchResponse watch_response = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyWatchResponse|undefined}\n   */\n  getWatchResponseOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableWatchResponse, 2, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * optional Close close = 3;\n   * @override\n   * @return {!jspb$punctual$proto$MultiWatchResponse$MutableClose|undefined}\n   */\n  getClose() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MultiWatchResponse$MutableClose, 3, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * optional Close close = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyClose}\n   */\n  getReadonlyClose() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$MultiWatchResponse$MutableClose, 3, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * optional Close close = 3;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MultiWatchResponse$MutableClose|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MultiWatchResponse$MutableClose') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponse$MutableClose|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponse$MutableClose\n   */\n  getMutableClose(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$MultiWatchResponse$MutableClose, 3, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyClose|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponse} returns this\n   */\n  setClose(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$MultiWatchResponse$MutableClose, 3, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponse} returns this\n   */\n  clearClose() {\n    return jspb_internal_adapters.clearOneofField(this, 3, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasClose() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$MultiWatchResponse$MutableClose, 3, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * optional Close close = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyClose|undefined}\n   */\n  getCloseOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MultiWatchResponse$MutableClose, 3, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * optional TooManyWatchSessions too_many_watch_sessions = 4;\n   * @override\n   * @return {!jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions|undefined}\n   */\n  getTooManyWatchSessions() {\n    return jspb_internal_adapters.getOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions, 4, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * optional TooManyWatchSessions too_many_watch_sessions = 4;\n   * @override\n   * @return {!jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyTooManyWatchSessions}\n   */\n  getReadonlyTooManyWatchSessions() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperField(this, jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions, 4, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * optional TooManyWatchSessions too_many_watch_sessions = 4;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions\n   */\n  getMutableTooManyWatchSessions(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableOneofWrapperField(this, jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions, 4, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyTooManyWatchSessions|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponse} returns this\n   */\n  setTooManyWatchSessions(value) {\n    return jspb_internal_adapters.setOneofWrapperField(this, jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions, 4, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponse} returns this\n   */\n  clearTooManyWatchSessions() {\n    return jspb_internal_adapters.clearOneofField(this, 4, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasTooManyWatchSessions() {\n    return jspb_internal_adapters.hasOneofWrapperField(this, jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions, 4, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n  /**\n   * optional TooManyWatchSessions too_many_watch_sessions = 4;\n   * @override\n   * @return {!jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyTooManyWatchSessions|undefined}\n   */\n  getTooManyWatchSessionsOrUndefined() {\n    return jspb_internal_adapters.getReadonlyOneofWrapperFieldOrUndefined(this, jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions, 4, jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableMultiWatchResponse}\n */\njspb$punctual$proto$MutableMultiWatchResponse.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableMultiWatchResponse}\n */\njspb$punctual$proto$MutableMultiWatchResponse.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableMultiWatchResponse}\n */\njspb$punctual$proto$MutableMultiWatchResponse.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableMultiWatchResponse));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableMultiWatchResponse.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableMultiWatchResponse>}\n */\njspb$punctual$proto$MutableMultiWatchResponse.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableMultiWatchResponse));\n\n/**\n * Object form of MultiWatchResponse as accepted by the `fromObject` method.\n * @typedef {{\n *  streamId: (?string|undefined),\n *  watchResponse: (?jspb$punctual$proto$MutableWatchResponse.ObjectFormat|undefined),\n *  close: (?jspb$punctual$proto$MultiWatchResponse$MutableClose.ObjectFormat|undefined),\n *  tooManyWatchSessions: (?jspb$punctual$proto$MultiWatchResponse$MutableTooManyWatchSessions.ObjectFormat|undefined)\n * }}\n */\njspb$punctual$proto$MutableMultiWatchResponse.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableMultiWatchResponse.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableMultiWatchResponse.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableMultiWatchResponse.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableMultiWatchResponse.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableMultiWatchResponse.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.MultiWatchResponse\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableMultiWatchResponse|!jspb$punctual$proto$MutableMultiWatchResponse}\n */\njspb$ro.punctual$proto$ReadonlyMultiWatchResponse = {};\n\n/**\n * Oneof group definition.\n * @private {!ReadonlyArray<number>}\n * @const\n * @nodts\n */\njspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_ = [2,3,4];\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableMultiWatchResponse.displayName = 'proto.punctual.proto.MultiWatchResponse';\n}\n/**\n * Interface form of MultiWatchResponse as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  streamId: (!gbigint|undefined),\n *  streamId_asString: (string|undefined),\n *  watchResponse: (!jspb$ro.punctual$proto$ReadonlyWatchResponse|undefined),\n *  close: (!jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyClose|undefined),\n *  tooManyWatchSessions: (!jspb$ro.punctual$proto$MultiWatchResponse$ReadonlyTooManyWatchSessions|undefined)\n * }}\n */\njspb$punctual$proto$MutableMultiWatchResponse.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableMultiWatchResponse.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableMultiWatchResponse}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchResponse, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchResponse.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableMultiWatchResponse\n */\njspb$punctual$proto$MutableMultiWatchResponse.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableMultiWatchResponse));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$ReadonlyMultiWatchResponse} value\n * @return {!jspb$punctual$proto$MutableMultiWatchResponse.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$ReadonlyMultiWatchResponse): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchResponse, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchResponse.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MutableMultiWatchResponse.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableStreamStatus');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyStreamStatus');\n\ngoog.require('jspb$punctual$proto$MutableReconnectHints');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$e.punctual$proto$StreamStatus$Code');\ngoog.requireType('jspb$punctual$proto$ImmutableStreamStatus');\ngoog.requireType('jspb$r$punctual$proto$StreamStatus$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyReconnectHints');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableStreamStatus>}\n * @implements {jspb$r$punctual$proto$StreamStatus$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableStreamStatus = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional Code code = 1;\n   * @override\n   * @return {!jspb$e.punctual$proto$StreamStatus$Code}\n   */\n  getCode() {\n    return /** @type {!jspb$e.punctual$proto$StreamStatus$Code} */ (jspb_internal_adapters.getEnumFieldWithDefault(this, 1));\n  }\n\n\n  /**\n   * @param {!jspb$e.punctual$proto$StreamStatus$Code|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableStreamStatus} returns this\n   */\n  setCode(value) {\n    return jspb_internal_adapters.setEnumField(this, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableStreamStatus} returns this\n   */\n  clearCode() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasCode() {\n    return jspb_internal_adapters.hasEnumField(this, 1);\n  }\n\n\n  /**\n   * optional Code code = 1;\n   * @override\n   * @return {!jspb$e.punctual$proto$StreamStatus$Code|undefined}\n   */\n  getCodeOrUndefined() {\n    return /** @type {!jspb$e.punctual$proto$StreamStatus$Code|undefined} */ (jspb_internal_adapters.getEnumFieldOrUndefined(this, 1));\n  }\n\n\n  /**\n   * optional ReconnectHints reconnect_hints = 2;\n   * @override\n   * @return {!jspb$punctual$proto$MutableReconnectHints|undefined}\n   */\n  getReconnectHints() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableReconnectHints, 2);\n  }\n\n\n  /**\n   * optional ReconnectHints reconnect_hints = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyReconnectHints}\n   */\n  getReadonlyReconnectHints() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$punctual$proto$MutableReconnectHints, 2);\n  }\n\n\n  /**\n   * optional ReconnectHints reconnect_hints = 2;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableReconnectHints|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableReconnectHints') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableReconnectHints|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableReconnectHints\n   */\n  getMutableReconnectHints(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$punctual$proto$MutableReconnectHints, 2, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyReconnectHints|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableStreamStatus} returns this\n   */\n  setReconnectHints(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$punctual$proto$MutableReconnectHints, 2, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableStreamStatus} returns this\n   */\n  clearReconnectHints() {\n    return jspb_internal_adapters.clearField(this, 2);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasReconnectHints() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$punctual$proto$MutableReconnectHints, 2);\n  }\n\n\n  /**\n   * optional ReconnectHints reconnect_hints = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyReconnectHints|undefined}\n   */\n  getReconnectHintsOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableReconnectHints, 2);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableStreamStatus}\n */\njspb$punctual$proto$MutableStreamStatus.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableStreamStatus}\n */\njspb$punctual$proto$MutableStreamStatus.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableStreamStatus}\n */\njspb$punctual$proto$MutableStreamStatus.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableStreamStatus));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableStreamStatus.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableStreamStatus>}\n */\njspb$punctual$proto$MutableStreamStatus.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableStreamStatus));\n\n/**\n * Object form of StreamStatus as accepted by the `fromObject` method.\n * @typedef {{\n *  code: (?number|undefined),\n *  reconnectHints: (?jspb$punctual$proto$MutableReconnectHints.ObjectFormat|undefined)\n * }}\n */\njspb$punctual$proto$MutableStreamStatus.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableStreamStatus.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableStreamStatus.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableStreamStatus.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableStreamStatus.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableStreamStatus.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.StreamStatus\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableStreamStatus|!jspb$punctual$proto$MutableStreamStatus}\n */\njspb$ro.punctual$proto$ReadonlyStreamStatus = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableStreamStatus.displayName = 'proto.punctual.proto.StreamStatus';\n}\n/**\n * Interface form of StreamStatus as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  code: (!jspb$e.punctual$proto$StreamStatus$Code|undefined),\n *  reconnectHints: (!jspb$ro.punctual$proto$ReadonlyReconnectHints|undefined)\n * }}\n */\njspb$punctual$proto$MutableStreamStatus.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableStreamStatus.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableStreamStatus}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableStreamStatus, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableStreamStatus.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableStreamStatus\n */\njspb$punctual$proto$MutableStreamStatus.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableStreamStatus));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$ReadonlyStreamStatus} value\n * @return {!jspb$punctual$proto$MutableStreamStatus.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$ReadonlyStreamStatus): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableStreamStatus, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableStreamStatus.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MutableStreamStatus.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableMultiWatchResponseBatch');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyMultiWatchResponseBatch');\n\ngoog.require('jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake');\ngoog.require('jspb$punctual$proto$MutableMultiWatchResponse');\ngoog.require('jspb$punctual$proto$MutableStreamStatus');\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$ImmutableMultiWatchResponseBatch');\ngoog.requireType('jspb$r$punctual$proto$MultiWatchResponseBatch$internalDoNotUseReader');\ngoog.requireType('jspb$ro.punctual$proto$MultiWatchResponseBatch$ReadonlyHandshake');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyMultiWatchResponse');\ngoog.requireType('jspb$ro.punctual$proto$ReadonlyStreamStatus');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableMultiWatchResponseBatch>}\n * @implements {jspb$r$punctual$proto$MultiWatchResponseBatch$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableMultiWatchResponseBatch = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * repeated MultiWatchResponse responses = 1;\n   * @param {!jspb_internal_public_for_gencode.DoNotFreezeToken=} freezeOptOut\n   * @tsType (freezeOptOut: import('google3/javascript/apps/jspb/internal_public').DoNotFreezeToken): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchResponse[]\n   * @tsType (): readonly \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchResponse[]\n   * @override\n   * @return {!ReadonlyArray<!jspb$punctual$proto$MutableMultiWatchResponse>}\n   */\n  getResponsesList(freezeOptOut) {\n    return jspb_internal_adapters.getRepeatedWrapperField(this, jspb$punctual$proto$MutableMultiWatchResponse, 1, jspb_internal_adapters.getRepeatedFieldReturnType(freezeOptOut));\n  }\n\n\n  /**\n   * repeated MultiWatchResponse responses = 1;\n   * @override\n   * @return {!ReadonlyArray<!jspb$ro.punctual$proto$ReadonlyMultiWatchResponse>}\n   */\n  getReadonlyResponsesList() {\n    return jspb_internal_adapters.getReadonlyRepeatedWrapperField(this, jspb$punctual$proto$MutableMultiWatchResponse, 1);\n  }\n\n\n  /**\n   * @param {!ReadonlyArray<!jspb$ro.punctual$proto$ReadonlyMultiWatchResponse>|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch} returns this\n   */\n  setResponsesList(value) {\n    return jspb_internal_adapters.setRepeatedWrapperField(this, jspb$punctual$proto$MutableMultiWatchResponse, 1, value);\n  }\n\n\n  /**\n   * Gets mutable repeated field reference.\n   * @param {number} index\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponse}\n   */\n  getMutableResponses(index) {\n    return jspb_internal_adapters.getRepeatedIndexedMutableWrapper(this, 1, jspb$punctual$proto$MutableMultiWatchResponse, index);\n  }\n\n\n  /**\n   * Gets readonly repeated field reference.\n   * @override\n   * @param {number} index\n   * @return {!jspb$ro.punctual$proto$ReadonlyMultiWatchResponse}\n   */\n  getReadonlyResponses(index) {\n    return jspb_internal_adapters.getRepeatedIndexedReadonlyWrapper(this, 1, jspb$punctual$proto$MutableMultiWatchResponse, index);\n  }\n\n\n  /**\n   * Adds repeated field and returns `this`.\n   * @param {!jspb$ro.punctual$proto$ReadonlyMultiWatchResponse} value\n   * @param {number=} index\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch} returns this\n   */\n  addResponses(value, index) {\n    return jspb_internal_adapters.addToRepeatedWrapperField(this, 1, jspb$punctual$proto$MutableMultiWatchResponse, value, index);\n  }\n\n\n  /**\n   * Adds repeated field and returns newly added submessage.\n   * @param {!jspb$punctual$proto$MutableMultiWatchResponse=} value\n   * @param {number=} index\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponse} the value that was added\n   */\n  addAndReturnResponses(value, index) {\n    return jspb_internal_adapters.addAndReturnRepeatedWrapperField(this, 1, jspb$punctual$proto$MutableMultiWatchResponse, value, index);\n  }\n\n\n  /**\n   * Adds multiple values to a repeated field and returns `this`.\n   * @param {!Iterable<!jspb$ro.punctual$proto$ReadonlyMultiWatchResponse>} values\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch} returns this\n   */\n  addAllResponses(values) {\n    return jspb_internal_adapters.addAllToRepeatedWrapperField(this, 1, jspb$punctual$proto$MutableMultiWatchResponse, values);\n  }\n\n\n  /**\n   * Sets repeated field value at `index` and returns `this`.\n   * @param {number} index\n   * @param {!jspb$ro.punctual$proto$ReadonlyMultiWatchResponse} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch} returns this\n   */\n  setResponses(index, value) {\n    return jspb_internal_adapters.setRepeatedIndexedWrapper(this, 1, jspb$punctual$proto$MutableMultiWatchResponse, index, value);\n  }\n\n\n  /**\n   * Removes a value from a repeated field and returns `this`.\n   * @param {number=} index defaults to the end\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch} returns this\n   */\n  removeResponses(index) {\n    return jspb_internal_adapters.removeFromRepeatedWrapperField(this, 1, jspb$punctual$proto$MutableMultiWatchResponse, index);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch} returns this\n   */\n  clearResponsesList() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns the size of this field.\n   * @override\n   * @return {number}\n   */\n  getResponsesCount() {\n    return jspb_internal_adapters.getRepeatedWrapperCount(this, jspb$punctual$proto$MutableMultiWatchResponse, 1);\n  }\n\n\n  /**\n   * optional StreamStatus status = 2;\n   * @override\n   * @return {!jspb$punctual$proto$MutableStreamStatus|undefined}\n   */\n  getStatus() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableStreamStatus, 2);\n  }\n\n\n  /**\n   * optional StreamStatus status = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyStreamStatus}\n   */\n  getReadonlyStatus() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$punctual$proto$MutableStreamStatus, 2);\n  }\n\n\n  /**\n   * optional StreamStatus status = 2;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MutableStreamStatus|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MutableStreamStatus') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableStreamStatus|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableStreamStatus\n   */\n  getMutableStatus(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$punctual$proto$MutableStreamStatus, 2, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$ReadonlyStreamStatus|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch} returns this\n   */\n  setStatus(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$punctual$proto$MutableStreamStatus, 2, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch} returns this\n   */\n  clearStatus() {\n    return jspb_internal_adapters.clearField(this, 2);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasStatus() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$punctual$proto$MutableStreamStatus, 2);\n  }\n\n\n  /**\n   * optional StreamStatus status = 2;\n   * @override\n   * @return {!jspb$ro.punctual$proto$ReadonlyStreamStatus|undefined}\n   */\n  getStatusOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$punctual$proto$MutableStreamStatus, 2);\n  }\n\n\n  /**\n   * optional Handshake handshake = 3;\n   * @override\n   * @return {!jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake|undefined}\n   */\n  getHandshake() {\n    return jspb_internal_adapters.getWrapperFieldOrUndefined(this, jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake, 3);\n  }\n\n\n  /**\n   * optional Handshake handshake = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$MultiWatchResponseBatch$ReadonlyHandshake}\n   */\n  getReadonlyHandshake() {\n    return jspb_internal_adapters.getReadonlyWrapperField(this, jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake, 3);\n  }\n\n\n  /**\n   * optional Handshake handshake = 3;\n   * @param {!jspb_internal_public_for_gencode.OrUndefinedToken<U>=} legacyOrUndefined\n   * @return {!jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake|R}\n   * @template U\n   * @template R := cond(eq(U, 'undefined'), 'undefined', 'jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake') =:\n   * @tsType (legacyOrUndefined: import('google3/javascript/apps/jspb/internal_public').OrUndefinedToken<undefined>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake|undefined\n   * @tsType (): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake\n   */\n  getMutableHandshake(legacyOrUndefined) {\n    return jspb_internal_adapters.getMutableWrapperField(this, jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake, 3, legacyOrUndefined);\n  }\n\n\n  /**\n   * @param {!jspb$ro.punctual$proto$MultiWatchResponseBatch$ReadonlyHandshake|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch} returns this\n   */\n  setHandshake(value) {\n    return jspb_internal_adapters.setWrapperField(this, jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake, 3, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch} returns this\n   */\n  clearHandshake() {\n    return jspb_internal_adapters.clearField(this, 3);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasHandshake() {\n    return jspb_internal_adapters.hasWrapperField(this, jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake, 3);\n  }\n\n\n  /**\n   * optional Handshake handshake = 3;\n   * @override\n   * @return {!jspb$ro.punctual$proto$MultiWatchResponseBatch$ReadonlyHandshake|undefined}\n   */\n  getHandshakeOrUndefined() {\n    return jspb_internal_adapters.getReadonlyWrapperFieldOrUndefined(this, jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake, 3);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableMultiWatchResponseBatch}\n */\njspb$punctual$proto$MutableMultiWatchResponseBatch.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch}\n */\njspb$punctual$proto$MutableMultiWatchResponseBatch.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableMultiWatchResponseBatch}\n */\njspb$punctual$proto$MutableMultiWatchResponseBatch.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableMultiWatchResponseBatch));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableMultiWatchResponseBatch.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableMultiWatchResponseBatch>}\n */\njspb$punctual$proto$MutableMultiWatchResponseBatch.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableMultiWatchResponseBatch));\n\n/**\n * Object form of MultiWatchResponseBatch as accepted by the `fromObject` method.\n * @typedef {{\n *  responsesList: (?Array<!jspb$punctual$proto$MutableMultiWatchResponse.ObjectFormat>|undefined),\n *  status: (?jspb$punctual$proto$MutableStreamStatus.ObjectFormat|undefined),\n *  handshake: (?jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake.ObjectFormat|undefined)\n * }}\n */\njspb$punctual$proto$MutableMultiWatchResponseBatch.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableMultiWatchResponseBatch.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableMultiWatchResponseBatch.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableMultiWatchResponseBatch.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableMultiWatchResponseBatch.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.MultiWatchResponseBatch\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableMultiWatchResponseBatch|!jspb$punctual$proto$MutableMultiWatchResponseBatch}\n */\njspb$ro.punctual$proto$ReadonlyMultiWatchResponseBatch = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableMultiWatchResponseBatch.displayName = 'proto.punctual.proto.MultiWatchResponseBatch';\n}\n/**\n * Interface form of MultiWatchResponseBatch as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  responsesList: (!ReadonlyArray<!jspb$ro.punctual$proto$ReadonlyMultiWatchResponse>|undefined),\n *  status: (!jspb$ro.punctual$proto$ReadonlyStreamStatus|undefined),\n *  handshake: (!jspb$ro.punctual$proto$MultiWatchResponseBatch$ReadonlyHandshake|undefined)\n * }}\n */\njspb$punctual$proto$MutableMultiWatchResponseBatch.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableMultiWatchResponseBatch.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableMultiWatchResponseBatch}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchResponseBatch, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchResponseBatch.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableMultiWatchResponseBatch\n */\njspb$punctual$proto$MutableMultiWatchResponseBatch.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableMultiWatchResponseBatch));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$ReadonlyMultiWatchResponseBatch} value\n * @return {!jspb$punctual$proto$MutableMultiWatchResponseBatch.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$ReadonlyMultiWatchResponseBatch): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchResponseBatch, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableMultiWatchResponseBatch.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MutableMultiWatchResponseBatch.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableRefreshCredentialsRequest');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyRefreshCredentialsRequest');\n\ngoog.require('jspb_internal_adapters');\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$ImmutableRefreshCredentialsRequest');\ngoog.requireType('jspb$r$punctual$proto$RefreshCredentialsRequest$internalDoNotUseReader');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableRefreshCredentialsRequest>}\n * @implements {jspb$r$punctual$proto$RefreshCredentialsRequest$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableRefreshCredentialsRequest = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n  /**\n   * optional string channel_id = 1;\n   * @override\n   * @return {string}\n   */\n  getChannelId() {\n    return jspb_internal_adapters.getStringFieldWithDefault(this, 1);\n  }\n\n\n  /**\n   * @param {string|null|undefined} value\n   * @return {!jspb$punctual$proto$MutableRefreshCredentialsRequest} returns this\n   */\n  setChannelId(value) {\n    return jspb_internal_adapters.setStringField(this, 1, value);\n  }\n\n\n  /**\n   * Clears the field.\n   * @return {!jspb$punctual$proto$MutableRefreshCredentialsRequest} returns this\n   */\n  clearChannelId() {\n    return jspb_internal_adapters.clearField(this, 1);\n  }\n\n\n  /**\n   * Returns whether this field is set.\n   * @override\n   * @return {boolean}\n   */\n  hasChannelId() {\n    return jspb_internal_adapters.hasStringField(this, 1);\n  }\n\n\n  /**\n   * optional string channel_id = 1;\n   * @override\n   * @return {string|undefined}\n   */\n  getChannelIdOrUndefined() {\n    return jspb_internal_adapters.getStringFieldOrUndefined(this, 1);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableRefreshCredentialsRequest}\n */\njspb$punctual$proto$MutableRefreshCredentialsRequest.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableRefreshCredentialsRequest}\n */\njspb$punctual$proto$MutableRefreshCredentialsRequest.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableRefreshCredentialsRequest}\n */\njspb$punctual$proto$MutableRefreshCredentialsRequest.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableRefreshCredentialsRequest));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableRefreshCredentialsRequest.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableRefreshCredentialsRequest>}\n */\njspb$punctual$proto$MutableRefreshCredentialsRequest.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableRefreshCredentialsRequest));\n\n/**\n * Object form of RefreshCredentialsRequest as accepted by the `fromObject` method.\n * @typedef {{\n *  channelId: (?string|undefined)\n * }}\n */\njspb$punctual$proto$MutableRefreshCredentialsRequest.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableRefreshCredentialsRequest.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableRefreshCredentialsRequest.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableRefreshCredentialsRequest.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableRefreshCredentialsRequest.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableRefreshCredentialsRequest.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.RefreshCredentialsRequest\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableRefreshCredentialsRequest|!jspb$punctual$proto$MutableRefreshCredentialsRequest}\n */\njspb$ro.punctual$proto$ReadonlyRefreshCredentialsRequest = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableRefreshCredentialsRequest.displayName = 'proto.punctual.proto.RefreshCredentialsRequest';\n}\n/**\n * Interface form of RefreshCredentialsRequest as accepted by `fromFields` and produced by `getFields`.\n * @typedef {{\n *  channelId: (string|undefined)\n * }}\n */\njspb$punctual$proto$MutableRefreshCredentialsRequest.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableRefreshCredentialsRequest.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableRefreshCredentialsRequest}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableRefreshCredentialsRequest, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableRefreshCredentialsRequest.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableRefreshCredentialsRequest\n */\njspb$punctual$proto$MutableRefreshCredentialsRequest.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableRefreshCredentialsRequest));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$ReadonlyRefreshCredentialsRequest} value\n * @return {!jspb$punctual$proto$MutableRefreshCredentialsRequest.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$ReadonlyRefreshCredentialsRequest): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableRefreshCredentialsRequest, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableRefreshCredentialsRequest.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MutableRefreshCredentialsRequest.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide,missingRequire}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$punctual$proto$MutableRefreshCredentialsResponse');\ngoog.provide('jspb$ro.punctual$proto$ReadonlyRefreshCredentialsResponse');\n\ngoog.require('jspb_internal_public_for_gencode');\n/** @suppress {extraRequire} */\ngoog.requireType('google3.javascript.apps.jspb.internal_records');\ngoog.requireType('google3.javascript.common.asserts.asserts');\ngoog.requireType('jspb$punctual$proto$ImmutableRefreshCredentialsResponse');\ngoog.requireType('jspb$r$punctual$proto$RefreshCredentialsResponse$internalDoNotUseReader');\n\n/**\n * @final\n * @extends {jspb_internal_public_for_gencode.GeneratedMessage<!jspb$punctual$proto$ImmutableRefreshCredentialsResponse>}\n * @implements {jspb$r$punctual$proto$RefreshCredentialsResponse$internalDoNotUseReader}\n */\njspb$punctual$proto$MutableRefreshCredentialsResponse = class extends jspb_internal_public_for_gencode.GeneratedMessage {\n  /**\n   * @usedViaDotConstructor\n   * @param {?Array<?>=} data See go/jspb-api-gotchas#construct_from_array\n   */\n  constructor(data) {\n    super(data);\n  }\n\n\n};\n\n/**\n * @override\n * @return {!jspb$punctual$proto$ImmutableRefreshCredentialsResponse}\n */\njspb$punctual$proto$MutableRefreshCredentialsResponse.prototype.toImmutable;\n/**\n * @override\n * @return {!jspb$punctual$proto$MutableRefreshCredentialsResponse}\n */\njspb$punctual$proto$MutableRefreshCredentialsResponse.prototype.clone;\n/**\n * @const {function(string):!jspb$punctual$proto$MutableRefreshCredentialsResponse}\n */\njspb$punctual$proto$MutableRefreshCredentialsResponse.deserialize = /** @pureOrBreakMyCode */(jspb_internal_public_for_gencode.makeMutableDeserializeFunction(jspb$punctual$proto$MutableRefreshCredentialsResponse));\n\n/**\n * Returns whether the given value is an instance of jspb$punctual$proto$MutableRefreshCredentialsResponse.\n * @const {!google3.javascript.common.asserts.asserts.TypeGuard<!jspb$punctual$proto$MutableRefreshCredentialsResponse>}\n */\njspb$punctual$proto$MutableRefreshCredentialsResponse.hasInstance = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeHasMutableInstance(jspb$punctual$proto$MutableRefreshCredentialsResponse));\n\n/**\n * Object form of RefreshCredentialsResponse as accepted by the `fromObject` method.\n * @typedef {!jspb_internal_public_for_gencode.EmptyRecord}\n */\njspb$punctual$proto$MutableRefreshCredentialsResponse.ObjectFormat;\n/**\n * Serializes the message to binary data (in protobuf wire format).\n *\n * If you see this method undefined, you probably need to import\n * the message type directly.\n *\n * @return {!Uint8Array}\n * @deprecated please call the static method instead: this one is only sometimes defined.\n */\njspb$punctual$proto$MutableRefreshCredentialsResponse.prototype.serializeBinary;\n\n/**\n * Serializes the message to an unstable object format.\n *\n * @private\n * @return {!jspb$punctual$proto$MutableRefreshCredentialsResponse.ObjectFormat}\n * @deprecated see go/jspb-api-gotchas#objects. This is only sometimes defined.\n */\njspb$punctual$proto$MutableRefreshCredentialsResponse.prototype.toObject;\n\nif (jspb_internal_public_for_gencode.GENERATE_TYPE_NAME_PROPERTIES) {\n  /**\n   * The proto type name for punctual$proto$MutableRefreshCredentialsResponse.\n   *\n   * @nodts\n   * @nocollapse\n   * @const {string|undefined}\n   */\n  jspb$punctual$proto$MutableRefreshCredentialsResponse.internalDoNotUse_debugOnlyProtoTypeName = \"punctual.proto.RefreshCredentialsResponse\";\n}\n\n/**\n * @typedef {!jspb$punctual$proto$ImmutableRefreshCredentialsResponse|!jspb$punctual$proto$MutableRefreshCredentialsResponse}\n */\njspb$ro.punctual$proto$ReadonlyRefreshCredentialsResponse = {};\n\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   * @type {string}\n   */\n  jspb$punctual$proto$MutableRefreshCredentialsResponse.displayName = 'proto.punctual.proto.RefreshCredentialsResponse';\n}\n/**\n * Interface form of RefreshCredentialsResponse as accepted by `fromFields` and produced by `getFields`.\n * @typedef {!jspb_internal_public_for_gencode.EmptyRecord}\n */\njspb$punctual$proto$MutableRefreshCredentialsResponse.FieldsInterface;\n\n/**\n * Constructs a set of proto fields into an immutable proto.\n *\n * This method can only be called in TS and must be passed an object.\n * literal with keys matching the setter names (so where you have\n * setFooList on the type, you can write {fooList: ...} here).\n *\n * See go/jspb-fields-interface for more information.\n *\n * This record format is **not a serialization format**.\n * @package this cannot be called from JS.\n * @param {!jspb$punctual$proto$MutableRefreshCredentialsResponse.FieldsInterface} record\n * @return {!jspb$punctual$proto$ImmutableRefreshCredentialsResponse}\n * @tsType (fields : import('google3/javascript/apps/jspb/internal_records').PartialFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableRefreshCredentialsResponse, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableRefreshCredentialsResponse.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>): \u0ca0_\u0ca0.clutz.jspb$punctual$proto$ImmutableRefreshCredentialsResponse\n */\njspb$punctual$proto$MutableRefreshCredentialsResponse.fromFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeFromFieldsForTesting(jspb$punctual$proto$MutableRefreshCredentialsResponse));\n\n/**\n * Retrieves the fields of this proto in a destructurable interface.\n *\n * This method can only be called in TS and the result must be\n * immediately destructured (so you can write\n * const {a} = Foo.getFields(value);).\n *\n * See go/jspb-fields-interface for more information.\n *\n * @package this cannot be called from JS.\n * @param {!jspb$ro.punctual$proto$ReadonlyRefreshCredentialsResponse} value\n * @return {!jspb$punctual$proto$MutableRefreshCredentialsResponse.FieldsInterface}\n * @tsType (value: \u0ca0_\u0ca0.clutz.jspb$ro.punctual$proto$ReadonlyRefreshCredentialsResponse): import('google3/javascript/apps/jspb/internal_records').ReadonlyFields<\u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableRefreshCredentialsResponse, \u0ca0_\u0ca0.clutz.jspb$punctual$proto$MutableRefreshCredentialsResponse.FieldsInterface, \u0ca0_\u0ca0.clutz.jspbInternalDoNotUse$RecordExtensionRegistry>\n */\njspb$punctual$proto$MutableRefreshCredentialsResponse.getFields = /** @pureOrBreakMyCode */ (jspb_internal_public_for_gencode.makeGetFieldsForTesting());\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Implements the disposable interface.\n */\n\ngoog.provide('goog.Disposable');\n\ngoog.require('goog.disposable.IDisposable');\ngoog.require('goog.dispose');\n/**\n * TODO(b/175587766): Remove this require.\n * @suppress {extraRequire}\n */\ngoog.require('goog.disposeAll');\n\n/**\n * Class that provides the basic implementation for disposable objects. If your\n * class holds references or resources that can't be collected by standard GC,\n * it should extend this class or implement the disposable interface (defined\n * in goog.disposable.IDisposable). See description of\n * goog.disposable.IDisposable for examples of cleanup.\n * @constructor\n * @implements {goog.disposable.IDisposable}\n */\ngoog.Disposable = function() {\n  'use strict';\n  /**\n   * If monitoring the goog.Disposable instances is enabled, stores the creation\n   * stack trace of the Disposable instance.\n   * @type {string|undefined}\n   */\n  this.creationStack;\n\n  if (goog.Disposable.MONITORING_MODE != goog.Disposable.MonitoringMode.OFF) {\n    if (goog.Disposable.INCLUDE_STACK_ON_CREATION) {\n      this.creationStack = new Error().stack;\n    }\n    goog.Disposable.instances_[goog.getUid(this)] = this;\n  }\n  // Support sealing\n  this.disposed_ = this.disposed_;\n  this.onDisposeCallbacks_ = this.onDisposeCallbacks_;\n};\n\n\n/**\n * @enum {number} Different monitoring modes for Disposable.\n */\ngoog.Disposable.MonitoringMode = {\n  /**\n   * No monitoring.\n   */\n  OFF: 0,\n  /**\n   * Creating and disposing the goog.Disposable instances is monitored. All\n   * disposable objects need to call the `goog.Disposable` base\n   * constructor. The PERMANENT mode must be switched on before creating any\n   * goog.Disposable instances.\n   */\n  PERMANENT: 1,\n  /**\n   * INTERACTIVE mode can be switched on and off on the fly without producing\n   * errors. It also doesn't warn if the disposable objects don't call the\n   * `goog.Disposable` base constructor.\n   */\n  INTERACTIVE: 2\n};\n\n\n/**\n * @define {number} The monitoring mode of the goog.Disposable\n *     instances. Default is OFF. Switching on the monitoring is only\n *     recommended for debugging because it has a significant impact on\n *     performance and memory usage. If switched off, the monitoring code\n *     compiles down to 0 bytes.\n */\ngoog.Disposable.MONITORING_MODE =\n    goog.define('goog.Disposable.MONITORING_MODE', 0);\n\n\n/**\n * @define {boolean} Whether to attach creation stack to each created disposable\n *     instance; This is only relevant for when MonitoringMode != OFF.\n */\ngoog.Disposable.INCLUDE_STACK_ON_CREATION =\n    goog.define('goog.Disposable.INCLUDE_STACK_ON_CREATION', true);\n\n\n/**\n * Maps the unique ID of every undisposed `goog.Disposable` object to\n * the object itself.\n * @type {!Object<number, !goog.Disposable>}\n * @private\n */\ngoog.Disposable.instances_ = {};\n\n\n/**\n * @return {!Array<!goog.Disposable>} All `goog.Disposable` objects that\n *     haven't been disposed of.\n */\ngoog.Disposable.getUndisposedObjects = function() {\n  'use strict';\n  const ret = [];\n  for (const id in goog.Disposable.instances_) {\n    if (goog.Disposable.instances_.hasOwnProperty(id)) {\n      ret.push(goog.Disposable.instances_[Number(id)]);\n    }\n  }\n  return ret;\n};\n\n\n/**\n * Clears the registry of undisposed objects but doesn't dispose of them.\n */\ngoog.Disposable.clearUndisposedObjects = function() {\n  'use strict';\n  goog.Disposable.instances_ = {};\n};\n\n\n/**\n * Whether the object has been disposed of.\n * @type {boolean}\n * @private\n */\ngoog.Disposable.prototype.disposed_ = false;\n\n\n/**\n * Callbacks to invoke when this object is disposed.\n * @type {Array<!Function>}\n * @private\n */\ngoog.Disposable.prototype.onDisposeCallbacks_;\n\n\n/**\n * @return {boolean} Whether the object has been disposed of.\n * @override\n */\ngoog.Disposable.prototype.isDisposed = function() {\n  'use strict';\n  return this.disposed_;\n};\n\n\n/**\n * @return {boolean} Whether the object has been disposed of.\n * @deprecated Use {@link #isDisposed} instead.\n */\ngoog.Disposable.prototype.getDisposed = goog.Disposable.prototype.isDisposed;\n\n\n/**\n * Disposes of the object. If the object hasn't already been disposed of, calls\n * {@link #disposeInternal}. Classes that extend `goog.Disposable` should\n * override {@link #disposeInternal} in order to cleanup references, resources\n * and other disposable objects. Reentrant.\n *\n * @return {void} Nothing.\n * @override\n */\ngoog.Disposable.prototype.dispose = function() {\n  'use strict';\n  if (!this.disposed_) {\n    // Set disposed_ to true first, in case during the chain of disposal this\n    // gets disposed recursively.\n    this.disposed_ = true;\n    this.disposeInternal();\n    if (goog.Disposable.MONITORING_MODE != goog.Disposable.MonitoringMode.OFF) {\n      const uid = goog.getUid(this);\n      if (goog.Disposable.MONITORING_MODE ==\n              goog.Disposable.MonitoringMode.PERMANENT &&\n          !goog.Disposable.instances_.hasOwnProperty(uid)) {\n        throw new Error(\n            this + ' did not call the goog.Disposable base ' +\n            'constructor or was disposed of after a clearUndisposedObjects ' +\n            'call');\n      }\n      if (goog.Disposable.MONITORING_MODE !=\n              goog.Disposable.MonitoringMode.OFF &&\n          this.onDisposeCallbacks_ && this.onDisposeCallbacks_.length > 0) {\n        throw new Error(\n            this + ' did not empty its onDisposeCallbacks queue. This ' +\n            'probably means it overrode dispose() or disposeInternal() ' +\n            'without calling the superclass\\' method.');\n      }\n      delete goog.Disposable.instances_[uid];\n    }\n  }\n};\n\n/**\n * The same as calling {@link #dispose}.\n *\n * This makes a goog.Disposable object a standard disposable object, in the\n * sense of the Explicit Resource Management spec. Details at\n * {@link https://github.com/tc39/proposal-explicit-resource-management}.\n *\n * @return {void} Nothing.\n */\ngoog.Disposable.prototype[Symbol.dispose] = function() {\n  'use strict';\n  // By implementing it this way rather than assigning this.dispose to\n  // Symbol.dispose, we support cases where subclasses have overridden\n  // dispose.\n  this.dispose();\n};\n\n\n/**\n * Associates a disposable object with this object so that they will be disposed\n * together.\n * @param {goog.disposable.IDisposable} disposable that will be disposed when\n *     this object is disposed.\n */\ngoog.Disposable.prototype.registerDisposable = function(disposable) {\n  'use strict';\n  this.addOnDisposeCallback(goog.partial(goog.dispose, disposable));\n};\n\n\n/**\n * Invokes a callback function when this object is disposed. Callbacks are\n * invoked in the order in which they were added. If a callback is added to\n * an already disposed Disposable, it will be called immediately.\n * @param {function(this:T):?} callback The callback function.\n * @param {T=} opt_scope An optional scope to call the callback in.\n * @template T\n */\ngoog.Disposable.prototype.addOnDisposeCallback = function(callback, opt_scope) {\n  'use strict';\n  if (this.disposed_) {\n    opt_scope !== undefined ? callback.call(opt_scope) : callback();\n    return;\n  }\n\n  if (!this.onDisposeCallbacks_) {\n    this.onDisposeCallbacks_ = [];\n  }\n\n  if (opt_scope) {\n    callback = (goog.TRUSTED_SITE) ? callback.bind(opt_scope) :\n                                     goog.bind(callback, opt_scope);\n  }\n\n  this.onDisposeCallbacks_.push(callback);\n};\n\n\n/**\n * Performs appropriate cleanup. See description of goog.disposable.IDisposable\n * for examples. Classes that extend `goog.Disposable` should override this\n * method. Not reentrant. To avoid calling it twice, it must only be called from\n * the subclass' `disposeInternal` method. Everywhere else the public `dispose`\n * method must be used. For example:\n *\n * <pre>\n * mypackage.MyClass = function() {\n * mypackage.MyClass.base(this, 'constructor');\n *     // Constructor logic specific to MyClass.\n *     ...\n *   };\n *   goog.inherits(mypackage.MyClass, goog.Disposable);\n *\n *   mypackage.MyClass.prototype.disposeInternal = function() {\n *     // Dispose logic specific to MyClass.\n *     ...\n *     // Call superclass's disposeInternal at the end of the subclass's, like\n *     // in C++, to avoid hard-to-catch issues.\n *     mypackage.MyClass.base(this, 'disposeInternal');\n *   };\n * </pre>\n *\n * @protected\n */\ngoog.Disposable.prototype.disposeInternal = function() {\n  'use strict';\n  if (this.onDisposeCallbacks_) {\n    while (this.onDisposeCallbacks_.length) {\n      this.onDisposeCallbacks_.shift()();\n    }\n  }\n};\n\n\n/**\n * Returns True if we can verify the object is disposed.\n * Calls `isDisposed` on the argument if it supports it.  If obj\n * is not an object with an isDisposed() method, return false.\n * @param {*} obj The object to investigate.\n * @return {boolean} True if we can verify the object is disposed.\n */\ngoog.Disposable.isDisposed = function(obj) {\n  'use strict';\n  if (obj && typeof obj.isDisposed == 'function') {\n    return obj.isDisposed();\n  }\n  return false;\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview A base class for event objects.\n */\n\n\ngoog.provide('goog.events.Event');\n\n/**\n * goog.events.Event no longer depends on goog.Disposable. Keep requiring\n * goog.Disposable here to not break projects which assume this dependency.\n * @suppress {extraRequire}\n */\ngoog.require('goog.Disposable');\ngoog.require('goog.events.EventId');\n\n\n/**\n * A base class for event objects, so that they can support preventDefault and\n * stopPropagation.\n *\n * @param {string|!goog.events.EventId} type Event Type.\n * @param {Object=} opt_target Reference to the object that is the target of\n *     this event. It has to implement the `EventTarget` interface\n *     declared at {@link http://developer.mozilla.org/en/DOM/EventTarget}.\n * @constructor\n */\ngoog.events.Event = function(type, opt_target) {\n  'use strict';\n  /**\n   * Event type.\n   * @type {string}\n   */\n  this.type = type instanceof goog.events.EventId ? String(type) : type;\n\n  /**\n   * TODO(tbreisacher): The type should probably be\n   * EventTarget|goog.events.EventTarget.\n   *\n   * Target of the event.\n   * @type {Object|undefined}\n   */\n  this.target = opt_target;\n\n  /**\n   * Object that had the listener attached.\n   * @type {Object|undefined}\n   */\n  this.currentTarget = this.target;\n\n  /**\n   * Whether to cancel the event in internal capture/bubble processing for IE.\n   * @type {boolean}\n   * @private\n   */\n  this.propagationStopped_ = false;\n\n  /**\n   * Whether the default action has been prevented.\n   * This is a property to match the W3C specification at\n   * {@link http://www.w3.org/TR/DOM-Level-3-Events/\n   * #events-event-type-defaultPrevented}.\n   * Must be treated as read-only outside the class.\n   * @type {boolean}\n   */\n  this.defaultPrevented = false;\n};\n\n/**\n * @return {boolean} true iff internal propagation has been stopped.\n */\ngoog.events.Event.prototype.hasPropagationStopped = function() {\n  'use strict';\n  return this.propagationStopped_;\n};\n\n/**\n * Stops event propagation.\n * @return {void}\n */\ngoog.events.Event.prototype.stopPropagation = function() {\n  'use strict';\n  this.propagationStopped_ = true;\n};\n\n\n/**\n * Prevents the default action, for example a link redirecting to a url.\n * @return {void}\n */\ngoog.events.Event.prototype.preventDefault = function() {\n  'use strict';\n  this.defaultPrevented = true;\n};\n\n\n/**\n * Stops the propagation of the event. It is equivalent to\n * `e.stopPropagation()`, but can be used as the callback argument of\n * {@link goog.events.listen} without declaring another function.\n * @param {!goog.events.Event} e An event.\n * @return {void}\n */\ngoog.events.Event.stopPropagation = function(e) {\n  'use strict';\n  e.stopPropagation();\n};\n\n\n/**\n * Prevents the default action. It is equivalent to\n * `e.preventDefault()`, but can be used as the callback argument of\n * {@link goog.events.listen} without declaring another function.\n * @param {!goog.events.Event} e An event.\n * @return {void}\n */\ngoog.events.Event.preventDefault = function(e) {\n  'use strict';\n  e.preventDefault();\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Browser capability checks for the events package.\n */\n\ngoog.module('goog.events.BrowserFeature');\ngoog.module.declareLegacyNamespace();\n\n\n/**\n * Tricks Closure Compiler into believing that a function is pure.  The compiler\n * assumes that any `valueOf` function is pure, without analyzing its contents.\n *\n * @param {function(): T} fn\n * @return {T}\n * @template T\n */\nconst purify = (fn) => {\n  return ({valueOf: fn}).valueOf();\n};\n\n\n/**\n * Enum of browser capabilities.\n * @enum {boolean}\n */\nexports = {\n  /**\n   * Whether touch is enabled in the browser.\n   */\n  TOUCH_ENABLED:\n      !!((goog.global.navigator && goog.global.navigator.maxTouchPoints) ||\n         (goog.FEATURESET_YEAR < 2018 &&\n          ('ontouchstart' in goog.global ||\n           (goog.global.document && document.documentElement &&\n            'ontouchstart' in document.documentElement) ||\n           // IE10 uses non-standard touch events, so it has a different check.\n           (goog.global.navigator && goog.global.navigator.msMaxTouchPoints)))),\n\n  /**\n   * Whether addEventListener supports W3C standard pointer events.\n   * http://www.w3.org/TR/pointerevents/\n   */\n  POINTER_EVENTS:\n      (goog.FEATURESET_YEAR >= 2019) || ('PointerEvent' in goog.global),\n\n  /**\n   * Whether addEventListener supports {passive: true}.\n   * https://developers.google.com/web/updates/2016/06/passive-event-listeners\n   */\n  PASSIVE_EVENTS:\n      (goog.FEATURESET_YEAR > 2018) || purify(function() {\n        // If we're in a web worker or other custom environment, we can't tell.\n        if (!goog.global.addEventListener || !Object.defineProperty) {  // IE 8\n          return false;\n        }\n\n        var passive = false;\n        var options = Object.defineProperty({}, 'passive', {\n          get: function() {\n            passive = true;\n          }\n        });\n        try {\n          const nullFunction = () => {};\n          goog.global.addEventListener('test', nullFunction, options);\n          goog.global.removeEventListener('test', nullFunction, options);\n        } catch (e) {\n        }\n\n        return passive;\n      })\n};\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview A patched, standardized event object for browser events.\n *\n * <pre>\n * The patched event object contains the following members:\n * - type           {string}    Event type, e.g. 'click'\n * - target         {Object}    The element that actually triggered the event\n * - currentTarget  {Object}    The element the listener is attached to\n * - relatedTarget  {Object}    For mouseover and mouseout, the previous object\n * - offsetX        {number}    X-coordinate relative to target\n * - offsetY        {number}    Y-coordinate relative to target\n * - clientX        {number}    X-coordinate relative to viewport\n * - clientY        {number}    Y-coordinate relative to viewport\n * - screenX        {number}    X-coordinate relative to the edge of the screen\n * - screenY        {number}    Y-coordinate relative to the edge of the screen\n * - button         {number}    Mouse button. Use isButton() to test.\n * - keyCode        {number}    Key-code\n * - ctrlKey        {boolean}   Was ctrl key depressed\n * - altKey         {boolean}   Was alt key depressed\n * - shiftKey       {boolean}   Was shift key depressed\n * - metaKey        {boolean}   Was meta key depressed\n * - pointerId      {number}    Pointer ID\n * - pointerType    {string}    Pointer type, e.g. 'mouse', 'pen', or 'touch'\n * - defaultPrevented {boolean} Whether the default action has been prevented\n * - state          {Object}    History state object\n * - timeStamp      {number}    Number of milliseconds since the window's time\n *                              origin\n *\n * NOTE: The keyCode member contains the raw browser keyCode. For normalized\n * key and character code use {@link goog.events.KeyHandler}.\n * </pre>\n */\n\ngoog.provide('goog.events.BrowserEvent');\n\ngoog.require('goog.events.Event');\ngoog.require('goog.events.EventType');\ngoog.require('goog.userAgent');\n\n/**\n * Accepts a browser event object and creates a patched, cross browser event\n * object.\n * The content of this object will not be initialized if no event object is\n * provided. If this is the case, init() needs to be invoked separately.\n * @param {Event=} opt_e Browser event object.\n * @param {EventTarget=} opt_currentTarget Current target for event.\n * @constructor\n * @extends {goog.events.Event}\n */\ngoog.events.BrowserEvent = function(opt_e, opt_currentTarget) {\n  'use strict';\n  goog.events.BrowserEvent.base(this, 'constructor', opt_e ? opt_e.type : '');\n\n  /**\n   * Target that fired the event.\n   * @override\n   * @type {?Node}\n   */\n  this.target = null;\n\n  /**\n   * Node that had the listener attached.\n   * @override\n   * @type {?Node|undefined}\n   */\n  this.currentTarget = null;\n\n  /**\n   * For mouseover and mouseout events, the related object for the event.\n   * @type {?Node}\n   */\n  this.relatedTarget = null;\n\n  /**\n   * X-coordinate relative to target.\n   * @type {number}\n   */\n  this.offsetX = 0;\n\n  /**\n   * Y-coordinate relative to target.\n   * @type {number}\n   */\n  this.offsetY = 0;\n\n  /**\n   * X-coordinate relative to the window.\n   * @type {number}\n   */\n  this.clientX = 0;\n\n  /**\n   * Y-coordinate relative to the window.\n   * @type {number}\n   */\n  this.clientY = 0;\n\n  /**\n   * X-coordinate relative to the monitor.\n   * @type {number}\n   */\n  this.screenX = 0;\n\n  /**\n   * Y-coordinate relative to the monitor.\n   * @type {number}\n   */\n  this.screenY = 0;\n\n  /**\n   * Which mouse button was pressed.\n   * @type {number}\n   */\n  this.button = 0;\n\n  /**\n   * Key of key press.\n   * @type {string}\n   */\n  this.key = '';\n\n  /**\n   * Keycode of key press.\n   * @type {number}\n   */\n  this.keyCode = 0;\n\n  /**\n   * Keycode of key press.\n   * @type {number}\n   */\n  this.charCode = 0;\n\n  /**\n   * Whether control was pressed at time of event.\n   * @type {boolean}\n   */\n  this.ctrlKey = false;\n\n  /**\n   * Whether alt was pressed at time of event.\n   * @type {boolean}\n   */\n  this.altKey = false;\n\n  /**\n   * Whether shift was pressed at time of event.\n   * @type {boolean}\n   */\n  this.shiftKey = false;\n\n  /**\n   * Whether the meta key was pressed at time of event.\n   * @type {boolean}\n   */\n  this.metaKey = false;\n\n  /**\n   * History state object, only set for PopState events where it's a copy of the\n   * state object provided to pushState or replaceState.\n   * @type {?Object}\n   */\n  this.state = null;\n\n  /**\n   * Whether the default platform modifier key was pressed at time of event.\n   * (This is control for all platforms except Mac, where it's Meta.)\n   * @type {boolean}\n   */\n  this.platformModifierKey = false;\n\n  /**\n   * @type {number}\n   */\n  this.pointerId = 0;\n\n  /**\n   * @type {string}\n   */\n  this.pointerType = '';\n\n  /**\n   * @type {number}\n   */\n  this.timeStamp = 0;\n\n  /**\n   * The browser event object.\n   * @private {?Event}\n   */\n  this.event_ = null;\n\n  if (opt_e) {\n    this.init(opt_e, opt_currentTarget);\n  }\n};\ngoog.inherits(goog.events.BrowserEvent, goog.events.Event);\n\n/**\n * @define {boolean} If true, use the layerX and layerY properties of a native\n * browser event over the offsetX and offsetY properties, which cause expensive\n * reflow. If layerX or layerY is not defined, offsetX and offsetY will be used\n * as usual.\n */\ngoog.events.BrowserEvent.USE_LAYER_XY_AS_OFFSET_XY =\n    goog.define('goog.events.BrowserEvent.USE_LAYER_XY_AS_OFFSET_XY', false);\n\n\n/**\n * Normalized button constants for the mouse.\n * @enum {number}\n */\ngoog.events.BrowserEvent.MouseButton = {\n  LEFT: 0,\n  MIDDLE: 1,\n  RIGHT: 2,\n  BACK: 3,\n  FORWARD: 4,\n};\n\n\n/**\n * Normalized pointer type constants for pointer events.\n * @enum {string}\n */\ngoog.events.BrowserEvent.PointerType = {\n  MOUSE: 'mouse',\n  PEN: 'pen',\n  TOUCH: 'touch'\n};\n\n\n/**\n * Accepts a browser event object and creates a patched, cross browser event\n * object.\n * @param {Event} e Browser event object.\n * @param {EventTarget=} opt_currentTarget Current target for event.\n */\ngoog.events.BrowserEvent.prototype.init = function(e, opt_currentTarget) {\n  'use strict';\n  const type = this.type = e.type;\n\n  /**\n   * On touch devices use the first \"changed touch\" as the relevant touch.\n   * @type {?Touch}\n   * @suppress {strictMissingProperties} Added to tighten compiler checks\n   */\n  const relevantTouch =\n      e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : null;\n\n  // TODO(nicksantos): Change this.target to type EventTarget.\n  this.target = /** @type {Node} */ (e.target) || e.srcElement;\n\n  // TODO(nicksantos): Change this.currentTarget to type EventTarget.\n  this.currentTarget = /** @type {Node} */ (opt_currentTarget);\n\n  let relatedTarget = /** @type {Node} */ (e.relatedTarget);\n  if (!relatedTarget) {\n    if (type == goog.events.EventType.MOUSEOVER) {\n      relatedTarget = e.fromElement;\n    } else if (type == goog.events.EventType.MOUSEOUT) {\n      relatedTarget = e.toElement;\n    }\n  }\n\n  this.relatedTarget = relatedTarget;\n\n  if (relevantTouch) {\n    this.clientX = relevantTouch.clientX !== undefined ? relevantTouch.clientX :\n                                                         relevantTouch.pageX;\n    this.clientY = relevantTouch.clientY !== undefined ? relevantTouch.clientY :\n                                                         relevantTouch.pageY;\n    this.screenX = relevantTouch.screenX || 0;\n    this.screenY = relevantTouch.screenY || 0;\n  } else {\n    if (goog.events.BrowserEvent.USE_LAYER_XY_AS_OFFSET_XY) {\n      this.offsetX = (e.layerX !== undefined) ? e.layerX : e.offsetX;\n      this.offsetY = (e.layerY !== undefined) ? e.layerY : e.offsetY;\n    } else {\n      // Webkit emits a lame warning whenever layerX/layerY is accessed.\n      // http://code.google.com/p/chromium/issues/detail?id=101733\n      this.offsetX = (goog.userAgent.WEBKIT || e.offsetX !== undefined) ?\n          e.offsetX :\n          e.layerX;\n      this.offsetY = (goog.userAgent.WEBKIT || e.offsetY !== undefined) ?\n          e.offsetY :\n          e.layerY;\n    }\n    this.clientX = e.clientX !== undefined ? e.clientX : e.pageX;\n    this.clientY = e.clientY !== undefined ? e.clientY : e.pageY;\n    this.screenX = e.screenX || 0;\n    this.screenY = e.screenY || 0;\n  }\n\n  this.button = e.button;\n\n  this.keyCode = e.keyCode || 0;\n  /** @suppress {strictMissingProperties} Added to tighten compiler checks */\n  this.key = e.key || '';\n  this.charCode = e.charCode || (type == 'keypress' ? e.keyCode : 0);\n  this.ctrlKey = e.ctrlKey;\n  this.altKey = e.altKey;\n  this.shiftKey = e.shiftKey;\n  this.metaKey = e.metaKey;\n  this.platformModifierKey = goog.userAgent.MAC ? e.metaKey : e.ctrlKey;\n  /** @suppress {strictMissingProperties} Added to tighten compiler checks */\n  this.pointerId = e.pointerId || 0;\n  this.pointerType = goog.events.BrowserEvent.getPointerType_(e);\n  /** @suppress {strictMissingProperties} Added to tighten compiler checks */\n  this.state = e.state;\n  this.timeStamp = e.timeStamp;\n  this.event_ = e;\n  if (e.defaultPrevented) {\n    // Sync native event state to internal state via super class, where default\n    // prevention is implemented and managed.\n    goog.events.BrowserEvent.superClass_.preventDefault.call(this);\n  }\n};\n\n\n/**\n * Tests to see which button was pressed during the event. This is really only\n * useful in IE and Gecko browsers. And in IE, it's only useful for\n * mousedown/mouseup events, because click only fires for the left mouse button.\n *\n * Safari 2 only reports the left button being clicked, and uses the value '1'\n * instead of 0. Opera only reports a mousedown event for the middle button, and\n * no mouse events for the right button. Opera has default behavior for left and\n * middle click that can only be overridden via a configuration setting.\n *\n * There's a nice table of this mess at http://www.unixpapa.com/js/mouse.html.\n *\n * @param {goog.events.BrowserEvent.MouseButton} button The button\n *     to test for.\n * @return {boolean} True if button was pressed.\n */\ngoog.events.BrowserEvent.prototype.isButton = function(button) {\n  'use strict';\n  return this.event_.button == button;\n};\n\n\n/**\n * Whether this has an \"action\"-producing mouse button.\n *\n * By definition, this includes left-click on windows/linux, and left-click\n * without the ctrl key on Macs.\n *\n * @return {boolean} The result.\n */\ngoog.events.BrowserEvent.prototype.isMouseActionButton = function() {\n  'use strict';\n  // Ctrl+click should never behave like a left-click on mac, regardless of\n  // whether or not the browser will actually ever emit such an event.  If\n  // we see it, treat it like right-click always.\n  return this.isButton(goog.events.BrowserEvent.MouseButton.LEFT) &&\n      !(goog.userAgent.MAC && this.ctrlKey);\n};\n\n\n/**\n * @override\n */\ngoog.events.BrowserEvent.prototype.stopPropagation = function() {\n  'use strict';\n  goog.events.BrowserEvent.superClass_.stopPropagation.call(this);\n  if (this.event_.stopPropagation) {\n    this.event_.stopPropagation();\n  } else {\n    this.event_.cancelBubble = true;\n  }\n};\n\n\n/**\n * @override\n */\ngoog.events.BrowserEvent.prototype.preventDefault = function() {\n  'use strict';\n  goog.events.BrowserEvent.superClass_.preventDefault.call(this);\n  const be = this.event_;\n  if (!be.preventDefault) {\n    be.returnValue = false;\n  } else {\n    be.preventDefault();\n  }\n};\n\n\n/**\n * @return {Event} The underlying browser event object.\n */\ngoog.events.BrowserEvent.prototype.getBrowserEvent = function() {\n  'use strict';\n  return this.event_;\n};\n\n\n/**\n * Extracts the pointer type from the given event.\n * @param {!Event} e\n * @return {string} The pointer type, e.g. 'mouse', 'pen', or 'touch'.\n * @private\n * @suppress {strictMissingProperties} \"pointerType\" on Event\n */\ngoog.events.BrowserEvent.getPointerType_ = function(e) {\n  'use strict';\n  return e.pointerType;\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\ngoog.provide('goog.events.EventType');\n\ngoog.require('goog.events.eventTypeHelpers');\n\n\n/**\n * Constants for event names.\n * @enum {string}\n */\ngoog.events.EventType = {\n  // Mouse events\n  CLICK: 'click',\n  RIGHTCLICK: 'rightclick',\n  DBLCLICK: 'dblclick',\n  AUXCLICK: 'auxclick',\n  MOUSEDOWN: 'mousedown',\n  MOUSEUP: 'mouseup',\n  MOUSEOVER: 'mouseover',\n  MOUSEOUT: 'mouseout',\n  MOUSEMOVE: 'mousemove',\n  MOUSEENTER: 'mouseenter',\n  MOUSELEAVE: 'mouseleave',\n\n  // Non-existent event; will never fire. This exists as a mouse counterpart to\n  // POINTERCANCEL.\n  MOUSECANCEL: 'mousecancel',\n\n  // Selection events.\n  // https://www.w3.org/TR/selection-api/\n  SELECTIONCHANGE: 'selectionchange',\n  SELECTSTART: 'selectstart',  // IE, Safari, Chrome\n\n  // Wheel events\n  // http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents\n  WHEEL: 'wheel',\n\n  // Key events\n  KEYPRESS: 'keypress',\n  KEYDOWN: 'keydown',\n  KEYUP: 'keyup',\n\n  // Focus\n  BLUR: 'blur',\n  FOCUS: 'focus',\n  DEACTIVATE: 'deactivate',  // IE only\n  FOCUSIN: 'focusin',\n  FOCUSOUT: 'focusout',\n\n  // Forms\n  CHANGE: 'change',\n  RESET: 'reset',\n  SELECT: 'select',\n  SUBMIT: 'submit',\n  INPUT: 'input',\n  PROPERTYCHANGE: 'propertychange',  // IE only\n\n  // Drag and drop\n  DRAGSTART: 'dragstart',\n  DRAG: 'drag',\n  DRAGENTER: 'dragenter',\n  DRAGOVER: 'dragover',\n  DRAGLEAVE: 'dragleave',\n  DROP: 'drop',\n  DRAGEND: 'dragend',\n\n  // Touch events\n  // Note that other touch events exist, but we should follow the W3C list here.\n  // http://www.w3.org/TR/touch-events/#list-of-touchevent-types\n  TOUCHSTART: 'touchstart',\n  TOUCHMOVE: 'touchmove',\n  TOUCHEND: 'touchend',\n  TOUCHCANCEL: 'touchcancel',\n\n  // Misc\n  BEFOREUNLOAD: 'beforeunload',\n  CONSOLEMESSAGE: 'consolemessage',\n  CONTEXTMENU: 'contextmenu',\n  DEVICECHANGE: 'devicechange',\n  DEVICEMOTION: 'devicemotion',\n  DEVICEORIENTATION: 'deviceorientation',\n  DOMCONTENTLOADED: 'DOMContentLoaded',\n  ERROR: 'error',\n  HELP: 'help',\n  LOAD: 'load',\n  LOSECAPTURE: 'losecapture',\n  ORIENTATIONCHANGE: 'orientationchange',\n  READYSTATECHANGE: 'readystatechange',\n  RESIZE: 'resize',\n  SCROLL: 'scroll',\n  UNLOAD: 'unload',\n\n  // Media events\n  CANPLAY: 'canplay',\n  CANPLAYTHROUGH: 'canplaythrough',\n  DURATIONCHANGE: 'durationchange',\n  EMPTIED: 'emptied',\n  ENDED: 'ended',\n  LOADEDDATA: 'loadeddata',\n  LOADEDMETADATA: 'loadedmetadata',\n  PAUSE: 'pause',\n  PLAY: 'play',\n  PLAYING: 'playing',\n  PROGRESS: 'progress',\n  RATECHANGE: 'ratechange',\n  SEEKED: 'seeked',\n  SEEKING: 'seeking',\n  STALLED: 'stalled',\n  SUSPEND: 'suspend',\n  TIMEUPDATE: 'timeupdate',\n  VOLUMECHANGE: 'volumechange',\n  WAITING: 'waiting',\n\n  // Media Source Extensions events\n  // https://www.w3.org/TR/media-source/#mediasource-events\n  SOURCEOPEN: 'sourceopen',\n  SOURCEENDED: 'sourceended',\n  SOURCECLOSED: 'sourceclosed',\n  // https://www.w3.org/TR/media-source/#sourcebuffer-events\n  ABORT: 'abort',\n  UPDATE: 'update',\n  UPDATESTART: 'updatestart',\n  UPDATEEND: 'updateend',\n\n  // HTML 5 History events\n  // See http://www.w3.org/TR/html5/browsers.html#event-definitions-0\n  HASHCHANGE: 'hashchange',\n  PAGEHIDE: 'pagehide',\n  PAGESHOW: 'pageshow',\n  POPSTATE: 'popstate',\n\n  // Copy and Paste\n  // Support is limited. Make sure it works on your favorite browser\n  // before using.\n  // http://www.quirksmode.org/dom/events/cutcopypaste.html\n  COPY: 'copy',\n  PASTE: 'paste',\n  CUT: 'cut',\n  BEFORECOPY: 'beforecopy',\n  BEFORECUT: 'beforecut',\n  BEFOREPASTE: 'beforepaste',\n\n  // HTML5 online/offline events.\n  // http://www.w3.org/TR/offline-webapps/#related\n  ONLINE: 'online',\n  OFFLINE: 'offline',\n\n  // HTML 5 worker events\n  MESSAGE: 'message',\n  CONNECT: 'connect',\n\n  // Service Worker Events - ServiceWorkerGlobalScope context\n  // See https://w3c.github.io/ServiceWorker/#execution-context-events\n  // Note: message event defined in worker events section\n  INSTALL: 'install',\n  ACTIVATE: 'activate',\n  FETCH: 'fetch',\n  FOREIGNFETCH: 'foreignfetch',\n  MESSAGEERROR: 'messageerror',\n\n  // Service Worker Events - Document context\n  // See https://w3c.github.io/ServiceWorker/#document-context-events\n  STATECHANGE: 'statechange',\n  UPDATEFOUND: 'updatefound',\n  CONTROLLERCHANGE: 'controllerchange',\n\n  // CSS animation events.\n  ANIMATIONSTART:\n      goog.events.eventTypeHelpers.getVendorPrefixedName('AnimationStart'),\n  ANIMATIONEND:\n      goog.events.eventTypeHelpers.getVendorPrefixedName('AnimationEnd'),\n  ANIMATIONITERATION:\n      goog.events.eventTypeHelpers.getVendorPrefixedName('AnimationIteration'),\n\n  // CSS transition events. Based on the browser support described at:\n  // https://developer.mozilla.org/en/css/css_transitions#Browser_compatibility\n  TRANSITIONEND:\n      goog.events.eventTypeHelpers.getVendorPrefixedName('TransitionEnd'),\n\n  // W3C Pointer Events\n  // http://www.w3.org/TR/pointerevents/\n  POINTERDOWN: 'pointerdown',\n  POINTERUP: 'pointerup',\n  POINTERCANCEL: 'pointercancel',\n  POINTERMOVE: 'pointermove',\n  POINTEROVER: 'pointerover',\n  POINTEROUT: 'pointerout',\n  POINTERENTER: 'pointerenter',\n  POINTERLEAVE: 'pointerleave',\n  GOTPOINTERCAPTURE: 'gotpointercapture',\n  LOSTPOINTERCAPTURE: 'lostpointercapture',\n\n  // IE specific events.\n  // See http://msdn.microsoft.com/en-us/library/ie/hh772103(v=vs.85).aspx\n  // Note: these events will be supplanted in IE11.\n  MSGESTURECHANGE: 'MSGestureChange',\n  MSGESTUREEND: 'MSGestureEnd',\n  MSGESTUREHOLD: 'MSGestureHold',\n  MSGESTURESTART: 'MSGestureStart',\n  MSGESTURETAP: 'MSGestureTap',\n  MSGOTPOINTERCAPTURE: 'MSGotPointerCapture',\n  MSINERTIASTART: 'MSInertiaStart',\n  MSLOSTPOINTERCAPTURE: 'MSLostPointerCapture',\n  MSPOINTERCANCEL: 'MSPointerCancel',\n  MSPOINTERDOWN: 'MSPointerDown',\n  MSPOINTERENTER: 'MSPointerEnter',\n  MSPOINTERHOVER: 'MSPointerHover',\n  MSPOINTERLEAVE: 'MSPointerLeave',\n  MSPOINTERMOVE: 'MSPointerMove',\n  MSPOINTEROUT: 'MSPointerOut',\n  MSPOINTEROVER: 'MSPointerOver',\n  MSPOINTERUP: 'MSPointerUp',\n\n  // Native IMEs/input tools events.\n  TEXT: 'text',\n  TEXTINPUT: 'textInput',\n  COMPOSITIONSTART: 'compositionstart',\n  COMPOSITIONUPDATE: 'compositionupdate',\n  COMPOSITIONEND: 'compositionend',\n\n  // The beforeinput event is initially only supported in Safari. See\n  // https://bugs.chromium.org/p/chromium/issues/detail?id=342670 for Chrome\n  // implementation tracking.\n  BEFOREINPUT: 'beforeinput',\n\n  // Fullscreen API events. See https://fullscreen.spec.whatwg.org/.\n  FULLSCREENCHANGE: 'fullscreenchange',\n  // iOS-only fullscreen events. See\n  // https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/ControllingMediaWithJavaScript/ControllingMediaWithJavaScript.html\n  WEBKITBEGINFULLSCREEN: 'webkitbeginfullscreen',\n  WEBKITENDFULLSCREEN: 'webkitendfullscreen',\n\n  // Webview tag events\n  // See https://developer.chrome.com/apps/tags/webview\n  EXIT: 'exit',\n  LOADABORT: 'loadabort',\n  LOADCOMMIT: 'loadcommit',\n  LOADREDIRECT: 'loadredirect',\n  LOADSTART: 'loadstart',\n  LOADSTOP: 'loadstop',\n  RESPONSIVE: 'responsive',\n  SIZECHANGED: 'sizechanged',\n  UNRESPONSIVE: 'unresponsive',\n\n  // HTML5 Page Visibility API.  See details at\n  // `goog.labs.dom.PageVisibilityMonitor`.\n  VISIBILITYCHANGE: 'visibilitychange',\n\n  // LocalStorage event.\n  STORAGE: 'storage',\n\n  // Print events.\n  BEFOREPRINT: 'beforeprint',\n  AFTERPRINT: 'afterprint',\n\n  // Web app manifest events.\n  BEFOREINSTALLPROMPT: 'beforeinstallprompt',\n  APPINSTALLED: 'appinstalled',\n\n  // Web Animation API (WAAPI) playback events\n  // https://www.w3.org/TR/web-animations-1/#animation-playback-event-types\n  CANCEL: 'cancel',\n  FINISH: 'finish',\n  REMOVE: 'remove'\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview An interface for a listenable JavaScript object.\n */\n\ngoog.provide('goog.events.Listenable');\n\ngoog.requireType('goog.events.EventId');\ngoog.requireType('goog.events.EventLike');\ngoog.requireType('goog.events.ListenableKey');\n\n\n/**\n * A listenable interface. A listenable is an object with the ability\n * to dispatch/broadcast events to \"event listeners\" registered via\n * listen/listenOnce.\n *\n * The interface allows for an event propagation mechanism similar\n * to one offered by native browser event targets, such as\n * capture/bubble mechanism, stopping propagation, and preventing\n * default actions. Capture/bubble mechanism depends on the ancestor\n * tree constructed via `#getParentEventTarget`; this tree\n * must be directed acyclic graph. The meaning of default action(s)\n * in preventDefault is specific to a particular use case.\n *\n * Implementations that do not support capture/bubble or can not have\n * a parent listenable can simply not implement any ability to set the\n * parent listenable (and have `#getParentEventTarget` return\n * null).\n *\n * Implementation of this class can be used with or independently from\n * goog.events.\n *\n * Implementation must call `#addImplementation(implClass)`.\n *\n * @interface\n * @see goog.events\n * @see http://www.w3.org/TR/DOM-Level-2-Events/events.html\n */\ngoog.events.Listenable = function() {};\n\n\n/**\n * An expando property to indicate that an object implements\n * goog.events.Listenable.\n *\n * See addImplementation/isImplementedBy.\n *\n * @type {string}\n * @const\n */\ngoog.events.Listenable.IMPLEMENTED_BY_PROP =\n    'closure_listenable_' + ((Math.random() * 1e6) | 0);\n\n\n/**\n * Marks a given class (constructor) as an implementation of\n * Listenable, so that we can query that fact at runtime. The class\n * must have already implemented the interface.\n * @param {function(new:goog.events.Listenable,...)} cls The class constructor.\n *     The corresponding class must have already implemented the interface.\n */\ngoog.events.Listenable.addImplementation = function(cls) {\n  'use strict';\n  cls.prototype[goog.events.Listenable.IMPLEMENTED_BY_PROP] = true;\n};\n\n\n/**\n * @param {?Object} obj The object to check.\n * @return {boolean} Whether a given instance implements Listenable. The\n *     class/superclass of the instance must call addImplementation.\n */\ngoog.events.Listenable.isImplementedBy = function(obj) {\n  'use strict';\n  return !!(obj && obj[goog.events.Listenable.IMPLEMENTED_BY_PROP]);\n};\n\n\n/**\n * Adds an event listener. A listener can only be added once to an\n * object and if it is added again the key for the listener is\n * returned. Note that if the existing listener is a one-off listener\n * (registered via listenOnce), it will no longer be a one-off\n * listener after a call to listen().\n *\n * @param {string|!goog.events.EventId<EVENTOBJ>} type The event type id.\n * @param {function(this:SCOPE, EVENTOBJ):(boolean|undefined)} listener Callback\n *     method.\n * @param {boolean=} opt_useCapture Whether to fire in capture phase\n *     (defaults to false).\n * @param {SCOPE=} opt_listenerScope Object in whose scope to call the\n *     listener.\n * @return {!goog.events.ListenableKey} Unique key for the listener.\n * @template SCOPE,EVENTOBJ\n */\ngoog.events.Listenable.prototype.listen = function(\n    type, listener, opt_useCapture, opt_listenerScope) {};\n\n\n/**\n * Adds an event listener that is removed automatically after the\n * listener fired once.\n *\n * If an existing listener already exists, listenOnce will do\n * nothing. In particular, if the listener was previously registered\n * via listen(), listenOnce() will not turn the listener into a\n * one-off listener. Similarly, if there is already an existing\n * one-off listener, listenOnce does not modify the listeners (it is\n * still a once listener).\n *\n * @param {string|!goog.events.EventId<EVENTOBJ>} type The event type id.\n * @param {function(this:SCOPE, EVENTOBJ):(boolean|undefined)} listener Callback\n *     method.\n * @param {boolean=} opt_useCapture Whether to fire in capture phase\n *     (defaults to false).\n * @param {SCOPE=} opt_listenerScope Object in whose scope to call the\n *     listener.\n * @return {!goog.events.ListenableKey} Unique key for the listener.\n * @template SCOPE,EVENTOBJ\n */\ngoog.events.Listenable.prototype.listenOnce = function(\n    type, listener, opt_useCapture, opt_listenerScope) {};\n\n\n/**\n * Removes an event listener which was added with listen() or listenOnce().\n *\n * @param {string|!goog.events.EventId<EVENTOBJ>} type The event type id.\n * @param {function(this:SCOPE, EVENTOBJ):(boolean|undefined)} listener Callback\n *     method.\n * @param {boolean=} opt_useCapture Whether to fire in capture phase\n *     (defaults to false).\n * @param {SCOPE=} opt_listenerScope Object in whose scope to call\n *     the listener.\n * @return {boolean} Whether any listener was removed.\n * @template SCOPE,EVENTOBJ\n */\ngoog.events.Listenable.prototype.unlisten = function(\n    type, listener, opt_useCapture, opt_listenerScope) {};\n\n\n/**\n * Removes an event listener which was added with listen() by the key\n * returned by listen().\n *\n * @param {!goog.events.ListenableKey} key The key returned by\n *     listen() or listenOnce().\n * @return {boolean} Whether any listener was removed.\n */\ngoog.events.Listenable.prototype.unlistenByKey = function(key) {};\n\n\n/**\n * Dispatches an event (or event like object) and calls all listeners\n * listening for events of this type. The type of the event is decided by the\n * type property on the event object.\n *\n * If any of the listeners returns false OR calls preventDefault then this\n * function will return false.  If one of the capture listeners calls\n * stopPropagation, then the bubble listeners won't fire.\n *\n * @param {?goog.events.EventLike} e Event object.\n * @return {boolean} If anyone called preventDefault on the event object (or\n *     if any of the listeners returns false) this will also return false.\n */\ngoog.events.Listenable.prototype.dispatchEvent = function(e) {};\n\n\n/**\n * Removes all listeners from this listenable. If type is specified,\n * it will only remove listeners of the particular type. otherwise all\n * registered listeners will be removed.\n *\n * @param {string|!goog.events.EventId=} opt_type Type of event to remove,\n *     default is to remove all types.\n * @return {number} Number of listeners removed.\n */\ngoog.events.Listenable.prototype.removeAllListeners = function(opt_type) {};\n\n\n/**\n * Returns the parent of this event target to use for capture/bubble\n * mechanism.\n *\n * NOTE(chrishenry): The name reflects the original implementation of\n * custom event target (`goog.events.EventTarget`). We decided\n * that changing the name is not worth it.\n *\n * @return {?goog.events.Listenable} The parent EventTarget or null if\n *     there is no parent.\n */\ngoog.events.Listenable.prototype.getParentEventTarget = function() {};\n\n\n/**\n * Fires all registered listeners in this listenable for the given\n * type and capture mode, passing them the given eventObject. This\n * does not perform actual capture/bubble. Only implementors of the\n * interface should be using this.\n *\n * @param {string|!goog.events.EventId<EVENTOBJ>} type The type of the\n *     listeners to fire.\n * @param {boolean} capture The capture mode of the listeners to fire.\n * @param {EVENTOBJ} eventObject The event object to fire.\n * @return {boolean} Whether all listeners succeeded without\n *     attempting to prevent default behavior. If any listener returns\n *     false or called goog.events.Event#preventDefault, this returns\n *     false.\n * @template EVENTOBJ\n */\ngoog.events.Listenable.prototype.fireListeners = function(\n    type, capture, eventObject) {};\n\n\n/**\n * Gets all listeners in this listenable for the given type and\n * capture mode.\n *\n * @param {string|!goog.events.EventId} type The type of the listeners to fire.\n * @param {boolean} capture The capture mode of the listeners to fire.\n * @return {!Array<!goog.events.ListenableKey>} An array of registered\n *     listeners.\n * @template EVENTOBJ\n */\ngoog.events.Listenable.prototype.getListeners = function(type, capture) {};\n\n\n/**\n * Gets the goog.events.ListenableKey for the event or null if no such\n * listener is in use.\n *\n * @param {string|!goog.events.EventId<EVENTOBJ>} type The name of the event\n *     without the 'on' prefix.\n * @param {function(this:SCOPE, EVENTOBJ):(boolean|undefined)} listener The\n *     listener function to get.\n * @param {boolean} capture Whether the listener is a capturing listener.\n * @param {SCOPE=} opt_listenerScope Object in whose scope to call the\n *     listener.\n * @return {?goog.events.ListenableKey} the found listener or null if not found.\n * @template SCOPE,EVENTOBJ\n */\ngoog.events.Listenable.prototype.getListener = function(\n    type, listener, capture, opt_listenerScope) {};\n\n\n/**\n * Whether there is any active listeners matching the specified\n * signature. If either the type or capture parameters are\n * unspecified, the function will match on the remaining criteria.\n *\n * @param {string|!goog.events.EventId<EVENTOBJ>=} opt_type Event type.\n * @param {boolean=} opt_capture Whether to check for capture or bubble\n *     listeners.\n * @return {boolean} Whether there is any active listeners matching\n *     the requested type and/or capture phase.\n * @template EVENTOBJ\n */\ngoog.events.Listenable.prototype.hasListener = function(\n    opt_type, opt_capture) {};\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview An interface that describes a single registered listener.\n */\ngoog.module('goog.events.ListenableKey');\ngoog.module.declareLegacyNamespace();\n\nconst Listenable = goog.requireType('goog.events.Listenable');\n\n/**\n * An interface that describes a single registered listener.\n * @interface\n */\nfunction ListenableKey() {}\n\n/**\n * Counter used to create a unique key\n * @type {number}\n * @private\n */\nListenableKey.counter_ = 0;\n\n/**\n * Reserves a key to be used for ListenableKey#key field.\n * @return {number} A number to be used to fill ListenableKey#key\n *     field.\n */\nListenableKey.reserveKey = function() {\n  return ++ListenableKey.counter_;\n};\n\n/**\n * The source event target.\n * @type {?Object|?Listenable}\n */\nListenableKey.prototype.src;\n\n/**\n * The event type the listener is listening to.\n * @type {string}\n */\nListenableKey.prototype.type;\n\n/**\n * The listener function.\n * @type {function(?):?|{handleEvent:function(?):?}|null}\n */\nListenableKey.prototype.listener;\n\n/**\n * Whether the listener works on capture phase.\n * @type {boolean}\n */\nListenableKey.prototype.capture;\n\n/**\n * The 'this' object for the listener function's scope.\n * @type {?Object|undefined}\n */\nListenableKey.prototype.handler;\n\n/**\n * A globally unique number to identify the key.\n * @type {number}\n */\nListenableKey.prototype.key;\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n\nexports = ListenableKey;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Listener object.\n */\n\ngoog.module('goog.events.Listener');\ngoog.module.declareLegacyNamespace();\n\nconst Listenable = goog.requireType('goog.events.Listenable');\nconst ListenableKey = goog.require('goog.events.ListenableKey');\n\n/**\n * Simple class that stores information about a listener\n * @param {function(?):?} listener Callback function.\n * @param {Function} proxy Wrapper for the listener that patches the event.\n * @param {EventTarget|Listenable} src Source object for\n *     the event.\n * @param {string} type Event type.\n * @param {boolean} capture Whether in capture or bubble phase.\n * @param {Object=} opt_handler Object in whose context to execute the callback.\n * @implements {ListenableKey}\n * @constructor\n */\nfunction Listener(listener, proxy, src, type, capture, opt_handler) {\n  if (Listener.ENABLE_MONITORING) {\n    this.creationStack = new Error().stack;\n  }\n\n  /** @override */\n  this.listener = listener;\n\n  /**\n   * A wrapper over the original listener. This is used solely to\n   * handle native browser events (it is used to simulate the capture\n   * phase and to patch the event object).\n   * @type {Function}\n   */\n  this.proxy = proxy;\n\n  /**\n   * Object or node that callback is listening to\n   * @type {EventTarget|Listenable}\n   */\n  this.src = src;\n\n  /**\n   * The event type.\n   * @const {string}\n   */\n  this.type = type;\n\n  /**\n   * Whether the listener is being called in the capture or bubble phase\n   * @const {boolean}\n   */\n  this.capture = !!capture;\n\n  /**\n   * Optional object whose context to execute the listener in\n   * @type {Object|undefined}\n   */\n  this.handler = opt_handler;\n\n  /**\n   * The key of the listener.\n   * @const {number}\n   * @override\n   */\n  this.key = ListenableKey.reserveKey();\n\n  /**\n   * Whether to remove the listener after it has been called.\n   * @type {boolean}\n   */\n  this.callOnce = false;\n\n  /**\n   * Whether the listener has been removed.\n   * @type {boolean}\n   */\n  this.removed = false;\n}\n\n/**\n * @define {boolean} Whether to enable the monitoring of the\n *     Listener instances. Switching on the monitoring is only\n *     recommended for debugging because it has a significant impact on\n *     performance and memory usage. If switched off, the monitoring code\n *     compiles down to 0 bytes.\n */\nListener.ENABLE_MONITORING =\n    goog.define('goog.events.Listener.ENABLE_MONITORING', false);\n\n/**\n * If monitoring the Listener instances is enabled, stores the\n * creation stack trace of the Disposable instance.\n * @type {string}\n */\nListener.prototype.creationStack;\n\n/**\n * Marks this listener as removed. This also remove references held by\n * this listener object (such as listener and event source).\n */\nListener.prototype.markAsRemoved = function() {\n  this.removed = true;\n  this.listener = null;\n  this.proxy = null;\n  this.src = null;\n  this.handler = null;\n};\n\nexports = Listener;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview A map of listeners that provides utility functions to\n * deal with listeners on an event target. Used by\n * `goog.events.EventTarget`.\n *\n * WARNING: Do not use this class from outside goog.events package.\n *\n */\n\ngoog.module('goog.events.ListenerMap');\n\ngoog.module.declareLegacyNamespace();\n\nconst EventId = goog.requireType('goog.events.EventId');\nconst Listenable = goog.requireType('goog.events.Listenable');\nconst ListenableKey = goog.requireType('goog.events.ListenableKey');\nconst Listener = goog.require('goog.events.Listener');\nconst array = goog.require('goog.array');\nconst object = goog.require('goog.object');\n\n/**\n * Creates a new listener map.\n * @param {EventTarget|Listenable} src The src object.\n * @constructor\n * @final\n */\nfunction ListenerMap(src) {\n  /** @type {EventTarget|Listenable} */\n  this.src = src;\n\n  /**\n   * Maps of event type to an array of listeners.\n   * @type {!Object<string, !Array<!Listener>>}\n   */\n  this.listeners = {};\n\n  /**\n   * The count of types in this map that have registered listeners.\n   * @private {number}\n   */\n  this.typeCount_ = 0;\n}\n\n\n/**\n * @return {number} The count of event types in this map that actually\n *     have registered listeners.\n */\nListenerMap.prototype.getTypeCount = function() {\n  return this.typeCount_;\n};\n\n\n/**\n * @return {number} Total number of registered listeners.\n */\nListenerMap.prototype.getListenerCount = function() {\n  let count = 0;\n  for (const type in this.listeners) {\n    count += this.listeners[type].length;\n  }\n  return count;\n};\n\n\n/**\n * Adds an event listener. A listener can only be added once to an\n * object and if it is added again the key for the listener is\n * returned.\n *\n * Note that a one-off listener will not change an existing listener,\n * if any. On the other hand a normal listener will change existing\n * one-off listener to become a normal listener.\n *\n * @param {string|!EventId} type The listener event type.\n * @param {!Function} listener This listener callback method.\n * @param {boolean} callOnce Whether the listener is a one-off\n *     listener.\n * @param {boolean=} opt_useCapture The capture mode of the listener.\n * @param {Object=} opt_listenerScope Object in whose scope to call the\n *     listener.\n * @return {!ListenableKey} Unique key for the listener.\n */\nListenerMap.prototype.add = function(\n    type, listener, callOnce, opt_useCapture, opt_listenerScope) {\n  const typeStr = type.toString();\n  let listenerArray = this.listeners[typeStr];\n  if (!listenerArray) {\n    listenerArray = this.listeners[typeStr] = [];\n    this.typeCount_++;\n  }\n\n  let listenerObj;\n  const index = ListenerMap.findListenerIndex_(\n      listenerArray, listener, opt_useCapture, opt_listenerScope);\n  if (index > -1) {\n    listenerObj = listenerArray[index];\n    if (!callOnce) {\n      // Ensure that, if there is an existing callOnce listener, it is no\n      // longer a callOnce listener.\n      listenerObj.callOnce = false;\n    }\n  } else {\n    listenerObj = new Listener(\n        listener, null, this.src, typeStr, !!opt_useCapture, opt_listenerScope);\n    listenerObj.callOnce = callOnce;\n    listenerArray.push(listenerObj);\n  }\n  return listenerObj;\n};\n\n\n/**\n * Removes a matching listener.\n * @param {string|!EventId} type The listener event type.\n * @param {!Function} listener This listener callback method.\n * @param {boolean=} opt_useCapture The capture mode of the listener.\n * @param {Object=} opt_listenerScope Object in whose scope to call the\n *     listener.\n * @return {boolean} Whether any listener was removed.\n */\nListenerMap.prototype.remove = function(\n    type, listener, opt_useCapture, opt_listenerScope) {\n  const typeStr = type.toString();\n  if (!(typeStr in this.listeners)) {\n    return false;\n  }\n\n  const listenerArray = this.listeners[typeStr];\n  const index = ListenerMap.findListenerIndex_(\n      listenerArray, listener, opt_useCapture, opt_listenerScope);\n  if (index > -1) {\n    const listenerObj = listenerArray[index];\n    listenerObj.markAsRemoved();\n    array.removeAt(listenerArray, index);\n    if (listenerArray.length == 0) {\n      delete this.listeners[typeStr];\n      this.typeCount_--;\n    }\n    return true;\n  }\n  return false;\n};\n\n\n/**\n * Removes the given listener object.\n * @param {!ListenableKey} listener The listener to remove.\n * @return {boolean} Whether the listener is removed.\n */\nListenerMap.prototype.removeByKey = function(listener) {\n  const type = listener.type;\n  if (!(type in this.listeners)) {\n    return false;\n  }\n\n  const removed = array.remove(this.listeners[type], listener);\n  if (removed) {\n    /** @type {!Listener} */ (listener).markAsRemoved();\n    if (this.listeners[type].length == 0) {\n      delete this.listeners[type];\n      this.typeCount_--;\n    }\n  }\n  return removed;\n};\n\n\n/**\n * Removes all listeners from this map. If opt_type is provided, only\n * listeners that match the given type are removed.\n * @param {string|!EventId=} opt_type Type of event to remove.\n * @return {number} Number of listeners removed.\n */\nListenerMap.prototype.removeAll = function(opt_type) {\n  const typeStr = opt_type && opt_type.toString();\n  let count = 0;\n  for (const type in this.listeners) {\n    if (!typeStr || type == typeStr) {\n      const listenerArray = this.listeners[type];\n      for (let i = 0; i < listenerArray.length; i++) {\n        ++count;\n        listenerArray[i].markAsRemoved();\n      }\n      delete this.listeners[type];\n      this.typeCount_--;\n    }\n  }\n  return count;\n};\n\n\n/**\n * Gets all listeners that match the given type and capture mode. The\n * returned array is a copy (but the listener objects are not).\n * @param {string|!EventId} type The type of the listeners\n *     to retrieve.\n * @param {boolean} capture The capture mode of the listeners to retrieve.\n * @return {!Array<!ListenableKey>} An array of matching\n *     listeners.\n */\nListenerMap.prototype.getListeners = function(type, capture) {\n  const listenerArray = this.listeners[type.toString()];\n  const rv = [];\n  if (listenerArray) {\n    for (let i = 0; i < listenerArray.length; ++i) {\n      const listenerObj = listenerArray[i];\n      if (listenerObj.capture == capture) {\n        rv.push(listenerObj);\n      }\n    }\n  }\n  return rv;\n};\n\n\n/**\n * Gets the goog.events.ListenableKey for the event or null if no such\n * listener is in use.\n *\n * @param {string|!EventId} type The type of the listener\n *     to retrieve.\n * @param {!Function} listener The listener function to get.\n * @param {boolean} capture Whether the listener is a capturing listener.\n * @param {Object=} opt_listenerScope Object in whose scope to call the\n *     listener.\n * @return {ListenableKey} the found listener or null if not found.\n */\nListenerMap.prototype.getListener = function(\n    type, listener, capture, opt_listenerScope) {\n  const listenerArray = this.listeners[type.toString()];\n  let i = -1;\n  if (listenerArray) {\n    i = ListenerMap.findListenerIndex_(\n        listenerArray, listener, capture, opt_listenerScope);\n  }\n  return i > -1 ? listenerArray[i] : null;\n};\n\n\n/**\n * Whether there is a matching listener. If either the type or capture\n * parameters are unspecified, the function will match on the\n * remaining criteria.\n *\n * @param {string|!EventId=} opt_type The type of the listener.\n * @param {boolean=} opt_capture The capture mode of the listener.\n * @return {boolean} Whether there is an active listener matching\n *     the requested type and/or capture phase.\n */\nListenerMap.prototype.hasListener = function(opt_type, opt_capture) {\n  const hasType = (opt_type !== undefined);\n  const typeStr = hasType ? opt_type.toString() : '';\n  const hasCapture = (opt_capture !== undefined);\n\n  return object.some(this.listeners, function(listenerArray, type) {\n    for (let i = 0; i < listenerArray.length; ++i) {\n      if ((!hasType || listenerArray[i].type == typeStr) &&\n          (!hasCapture || listenerArray[i].capture == opt_capture)) {\n        return true;\n      }\n    }\n\n    return false;\n  });\n};\n\n\n/**\n * Finds the index of a matching goog.events.Listener in the given\n * listenerArray.\n * @param {!Array<!Listener>} listenerArray Array of listener.\n * @param {!Function} listener The listener function.\n * @param {boolean=} opt_useCapture The capture flag for the listener.\n * @param {Object=} opt_listenerScope The listener scope.\n * @return {number} The index of the matching listener within the\n *     listenerArray.\n * @private\n */\nListenerMap.findListenerIndex_ = function(\n    listenerArray, listener, opt_useCapture, opt_listenerScope) {\n  for (let i = 0; i < listenerArray.length; ++i) {\n    const listenerObj = listenerArray[i];\n    if (!listenerObj.removed && listenerObj.listener == listener &&\n        listenerObj.capture == !!opt_useCapture &&\n        listenerObj.handler == opt_listenerScope) {\n      return i;\n    }\n  }\n  return -1;\n};\n\nexports = ListenerMap;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview An event manager for both native browser event\n * targets and custom JavaScript event targets\n * (`goog.events.Listenable`). This provides an abstraction\n * over browsers' event systems.\n *\n * It also provides a simulation of W3C event model's capture phase in\n * Internet Explorer (IE 8 and below). Caveat: the simulation does not\n * interact well with listeners registered directly on the elements\n * (bypassing goog.events) or even with listeners registered via\n * goog.events in a separate JS binary. In these cases, we provide\n * no ordering guarantees.\n *\n * The listeners will receive a \"patched\" event object. Such event object\n * contains normalized values for certain event properties that differs in\n * different browsers.\n *\n * Example usage:\n * <pre>\n * goog.events.listen(myNode, 'click', function(e) { alert('woo') });\n * goog.events.listen(myNode, 'mouseover', mouseHandler, true);\n * goog.events.unlisten(myNode, 'mouseover', mouseHandler, true);\n * goog.events.removeAll(myNode);\n * </pre>\n *\n *                                            in IE and event object patching]\n */\n\n// IMPLEMENTATION NOTES:\n// goog.events stores an auxiliary data structure on each EventTarget\n// source being listened on. This allows us to take advantage of GC,\n// having the data structure GC'd when the EventTarget is GC'd. This\n// GC behavior is equivalent to using W3C DOM Events directly.\n\ngoog.provide('goog.events');\n\ngoog.require('goog.asserts');\ngoog.require('goog.debug.entryPointRegistry');\ngoog.require('goog.events.BrowserEvent');\ngoog.require('goog.events.BrowserFeature');\ngoog.require('goog.events.Listenable');\ngoog.require('goog.events.ListenerMap');\ngoog.requireType('goog.debug.ErrorHandler');\ngoog.requireType('goog.events.EventId');\ngoog.requireType('goog.events.EventLike');\ngoog.requireType('goog.events.EventWrapper');\ngoog.requireType('goog.events.ListenableKey');\ngoog.requireType('goog.events.Listener');\n\n\n/**\n * @typedef {number|goog.events.ListenableKey}\n */\ngoog.events.Key;\n\n\n/**\n * @typedef {EventTarget|goog.events.Listenable}\n */\ngoog.events.ListenableType;\n\n\n/**\n * Property name on a native event target for the listener map\n * associated with the event target.\n * @private @const {string}\n */\ngoog.events.LISTENER_MAP_PROP_ = 'closure_lm_' + ((Math.random() * 1e6) | 0);\n\n\n/**\n * String used to prepend to IE event types.\n * @const\n * @private\n */\ngoog.events.onString_ = 'on';\n\n\n/**\n * Map of computed \"on<eventname>\" strings for IE event types. Caching\n * this removes an extra object allocation in goog.events.listen which\n * improves IE6 performance.\n * @const\n * @dict\n * @private\n */\ngoog.events.onStringMap_ = {};\n\n\n/**\n * @enum {number} Different capture simulation mode for IE8-.\n */\ngoog.events.CaptureSimulationMode = {\n  /**\n   * Does not perform capture simulation. Will asserts in IE8- when you\n   * add capture listeners.\n   */\n  OFF_AND_FAIL: 0,\n\n  /**\n   * Does not perform capture simulation, silently ignore capture\n   * listeners.\n   */\n  OFF_AND_SILENT: 1,\n\n  /**\n   * Performs capture simulation.\n   */\n  ON: 2\n};\n\n\n/**\n * Estimated count of total native listeners.\n * @private {number}\n */\ngoog.events.listenerCountEstimate_ = 0;\n\n\n/**\n * Adds an event listener for a specific event on a native event\n * target (such as a DOM element) or an object that has implemented\n * {@link goog.events.Listenable}. A listener can only be added once\n * to an object and if it is added again the key for the listener is\n * returned. Note that if the existing listener is a one-off listener\n * (registered via listenOnce), it will no longer be a one-off\n * listener after a call to listen().\n *\n * @param {EventTarget|goog.events.Listenable} src The node to listen\n *     to events on.\n * @param {string|Array<string>|\n *     !goog.events.EventId<EVENTOBJ>|!Array<!goog.events.EventId<EVENTOBJ>>}\n *     type Event type or array of event types.\n * @param {function(this:T, EVENTOBJ):?|{handleEvent:function(?):?}|null}\n *     listener Callback method, or an object with a handleEvent function.\n *     WARNING: passing an Object is now softly deprecated.\n * @param {(boolean|!AddEventListenerOptions)=} opt_options\n * @param {T=} opt_handler Element in whose scope to call the listener.\n * @return {goog.events.Key} Unique key for the listener.\n * @template T,EVENTOBJ\n * @suppress {strictMissingProperties} Added to tighten compiler checks\n */\ngoog.events.listen = function(src, type, listener, opt_options, opt_handler) {\n  'use strict';\n  if (opt_options && opt_options.once) {\n    return goog.events.listenOnce(\n        src, type, listener, opt_options, opt_handler);\n  }\n  if (Array.isArray(type)) {\n    for (let i = 0; i < type.length; i++) {\n      goog.events.listen(src, type[i], listener, opt_options, opt_handler);\n    }\n    return null;\n  }\n\n  listener = goog.events.wrapListener(listener);\n  if (goog.events.Listenable.isImplementedBy(src)) {\n    const capture =\n        goog.isObject(opt_options) ? !!opt_options.capture : !!opt_options;\n    return src.listen(\n        /** @type {string|!goog.events.EventId} */ (type), listener, capture,\n        opt_handler);\n  } else {\n    return goog.events.listen_(\n        /** @type {!EventTarget} */ (src), type, listener,\n        /* callOnce */ false, opt_options, opt_handler);\n  }\n};\n\n\n/**\n * Adds an event listener for a specific event on a native event\n * target. A listener can only be added once to an object and if it\n * is added again the key for the listener is returned.\n *\n * Note that a one-off listener will not change an existing listener,\n * if any. On the other hand a normal listener will change existing\n * one-off listener to become a normal listener.\n *\n * @param {EventTarget} src The node to listen to events on.\n * @param {string|?goog.events.EventId<EVENTOBJ>} type Event type.\n * @param {!Function} listener Callback function.\n * @param {boolean} callOnce Whether the listener is a one-off\n *     listener or otherwise.\n * @param {(boolean|!AddEventListenerOptions)=} opt_options\n * @param {Object=} opt_handler Element in whose scope to call the listener.\n * @return {goog.events.ListenableKey} Unique key for the listener.\n * @template EVENTOBJ\n * @private\n * @suppress {strictMissingProperties} Added to tighten compiler checks\n */\ngoog.events.listen_ = function(\n    src, type, listener, callOnce, opt_options, opt_handler) {\n  'use strict';\n  if (!type) {\n    throw new Error('Invalid event type');\n  }\n\n  const capture =\n      goog.isObject(opt_options) ? !!opt_options.capture : !!opt_options;\n\n  let listenerMap = goog.events.getListenerMap_(src);\n  if (!listenerMap) {\n    src[goog.events.LISTENER_MAP_PROP_] = listenerMap =\n        new goog.events.ListenerMap(src);\n  }\n\n  const listenerObj = /** @type {goog.events.Listener} */ (\n      listenerMap.add(type, listener, callOnce, capture, opt_handler));\n\n  // If the listenerObj already has a proxy, it has been set up\n  // previously. We simply return.\n  if (listenerObj.proxy) {\n    return listenerObj;\n  }\n\n  const proxy = goog.events.getProxy();\n  listenerObj.proxy = proxy;\n\n  /** @suppress {strictMissingProperties} Added to tighten compiler checks */\n  proxy.src = src;\n  /** @suppress {strictMissingProperties} Added to tighten compiler checks */\n  proxy.listener = listenerObj;\n\n  // Attach the proxy through the browser's API\n  if (src.addEventListener) {\n    // Don't pass an object as `capture` if the browser doesn't support that.\n    if (!goog.events.BrowserFeature.PASSIVE_EVENTS) {\n      opt_options = capture;\n    }\n    // Don't break tests that expect a boolean.\n    if (opt_options === undefined) opt_options = false;\n    src.addEventListener(type.toString(), proxy, opt_options);\n  } else if (src.attachEvent) {\n    // The else if above used to be an unconditional else. It would call\n    // attachEvent come gws or high water. This would sometimes throw an\n    // exception on IE11, spoiling the day of some callers. The previous\n    // incarnation of this code, from 2007, indicates that it replaced an\n    // earlier still version that caused excess allocations on IE6.\n    src.attachEvent(goog.events.getOnString_(type.toString()), proxy);\n  } else if (src.addListener && src.removeListener) {\n    // In IE, MediaQueryList uses addListener() insteadd of addEventListener. In\n    // Safari, there is no global for the MediaQueryList constructor, so we just\n    // check whether the object \"looks like\" MediaQueryList.\n    goog.asserts.assert(\n        type === 'change', 'MediaQueryList only has a change event');\n    src.addListener(proxy);\n  } else {\n    throw new Error('addEventListener and attachEvent are unavailable.');\n  }\n\n  goog.events.listenerCountEstimate_++;\n  return listenerObj;\n};\n\n\n/**\n * Helper function for returning a proxy function.\n * @return {!Function} A new or reused function object.\n */\ngoog.events.getProxy = function() {\n  'use strict';\n  const proxyCallbackFunction = goog.events.handleBrowserEvent_;\n  /** @suppress {strictMissingProperties} Added to tighten compiler checks */\n  const f = function(eventObject) {\n    return proxyCallbackFunction.call(f.src, f.listener, eventObject);\n  };\n  return f;\n};\n\n\n/**\n * Adds an event listener for a specific event on a native event\n * target (such as a DOM element) or an object that has implemented\n * {@link goog.events.Listenable}. After the event has fired the event\n * listener is removed from the target.\n *\n * If an existing listener already exists, listenOnce will do\n * nothing. In particular, if the listener was previously registered\n * via listen(), listenOnce() will not turn the listener into a\n * one-off listener. Similarly, if there is already an existing\n * one-off listener, listenOnce does not modify the listeners (it is\n * still a once listener).\n *\n * @param {EventTarget|goog.events.Listenable} src The node to listen\n *     to events on.\n * @param {string|Array<string>|\n *     !goog.events.EventId<EVENTOBJ>|!Array<!goog.events.EventId<EVENTOBJ>>}\n *     type Event type or array of event types.\n * @param {function(this:T, EVENTOBJ):?|{handleEvent:function(?):?}|null}\n *     listener Callback method.\n * @param {(boolean|!AddEventListenerOptions)=} opt_options\n * @param {T=} opt_handler Element in whose scope to call the listener.\n * @return {goog.events.Key} Unique key for the listener.\n * @template T,EVENTOBJ\n * @suppress {strictMissingProperties} Added to tighten compiler checks\n */\ngoog.events.listenOnce = function(\n    src, type, listener, opt_options, opt_handler) {\n  'use strict';\n  if (Array.isArray(type)) {\n    for (let i = 0; i < type.length; i++) {\n      goog.events.listenOnce(src, type[i], listener, opt_options, opt_handler);\n    }\n    return null;\n  }\n\n  listener = goog.events.wrapListener(listener);\n  if (goog.events.Listenable.isImplementedBy(src)) {\n    const capture =\n        goog.isObject(opt_options) ? !!opt_options.capture : !!opt_options;\n    return src.listenOnce(\n        /** @type {string|!goog.events.EventId} */ (type), listener, capture,\n        opt_handler);\n  } else {\n    return goog.events.listen_(\n        /** @type {!EventTarget} */ (src), type, listener,\n        /* callOnce */ true, opt_options, opt_handler);\n  }\n};\n\n\n/**\n * Adds an event listener with a specific event wrapper on a DOM Node or an\n * object that has implemented {@link goog.events.Listenable}. A listener can\n * only be added once to an object.\n *\n * @param {EventTarget|goog.events.Listenable} src The target to\n *     listen to events on.\n * @param {goog.events.EventWrapper} wrapper Event wrapper to use.\n * @param {function(this:T, ?):?|{handleEvent:function(?):?}|null} listener\n *     Callback method, or an object with a handleEvent function.\n * @param {boolean=} opt_capt Whether to fire in capture phase (defaults to\n *     false).\n * @param {T=} opt_handler Element in whose scope to call the listener.\n * @template T\n */\ngoog.events.listenWithWrapper = function(\n    src, wrapper, listener, opt_capt, opt_handler) {\n  'use strict';\n  wrapper.listen(src, listener, opt_capt, opt_handler);\n};\n\n\n/**\n * Removes an event listener which was added with listen().\n *\n * @param {EventTarget|goog.events.Listenable} src The target to stop\n *     listening to events on.\n * @param {string|Array<string>|\n *     !goog.events.EventId<EVENTOBJ>|!Array<!goog.events.EventId<EVENTOBJ>>}\n *     type Event type or array of event types to unlisten to.\n * @param {function(?):?|{handleEvent:function(?):?}|null} listener The\n *     listener function to remove.\n * @param {(boolean|!EventListenerOptions)=} opt_options\n *     whether the listener is fired during the capture or bubble phase of the\n *     event.\n * @param {Object=} opt_handler Element in whose scope to call the listener.\n * @return {?boolean} indicating whether the listener was there to remove.\n * @template EVENTOBJ\n * @suppress {strictMissingProperties} Added to tighten compiler checks\n */\ngoog.events.unlisten = function(src, type, listener, opt_options, opt_handler) {\n  'use strict';\n  if (Array.isArray(type)) {\n    for (let i = 0; i < type.length; i++) {\n      goog.events.unlisten(src, type[i], listener, opt_options, opt_handler);\n    }\n    return null;\n  }\n  const capture =\n      goog.isObject(opt_options) ? !!opt_options.capture : !!opt_options;\n\n  listener = goog.events.wrapListener(listener);\n  if (goog.events.Listenable.isImplementedBy(src)) {\n    return src.unlisten(\n        /** @type {string|!goog.events.EventId} */ (type), listener, capture,\n        opt_handler);\n  }\n\n  if (!src) {\n    // TODO(chrishenry): We should tighten the API to only accept\n    // non-null objects, or add an assertion here.\n    return false;\n  }\n\n  const listenerMap = goog.events.getListenerMap_(\n      /** @type {!EventTarget} */ (src));\n  if (listenerMap) {\n    const listenerObj = listenerMap.getListener(\n        /** @type {string|!goog.events.EventId} */ (type), listener, capture,\n        opt_handler);\n    if (listenerObj) {\n      return goog.events.unlistenByKey(listenerObj);\n    }\n  }\n\n  return false;\n};\n\n\n/**\n * Removes an event listener which was added with listen() by the key\n * returned by listen().\n *\n * @param {goog.events.Key} key The key returned by listen() for this\n *     event listener.\n * @return {boolean} indicating whether the listener was there to remove.\n * @suppress {strictMissingProperties} Added to tighten compiler checks\n */\ngoog.events.unlistenByKey = function(key) {\n  'use strict';\n  // TODO(chrishenry): Remove this check when tests that rely on this\n  // are fixed.\n  if (typeof key === 'number') {\n    return false;\n  }\n\n  const listener = key;\n  if (!listener || listener.removed) {\n    return false;\n  }\n\n  const src = listener.src;\n  if (goog.events.Listenable.isImplementedBy(src)) {\n    return /** @type {!goog.events.Listenable} */ (src).unlistenByKey(listener);\n  }\n\n  const type = listener.type;\n  /** @suppress {strictMissingProperties} Added to tighten compiler checks */\n  const proxy = listener.proxy;\n  if (src.removeEventListener) {\n    src.removeEventListener(type, proxy, listener.capture);\n  } else if (src.detachEvent) {\n    src.detachEvent(goog.events.getOnString_(type), proxy);\n  } else if (src.addListener && src.removeListener) {\n    src.removeListener(proxy);\n  }\n  goog.events.listenerCountEstimate_--;\n\n  const listenerMap = goog.events.getListenerMap_(\n      /** @type {!EventTarget} */ (src));\n  // TODO(chrishenry): Try to remove this conditional and execute the\n  // first branch always. This should be safe.\n  if (listenerMap) {\n    listenerMap.removeByKey(listener);\n    if (listenerMap.getTypeCount() == 0) {\n      // Null the src, just because this is simple to do (and useful\n      // for IE <= 7).\n      listenerMap.src = null;\n      // We don't use delete here because IE does not allow delete\n      // on a window object.\n      src[goog.events.LISTENER_MAP_PROP_] = null;\n    }\n  } else {\n    /** @type {!goog.events.Listener} */ (listener).markAsRemoved();\n  }\n\n  return true;\n};\n\n\n/**\n * Removes an event listener which was added with listenWithWrapper().\n *\n * @param {EventTarget|goog.events.Listenable} src The target to stop\n *     listening to events on.\n * @param {goog.events.EventWrapper} wrapper Event wrapper to use.\n * @param {function(?):?|{handleEvent:function(?):?}|null} listener The\n *     listener function to remove.\n * @param {boolean=} opt_capt In DOM-compliant browsers, this determines\n *     whether the listener is fired during the capture or bubble phase of the\n *     event.\n * @param {Object=} opt_handler Element in whose scope to call the listener.\n */\ngoog.events.unlistenWithWrapper = function(\n    src, wrapper, listener, opt_capt, opt_handler) {\n  'use strict';\n  wrapper.unlisten(src, listener, opt_capt, opt_handler);\n};\n\n\n/**\n * Removes all listeners from an object. You can also optionally\n * remove listeners of a particular type.\n *\n * @param {Object|undefined} obj Object to remove listeners from. Must be an\n *     EventTarget or a goog.events.Listenable.\n * @param {string|!goog.events.EventId=} opt_type Type of event to remove.\n *     Default is all types.\n * @return {number} Number of listeners removed.\n */\ngoog.events.removeAll = function(obj, opt_type) {\n  'use strict';\n  // TODO(chrishenry): Change the type of obj to\n  // (!EventTarget|!goog.events.Listenable).\n\n  if (!obj) {\n    return 0;\n  }\n\n  if (goog.events.Listenable.isImplementedBy(obj)) {\n    return /** @type {?} */ (obj).removeAllListeners(opt_type);\n  }\n\n  const listenerMap = goog.events.getListenerMap_(\n      /** @type {!EventTarget} */ (obj));\n  if (!listenerMap) {\n    return 0;\n  }\n\n  let count = 0;\n  const typeStr = opt_type && opt_type.toString();\n  for (const type in listenerMap.listeners) {\n    if (!typeStr || type == typeStr) {\n      // Clone so that we don't need to worry about unlistenByKey\n      // changing the content of the ListenerMap.\n      const listeners = listenerMap.listeners[type].concat();\n      for (let i = 0; i < listeners.length; ++i) {\n        if (goog.events.unlistenByKey(listeners[i])) {\n          ++count;\n        }\n      }\n    }\n  }\n  return count;\n};\n\n\n/**\n * Gets the listeners for a given object, type and capture phase.\n *\n * @param {Object} obj Object to get listeners for.\n * @param {string|!goog.events.EventId} type Event type.\n * @param {boolean} capture Capture phase?.\n * @return {!Array<!goog.events.Listener>} Array of listener objects.\n */\ngoog.events.getListeners = function(obj, type, capture) {\n  'use strict';\n  if (goog.events.Listenable.isImplementedBy(obj)) {\n    return /** @type {!goog.events.Listenable} */ (obj).getListeners(\n        type, capture);\n  } else {\n    if (!obj) {\n      // TODO(chrishenry): We should tighten the API to accept\n      // !EventTarget|goog.events.Listenable, and add an assertion here.\n      return [];\n    }\n\n    const listenerMap = goog.events.getListenerMap_(\n        /** @type {!EventTarget} */ (obj));\n    return listenerMap ? listenerMap.getListeners(type, capture) : [];\n  }\n};\n\n\n/**\n * Gets the goog.events.Listener for the event or null if no such listener is\n * in use.\n *\n * @param {EventTarget|goog.events.Listenable} src The target from\n *     which to get listeners.\n * @param {?string|!goog.events.EventId<EVENTOBJ>} type The type of the event.\n * @param {function(EVENTOBJ):?|{handleEvent:function(?):?}|null} listener The\n *     listener function to get.\n * @param {boolean=} opt_capt In DOM-compliant browsers, this determines\n *                            whether the listener is fired during the\n *                            capture or bubble phase of the event.\n * @param {Object=} opt_handler Element in whose scope to call the listener.\n * @return {goog.events.ListenableKey} the found listener or null if not found.\n * @template EVENTOBJ\n * @suppress {strictMissingProperties} Added to tighten compiler checks\n */\ngoog.events.getListener = function(src, type, listener, opt_capt, opt_handler) {\n  'use strict';\n  // TODO(chrishenry): Change type from ?string to string, or add assertion.\n  type = /** @type {string} */ (type);\n  listener = goog.events.wrapListener(listener);\n  const capture = !!opt_capt;\n  if (goog.events.Listenable.isImplementedBy(src)) {\n    return src.getListener(type, listener, capture, opt_handler);\n  }\n\n  if (!src) {\n    // TODO(chrishenry): We should tighten the API to only accept\n    // non-null objects, or add an assertion here.\n    return null;\n  }\n\n  const listenerMap = goog.events.getListenerMap_(\n      /** @type {!EventTarget} */ (src));\n  if (listenerMap) {\n    return listenerMap.getListener(type, listener, capture, opt_handler);\n  }\n  return null;\n};\n\n\n/**\n * Returns whether an event target has any active listeners matching the\n * specified signature. If either the type or capture parameters are\n * unspecified, the function will match on the remaining criteria.\n *\n * @param {EventTarget|goog.events.Listenable} obj Target to get\n *     listeners for.\n * @param {string|!goog.events.EventId=} opt_type Event type.\n * @param {boolean=} opt_capture Whether to check for capture or bubble-phase\n *     listeners.\n * @return {boolean} Whether an event target has one or more listeners matching\n *     the requested type and/or capture phase.\n * @suppress {strictMissingProperties} Added to tighten compiler checks\n */\ngoog.events.hasListener = function(obj, opt_type, opt_capture) {\n  'use strict';\n  if (goog.events.Listenable.isImplementedBy(obj)) {\n    return obj.hasListener(opt_type, opt_capture);\n  }\n\n  const listenerMap = goog.events.getListenerMap_(\n      /** @type {!EventTarget} */ (obj));\n  return !!listenerMap && listenerMap.hasListener(opt_type, opt_capture);\n};\n\n\n/**\n * Provides a nice string showing the normalized event objects public members\n * @param {Object} e Event Object.\n * @return {string} String of the public members of the normalized event object.\n */\ngoog.events.expose = function(e) {\n  'use strict';\n  const str = [];\n  for (const key in e) {\n    if (e[key] && e[key].id) {\n      str.push(key + ' = ' + e[key] + ' (' + e[key].id + ')');\n    } else {\n      str.push(key + ' = ' + e[key]);\n    }\n  }\n  return str.join('\\n');\n};\n\n\n/**\n * Returns a string with on prepended to the specified type. This is used for IE\n * which expects \"on\" to be prepended. This function caches the string in order\n * to avoid extra allocations in steady state.\n * @param {string} type Event type.\n * @return {string} The type string with 'on' prepended.\n * @private\n */\ngoog.events.getOnString_ = function(type) {\n  'use strict';\n  if (type in goog.events.onStringMap_) {\n    return goog.events.onStringMap_[type];\n  }\n  return goog.events.onStringMap_[type] = goog.events.onString_ + type;\n};\n\n\n/**\n * Fires an object's listeners of a particular type and phase\n *\n * @param {Object} obj Object whose listeners to call.\n * @param {string|!goog.events.EventId} type Event type.\n * @param {boolean} capture Which event phase.\n * @param {Object} eventObject Event object to be passed to listener.\n * @return {boolean} True if all listeners returned true else false.\n */\ngoog.events.fireListeners = function(obj, type, capture, eventObject) {\n  'use strict';\n  if (goog.events.Listenable.isImplementedBy(obj)) {\n    return /** @type {!goog.events.Listenable} */ (obj).fireListeners(\n        type, capture, eventObject);\n  }\n\n  return goog.events.fireListeners_(obj, type, capture, eventObject);\n};\n\n\n/**\n * Fires an object's listeners of a particular type and phase.\n * @param {Object} obj Object whose listeners to call.\n * @param {string|!goog.events.EventId} type Event type.\n * @param {boolean} capture Which event phase.\n * @param {Object} eventObject Event object to be passed to listener.\n * @return {boolean} True if all listeners returned true else false.\n * @private\n */\ngoog.events.fireListeners_ = function(obj, type, capture, eventObject) {\n  'use strict';\n  /** @type {boolean} */\n  let retval = true;\n\n  const listenerMap = goog.events.getListenerMap_(\n      /** @type {EventTarget} */ (obj));\n  if (listenerMap) {\n    // TODO(chrishenry): Original code avoids array creation when there\n    // is no listener, so we do the same. If this optimization turns\n    // out to be not required, we can replace this with\n    // listenerMap.getListeners(type, capture) instead, which is simpler.\n    let listenerArray = listenerMap.listeners[type.toString()];\n    if (listenerArray) {\n      listenerArray = listenerArray.concat();\n      for (let i = 0; i < listenerArray.length; i++) {\n        const listener = listenerArray[i];\n        // We might not have a listener if the listener was removed.\n        if (listener && listener.capture == capture && !listener.removed) {\n          const result = goog.events.fireListener(listener, eventObject);\n          retval = retval && (result !== false);\n        }\n      }\n    }\n  }\n  return retval;\n};\n\n\n/**\n * Fires a listener with a set of arguments\n *\n * @param {goog.events.Listener} listener The listener object to call.\n * @param {Object} eventObject The event object to pass to the listener.\n * @return {*} Result of listener.\n * @suppress {strictMissingProperties} Added to tighten compiler checks\n */\ngoog.events.fireListener = function(listener, eventObject) {\n  'use strict';\n  const listenerFn = listener.listener;\n  const listenerHandler = listener.handler || listener.src;\n\n  if (listener.callOnce) {\n    goog.events.unlistenByKey(listener);\n  }\n  return listenerFn.call(listenerHandler, eventObject);\n};\n\n\n/**\n * Gets the total number of listeners currently in the system.\n * @return {number} Number of listeners.\n * @deprecated This returns estimated count, now that Closure no longer\n * stores a central listener registry. We still return an estimation\n * to keep existing listener-related tests passing. In the near future,\n * this function will be removed.\n */\ngoog.events.getTotalListenerCount = function() {\n  'use strict';\n  return goog.events.listenerCountEstimate_;\n};\n\n\n/**\n * Dispatches an event (or event like object) and calls all listeners\n * listening for events of this type. The type of the event is decided by the\n * type property on the event object.\n *\n * If any of the listeners returns false OR calls preventDefault then this\n * function will return false.  If one of the capture listeners calls\n * stopPropagation, then the bubble listeners won't fire.\n *\n * @param {goog.events.Listenable} src The event target.\n * @param {goog.events.EventLike} e Event object.\n * @return {boolean} If anyone called preventDefault on the event object (or\n *     if any of the handlers returns false) this will also return false.\n *     If there are no handlers, or if all handlers return true, this returns\n *     true.\n */\ngoog.events.dispatchEvent = function(src, e) {\n  'use strict';\n  goog.asserts.assert(\n      goog.events.Listenable.isImplementedBy(src),\n      'Can not use goog.events.dispatchEvent with ' +\n          'non-goog.events.Listenable instance.');\n  return src.dispatchEvent(e);\n};\n\n\n/**\n * Installs exception protection for the browser event entry point using the\n * given error handler.\n *\n * @param {goog.debug.ErrorHandler} errorHandler Error handler with which to\n *     protect the entry point.\n */\ngoog.events.protectBrowserEventEntryPoint = function(errorHandler) {\n  'use strict';\n  goog.events.handleBrowserEvent_ =\n      errorHandler.protectEntryPoint(goog.events.handleBrowserEvent_);\n};\n\n\n/**\n * Handles an event and dispatches it to the correct listeners. This\n * function is a proxy for the real listener the user specified.\n *\n * @param {goog.events.Listener} listener The listener object.\n * @param {Event=} opt_evt Optional event object that gets passed in via the\n *     native event handlers.\n * @return {*} Result of the event handler.\n * @this {EventTarget} The object or Element that fired the event.\n * @private\n */\ngoog.events.handleBrowserEvent_ = function(listener, opt_evt) {\n  'use strict';\n  if (listener.removed) {\n    return true;\n  }\n\n  // Otherwise, simply fire the listener.\n  return goog.events.fireListener(\n      listener, new goog.events.BrowserEvent(opt_evt, this));\n};\n\n\n/**\n * This is used to mark the IE event object so we do not do the Closure pass\n * twice for a bubbling event.\n * @param {Event} e The IE browser event.\n * @private\n */\ngoog.events.markIeEvent_ = function(e) {\n  'use strict';\n  // Only the keyCode and the returnValue can be changed. We use keyCode for\n  // non keyboard events.\n  // event.returnValue is a bit more tricky. It is undefined by default. A\n  // boolean false prevents the default action. In a window.onbeforeunload and\n  // the returnValue is non undefined it will be alerted. However, we will only\n  // modify the returnValue for keyboard events. We can get a problem if non\n  // closure events sets the keyCode or the returnValue\n\n  let useReturnValue = false;\n\n  if (e.keyCode == 0) {\n    // We cannot change the keyCode in case that srcElement is input[type=file].\n    // We could test that that is the case but that would allocate 3 objects.\n    // If we use try/catch we will only allocate extra objects in the case of a\n    // failure.\n\n    try {\n      e.keyCode = -1;\n      return;\n    } catch (ex) {\n      useReturnValue = true;\n    }\n  }\n\n  if (useReturnValue ||\n      /** @type {boolean|undefined} */ (e.returnValue) == undefined) {\n    e.returnValue = true;\n  }\n};\n\n\n/**\n * This is used to check if an IE event has already been handled by the Closure\n * system so we do not do the Closure pass twice for a bubbling event.\n * @param {Event} e  The IE browser event.\n * @return {boolean} True if the event object has been marked.\n * @private\n */\ngoog.events.isMarkedIeEvent_ = function(e) {\n  'use strict';\n  return e.keyCode < 0 || e.returnValue != undefined;\n};\n\n\n/**\n * Counter to create unique event ids.\n * @private {number}\n */\ngoog.events.uniqueIdCounter_ = 0;\n\n\n/**\n * Creates a unique event id.\n *\n * @param {string} identifier The identifier.\n * @return {string} A unique identifier.\n * @idGenerator {unique}\n */\ngoog.events.getUniqueId = function(identifier) {\n  'use strict';\n  return identifier + '_' + goog.events.uniqueIdCounter_++;\n};\n\n\n/**\n * @param {EventTarget} src The source object.\n * @return {goog.events.ListenerMap} A listener map for the given\n *     source object, or null if none exists.\n * @private\n */\ngoog.events.getListenerMap_ = function(src) {\n  'use strict';\n  const listenerMap = src[goog.events.LISTENER_MAP_PROP_];\n  // IE serializes the property as well (e.g. when serializing outer\n  // HTML). So we must check that the value is of the correct type.\n  return listenerMap instanceof goog.events.ListenerMap ? listenerMap : null;\n};\n\n\n/**\n * Expando property for listener function wrapper for Object with\n * handleEvent.\n * @private @const {string}\n */\ngoog.events.LISTENER_WRAPPER_PROP_ =\n    '__closure_events_fn_' + ((Math.random() * 1e9) >>> 0);\n\n\n/**\n * @param {Object|Function} listener The listener function or an\n *     object that contains handleEvent method.\n * @return {!Function} Either the original function or a function that\n *     calls obj.handleEvent. If the same listener is passed to this\n *     function more than once, the same function is guaranteed to be\n *     returned.\n * @suppress {strictMissingProperties} Added to tighten compiler checks\n */\ngoog.events.wrapListener = function(listener) {\n  'use strict';\n  goog.asserts.assert(listener, 'Listener can not be null.');\n\n  if (typeof listener === 'function') {\n    return listener;\n  }\n\n  goog.asserts.assert(\n      listener.handleEvent, 'An object listener must have handleEvent method.');\n  if (!listener[goog.events.LISTENER_WRAPPER_PROP_]) {\n    listener[goog.events.LISTENER_WRAPPER_PROP_] = function(e) {\n      'use strict';\n      return /** @type {?} */ (listener).handleEvent(e);\n    };\n  }\n  return listener[goog.events.LISTENER_WRAPPER_PROP_];\n};\n\n\n// Register the browser event handler as an entry point, so that\n// it can be monitored for exception handling, etc.\ngoog.debug.entryPointRegistry.register(\n    /**\n     * @param {function(!Function): !Function} transformer The transforming\n     *     function.\n     */\n    function(transformer) {\n      'use strict';\n      goog.events.handleBrowserEvent_ =\n          transformer(goog.events.handleBrowserEvent_);\n    });\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview A disposable implementation of a custom\n * listenable/event target. See also: documentation for\n * `goog.events.Listenable`.\n *\n * @see goog.events.Listenable\n */\n\ngoog.provide('goog.events.EventTarget');\n\ngoog.require('goog.Disposable');\ngoog.require('goog.asserts');\ngoog.require('goog.events');\ngoog.require('goog.events.Event');\ngoog.require('goog.events.Listenable');\ngoog.require('goog.events.ListenerMap');\ngoog.require('goog.object');\ngoog.requireType('goog.events.EventId');\ngoog.requireType('goog.events.EventLike');\ngoog.requireType('goog.events.ListenableKey');\n\n\n\n/**\n * An implementation of `goog.events.Listenable` with full W3C\n * EventTarget-like support (capture/bubble mechanism, stopping event\n * propagation, preventing default actions).\n *\n * You may subclass this class to turn your class into a Listenable.\n *\n * Unless propagation is stopped, an event dispatched by an\n * EventTarget will bubble to the parent returned by\n * `getParentEventTarget`. To set the parent, call\n * `setParentEventTarget`. Subclasses that don't support\n * changing the parent can override the setter to throw an error.\n *\n * Example usage:\n * <pre>\n *   var source = new goog.events.EventTarget();\n *   function handleEvent(e) {\n *     alert('Type: ' + e.type + '; Target: ' + e.target);\n *   }\n *   source.listen('foo', handleEvent);\n *   // Or: goog.events.listen(source, 'foo', handleEvent);\n *   ...\n *   source.dispatchEvent('foo');  // will call handleEvent\n *   ...\n *   source.unlisten('foo', handleEvent);\n *   // Or: goog.events.unlisten(source, 'foo', handleEvent);\n * </pre>\n *\n * @constructor\n * @extends {goog.Disposable}\n * @implements {goog.events.Listenable}\n */\ngoog.events.EventTarget = function() {\n  'use strict';\n  goog.Disposable.call(this);\n\n  /**\n   * Maps of event type to an array of listeners.\n   * @private {!goog.events.ListenerMap}\n   */\n  this.eventTargetListeners_ = new goog.events.ListenerMap(this);\n\n  /**\n   * The object to use for event.target. Useful when mixing in an\n   * EventTarget to another object.\n   * @private {!Object}\n   */\n  this.actualEventTarget_ = this;\n\n  /**\n   * Parent event target, used during event bubbling.\n   *\n   * TODO(chrishenry): Change this to goog.events.Listenable. This\n   * currently breaks people who expect getParentEventTarget to return\n   * goog.events.EventTarget.\n   *\n   * @private {?goog.events.EventTarget}\n   */\n  this.parentEventTarget_ = null;\n};\ngoog.inherits(goog.events.EventTarget, goog.Disposable);\ngoog.events.Listenable.addImplementation(goog.events.EventTarget);\n\n\n/**\n * An artificial cap on the number of ancestors you can have. This is mainly\n * for loop detection.\n * @const {number}\n * @private\n */\ngoog.events.EventTarget.MAX_ANCESTORS_ = 1000;\n\n\n/**\n * Returns the parent of this event target to use for bubbling.\n *\n * @return {goog.events.EventTarget} The parent EventTarget or null if\n *     there is no parent.\n * @override\n */\ngoog.events.EventTarget.prototype.getParentEventTarget = function() {\n  'use strict';\n  return this.parentEventTarget_;\n};\n\n\n/**\n * Sets the parent of this event target to use for capture/bubble\n * mechanism.\n * @param {goog.events.EventTarget} parent Parent listenable (null if none).\n */\ngoog.events.EventTarget.prototype.setParentEventTarget = function(parent) {\n  'use strict';\n  this.parentEventTarget_ = parent;\n};\n\n\n/**\n * Adds an event listener to the event target. The same handler can only be\n * added once per the type. Even if you add the same handler multiple times\n * using the same type then it will only be called once when the event is\n * dispatched.\n *\n * @param {string|!goog.events.EventId} type The type of the event to listen for\n * @param {function(?):?|{handleEvent:function(?):?}|null} handler The function\n *     to handle the event. The handler can also be an object that implements\n *     the handleEvent method which takes the event object as argument.\n * @param {boolean=} opt_capture In DOM-compliant browsers, this determines\n *     whether the listener is fired during the capture or bubble phase\n *     of the event.\n * @param {Object=} opt_handlerScope Object in whose scope to call\n *     the listener.\n * @deprecated Use `goog.events.EventTarget.prototype.listen` instead, when\n *     possible. Otherwise, use `goog.events.listen` if you are passing Object\n *     (instead of Function) as handler.\n */\ngoog.events.EventTarget.prototype.addEventListener = function(\n    type, handler, opt_capture, opt_handlerScope) {\n  'use strict';\n  goog.events.listen(this, type, handler, opt_capture, opt_handlerScope);\n};\n\n\n/**\n * Removes an event listener from the event target. The handler must be the\n * same object as the one added. If the handler has not been added then\n * nothing is done.\n *\n * @param {string|!goog.events.EventId} type The type of the event to listen for\n * @param {function(?):?|{handleEvent:function(?):?}|null} handler The function\n *     to handle the event. The handler can also be an object that implements\n *     the handleEvent method which takes the event object as argument.\n * @param {boolean=} opt_capture In DOM-compliant browsers, this determines\n *     whether the listener is fired during the capture or bubble phase\n *     of the event.\n * @param {Object=} opt_handlerScope Object in whose scope to call\n *     the listener.\n * @deprecated Use `#unlisten` instead, when possible. Otherwise, use\n *     `goog.events.unlisten` if you are passing Object\n *     (instead of Function) as handler.\n */\ngoog.events.EventTarget.prototype.removeEventListener = function(\n    type, handler, opt_capture, opt_handlerScope) {\n  'use strict';\n  goog.events.unlisten(this, type, handler, opt_capture, opt_handlerScope);\n};\n\n\n/**\n * @param {?goog.events.EventLike} e Event object.\n * @return {boolean} If anyone called preventDefault on the event object (or\n *     if any of the listeners returns false) this will also return false.\n * @override\n */\ngoog.events.EventTarget.prototype.dispatchEvent = function(e) {\n  'use strict';\n  this.assertInitialized_();\n\n  let ancestorsTree;\n  let ancestor = this.getParentEventTarget();\n  if (ancestor) {\n    ancestorsTree = [];\n    let ancestorCount = 1;\n    for (; ancestor; ancestor = ancestor.getParentEventTarget()) {\n      ancestorsTree.push(ancestor);\n      goog.asserts.assert(\n          (++ancestorCount < goog.events.EventTarget.MAX_ANCESTORS_),\n          'infinite loop');\n    }\n  }\n\n  return goog.events.EventTarget.dispatchEventInternal_(\n      this.actualEventTarget_, e, ancestorsTree);\n};\n\n\n/**\n * Removes listeners from this object.  Classes that extend EventTarget may\n * need to override this method in order to remove references to DOM Elements\n * and additional listeners.\n * @override\n * @protected\n */\ngoog.events.EventTarget.prototype.disposeInternal = function() {\n  'use strict';\n  goog.events.EventTarget.superClass_.disposeInternal.call(this);\n\n  this.removeAllListeners();\n  this.parentEventTarget_ = null;\n};\n\n\n/**\n * @param {string|!goog.events.EventId<EVENTOBJ>} type The event type id.\n * @param {function(this:SCOPE, EVENTOBJ):(boolean|undefined)} listener Callback\n *     method.\n * @param {boolean=} opt_useCapture Whether to fire in capture phase\n *     (defaults to false).\n * @param {SCOPE=} opt_listenerScope Object in whose scope to call the\n *     listener.\n * @return {!goog.events.ListenableKey} Unique key for the listener.\n * @template SCOPE,EVENTOBJ\n * @override\n */\ngoog.events.EventTarget.prototype.listen = function(\n    type, listener, opt_useCapture, opt_listenerScope) {\n  'use strict';\n  this.assertInitialized_();\n  return this.eventTargetListeners_.add(\n      String(type), listener, false /* callOnce */, opt_useCapture,\n      opt_listenerScope);\n};\n\n\n/**\n * @param {string|!goog.events.EventId<EVENTOBJ>} type The event type id.\n * @param {function(this:SCOPE, EVENTOBJ):(boolean|undefined)} listener Callback\n *     method.\n * @param {boolean=} opt_useCapture Whether to fire in capture phase\n *     (defaults to false).\n * @param {SCOPE=} opt_listenerScope Object in whose scope to call the\n *     listener.\n * @return {!goog.events.ListenableKey} Unique key for the listener.\n * @template SCOPE,EVENTOBJ\n * @override\n */\ngoog.events.EventTarget.prototype.listenOnce = function(\n    type, listener, opt_useCapture, opt_listenerScope) {\n  'use strict';\n  return this.eventTargetListeners_.add(\n      String(type), listener, true /* callOnce */, opt_useCapture,\n      opt_listenerScope);\n};\n\n\n/**\n * @param {string|!goog.events.EventId<EVENTOBJ>} type The event type id.\n * @param {function(this:SCOPE, EVENTOBJ):(boolean|undefined)} listener Callback\n *     method.\n * @param {boolean=} opt_useCapture Whether to fire in capture phase\n *     (defaults to false).\n * @param {SCOPE=} opt_listenerScope Object in whose scope to call\n *     the listener.\n * @return {boolean} Whether any listener was removed.\n * @template SCOPE,EVENTOBJ\n * @override\n */\ngoog.events.EventTarget.prototype.unlisten = function(\n    type, listener, opt_useCapture, opt_listenerScope) {\n  'use strict';\n  return this.eventTargetListeners_.remove(\n      String(type), listener, opt_useCapture, opt_listenerScope);\n};\n\n\n/**\n * @param {!goog.events.ListenableKey} key The key returned by\n *     listen() or listenOnce().\n * @return {boolean} Whether any listener was removed.\n * @override\n */\ngoog.events.EventTarget.prototype.unlistenByKey = function(key) {\n  'use strict';\n  return this.eventTargetListeners_.removeByKey(key);\n};\n\n\n/**\n * @param {string|!goog.events.EventId=} opt_type Type of event to remove,\n *     default is to remove all types.\n * @return {number} Number of listeners removed.\n * @override\n */\ngoog.events.EventTarget.prototype.removeAllListeners = function(opt_type) {\n  'use strict';\n  // TODO(chrishenry): Previously, removeAllListeners can be called on\n  // uninitialized EventTarget, so we preserve that behavior. We\n  // should remove this when usages that rely on that fact are purged.\n  if (!this.eventTargetListeners_) {\n    return 0;\n  }\n  return this.eventTargetListeners_.removeAll(opt_type);\n};\n\n\n/**\n * @param {string|!goog.events.EventId<EVENTOBJ>} type The type of the\n *     listeners to fire.\n * @param {boolean} capture The capture mode of the listeners to fire.\n * @param {EVENTOBJ} eventObject The event object to fire.\n * @return {boolean} Whether all listeners succeeded without\n *     attempting to prevent default behavior. If any listener returns\n *     false or called goog.events.Event#preventDefault, this returns\n *     false.\n * @template EVENTOBJ\n * @override\n */\ngoog.events.EventTarget.prototype.fireListeners = function(\n    type, capture, eventObject) {\n  'use strict';\n  // TODO(chrishenry): Original code avoids array creation when there\n  // is no listener, so we do the same. If this optimization turns\n  // out to be not required, we can replace this with\n  // getListeners(type, capture) instead, which is simpler.\n  let listenerArray = this.eventTargetListeners_.listeners[String(type)];\n  if (!listenerArray) {\n    return true;\n  }\n  listenerArray = listenerArray.concat();\n\n  let rv = true;\n  for (let i = 0; i < listenerArray.length; ++i) {\n    const listener = listenerArray[i];\n    // We might not have a listener if the listener was removed.\n    if (listener && !listener.removed && listener.capture == capture) {\n      const listenerFn = listener.listener;\n      const listenerHandler = listener.handler || listener.src;\n\n      if (listener.callOnce) {\n        this.unlistenByKey(listener);\n      }\n      rv = listenerFn.call(listenerHandler, eventObject) !== false && rv;\n    }\n  }\n\n  return rv && !eventObject.defaultPrevented;\n};\n\n\n/**\n * @param {string|!goog.events.EventId} type The type of the listeners to fire.\n * @param {boolean} capture The capture mode of the listeners to fire.\n * @return {!Array<!goog.events.ListenableKey>} An array of registered\n *     listeners.\n * @template EVENTOBJ\n * @override\n */\ngoog.events.EventTarget.prototype.getListeners = function(type, capture) {\n  'use strict';\n  return this.eventTargetListeners_.getListeners(String(type), capture);\n};\n\n\n/**\n * @param {string|!goog.events.EventId<EVENTOBJ>} type The name of the event\n *     without the 'on' prefix.\n * @param {function(this:SCOPE, EVENTOBJ):(boolean|undefined)} listener The\n *     listener function to get.\n * @param {boolean} capture Whether the listener is a capturing listener.\n * @param {SCOPE=} opt_listenerScope Object in whose scope to call the\n *     listener.\n * @return {?goog.events.ListenableKey} the found listener or null if not found.\n * @template SCOPE,EVENTOBJ\n * @override\n */\ngoog.events.EventTarget.prototype.getListener = function(\n    type, listener, capture, opt_listenerScope) {\n  'use strict';\n  return this.eventTargetListeners_.getListener(\n      String(type), listener, capture, opt_listenerScope);\n};\n\n\n/**\n * @param {string|!goog.events.EventId<EVENTOBJ>=} opt_type Event type.\n * @param {boolean=} opt_capture Whether to check for capture or bubble\n *     listeners.\n * @return {boolean} Whether there is any active listeners matching\n *     the requested type and/or capture phase.\n * @template EVENTOBJ\n * @override\n */\ngoog.events.EventTarget.prototype.hasListener = function(\n    opt_type, opt_capture) {\n  'use strict';\n  const id = (opt_type !== undefined) ? String(opt_type) : undefined;\n  return this.eventTargetListeners_.hasListener(id, opt_capture);\n};\n\n\n/**\n * Sets the target to be used for `event.target` when firing\n * event. Mainly used for testing. For example, see\n * `goog.testing.events.mixinListenable`.\n * @param {!Object} target The target.\n */\ngoog.events.EventTarget.prototype.setTargetForTesting = function(target) {\n  'use strict';\n  this.actualEventTarget_ = target;\n};\n\n\n/**\n * Asserts that the event target instance is initialized properly.\n * @private\n */\ngoog.events.EventTarget.prototype.assertInitialized_ = function() {\n  'use strict';\n  goog.asserts.assert(\n      this.eventTargetListeners_,\n      'Event target is not initialized. Did you call the superclass ' +\n          '(goog.events.EventTarget) constructor?');\n};\n\n\n/**\n * Dispatches the given event on the ancestorsTree.\n *\n * @param {!Object} target The target to dispatch on.\n * @param {goog.events.Event|Object|string} e The event object.\n * @param {Array<goog.events.Listenable>=} opt_ancestorsTree The ancestors\n *     tree of the target, in reverse order from the closest ancestor\n *     to the root event target. May be null if the target has no ancestor.\n * @return {boolean} If anyone called preventDefault on the event object (or\n *     if any of the listeners returns false) this will also return false.\n * @private\n */\ngoog.events.EventTarget.dispatchEventInternal_ = function(\n    target, e, opt_ancestorsTree) {\n  'use strict';\n  /** @suppress {missingProperties} */\n  const type = e.type || /** @type {string} */ (e);\n\n  // If accepting a string or object, create a custom event object so that\n  // preventDefault and stopPropagation work with the event.\n  if (typeof e === 'string') {\n    e = new goog.events.Event(e, target);\n  } else if (!(e instanceof goog.events.Event)) {\n    const oldEvent = e;\n    e = new goog.events.Event(type, target);\n    goog.object.extend(e, oldEvent);\n  } else {\n    e.target = e.target || target;\n  }\n\n  let rv = true;\n  let currentTarget;\n\n  // Executes all capture listeners on the ancestors, if any.\n  let i;\n  if (opt_ancestorsTree) {\n    for (i = opt_ancestorsTree.length - 1; !e.hasPropagationStopped() && i >= 0;\n         i--) {\n      currentTarget = e.currentTarget = opt_ancestorsTree[i];\n      rv = currentTarget.fireListeners(type, true, e) && rv;\n    }\n  }\n\n  // Executes capture and bubble listeners on the target.\n  if (!e.hasPropagationStopped()) {\n    currentTarget = /** @type {?} */ (e.currentTarget = target);\n    rv = currentTarget.fireListeners(type, true, e) && rv;\n    if (!e.hasPropagationStopped()) {\n      rv = currentTarget.fireListeners(type, false, e) && rv;\n    }\n  }\n\n  // Executes all bubble listeners on the ancestors, if any.\n  if (opt_ancestorsTree) {\n    for (i = 0; !e.hasPropagationStopped() && i < opt_ancestorsTree.length;\n         i++) {\n      currentTarget = e.currentTarget = opt_ancestorsTree[i];\n      rv = currentTarget.fireListeners(type, false, e) && rv;\n    }\n  }\n\n  return rv;\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Class to create objects which want to handle multiple events\n * and have their listeners easily cleaned up via a dispose method.\n *\n * Example:\n * <pre>\n * function Something() {\n *   Something.base(this);\n *\n *   ... set up object ...\n *\n *   // Add event listeners\n *   this.listen(this.starEl, goog.events.EventType.CLICK, this.handleStar);\n *   this.listen(this.headerEl, goog.events.EventType.CLICK, this.expand);\n *   this.listen(this.collapseEl, goog.events.EventType.CLICK, this.collapse);\n *   this.listen(this.infoEl, goog.events.EventType.MOUSEOVER, this.showHover);\n *   this.listen(this.infoEl, goog.events.EventType.MOUSEOUT, this.hideHover);\n * }\n * goog.inherits(Something, goog.events.EventHandler);\n *\n * Something.prototype.disposeInternal = function() {\n *   Something.base(this, 'disposeInternal');\n *   goog.dom.removeNode(this.container);\n * };\n *\n *\n * // Then elsewhere:\n *\n * var activeSomething = null;\n * function openSomething() {\n *   activeSomething = new Something();\n * }\n *\n * function closeSomething() {\n *   if (activeSomething) {\n *     activeSomething.dispose();  // Remove event listeners\n *     activeSomething = null;\n *   }\n * }\n * </pre>\n */\ngoog.module('goog.events.EventHandler');\ngoog.module.declareLegacyNamespace();\n\nconst Disposable = goog.require('goog.Disposable');\nconst EventId = goog.requireType('goog.events.EventId');\nconst EventWrapper = goog.requireType('goog.events.EventWrapper');\nconst GoogEvent = goog.requireType('goog.events.Event');\nconst GoogEventTarget = goog.requireType('goog.events.EventTarget');\nconst events = goog.require('goog.events');\nconst googObject = goog.require('goog.object');\n\n/**\n * Super class for objects that want to easily manage a number of event\n * listeners.  It allows a short cut to listen and also provides a quick way\n * to remove all events listeners belonging to this object.\n * @param {SCOPE=} opt_scope Object in whose scope to call the listeners.\n * @constructor\n * @extends {Disposable}\n * @template SCOPE\n */\nfunction EventHandler(opt_scope) {\n  Disposable.call(this);\n  // TODO(mknichel): Rename this to this.scope_ and fix the classes in google3\n  // that access this private variable. :(\n  this.handler_ = opt_scope;\n\n  /**\n   * Keys for events that are being listened to.\n   * @type {!Object<!events.Key>}\n   * @private\n   */\n  this.keys_ = {};\n}\ngoog.inherits(EventHandler, Disposable);\n\n/**\n * Utility array used to unify the cases of listening for an array of types\n * and listening for a single event, without using recursion or allocating\n * an array each time.\n * @type {!Array<string>}\n * @const\n * @private\n */\nEventHandler.typeArray_ = [];\n\n/**\n * Listen to an event on a Listenable.  If the function is omitted then the\n * EventHandler's handleEvent method will be used.\n * @param {events.ListenableType} src Event source.\n * @param {string|Array<string>|\n *     !EventId<EVENTOBJ>|!Array<!EventId<EVENTOBJ>>}\n *     type Event type to listen for or array of event types.\n * @param {function(this:SCOPE, EVENTOBJ):?|{handleEvent:function(?):?}|null=}\n *     opt_fn Optional callback function to be used as the listener or an object\n *     with handleEvent function.\n * @param {(boolean|!AddEventListenerOptions)=} opt_options\n * @return {THIS} This object, allowing for chaining of calls.\n * @this {THIS}\n * @template EVENTOBJ, THIS\n */\nEventHandler.prototype.listen = function(src, type, opt_fn, opt_options) {\n  const self = /** @type {!EventHandler} */ (this);\n  return self.listen_(src, type, opt_fn, opt_options);\n};\n\n/**\n * Listen to an event on a Listenable.  If the function is omitted then the\n * EventHandler's handleEvent method will be used.\n * @param {events.ListenableType} src Event source.\n * @param {string|Array<string>|\n *     !EventId<EVENTOBJ>|!Array<!EventId<EVENTOBJ>>}\n *     type Event type to listen for or array of event types.\n * @param {function(this:T, EVENTOBJ):?|{handleEvent:function(this:T, ?):?}|\n *     null|undefined} fn Optional callback function to be used as the\n *     listener or an object with handleEvent function.\n * @param {boolean|!AddEventListenerOptions|undefined} options\n * @param {T} scope Object in whose scope to call the listener.\n * @return {THIS} This object, allowing for chaining of calls.\n * @this {THIS}\n * @template T, EVENTOBJ, THIS\n */\nEventHandler.prototype.listenWithScope = function(\n    src, type, fn, options, scope) {\n  const self = /** @type {!EventHandler} */ (this);\n  // TODO(mknichel): Deprecate this function.\n  return self.listen_(src, type, fn, options, scope);\n};\n\n/**\n * Listen to an event on a Listenable.  If the function is omitted then the\n * EventHandler's handleEvent method will be used.\n * @param {events.ListenableType} src Event source.\n * @param {string|Array<string>|\n *     !EventId<EVENTOBJ>|!Array<!EventId<EVENTOBJ>>}\n *     type Event type to listen for or array of event types.\n * @param {function(EVENTOBJ):?|{handleEvent:function(?):?}|null=} opt_fn\n *     Optional callback function to be used as the listener or an object with\n *     handleEvent function.\n * @param {(boolean|!AddEventListenerOptions)=} opt_options\n * @param {Object=} opt_scope Object in whose scope to call the listener.\n * @return {THIS} This object, allowing for chaining of calls.\n * @this {THIS}\n * @template EVENTOBJ, THIS\n * @private\n */\nEventHandler.prototype.listen_ = function(\n    src, type, opt_fn, opt_options, opt_scope) {\n  const self = /** @type {!EventHandler} */ (this);\n  if (!Array.isArray(type)) {\n    if (type) {\n      EventHandler.typeArray_[0] = type.toString();\n    }\n    type = EventHandler.typeArray_;\n  }\n  for (let i = 0; i < type.length; i++) {\n    const listenerObj = events.listen(\n        src, type[i], opt_fn || self.handleEvent, opt_options || false,\n        opt_scope || self.handler_ || self);\n\n    if (!listenerObj) {\n      // When goog.events.listen run on OFF_AND_FAIL or OFF_AND_SILENT\n      // (goog.events.CaptureSimulationMode) in IE8-, it will return null\n      // value.\n      return self;\n    }\n\n    /** @suppress {strictMissingProperties} Added to tighten compiler checks */\n    const key = listenerObj.key;\n    self.keys_[key] = listenerObj;\n  }\n\n  return self;\n};\n\n/**\n * Listen to an event on a Listenable.  If the function is omitted, then the\n * EventHandler's handleEvent method will be used. After the event has fired the\n * event listener is removed from the target. If an array of event types is\n * provided, each event type will be listened to once.\n * @param {events.ListenableType} src Event source.\n * @param {string|Array<string>|\n *     !EventId<EVENTOBJ>|!Array<!EventId<EVENTOBJ>>}\n *     type Event type to listen for or array of event types.\n * @param {function(this:SCOPE, EVENTOBJ):?|{handleEvent:function(?):?}|null=}\n * opt_fn\n *    Optional callback function to be used as the listener or an object with\n *    handleEvent function.\n * @param {(boolean|!AddEventListenerOptions)=} opt_options\n * @return {THIS} This object, allowing for chaining of calls.\n * @this {THIS}\n * @template EVENTOBJ, THIS\n */\nEventHandler.prototype.listenOnce = function(src, type, opt_fn, opt_options) {\n  const self = /** @type {!EventHandler} */ (this);\n  return self.listenOnce_(src, type, opt_fn, opt_options);\n};\n\n/**\n * Listen to an event on a Listenable.  If the function is omitted, then the\n * EventHandler's handleEvent method will be used. After the event has fired the\n * event listener is removed from the target. If an array of event types is\n * provided, each event type will be listened to once.\n * @param {events.ListenableType} src Event source.\n * @param {string|Array<string>|\n *     !EventId<EVENTOBJ>|!Array<!EventId<EVENTOBJ>>}\n *     type Event type to listen for or array of event types.\n * @param {function(this:T, EVENTOBJ):?|{handleEvent:function(this:T, ?):?}|\n *     null|undefined} fn Optional callback function to be used as the\n *     listener or an object with handleEvent function.\n * @param {boolean|undefined} capture Optional whether to use capture phase.\n * @param {T} scope Object in whose scope to call the listener.\n * @return {THIS} This object, allowing for chaining of calls.\n * @this {THIS}\n * @template T, EVENTOBJ, THIS\n */\nEventHandler.prototype.listenOnceWithScope = function(\n    src, type, fn, capture, scope) {\n  const self = /** @type {!EventHandler} */ (this);\n  // TODO(mknichel): Deprecate this function.\n  return self.listenOnce_(src, type, fn, capture, scope);\n};\n\n/**\n * Listen to an event on a Listenable.  If the function is omitted, then the\n * EventHandler's handleEvent method will be used. After the event has fired\n * the event listener is removed from the target. If an array of event types is\n * provided, each event type will be listened to once.\n * @param {events.ListenableType} src Event source.\n * @param {string|Array<string>|\n *     !EventId<EVENTOBJ>|!Array<!EventId<EVENTOBJ>>}\n *     type Event type to listen for or array of event types.\n * @param {function(EVENTOBJ):?|{handleEvent:function(?):?}|null=} opt_fn\n *    Optional callback function to be used as the listener or an object with\n *    handleEvent function.\n * @param {(boolean|!AddEventListenerOptions)=} opt_options\n * @param {Object=} opt_scope Object in whose scope to call the listener.\n * @return {THIS} This object, allowing for chaining of calls.\n * @this {THIS}\n * @template EVENTOBJ, THIS\n * @private\n */\nEventHandler.prototype.listenOnce_ = function(\n    src, type, opt_fn, opt_options, opt_scope) {\n  const self = /** @type {!EventHandler} */ (this);\n  if (Array.isArray(type)) {\n    for (let i = 0; i < type.length; i++) {\n      self.listenOnce_(src, type[i], opt_fn, opt_options, opt_scope);\n    }\n  } else {\n    const listenerObj = events.listenOnce(\n        src, type, opt_fn || self.handleEvent, opt_options,\n        opt_scope || self.handler_ || self);\n    if (!listenerObj) {\n      // When goog.events.listen run on OFF_AND_FAIL or OFF_AND_SILENT\n      // (goog.events.CaptureSimulationMode) in IE8-, it will return null\n      // value.\n      return self;\n    }\n\n    /** @suppress {strictMissingProperties} Added to tighten compiler checks */\n    const key = listenerObj.key;\n    self.keys_[key] = listenerObj;\n  }\n\n  return self;\n};\n\n/**\n * Adds an event listener with a specific event wrapper on a DOM Node or an\n * object that has implemented {@link goog.events.EventTarget}. A listener can\n * only be added once to an object.\n *\n * @param {EventTarget|GoogEventTarget} src The node to listen to\n *     events on.\n * @param {EventWrapper} wrapper Event wrapper to use.\n * @param {function(this:SCOPE, ?):?|{handleEvent:function(?):?}|null} listener\n *     Callback method, or an object with a handleEvent function.\n * @param {boolean=} opt_capt Whether to fire in capture phase (defaults to\n *     false).\n * @return {THIS} This object, allowing for chaining of calls.\n * @this {THIS}\n * @template THIS\n */\nEventHandler.prototype.listenWithWrapper = function(\n    src, wrapper, listener, opt_capt) {\n  const self = /** @type {!EventHandler} */ (this);\n  // TODO(mknichel): Remove the opt_scope from this function and then\n  // templatize it.\n  return self.listenWithWrapper_(src, wrapper, listener, opt_capt);\n};\n\n/**\n * Adds an event listener with a specific event wrapper on a DOM Node or an\n * object that has implemented {@link goog.events.EventTarget}. A listener can\n * only be added once to an object.\n *\n * @param {EventTarget|GoogEventTarget} src The node to listen to\n *     events on.\n * @param {EventWrapper} wrapper Event wrapper to use.\n * @param {function(this:T, ?):?|{handleEvent:function(this:T, ?):?}|null}\n *     listener Optional callback function to be used as the\n *     listener or an object with handleEvent function.\n * @param {boolean|undefined} capture Optional whether to use capture phase.\n * @param {T} scope Object in whose scope to call the listener.\n * @return {THIS} This object, allowing for chaining of calls.\n * @this {THIS}\n * @template T, THIS\n */\nEventHandler.prototype.listenWithWrapperAndScope = function(\n    src, wrapper, listener, capture, scope) {\n  const self = /** @type {!EventHandler} */ (this);\n  // TODO(mknichel): Deprecate this function.\n  return self.listenWithWrapper_(src, wrapper, listener, capture, scope);\n};\n\n/**\n * Adds an event listener with a specific event wrapper on a DOM Node or an\n * object that has implemented {@link goog.events.EventTarget}. A listener can\n * only be added once to an object.\n *\n * @param {EventTarget|GoogEventTarget} src The node to listen to\n *     events on.\n * @param {EventWrapper} wrapper Event wrapper to use.\n * @param {function(?):?|{handleEvent:function(?):?}|null} listener Callback\n *     method, or an object with a handleEvent function.\n * @param {boolean=} opt_capt Whether to fire in capture phase (defaults to\n *     false).\n * @param {Object=} opt_scope Element in whose scope to call the listener.\n * @return {THIS} This object, allowing for chaining of calls.\n * @this {THIS}\n * @template THIS\n * @private\n */\nEventHandler.prototype.listenWithWrapper_ = function(\n    src, wrapper, listener, opt_capt, opt_scope) {\n  const self = /** @type {!EventHandler} */ (this);\n  wrapper.listen(\n      src, listener, opt_capt, opt_scope || self.handler_ || self, self);\n  return self;\n};\n\n/**\n * @return {number} Number of listeners registered by this handler.\n */\nEventHandler.prototype.getListenerCount = function() {\n  let count = 0;\n  for (const key in this.keys_) {\n    if (Object.prototype.hasOwnProperty.call(this.keys_, key)) {\n      count++;\n    }\n  }\n  return count;\n};\n\n/**\n * Unlistens on an event.\n * @param {events.ListenableType} src Event source.\n * @param {string|Array<string>|\n *     !EventId<EVENTOBJ>|!Array<!EventId<EVENTOBJ>>}\n *     type Event type or array of event types to unlisten to.\n * @param {function(this:?, EVENTOBJ):?|{handleEvent:function(?):?}|null=}\n *     opt_fn Optional callback function to be used as the listener or an object\n *     with handleEvent function.\n * @param {(boolean|!EventListenerOptions)=} opt_options\n * @param {Object=} opt_scope Object in whose scope to call the listener.\n * @return {THIS} This object, allowing for chaining of calls.\n * @this {THIS}\n * @template EVENTOBJ, THIS\n */\nEventHandler.prototype.unlisten = function(\n    src, type, opt_fn, opt_options, opt_scope) {\n  const self = /** @type {!EventHandler} */ (this);\n  if (Array.isArray(type)) {\n    for (let i = 0; i < type.length; i++) {\n      self.unlisten(src, type[i], opt_fn, opt_options, opt_scope);\n    }\n  } else {\n    const capture =\n        goog.isObject(opt_options) ? !!opt_options.capture : !!opt_options;\n    const listener = events.getListener(\n        src, type, opt_fn || self.handleEvent, capture,\n        opt_scope || self.handler_ || self);\n\n    if (listener) {\n      events.unlistenByKey(listener);\n      delete self.keys_[listener.key];\n    }\n  }\n\n  return self;\n};\n\n/**\n * Removes an event listener which was added with listenWithWrapper().\n *\n * @param {EventTarget|GoogEventTarget} src The target to stop\n *     listening to events on.\n * @param {EventWrapper} wrapper Event wrapper to use.\n * @param {function(?):?|{handleEvent:function(?):?}|null} listener The\n *     listener function to remove.\n * @param {boolean=} opt_capt In DOM-compliant browsers, this determines\n *     whether the listener is fired during the capture or bubble phase of the\n *     event.\n * @param {Object=} opt_scope Element in whose scope to call the listener.\n * @return {THIS} This object, allowing for chaining of calls.\n * @this {THIS}\n * @template THIS\n */\nEventHandler.prototype.unlistenWithWrapper = function(\n    src, wrapper, listener, opt_capt, opt_scope) {\n  const self = /** @type {!EventHandler} */ (this);\n  wrapper.unlisten(\n      src, listener, opt_capt, opt_scope || self.handler_ || self, self);\n  return self;\n};\n\n/**\n * Unlistens to all events.\n */\nEventHandler.prototype.removeAll = function() {\n  googObject.forEach(this.keys_, function(listenerObj, key) {\n    if (this.keys_.hasOwnProperty(key)) {\n      events.unlistenByKey(listenerObj);\n    }\n  }, this);\n\n  this.keys_ = {};\n};\n\n/**\n * Disposes of this EventHandler and removes all listeners that it registered.\n * @override\n * @protected\n */\nEventHandler.prototype.disposeInternal = function() {\n  EventHandler.superClass_.disposeInternal.call(this);\n  this.removeAll();\n};\n\n/**\n * Default event handler\n * @param {GoogEvent} e Event object.\n */\nEventHandler.prototype.handleEvent = function(e) {\n  throw new Error('EventHandler.handleEvent not implemented');\n};\n\nexports = EventHandler;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Interface for a factory for creating XMLHttpRequest objects\n * and metadata about them.\n */\n\ngoog.module('goog.net.XmlHttpFactory');\n\ngoog.module.declareLegacyNamespace();\n\n/** @suppress {extraRequire} Typedef. */\nconst XhrLike = goog.require('goog.net.XhrLike');\n\n/**\n * Abstract base class for an XmlHttpRequest factory.\n * @constructor\n */\nfunction XmlHttpFactory() {}\n\n\n/**\n * @return {!XhrLike.OrNative} A new XhrLike instance.\n */\nXmlHttpFactory.prototype.createInstance = goog.abstractMethod;\n\nexports = XmlHttpFactory;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview The API spec for the WebChannel messaging library.\n *\n * Similar to HTML5 WebSocket, WebChannel offers an abstraction for\n * point-to-point socket-like communication between a browser client and\n * a remote origin.\n *\n * WebChannels are created via <code>WebChannel</code>. Multiple WebChannels\n * may be multiplexed over the same WebChannelTransport, which encapsulates\n * the underlying physical connectivity over standard wire protocols\n * such as HTTP.\n *\n * A WebChannel in turn represents a logical communication channel between\n * the client and server endpoint. A WebChannel remains open for as long\n * as the client or server endpoint allows.\n *\n * Messages are delivered in-order and reliably over the same WebChannel,\n * and the choice of the underlying wire protocols is completely transparent\n * to the API users.\n *\n * Note that we have no immediate plan to move this API out of labs. While\n * the implementation is production ready, the API is subject to change.\n */\n\ngoog.module('goog.net.WebChannel');\ngoog.module.declareLegacyNamespace();\n\nconst GoogEvent = goog.require('goog.events.Event');\nconst Listenable = goog.require('goog.events.Listenable');\nconst XmlHttpFactory = goog.require('goog.net.XmlHttpFactory');\nconst events = goog.require('goog.events');\n\n/**\n * A WebChannel represents a logical bi-directional channel over which the\n * client communicates with a remote server that holds the other endpoint\n * of the channel. A WebChannel is always created in the context of a shared\n * {@link WebChannelTransport} instance. It is up to the underlying client-side\n * and server-side implementations to decide how or when multiplexing is\n * to be enabled.\n *\n * @interface\n * @extends {Listenable}\n */\nfunction WebChannel() {}\n\n/**\n * This interface defines a pluggable API to allow WebChannel runtime to support\n * customized algorithms in order to recover from transient failures such as\n * those failures caused by network or proxies (intermediaries).\n *\n * The algorithm may also choose to fail-fast, e.g. switch the client to some\n * offline mode.\n *\n * Extra measurements and logging could also be implemented in the custom\n * module, which has the full knowledge of all the state transitions\n * (due to failures).\n *\n * A default algorithm will be provided by the webchannel library itself. Custom\n * algorithms are expected to be tailored to specific client platforms or\n * networking environments, e.g. mobile, cellular network.\n *\n * @interface\n */\nWebChannel.FailureRecovery = function() {};\n\n/**\n * Configuration spec for newly created WebChannel instances.\n *\n * WebChannels are configured in the context of the containing\n * {@link WebChannelTransport}. The configuration parameters are specified\n * when a new instance of WebChannel is created via {@link WebChannelTransport}.\n * @record\n */\nWebChannel.Options = function() {};\n\n/**\n * Transport-metadata support.\n *\n * Custom HTTP headers to be added to every message sent to the server. This\n * object is mutable, and custom headers may be changed, removed, or added\n * during the runtime after a channel has been opened.\n *\n * Custom headers may trigger CORS preflight. See other related options.\n * @type {!Object<string, string>|undefined}\n */\nWebChannel.Options.prototype.messageHeaders;\n\n/**\n * Transport-metadata support.\n *\n * Similar to messageHeaders, but any custom HTTP headers will be sent only once\n * when the channel is opened as part of the handshake request. Typical usage is\n * to send an auth header to the server, which only checks the auth header at\n * the time during the handshake when the channel is opened.\n * @type {!Object<string, string>|undefined}\n */\nWebChannel.Options.prototype.initMessageHeaders;\n\n/**\n * Sent as initMessageHeaders via X-WebChannel-Content-Type,\n * to inform the server the MIME type of WebChannel messages.\n * @type {string|undefined}\n */\nWebChannel.Options.prototype.messageContentType;\n\n/**\n * Transport-metadata support.\n *\n * Custom url query parameters to be added to every message sent to the server.\n * This object is mutable, and custom parameters may be changed, removed or\n * added during the runtime after a channel has been opened.\n *\n * TODO: initMessageUrlParams\n * TODO: closeMessageUrlParams  (custom url query params to be added to the\n * channel-close message. Custom headers are not supported due to the use of\n * SendBeacon)\n *\n * @type {!Object<string, string>|undefined}\n */\nWebChannel.Options.prototype.messageUrlParams;\n\n/**\n * Whether a special header should be added to\n * each message so that the server can dispatch webchannel messages without\n * knowing the URL path prefix. Defaults to false.\n * @type {boolean|undefined}\n */\nWebChannel.Options.prototype.clientProtocolHeaderRequired;\n\n/**\n * The maximum number of in-flight HTTP requests allowed\n * when SPDY is enabled. Currently we only detect SPDY in Chrome.\n * This parameter defaults to 10. When SPDY is not enabled, this parameter\n * will have no effect.\n * @type {number|undefined}\n */\nWebChannel.Options.prototype.concurrentRequestLimit;\n\n/**\n * The maximum number of messages to batch in a single request.\n * This option defaults to 1000. Values larger than 1000 will be ignored.\n * @type {number|undefined}\n */\nWebChannel.Options.prototype.maxMessagesPerRequest;\n\n/**\n * Setting this to true to allow the use of sub-domains\n * (as configured by the server) to send XHRs with the CORS withCredentials\n * bit set to true.\n * @type {boolean|undefined}\n */\nWebChannel.Options.prototype.supportsCrossDomainXhr;\n\n/**\n * Whether to bypass v8 encoding of client-sent messages.\n * This defaults to false now due to legacy servers. New applications should\n * always configure this option to true.\n * @type {boolean|undefined}\n */\nWebChannel.Options.prototype.sendRawJson;\n\n/**\n * The URL parameter name that contains the session id (for sticky routing of\n * HTTP requests). When this param is specified, a server that supports this\n * option will respond with an opaque session id as part of the initial\n * handshake (via the X-HTTP-Session-Id header); and all the subsequent requests\n * will contain the httpSessionIdParam. This option will take precedence over\n * any duplicated parameter specified with messageUrlParams, whose value will be\n * ignored.\n * @type {string|undefined}\n */\nWebChannel.Options.prototype.httpSessionIdParam;\n\n/**\n * The URL parameter name to allow custom HTTP\n * headers to be overwritten as a URL param to bypass CORS preflight.\n *\n * @type {string|undefined}\n */\nWebChannel.Options.prototype.httpHeadersOverwriteParam;\n\n/**\n * Whether to encode Options.initMessageHeaders in the HTTP request body.\n * This option defaults to false. If true, Options.httpHeadersOverwriteParam\n * will be ignored.\n *\n * This option should not be set if Options.fastHandshake is set (which\n * uses GET for handshake).\n *\n * Web-only feature.\n *\n * @type {boolean|undefined}\n */\nWebChannel.Options.prototype.encodeInitMessageHeaders;\n\n/**\n * Whether to force long-polling from client to server.\n * This defaults to false. Long-polling may be necessary when a (MITM) proxy\n * is buffering data sent by the server.\n * @type {boolean|undefined}\n */\nWebChannel.Options.prototype.forceLongPolling;\n\n/**\n * Whether to enable automatic detection of buffering proxies. In the presence\n * of any buffering proxy, webchannel will use long-polling to send messages\n * from the server to the client. This option defaults to false.\n * Currently when fastHandshake is enabled, this option will be ignored.\n * Compared to \"forceLongPolling\", this option may introduce up to 2-RTT\n * extra latency for delivering messages generated immediately after the\n * handshake.\n * @type {boolean|undefined}\n */\nWebChannel.Options.prototype.detectBufferingProxy;\n\n/**\n * This option informs the server the desired maximum timeout interval (in\n * Milliseconds) to complete a long-polling GET response, e.g. to accommodate\n * the timeout enforced by a proxy. The WebChannel server may adjust the\n * specified timeout or may ignore this client-configured timeout.\n * @type {number|undefined}\n */\nWebChannel.Options.prototype.longPollingTimeout;\n\n/**\n * Enable true 0-RTT message delivery, including\n * leveraging QUIC 0-RTT (which requires GET to be used). This option\n * defaults to false. Note it is allowed to send messages before Open event is\n * received, after a channel has been opened. In order to enable 0-RTT,\n * messages will be encoded as part of URL and therefore there needs be a size\n * limit for those initial messages that are sent immediately as part of the\n * GET handshake request. With sendRawJson=true, this limit is currently set\n * to 4K chars and data beyond this limit will be buffered till the handshake\n * (1-RTT) finishes. With sendRawJson=false, it's up to the application\n * to limit the amount of data that is sent as part of the handshake.\n * @type {boolean|undefined}\n */\nWebChannel.Options.prototype.fastHandshake;\n\n/**\n * Enable the blocking RPC semantics for the handshake:\n * 1) the completion of handshake is blocked by the server-side application\n * logic for handling the handshake (HTTP) request; 2) the client application\n * will inspect the handshake (HTTP) response headers as generated\n * by the server application (v.s. by only the webchannel runtime). This option\n * defaults to false.\n * @type {boolean|undefined}\n */\nWebChannel.Options.prototype.blockingHandshake;\n\n/**\n * Whether to disable logging redact. By default, redact is\n * enabled to remove any message payload or user-provided info\n * from closure logs.\n * @type {boolean|undefined}\n */\nWebChannel.Options.prototype.disableRedact;\n\n/**\n * Inform the server about the client profile to enable\n * customized configs that are optimized for certain clients or environments.\n * Currently this information is sent via X-WebChannel-Client-Profile header.\n * @type {string|undefined}\n */\nWebChannel.Options.prototype.clientProfile;\n\n/**\n * The internal channel parameter name to allow\n * experimental channel configurations. Supported options include fastfail,\n * baseRetryDelayMs, retryDelaySeedMs, forwardChannelMaxRetries and\n * forwardChannelRequestTimeoutMs. Note that these options are subject to\n * change.\n * @type {!Object<string, boolean|number>|undefined}\n */\nWebChannel.Options.prototype.internalChannelParams;\n\n/**\n * Allows the caller to override the factory used to create\n * XMLHttpRequest objects. This is introduced to disable CORS on firefox OS.\n * @type {!XmlHttpFactory|undefined}\n */\nWebChannel.Options.prototype.xmlHttpFactory;\n\n/**\n * Client-side thresholds that decide when to refresh\n * an underlying HTTP request, to limit memory consumption due to XHR buffering\n * or compression context. The client-side thresholds should be significantly\n * smaller than the server-side thresholds. This allows the client to eliminate\n * any latency introduced by request refreshing, i.e. an RTT window during which\n * messages may be buffered on the server-side. Supported params include\n * totalBytesReceived, totalDurationMs.\n * @type {!Object<string, number>|undefined}\n */\nWebChannel.Options.prototype.requestRefreshThresholds;\n\n/**\n * A debugging URL to detect network connectivity and server reachability.\n *\n * @type {string|undefined}\n */\nWebChannel.Options.prototype.networkTestUrl;\n\n/**\n * This is an experimental feature to use WHATWG Fetch/streams (when supported).\n * If a custom 'xmlHttpFactory' is speficied, this option will not be effective.\n * This option defaults to false now and will eventually be turned on by\n * default.\n * @type {boolean|undefined}\n */\nWebChannel.Options.prototype.useFetchStreams;\n\n/**\n * Opt-in to enable Chrome origin trials from the WebChannel client. See\n * https://github.com/GoogleChrome/OriginTrials\n *\n * Origin trial history:\n * - fetch upload (11/2020 - 07/2021)\n * https://developers.chrome.com/origintrials/#/view_trial/3524066708417413121\n *\n * Participating in the origin trials will help Chrome to release new Web\n * platform features sooner, which will in turn help improve WebChannel\n * performance.\n *\n * Origin trials are not expected to interfere with WebChannel wire messages\n * and should not introduce any noticeable overhead.\n *\n * This is enabled by default with any on-going origin-trial.\n *\n * @type {boolean|undefined}\n */\nWebChannel.Options.prototype.enableOriginTrials;\n\n/**\n * Types that are allowed as message data.\n *\n * Note that JS objects (sent by the client) can only have string encoded\n * values due to the limitation of the current wire protocol.\n *\n * Unicode strings (sent by the server) may or may not need be escaped, as\n * decided by the server.\n *\n * @typedef {(!ArrayBuffer|!Blob|!Object<string, !Object|string>|!Array|string)}\n */\nWebChannel.MessageData;\n\n/**\n * Open the WebChannel against the URI specified in the constructor.\n */\nWebChannel.prototype.open = goog.abstractMethod;\n\n/**\n * Close the WebChannel.\n *\n * This is a full close (shutdown) with no guarantee of FIFO delivery in respect\n * to any in-flight messages sent to the server.\n *\n * If you need such a guarantee, see the Half the halfClose() method.\n */\nWebChannel.prototype.close = goog.abstractMethod;\n\n/**\n * Half-close the WebChannel.\n *\n * Half-close semantics:\n * 1. delivered as a regular message in FIFO programming order\n * 2. the server is expected to return a half-close too (with or without\n *    application involved), which will trigger a full close (shutdown)\n *    on the client side\n * 3. for now, the half-close event defined for server-initiated\n *    half-close is not exposed to the client application\n * 4. a client-side half-close may be triggered internally when the client\n *    receives a half-close from the server; and the client is expected to\n *    do a full close after the half-close is acked and delivered\n *    on the server-side.\n * 5. Full close is always a forced one. See the close() method.\n *\n * New messages sent after halfClose() will be dropped.\n *\n * NOTE: This is not yet implemented, and will throw an exception if called.\n */\nWebChannel.prototype.halfClose = goog.abstractMethod;\n\n/**\n * Sends a message to the server that maintains the other endpoint of\n * the WebChannel.\n *\n * O-RTT behavior:\n * 1. messages sent before open() is called will always be delivered as\n *    part of the handshake, i.e. with 0-RTT\n * 2. messages sent after open() is called but before the OPEN event\n *    is received will be delivered as part of the handshake if\n *    send() is called from the same execution context as open().\n * 3. otherwise, those messages will be buffered till the handshake\n *    is completed (which will fire the OPEN event).\n *\n * @param {!WebChannel.MessageData} message The message to send.\n */\nWebChannel.prototype.send = goog.abstractMethod;\n\n/**\n * Common events fired by WebChannels.\n * @enum {string}\n */\nWebChannel.EventType = {\n  /** Dispatched when the channel is opened. */\n  OPEN: events.getUniqueId('open'),\n\n  /** Dispatched when the channel is closed. */\n  CLOSE: events.getUniqueId('close'),\n\n  /**\n   * Dispatched when the channel is aborted due to errors.\n   *\n   * For backward compatibility reasons, a CLOSE event will also be\n   * dispatched, following the ERROR event, which indicates that the channel\n   * has been completely shutdown .\n   */\n  ERROR: events.getUniqueId('error'),\n\n  /** Dispatched when the channel has received a new message. */\n  MESSAGE: events.getUniqueId('message')\n};\n\n/**\n * The event interface for the MESSAGE event.\n *\n * @constructor\n * @extends {GoogEvent}\n */\nWebChannel.MessageEvent = function() {\n  WebChannel.MessageEvent.base(\n      this, 'constructor', WebChannel.EventType.MESSAGE);\n};\ngoog.inherits(WebChannel.MessageEvent, GoogEvent);\n\n/**\n * The content of the message received from the server.\n *\n * @type {!WebChannel.MessageData}\n */\nWebChannel.MessageEvent.prototype.data;\n\n/**\n * The metadata key when the MESSAGE event represents a metadata message.\n *\n * @type {string|undefined}\n */\nWebChannel.MessageEvent.prototype.metadataKey;\n\n/**\n * Metadata as HTTP status code. Typically sent before the channel is\n * half-closed by the server.\n *\n * @type {number|undefined}\n */\nWebChannel.MessageEvent.prototype.statusCode;\n\n/**\n * Metadata as HTTP headers. Typically sent before the channel is\n * half-closed by the server.\n *\n * @type {!Object<string, string>|undefined}\n */\nWebChannel.MessageEvent.prototype.headers;\n\n/**\n * WebChannel level error conditions.\n *\n * Summary of error debugging and reporting in WebChannel:\n *\n * Network Error\n * 1. By default the webchannel library will set the error status to\n *    NETWORK_ERROR when a channel has to be aborted or closed. NETWORK_ERROR\n *    may be recovered by the application by retrying and opening a new channel.\n * 2. There may be lost messages (not acked by the server) when a channel is\n *    aborted. Currently we don't have a public API to retrieve messages that\n *    are waiting to be acked on the client side. File a bug if you think it\n *    is useful to expose such an API.\n * 3. Details of why a channel fails are available via closure debug logs,\n *    and stats events (see webchannel/requeststats.js). Those are internal\n *    stats and are subject to change. File a bug if you think it's useful to\n *    version and expose such stats as part of the WebChannel API.\n *\n * Server Error\n * 1. SERVER_ERROR is intended to indicate a non-recoverable condition, e.g.\n *    when auth fails.\n * 2. We don't currently generate any such errors, because most of the time\n *    it's the responsibility of upper-layer frameworks or the application\n *    itself to indicate to the client why a webchannel has been failed\n *    by the server.\n * 3. When a channel is failed by the server explicitly, we still signal\n *    NETWORK_ERROR to the client. Explicit server failure may happen when the\n *    server does a fail-over, or becomes overloaded, or conducts a forced\n *    shutdown etc.\n * 4. We use some heuristic to decide if the network (aka cloud) is down\n *    v.s. the actual server is down.\n *\n *  RuntimeProperties.getLastStatusCode is a useful state that we expose to\n *  the client to indicate the HTTP response status code of the last HTTP\n *  request initiated by the WebChannel client library, for debugging\n *  purposes only.\n *\n *  See WebChannel.Options.backChannelFailureRecovery and\n *  WebChannel.FailureRecovery to install a custom failure-recovery algorithm.\n *\n * @enum {number}\n */\nWebChannel.ErrorStatus = {\n  /** No error has occurred. */\n  OK: 0,\n\n  /** Communication to the server has failed. */\n  NETWORK_ERROR: 1,\n\n  /** The server fails to accept or process the WebChannel. */\n  SERVER_ERROR: 2\n};\n\n/**\n * The event interface for the ERROR event.\n *\n * @constructor\n * @extends {GoogEvent}\n */\nWebChannel.ErrorEvent = function() {\n  WebChannel.ErrorEvent.base(this, 'constructor', WebChannel.EventType.ERROR);\n};\ngoog.inherits(WebChannel.ErrorEvent, GoogEvent);\n\n/**\n * The error status.\n *\n * @type {!WebChannel.ErrorStatus}\n */\nWebChannel.ErrorEvent.prototype.status;\n\n/**\n * @return {!WebChannel.RuntimeProperties} The runtime properties\n * of the WebChannel instance.\n */\nWebChannel.prototype.getRuntimeProperties = goog.abstractMethod;\n\n/**\n * The runtime properties of the WebChannel instance.\n *\n * This class is defined for debugging and monitoring purposes, as well as for\n * runtime functions that the application may choose to manage by itself.\n *\n * @interface\n */\nWebChannel.RuntimeProperties = function() {};\n\n/**\n * @return {number} The effective limit for the number of concurrent HTTP\n * requests that are allowed to be made for sending messages from the client\n * to the server. When SPDY is not enabled, this limit will be one.\n */\nWebChannel.RuntimeProperties.prototype.getConcurrentRequestLimit =\n    goog.abstractMethod;\n\n/**\n * For applications that need support multiple channels (e.g. from\n * different tabs) to the same origin, use this method to decide if SPDY is\n * enabled and therefore it is safe to open multiple channels.\n *\n * If SPDY is disabled, the application may choose to limit the number of active\n * channels to one or use other means such as sub-domains to work around\n * the browser connection limit.\n *\n * @return {boolean} Whether SPDY is enabled for the origin against which\n * the channel is created.\n */\nWebChannel.RuntimeProperties.prototype.isSpdyEnabled = goog.abstractMethod;\n\n/**\n * @return {number} The number of requests (for sending messages to the server)\n * that are pending. If this number is approaching the value of\n * getConcurrentRequestLimit(), client-to-server message delivery may experience\n * a higher latency.\n */\nWebChannel.RuntimeProperties.prototype.getPendingRequestCount =\n    goog.abstractMethod;\n\n/**\n * For applications to query the current HTTP session id, sent by the server\n * during the initial handshake.\n *\n * @return {?string} the HTTP session id or null if no HTTP session is in use.\n */\nWebChannel.RuntimeProperties.prototype.getHttpSessionId = goog.abstractMethod;\n\n/**\n * Experimental API.\n *\n * This method generates an in-band commit request to the server, which will\n * ack the commit request as soon as all messages sent prior to this commit\n * request have been committed by the application.\n *\n * Committing a message has a stronger semantics than delivering a message\n * to the application. Detail spec:\n * https://github.com/bidiweb/webchannel/blob/master/commit.md\n *\n * Timeout or cancellation is not supported and the application is expected to\n * abort the channel if the commit-ack fails to arrive in time.\n *\n * ===\n *\n * This is currently implemented only in the client layer and the commit\n * callback will be invoked after all the pending client-sent messages have been\n * delivered by the server-side webchannel endpoint. This semantics is\n * different and weaker than what's required for end-to-end ack which requires\n * the server application to ack the in-order delivery of messages that are sent\n * before the commit request is issued.\n *\n * Commit should only be called after the channel open event is received.\n * Duplicated commits are allowed and only the last callback is guaranteed.\n * Commit called after the channel has been closed will be ignored.\n *\n * @param {function()} callback The callback will be invoked once an\n * ack has been received for the current commit or any newly issued commit.\n */\nWebChannel.RuntimeProperties.prototype.commit = goog.abstractMethod;\n\n/**\n * This method may be used by the application to recover from a peer failure\n * or to enable sender-initiated flow-control.\n *\n * Detail spec: https://github.com/bidiweb/webchannel/blob/master/commit.md\n *\n * Note that the caller should NOT modify the list of returned messages.\n *\n * @return {!Array<!WebChannel.MessageData>} The list of messages that\n * have not received commit-ack from the server; or if no commit has been\n * issued, the list of messages that have not been delivered to the server\n * application.\n */\nWebChannel.RuntimeProperties.prototype.getNonAckedMessages =\n    goog.abstractMethod;\n\n/**\n * This method is for flow-control purpose.\n *\n * @return {number} The number of messages in flight, from the oldest message\n * not yet acknowledged by the server to the next message to be sent out.\n */\nWebChannel.RuntimeProperties.prototype.getNonAckedMessageGap =\n    goog.abstractMethod;\n\n/**\n * A low water-mark message count to notify the application when the\n * flow-control condition is cleared, that is, when the application is\n * able to send more messages.\n *\n * We expect the application to configure a high water-mark message count,\n * which is checked via getNonAckedMessageCount(). When the high water-mark\n * is exceeded, the application should install a callback via this method\n * to be notified when to start to send new messages.\n *\n * This is not yet implemented.\n *\n * @param {number} count The low water-mark count. It is an error to pass\n * a non-positive value.\n * @param {function()} callback The call back to notify the application\n * when NonAckedMessageCount is below the specified low water-mark count.\n * Any previously registered callback is cleared. This new callback will\n * be cleared once it has been fired, or when the channel is closed or aborted.\n */\nWebChannel.RuntimeProperties.prototype.notifyNonAckedMessageCount =\n    goog.abstractMethod;\n\n/**\n * Experimental API.\n *\n * This method registers a callback to handle the commit request sent\n * by the server. Commit protocol spec:\n * https://github.com/bidiweb/webchannel/blob/master/commit.md\n *\n * This is not yet implemented.\n *\n * @param {function(!Object)} callback The callback will take an opaque\n * commitId which needs be passed back to the server when an ack-commit\n * response is generated by the client application, via ackCommit().\n */\nWebChannel.RuntimeProperties.prototype.onCommit = goog.abstractMethod;\n\n/**\n * Experimental API.\n *\n * This method is used by the application to generate an ack-commit response\n * for the given commitId. Commit protocol spec:\n * https://github.com/bidiweb/webchannel/blob/master/commit.md\n *\n * This is not yet implemented.\n *\n * @param {!Object} commitId The commitId which denotes the commit request\n * from the server that needs be ack'ed.\n */\nWebChannel.RuntimeProperties.prototype.ackCommit = goog.abstractMethod;\n\n/**\n * Transport-metadata support.\n *\n * Responses from the channel-close (abort) message are not available.\n *\n * In future when client-side half-close is supported, its response headers\n * will be available via this API too.\n * @return {!Object<string, string>|undefined} The response headers received\n * with the non-200 HTTP status code that causes the channel to be aborted.\n */\nWebChannel.RuntimeProperties.prototype.getLastResponseHeaders =\n    goog.abstractMethod;\n\n/**\n * Transport-metadata support.\n *\n * TODO: getInitStatusCode   (handshake)\n * TODO: getInitResponseHeaders  (handshake)\n *\n * Note that response headers from client-initiated close (abort) are not\n * available.\n *\n * In future when client-initiated half-close is supported, its response status\n * will be available via this API.\n *\n * @return {number} The non-200 HTTP status code received that causes the\n * channel to be aborted.\n */\nWebChannel.RuntimeProperties.prototype.getLastStatusCode = goog.abstractMethod;\n\n/**\n * Enum to indicate the current recovery state.\n *\n * @enum {string}\n */\nWebChannel.FailureRecovery.State = {\n  /** Initial state. */\n  INIT: 'init',\n\n  /** Once a failure has been detected. */\n  FAILED: 'failed',\n\n  /**\n   * Once a recovery operation has been issued, e.g. a new request to resume\n   * communication.\n   */\n  RECOVERING: 'recovering',\n\n  /** The channel has been closed.  */\n  CLOSED: 'closed'\n};\n\n/**\n * Enum to indicate different failure conditions as detected by the webchannel\n * runtime.\n *\n * This enum is to be used only between the runtime and FailureRecovery module,\n * and new states are expected to be introduced in future.\n *\n * @enum {string}\n */\nWebChannel.FailureRecovery.FailureCondition = {\n  /**\n   * The HTTP response returned a non-successful http status code.\n   */\n  HTTP_ERROR: 'http_error',\n\n  /**\n   * The request was aborted.\n   */\n  ABORT: 'abort',\n\n  /**\n   * The request timed out.\n   */\n  TIMEOUT: 'timeout',\n\n  /**\n   * Exception was thrown while processing the request/response.\n   */\n  EXCEPTION: 'exception'\n};\n\n/**\n * @return {!WebChannel.FailureRecovery.State} the current state,\n * mainly for debugging use.\n */\nWebChannel.FailureRecovery.prototype.getState = goog.abstractMethod;\n\n/**\n * This method is for WebChannel runtime to set the current failure condition\n * and to provide a callback for the algorithm to signal to the runtime\n * when it is time to issue a recovery operation, e.g. a new request to the\n * server.\n *\n * Supported transitions include:\n *   INIT->FAILED\n *   FAILED->FAILED (re-entry ok)\n *   RECOVERY->FAILED.\n *\n * Ignored if state == CLOSED.\n *\n * Advanced implementations are expected to track all the state transitions\n * and their timestamps for monitoring purposes.\n *\n * @param {!WebChannel.FailureRecovery.FailureCondition} failure The\n * new failure condition generated by the WebChannel runtime.\n * @param {!Function} operation The callback function to the WebChannel\n * runtime to issue a recovery operation, e.g. a new request. E.g. the default\n * recovery algorithm will issue timeout-based recovery operations.\n * Post-condition for the callback: state transition to RECOVERING.\n *\n * @return {!WebChannel.FailureRecovery.State} The updated state\n * as decided by the failure recovery module. Upon a recoverable failure event,\n * the state is transitioned to RECOVERING; or the state is transitioned to\n * FAILED which indicates a fail-fast decision for the runtime to execute.\n */\nWebChannel.FailureRecovery.prototype.setFailure = goog.abstractMethod;\n\n/**\n * The Webchannel runtime needs call this method when webchannel is closed or\n * aborted.\n *\n * Once the instance is closed, any access to the instance will be a no-op.\n */\nWebChannel.FailureRecovery.prototype.close = goog.abstractMethod;\n\n/**\n * A request header to indicate to the server the messaging protocol\n * each HTTP message is speaking.\n *\n * @type {string}\n */\nWebChannel.X_CLIENT_PROTOCOL = 'X-Client-Protocol';\n\n/**\n * The value for x-client-protocol when the messaging protocol is WebChannel.\n *\n * @type {string}\n */\nWebChannel.X_CLIENT_PROTOCOL_WEB_CHANNEL = 'webchannel';\n\n/**\n * A response header for the server to signal the wire-protocol that\n * the browser establishes with the server (or proxy), e.g. \"spdy\" (aka http/2)\n * \"quic\". This information avoids the need to use private APIs to decide if\n * HTTP requests are multiplexed etc.\n *\n * @type {string}\n */\nWebChannel.X_CLIENT_WIRE_PROTOCOL = 'X-Client-Wire-Protocol';\n\n/**\n * A response header for the server to send back the HTTP session id as part of\n * the initial handshake. The value of the HTTP session id is opaque to the\n * WebChannel protocol.\n *\n * @type {string}\n */\nWebChannel.X_HTTP_SESSION_ID = 'X-HTTP-Session-Id';\n\n/**\n * A response header for the server to send back any initial response data as a\n * header to avoid any possible buffering by an intermediary, which may\n * be undesired during the handshake.\n *\n * @type {string}\n */\nWebChannel.X_HTTP_INITIAL_RESPONSE = 'X-HTTP-Initial-Response';\n\n/**\n * A request header for specifying the content-type of WebChannel messages,\n * e.g. application-defined JSON encoding styles. Currently this header\n * is sent by the client via initMessageHeaders when the channel is opened.\n *\n * @type {string}\n */\nWebChannel.X_WEBCHANNEL_CONTENT_TYPE = 'X-WebChannel-Content-Type';\n\n/**\n * A request header for specifying the client profile in order to apply\n * customized config params on the server side, e.g. timeouts.\n *\n * @type {string}\n */\nWebChannel.X_WEBCHANNEL_CLIENT_PROFILE = 'X-WebChannel-Client-Profile';\n\nexports = WebChannel;\n","import {Status} from 'google3/google/rpc/status.proto';\nimport {\n  MultiWatchResponseBatch,\n  ReadonlyMultiWatchRequestBatch,\n} from 'google3/ipc/invalidation/punctual/client/proto/punctual.proto';\nimport {AuthMethod} from 'google3/ipc/invalidation/typescript/auth_method';\nimport {newMutableMessageFromTransferredArray} from 'google3/javascript/apps/jspb/message';\nimport {EventHandler} from 'google3/third_party/javascript/closure/events/eventhandler';\nimport {WebChannel} from 'google3/third_party/javascript/closure/labs/net/webchannel';\nimport * as log from 'google3/third_party/javascript/closure/log/log';\nimport {Uri} from 'google3/third_party/javascript/closure/uri/uri';\n\nimport {Channel, ChannelHandler, ChannelStatusHandler} from './channel';\n\nconst logger = log.getLogger('invalidation.punctual.clientimpl');\n\n/** Possible states for the channel. */\nenum ChannelState {\n  INIT = 0,\n  ACTIVE = 1, // The WebChannel is opening or open.\n  CLOSED = 2, // The WebChannel is closed/broken and can no longer be used.\n}\n\n/** Config options for the channel. */\nexport class ChannelConfig {\n  constructor(\n    /** The URI for the WebChannel. */\n    private readonly uri: Uri,\n    readonly authMethod: AuthMethod,\n    readonly useFetchApi: boolean,\n    readonly addDomainPrefix: boolean,\n  ) {}\n\n  /**\n   * Generates a URI for the WebChannel, adding a domain prefix if so\n   * configured.\n   */\n  generateUri(): Uri {\n    const uri = this.uri.clone();\n    if (this.addDomainPrefix) {\n      uri.setDomain(\n        Math.floor(Math.random() * 10).toString() + '-' + uri.getDomain(),\n      );\n    }\n    return uri;\n  }\n}\n\n/** Creates the web channel. */\nexport interface WebChannelCreator {\n  (path: string, options: WebChannel.Options): WebChannel;\n}\n\n/** Wrapper for web channel. */\nexport class ChannelImpl implements Channel {\n  /** WebChannel instance.  */\n  private readonly channel: WebChannel;\n\n  /** Keeps track of whether the channel has closed. */\n  private state = ChannelState.INIT;\n\n  /** Event handler for the WebChannel. */\n  private readonly channelHandler = new EventHandler();\n\n  constructor(\n    /** Handles responses from the client proxy. */\n    readonly channelMessageHandler: ChannelHandler,\n    /** Handles error statuses from the WebChannel. */\n    readonly channelStatusHandler: ChannelStatusHandler,\n    /** Configuration for the new Channel instance. */\n    readonly config: ChannelConfig,\n    /** Manages the creation of the WebChannel */\n    readonly channelCreator: WebChannelCreator,\n    /** The gsessionid of the server that should handle the watch stream. */\n    gsessionid: string,\n  ) {\n    this.channel = this.createWebChannel(gsessionid);\n  }\n\n  /** Handle close events. */\n  private handleCloseEvent() {\n    this.channelStatusHandler.onClose(\n      this.channel.getRuntimeProperties().getLastStatusCode(),\n    );\n    this.state = ChannelState.CLOSED;\n    // Unlisten to the WebChannel.\n    this.channel.removeAllListeners();\n    this.channelHandler.removeAll();\n  }\n\n  /** Handles messages from the WebChannel. */\n  private handleMessageEvent(event: WebChannel.MessageEvent) {\n    if (!event.data || !Array.isArray(event.data) || event.data.length !== 1) {\n      log.info(logger, 'Bad format for message.');\n      return;\n    }\n\n    if (event.metadataKey && event.metadataKey === 'status') {\n      // Status messages indicate server errors and are nested twice, per\n      // go/webchannel-oneplatform-support#webchannel-wrapping.\n      const status: Status = newMutableMessageFromTransferredArray(\n        Status,\n        event.data[0][0],\n      );\n      this.channelStatusHandler.onServerError(status);\n      return;\n    }\n    const responseBatch: MultiWatchResponseBatch =\n      newMutableMessageFromTransferredArray(\n        MultiWatchResponseBatch,\n        event.data[0],\n      );\n    this.channelMessageHandler(responseBatch);\n  }\n\n  /** Handles error events. */\n  private handleErrorEvent(error: WebChannel.ErrorEvent) {\n    this.channelStatusHandler.onError(\n      error,\n      this.channel.getRuntimeProperties().getLastStatusCode(),\n    );\n    if (error.status !== WebChannel.ErrorStatus.OK) {\n      // When an error event is received, the channel will be closed.\n      this.state = ChannelState.CLOSED;\n    }\n  }\n\n  /** Creates a WebChannel and sets up its listeners. */\n  private createWebChannel(gsessionid: string): WebChannel {\n    const opts: WebChannel.Options = {\n      sendRawJson: true,\n      messageContentType: 'application/json+protobuf',\n      // Disable WebChannel's support for choosing the gsessionid, since we\n      // choose our own gsessionid out of band and manually set the query\n      // parameter when opening the channel.\n      httpSessionIdParam: undefined,\n      messageUrlParams: {\n        'gsessionid': gsessionid,\n        ...this.config.authMethod.getQueryParameters(),\n      },\n      // Some users may be behind a buffering proxy, which could require the\n      // use of long polling for the WebChannel to function properly. There\n      // seems to be no downside to enabling this, and a fraction of users may\n      // be broken by the default behavior.\n      detectBufferingProxy: true,\n      useFetchStreams: this.config.useFetchApi,\n      messageHeaders: this.config.authMethod.getHeaders(),\n      supportsCrossDomainXhr: this.config.authMethod.usesCredentialedRequests(),\n    };\n\n    const channel = this.channelCreator(\n      this.config.generateUri().toString(),\n      opts,\n    );\n\n    // Listens for open events from the WebChannel. The channel waits for a\n    // given amount of time before resetting the delay generator.\n    this.channelHandler.listen(channel, WebChannel.EventType.OPEN, () => {\n      this.channelStatusHandler.onOpen();\n    });\n\n    // Listens for close events from the WebChannel.\n    this.channelHandler.listen(channel, WebChannel.EventType.CLOSE, () => {\n      this.handleCloseEvent();\n    });\n\n    // Listens for message events from the WebChannel. We assume here that\n    // the data will be sent in strings.\n    this.channelHandler.listen(\n      channel,\n      WebChannel.EventType.MESSAGE,\n      (message: WebChannel.MessageEvent) => {\n        this.handleMessageEvent(message);\n      },\n    );\n\n    // Listens for error events from the WebChannel.\n    this.channelHandler.listen(\n      channel,\n      WebChannel.EventType.ERROR,\n      (error: WebChannel.ErrorEvent) => {\n        this.handleErrorEvent(error);\n      },\n    );\n\n    return channel;\n  }\n\n  open(): void {\n    if (this.state !== ChannelState.INIT) {\n      log.info(logger, 'Channel is not opening since it is already active.');\n      return;\n    }\n\n    this.state = ChannelState.ACTIVE;\n    this.channel.open();\n  }\n\n  close(): void {\n    if (this.state === ChannelState.CLOSED) {\n      log.info(logger, 'Channel is not closing since it is already closed.');\n      return;\n    }\n    this.channel.close();\n  }\n\n  send(request: ReadonlyMultiWatchRequestBatch): void {\n    const data = request.serialize();\n    this.channel.send(data);\n  }\n}\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Class for parsing and formatting URIs.\n *\n * This package is deprecated in favour of the Closure URL package (goog.url)\n * when manipulating URIs for use by a browser. This package uses regular\n * expressions to parse a potential URI which can fall out of sync with how a\n * browser will actually interpret the URI. See\n * `goog.uri.utils.setUrlPackageSupportLoggingHandler` for one way to identify\n * URIs that should instead be parsed using the URL package.\n *\n * Use goog.Uri(string) to parse a URI string.  Use goog.Uri.create(...) to\n * create a new instance of the goog.Uri object from Uri parts.\n *\n * e.g: <code>var myUri = new goog.Uri(window.location);</code>\n *\n * Implements RFC 3986 for parsing/formatting URIs.\n * http://www.ietf.org/rfc/rfc3986.txt\n *\n * Some changes have been made to the interface (more like .NETs), though the\n * internal representation is now of un-encoded parts, this will change the\n * behavior slightly.\n */\n\ngoog.provide('goog.Uri');\n\ngoog.require('goog.array');\ngoog.require('goog.asserts');\ngoog.require('goog.collections.maps');\ngoog.require('goog.string');\ngoog.require('goog.structs');\ngoog.require('goog.uri.utils');\n\n\n\n/**\n * This class contains setters and getters for the parts of the URI.\n * The <code>getXyz</code>/<code>setXyz</code> methods return the decoded part\n * -- so<code>goog.Uri.parse('/foo%20bar').getPath()</code> will return the\n * decoded path, <code>/foo bar</code>.\n *\n * Reserved characters (see RFC 3986 section 2.2) can be present in\n * their percent-encoded form in scheme, domain, and path URI components and\n * will not be auto-decoded. For example:\n * <code>goog.Uri.parse('rel%61tive/path%2fto/resource').getPath()</code> will\n * return <code>relative/path%2fto/resource</code>.\n *\n * The constructor accepts an optional unparsed, raw URI string.  The parser\n * is relaxed, so special characters that aren't escaped but don't cause\n * ambiguities will not cause parse failures.\n *\n * All setters return <code>this</code> and so may be chained, a la\n * <code>goog.Uri.parse('/foo').setFragment('part').toString()</code>.\n *\n * @param {*=} opt_uri Optional string URI to parse\n *        (use goog.Uri.create() to create a URI from parts), or if\n *        a goog.Uri is passed, a clone is created.\n * @param {boolean=} opt_ignoreCase If true, #getParameterValue will ignore\n * the case of the parameter name.\n *\n * @throws URIError If opt_uri is provided and URI is malformed (that is,\n *     if decodeURIComponent fails on any of the URI components).\n * @constructor\n * @struct\n */\ngoog.Uri = function(opt_uri, opt_ignoreCase) {\n  'use strict';\n  /**\n   * Scheme such as \"http\".\n   * @private {string}\n   */\n  this.scheme_ = '';\n\n  /**\n   * User credentials in the form \"username:password\".\n   * @private {string}\n   */\n  this.userInfo_ = '';\n\n  /**\n   * Domain part, e.g. \"www.google.com\".\n   * @private {string}\n   */\n  this.domain_ = '';\n\n  /**\n   * Port, e.g. 8080.\n   * @private {?number}\n   */\n  this.port_ = null;\n\n  /**\n   * Path, e.g. \"/tests/img.png\".\n   * @private {string}\n   */\n  this.path_ = '';\n\n  /**\n   * The fragment without the #.\n   * @private {string}\n   */\n  this.fragment_ = '';\n\n  /**\n   * Whether or not this Uri should be treated as Read Only.\n   * @private {boolean}\n   */\n  this.isReadOnly_ = false;\n\n  /**\n   * Whether or not to ignore case when comparing query params.\n   * @private {boolean}\n   */\n  this.ignoreCase_ = false;\n\n  /**\n   * Object representing query data.\n   * @private {!goog.Uri.QueryData}\n   */\n  this.queryData_;\n\n  // Parse in the uri string\n  let m;\n  if (opt_uri instanceof goog.Uri) {\n    this.ignoreCase_ = (opt_ignoreCase !== undefined) ? opt_ignoreCase :\n                                                        opt_uri.getIgnoreCase();\n    this.setScheme(opt_uri.getScheme());\n    this.setUserInfo(opt_uri.getUserInfo());\n    this.setDomain(opt_uri.getDomain());\n    this.setPort(opt_uri.getPort());\n    this.setPath(opt_uri.getPath());\n    this.setQueryData(opt_uri.getQueryData().clone());\n    this.setFragment(opt_uri.getFragment());\n  } else if (opt_uri && (m = goog.uri.utils.split(String(opt_uri)))) {\n    this.ignoreCase_ = !!opt_ignoreCase;\n\n    // Set the parts -- decoding as we do so.\n    // COMPATIBILITY NOTE - In IE, unmatched fields may be empty strings,\n    // whereas in other browsers they will be undefined.\n    this.setScheme(m[goog.uri.utils.ComponentIndex.SCHEME] || '', true);\n    this.setUserInfo(m[goog.uri.utils.ComponentIndex.USER_INFO] || '', true);\n    this.setDomain(m[goog.uri.utils.ComponentIndex.DOMAIN] || '', true);\n    this.setPort(m[goog.uri.utils.ComponentIndex.PORT]);\n    this.setPath(m[goog.uri.utils.ComponentIndex.PATH] || '', true);\n    this.setQueryData(m[goog.uri.utils.ComponentIndex.QUERY_DATA] || '', true);\n    this.setFragment(m[goog.uri.utils.ComponentIndex.FRAGMENT] || '', true);\n\n  } else {\n    this.ignoreCase_ = !!opt_ignoreCase;\n    this.queryData_ = new goog.Uri.QueryData(null, this.ignoreCase_);\n  }\n};\n\n\n/**\n * Parameter name added to stop caching.\n * @type {string}\n */\ngoog.Uri.RANDOM_PARAM = goog.uri.utils.StandardQueryParam.RANDOM;\n\n\n/**\n * @return {string} The string form of the url.\n * @override\n */\ngoog.Uri.prototype.toString = function() {\n  'use strict';\n  const out = [];\n\n  const scheme = this.getScheme();\n  if (scheme) {\n    out.push(\n        goog.Uri.encodeSpecialChars_(\n            scheme, goog.Uri.reDisallowedInSchemeOrUserInfo_, true),\n        ':');\n  }\n\n  const domain = this.getDomain();\n  if (domain || scheme == 'file') {\n    out.push('//');\n\n    const userInfo = this.getUserInfo();\n    if (userInfo) {\n      out.push(\n          goog.Uri.encodeSpecialChars_(\n              userInfo, goog.Uri.reDisallowedInSchemeOrUserInfo_, true),\n          '@');\n    }\n\n    out.push(goog.Uri.removeDoubleEncoding_(goog.string.urlEncode(domain)));\n\n    const port = this.getPort();\n    if (port != null) {\n      out.push(':', String(port));\n    }\n  }\n\n  const path = this.getPath();\n  if (path) {\n    if (this.hasDomain() && path.charAt(0) != '/') {\n      out.push('/');\n    }\n    out.push(goog.Uri.encodeSpecialChars_(\n        path,\n        path.charAt(0) == '/' ? goog.Uri.reDisallowedInAbsolutePath_ :\n                                goog.Uri.reDisallowedInRelativePath_,\n        true));\n  }\n\n  const query = this.getEncodedQuery();\n  if (query) {\n    out.push('?', query);\n  }\n\n  const fragment = this.getFragment();\n  if (fragment) {\n    out.push(\n        '#',\n        goog.Uri.encodeSpecialChars_(\n            fragment, goog.Uri.reDisallowedInFragment_));\n  }\n  return out.join('');\n};\n\n\n/**\n * Resolves the given relative URI (a goog.Uri object), using the URI\n * represented by this instance as the base URI.\n *\n * There are several kinds of relative URIs:<br>\n * 1. foo - replaces the last part of the path, the whole query and fragment<br>\n * 2. /foo - replaces the path, the query and fragment<br>\n * 3. //foo - replaces everything from the domain on.  foo is a domain name<br>\n * 4. ?foo - replace the query and fragment<br>\n * 5. #foo - replace the fragment only\n *\n * Additionally, if relative URI has a non-empty path, all \"..\" and \".\"\n * segments will be resolved, as described in RFC 3986.\n *\n * @param {!goog.Uri} relativeUri The relative URI to resolve.\n * @return {!goog.Uri} The resolved URI.\n */\ngoog.Uri.prototype.resolve = function(relativeUri) {\n  'use strict';\n  const absoluteUri = this.clone();\n\n  // we satisfy these conditions by looking for the first part of relativeUri\n  // that is not blank and applying defaults to the rest\n\n  let overridden = relativeUri.hasScheme();\n\n  if (overridden) {\n    absoluteUri.setScheme(relativeUri.getScheme());\n  } else {\n    overridden = relativeUri.hasUserInfo();\n  }\n\n  if (overridden) {\n    absoluteUri.setUserInfo(relativeUri.getUserInfo());\n  } else {\n    overridden = relativeUri.hasDomain();\n  }\n\n  if (overridden) {\n    absoluteUri.setDomain(relativeUri.getDomain());\n  } else {\n    overridden = relativeUri.hasPort();\n  }\n\n  let path = relativeUri.getPath();\n  if (overridden) {\n    absoluteUri.setPort(relativeUri.getPort());\n  } else {\n    overridden = relativeUri.hasPath();\n    if (overridden) {\n      // resolve path properly\n      if (path.charAt(0) != '/') {\n        // path is relative\n        if (this.hasDomain() && !this.hasPath()) {\n          // RFC 3986, section 5.2.3, case 1\n          path = '/' + path;\n        } else {\n          // RFC 3986, section 5.2.3, case 2\n          const lastSlashIndex = absoluteUri.getPath().lastIndexOf('/');\n          if (lastSlashIndex != -1) {\n            path = absoluteUri.getPath().slice(0, lastSlashIndex + 1) + path;\n          }\n        }\n      }\n      path = goog.Uri.removeDotSegments(path);\n    }\n  }\n\n  if (overridden) {\n    absoluteUri.setPath(path);\n  } else {\n    overridden = relativeUri.hasQuery();\n  }\n\n  if (overridden) {\n    absoluteUri.setQueryData(relativeUri.getQueryData().clone());\n  } else {\n    overridden = relativeUri.hasFragment();\n  }\n\n  if (overridden) {\n    absoluteUri.setFragment(relativeUri.getFragment());\n  }\n\n  return absoluteUri;\n};\n\n\n/**\n * Clones the URI instance.\n * @return {!goog.Uri} New instance of the URI object.\n */\ngoog.Uri.prototype.clone = function() {\n  'use strict';\n  return new goog.Uri(this);\n};\n\n\n/**\n * @return {string} The encoded scheme/protocol for the URI.\n */\ngoog.Uri.prototype.getScheme = function() {\n  'use strict';\n  return this.scheme_;\n};\n\n\n/**\n * Sets the scheme/protocol.\n * @throws URIError If opt_decode is true and newScheme is malformed (that is,\n *     if decodeURIComponent fails).\n * @param {string} newScheme New scheme value.\n * @param {boolean=} opt_decode Optional param for whether to decode new value.\n * @return {!goog.Uri} Reference to this URI object.\n */\ngoog.Uri.prototype.setScheme = function(newScheme, opt_decode) {\n  'use strict';\n  this.enforceReadOnly();\n  this.scheme_ =\n      opt_decode ? goog.Uri.decodeOrEmpty_(newScheme, true) : newScheme;\n\n  // remove an : at the end of the scheme so somebody can pass in\n  // window.location.protocol\n  if (this.scheme_) {\n    this.scheme_ = this.scheme_.replace(/:$/, '');\n  }\n  return this;\n};\n\n\n/**\n * @return {boolean} Whether the scheme has been set.\n */\ngoog.Uri.prototype.hasScheme = function() {\n  'use strict';\n  return !!this.scheme_;\n};\n\n\n/**\n * @return {string} The decoded user info.\n */\ngoog.Uri.prototype.getUserInfo = function() {\n  'use strict';\n  return this.userInfo_;\n};\n\n\n/**\n * Sets the userInfo.\n * @throws URIError If opt_decode is true and newUserInfo is malformed (that is,\n *     if decodeURIComponent fails).\n * @param {string} newUserInfo New userInfo value.\n * @param {boolean=} opt_decode Optional param for whether to decode new value.\n * @return {!goog.Uri} Reference to this URI object.\n */\ngoog.Uri.prototype.setUserInfo = function(newUserInfo, opt_decode) {\n  'use strict';\n  this.enforceReadOnly();\n  this.userInfo_ =\n      opt_decode ? goog.Uri.decodeOrEmpty_(newUserInfo) : newUserInfo;\n  return this;\n};\n\n\n/**\n * @return {boolean} Whether the user info has been set.\n */\ngoog.Uri.prototype.hasUserInfo = function() {\n  'use strict';\n  return !!this.userInfo_;\n};\n\n\n/**\n * @return {string} The decoded domain.\n */\ngoog.Uri.prototype.getDomain = function() {\n  'use strict';\n  return this.domain_;\n};\n\n\n/**\n * Sets the domain.\n * @throws URIError If opt_decode is true and newDomain is malformed (that is,\n *     if decodeURIComponent fails).\n * @param {string} newDomain New domain value.\n * @param {boolean=} opt_decode Optional param for whether to decode new value.\n * @return {!goog.Uri} Reference to this URI object.\n */\ngoog.Uri.prototype.setDomain = function(newDomain, opt_decode) {\n  'use strict';\n  this.enforceReadOnly();\n  this.domain_ =\n      opt_decode ? goog.Uri.decodeOrEmpty_(newDomain, true) : newDomain;\n  return this;\n};\n\n\n/**\n * @return {boolean} Whether the domain has been set.\n */\ngoog.Uri.prototype.hasDomain = function() {\n  'use strict';\n  return !!this.domain_;\n};\n\n\n/**\n * @return {?number} The port number.\n */\ngoog.Uri.prototype.getPort = function() {\n  'use strict';\n  return this.port_;\n};\n\n\n/**\n * Sets the port number.\n * @param {*} newPort Port number. Will be explicitly casted to a number.\n * @return {!goog.Uri} Reference to this URI object.\n */\ngoog.Uri.prototype.setPort = function(newPort) {\n  'use strict';\n  this.enforceReadOnly();\n\n  if (newPort) {\n    newPort = Number(newPort);\n    if (isNaN(newPort) || newPort < 0) {\n      throw new Error('Bad port number ' + newPort);\n    }\n    this.port_ = newPort;\n  } else {\n    this.port_ = null;\n  }\n\n  return this;\n};\n\n\n/**\n * @return {boolean} Whether the port has been set.\n */\ngoog.Uri.prototype.hasPort = function() {\n  'use strict';\n  return this.port_ != null;\n};\n\n\n/**\n * @return {string} The decoded path.\n */\ngoog.Uri.prototype.getPath = function() {\n  'use strict';\n  return this.path_;\n};\n\n\n/**\n * Sets the path.\n * @throws URIError If opt_decode is true and newPath is malformed (that is,\n *     if decodeURIComponent fails).\n * @param {string} newPath New path value.\n * @param {boolean=} opt_decode Optional param for whether to decode new value.\n * @return {!goog.Uri} Reference to this URI object.\n */\ngoog.Uri.prototype.setPath = function(newPath, opt_decode) {\n  'use strict';\n  this.enforceReadOnly();\n  this.path_ = opt_decode ? goog.Uri.decodeOrEmpty_(newPath, true) : newPath;\n  return this;\n};\n\n\n/**\n * @return {boolean} Whether the path has been set.\n */\ngoog.Uri.prototype.hasPath = function() {\n  'use strict';\n  return !!this.path_;\n};\n\n\n/**\n * @return {boolean} Whether the query string has been set.\n */\ngoog.Uri.prototype.hasQuery = function() {\n  'use strict';\n  return this.queryData_.toString() !== '';\n};\n\n\n/**\n * Sets the query data.\n * @param {goog.Uri.QueryData|string|undefined} queryData QueryData object.\n * @param {boolean=} opt_decode Optional param for whether to decode new value.\n *     Applies only if queryData is a string.\n * @return {!goog.Uri} Reference to this URI object.\n */\ngoog.Uri.prototype.setQueryData = function(queryData, opt_decode) {\n  'use strict';\n  this.enforceReadOnly();\n\n  if (queryData instanceof goog.Uri.QueryData) {\n    this.queryData_ = queryData;\n    this.queryData_.setIgnoreCase(this.ignoreCase_);\n  } else {\n    if (!opt_decode) {\n      // QueryData accepts encoded query string, so encode it if\n      // opt_decode flag is not true.\n      queryData = goog.Uri.encodeSpecialChars_(\n          queryData, goog.Uri.reDisallowedInQuery_);\n    }\n    this.queryData_ = new goog.Uri.QueryData(queryData, this.ignoreCase_);\n  }\n\n  return this;\n};\n\n\n/**\n * Sets the URI query.\n * @param {string} newQuery New query value.\n * @param {boolean=} opt_decode Optional param for whether to decode new value.\n * @return {!goog.Uri} Reference to this URI object.\n */\ngoog.Uri.prototype.setQuery = function(newQuery, opt_decode) {\n  'use strict';\n  return this.setQueryData(newQuery, opt_decode);\n};\n\n\n/**\n * @return {string} The encoded URI query, not including the ?.\n */\ngoog.Uri.prototype.getEncodedQuery = function() {\n  'use strict';\n  return this.queryData_.toString();\n};\n\n\n/**\n * @return {string} The decoded URI query, not including the ?.\n */\ngoog.Uri.prototype.getDecodedQuery = function() {\n  'use strict';\n  return this.queryData_.toDecodedString();\n};\n\n\n/**\n * Returns the query data.\n * @return {!goog.Uri.QueryData} QueryData object.\n */\ngoog.Uri.prototype.getQueryData = function() {\n  'use strict';\n  return this.queryData_;\n};\n\n\n/**\n * @return {string} The encoded URI query, not including the ?.\n *\n * Warning: This method, unlike other getter methods, returns encoded\n * value, instead of decoded one.\n */\ngoog.Uri.prototype.getQuery = function() {\n  'use strict';\n  return this.getEncodedQuery();\n};\n\n\n/**\n * Sets the value of the named query parameters, clearing previous values for\n * that key.\n *\n * @param {string} key The parameter to set.\n * @param {*} value The new value. Value does not need to be encoded.\n * @return {!goog.Uri} Reference to this URI object.\n */\ngoog.Uri.prototype.setParameterValue = function(key, value) {\n  'use strict';\n  this.enforceReadOnly();\n  this.queryData_.set(key, value);\n  return this;\n};\n\n\n/**\n * Sets the values of the named query parameters, clearing previous values for\n * that key.  Not new values will currently be moved to the end of the query\n * string.\n *\n * So, <code>goog.Uri.parse('foo?a=b&c=d&e=f').setParameterValues('c', ['new'])\n * </code> yields <tt>foo?a=b&e=f&c=new</tt>.</p>\n *\n * @param {string} key The parameter to set.\n * @param {*} values The new values. If values is a single\n *     string then it will be treated as the sole value. Values do not need to\n *     be encoded.\n * @return {!goog.Uri} Reference to this URI object.\n */\ngoog.Uri.prototype.setParameterValues = function(key, values) {\n  'use strict';\n  this.enforceReadOnly();\n\n  if (!Array.isArray(values)) {\n    values = [String(values)];\n  }\n\n  this.queryData_.setValues(key, values);\n\n  return this;\n};\n\n\n/**\n * Returns the value<b>s</b> for a given cgi parameter as a list of decoded\n * query parameter values.\n * @param {string} name The parameter to get values for.\n * @return {!Array<?>} The values for a given cgi parameter as a list of\n *     decoded query parameter values.\n */\ngoog.Uri.prototype.getParameterValues = function(name) {\n  'use strict';\n  return this.queryData_.getValues(name);\n};\n\n\n/**\n * Returns the first value for a given cgi parameter or undefined if the given\n * parameter name does not appear in the query string.\n * @param {string} paramName Unescaped parameter name.\n * @return {string|undefined} The first value for a given cgi parameter or\n *     undefined if the given parameter name does not appear in the query\n *     string.\n */\ngoog.Uri.prototype.getParameterValue = function(paramName) {\n  'use strict';\n  return /** @type {string|undefined} */ (this.queryData_.get(paramName));\n};\n\n\n/**\n * @return {string} The URI fragment, not including the #.\n */\ngoog.Uri.prototype.getFragment = function() {\n  'use strict';\n  return this.fragment_;\n};\n\n\n/**\n * Sets the URI fragment.\n * @throws URIError If opt_decode is true and newFragment is malformed (that is,\n *     if decodeURIComponent fails).\n * @param {string} newFragment New fragment value.\n * @param {boolean=} opt_decode Optional param for whether to decode new value.\n * @return {!goog.Uri} Reference to this URI object.\n */\ngoog.Uri.prototype.setFragment = function(newFragment, opt_decode) {\n  'use strict';\n  this.enforceReadOnly();\n  this.fragment_ =\n      opt_decode ? goog.Uri.decodeOrEmpty_(newFragment) : newFragment;\n  return this;\n};\n\n\n/**\n * @return {boolean} Whether the URI has a fragment set.\n */\ngoog.Uri.prototype.hasFragment = function() {\n  'use strict';\n  return !!this.fragment_;\n};\n\n\n/**\n * Returns true if this has the same domain as that of uri2.\n * @param {!goog.Uri} uri2 The URI object to compare to.\n * @return {boolean} true if same domain; false otherwise.\n */\ngoog.Uri.prototype.hasSameDomainAs = function(uri2) {\n  'use strict';\n  return ((!this.hasDomain() && !uri2.hasDomain()) ||\n          this.getDomain() == uri2.getDomain()) &&\n      ((!this.hasPort() && !uri2.hasPort()) ||\n       this.getPort() == uri2.getPort());\n};\n\n\n/**\n * Adds a random parameter to the Uri.\n * @return {!goog.Uri} Reference to this Uri object.\n */\ngoog.Uri.prototype.makeUnique = function() {\n  'use strict';\n  this.enforceReadOnly();\n  this.setParameterValue(goog.Uri.RANDOM_PARAM, goog.string.getRandomString());\n\n  return this;\n};\n\n\n/**\n * Removes the named query parameter.\n *\n * @param {string} key The parameter to remove.\n * @return {!goog.Uri} Reference to this URI object.\n */\ngoog.Uri.prototype.removeParameter = function(key) {\n  'use strict';\n  this.enforceReadOnly();\n  this.queryData_.remove(key);\n  return this;\n};\n\n\n/**\n * Sets whether Uri is read only. If this goog.Uri is read-only,\n * enforceReadOnly_ will be called at the start of any function that may modify\n * this Uri.\n * @param {boolean} isReadOnly whether this goog.Uri should be read only.\n * @return {!goog.Uri} Reference to this Uri object.\n */\ngoog.Uri.prototype.setReadOnly = function(isReadOnly) {\n  'use strict';\n  this.isReadOnly_ = isReadOnly;\n  return this;\n};\n\n\n/**\n * @return {boolean} Whether the URI is read only.\n */\ngoog.Uri.prototype.isReadOnly = function() {\n  'use strict';\n  return this.isReadOnly_;\n};\n\n\n/**\n * Checks if this Uri has been marked as read only, and if so, throws an error.\n * This should be called whenever any modifying function is called.\n */\ngoog.Uri.prototype.enforceReadOnly = function() {\n  'use strict';\n  if (this.isReadOnly_) {\n    throw new Error('Tried to modify a read-only Uri');\n  }\n};\n\n\n/**\n * Sets whether to ignore case.\n * NOTE: If there are already key/value pairs in the QueryData, and\n * ignoreCase_ is set to false, the keys will all be lower-cased.\n * @param {boolean} ignoreCase whether this goog.Uri should ignore case.\n * @return {!goog.Uri} Reference to this Uri object.\n */\ngoog.Uri.prototype.setIgnoreCase = function(ignoreCase) {\n  'use strict';\n  this.ignoreCase_ = ignoreCase;\n  if (this.queryData_) {\n    this.queryData_.setIgnoreCase(ignoreCase);\n  }\n  return this;\n};\n\n\n/**\n * @return {boolean} Whether to ignore case.\n */\ngoog.Uri.prototype.getIgnoreCase = function() {\n  'use strict';\n  return this.ignoreCase_;\n};\n\n\n//==============================================================================\n// Static members\n//==============================================================================\n\n\n/**\n * Creates a uri from the string form.  Basically an alias of new goog.Uri().\n * If a Uri object is passed to parse then it will return a clone of the object.\n *\n * @throws URIError If parsing the URI is malformed. The passed URI components\n *     should all be parseable by decodeURIComponent.\n * @param {*} uri Raw URI string or instance of Uri\n *     object.\n * @param {boolean=} opt_ignoreCase Whether to ignore the case of parameter\n * names in #getParameterValue.\n * @return {!goog.Uri} The new URI object.\n */\ngoog.Uri.parse = function(uri, opt_ignoreCase) {\n  'use strict';\n  return uri instanceof goog.Uri ? uri.clone() :\n                                   new goog.Uri(uri, opt_ignoreCase);\n};\n\n\n/**\n * Creates a new goog.Uri object from unencoded parts.\n *\n * @param {?string=} opt_scheme Scheme/protocol or full URI to parse.\n * @param {?string=} opt_userInfo username:password.\n * @param {?string=} opt_domain www.google.com.\n * @param {?number=} opt_port 9830.\n * @param {?string=} opt_path /some/path/to/a/file.html.\n * @param {string|goog.Uri.QueryData=} opt_query a=1&b=2.\n * @param {?string=} opt_fragment The fragment without the #.\n * @param {boolean=} opt_ignoreCase Whether to ignore parameter name case in\n *     #getParameterValue.\n *\n * @return {!goog.Uri} The new URI object.\n */\ngoog.Uri.create = function(\n    opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_query,\n    opt_fragment, opt_ignoreCase) {\n  'use strict';\n  const uri = new goog.Uri(null, opt_ignoreCase);\n\n  // Only set the parts if they are defined and not empty strings.\n  opt_scheme && uri.setScheme(opt_scheme);\n  opt_userInfo && uri.setUserInfo(opt_userInfo);\n  opt_domain && uri.setDomain(opt_domain);\n  opt_port && uri.setPort(opt_port);\n  opt_path && uri.setPath(opt_path);\n  opt_query && uri.setQueryData(opt_query);\n  opt_fragment && uri.setFragment(opt_fragment);\n\n  return uri;\n};\n\n\n/**\n * Resolves a relative Uri against a base Uri, accepting both strings and\n * Uri objects.\n *\n * @param {*} base Base Uri.\n * @param {*} rel Relative Uri.\n * @return {!goog.Uri} Resolved uri.\n */\ngoog.Uri.resolve = function(base, rel) {\n  'use strict';\n  if (!(base instanceof goog.Uri)) {\n    base = goog.Uri.parse(base);\n  }\n\n  if (!(rel instanceof goog.Uri)) {\n    rel = goog.Uri.parse(rel);\n  }\n\n  return base.resolve(rel);\n};\n\n\n/**\n * Removes dot segments in given path component, as described in\n * RFC 3986, section 5.2.4.\n *\n * @param {string} path A non-empty path component.\n * @return {string} Path component with removed dot segments.\n */\ngoog.Uri.removeDotSegments = function(path) {\n  'use strict';\n  if (path == '..' || path == '.') {\n    return '';\n\n  } else if (\n      !goog.string.contains(path, './') && !goog.string.contains(path, '/.')) {\n    // This optimization detects uris which do not contain dot-segments,\n    // and as a consequence do not require any processing.\n    return path;\n\n  } else {\n    let leadingSlash = goog.string.startsWith(path, '/');\n    const segments = path.split('/');\n    const out = [];\n\n    for (let pos = 0; pos < segments.length;) {\n      const segment = segments[pos++];\n\n      if (segment == '.') {\n        if (leadingSlash && pos == segments.length) {\n          out.push('');\n        }\n      } else if (segment == '..') {\n        if (out.length > 1 || out.length == 1 && out[0] != '') {\n          out.pop();\n        }\n        if (leadingSlash && pos == segments.length) {\n          out.push('');\n        }\n      } else {\n        out.push(segment);\n        leadingSlash = true;\n      }\n    }\n\n    return out.join('/');\n  }\n};\n\n\n/**\n * Decodes a value or returns the empty string if it isn't defined or empty.\n * @throws URIError If decodeURIComponent fails to decode val.\n * @param {string|undefined} val Value to decode.\n * @param {boolean=} opt_preserveReserved If true, restricted characters will\n *     not be decoded.\n * @return {string} Decoded value.\n * @private\n */\ngoog.Uri.decodeOrEmpty_ = function(val, opt_preserveReserved) {\n  'use strict';\n  // Don't use UrlDecode() here because val is not a query parameter.\n  if (!val) {\n    return '';\n  }\n\n  // decodeURI has the same output for '%2f' and '%252f'. We double encode %25\n  // so that we can distinguish between the 2 inputs. This is later undone by\n  // removeDoubleEncoding_.\n  return opt_preserveReserved ? decodeURI(val.replace(/%25/g, '%2525')) :\n                                decodeURIComponent(val);\n};\n\n\n/**\n * If unescapedPart is non null, then escapes any characters in it that aren't\n * valid characters in a url and also escapes any special characters that\n * appear in extra.\n *\n * @param {*} unescapedPart The string to encode.\n * @param {RegExp} extra A character set of characters in [\\01-\\177].\n * @param {boolean=} opt_removeDoubleEncoding If true, remove double percent\n *     encoding.\n * @return {?string} null iff unescapedPart == null.\n * @private\n */\ngoog.Uri.encodeSpecialChars_ = function(\n    unescapedPart, extra, opt_removeDoubleEncoding) {\n  'use strict';\n  if (typeof unescapedPart === 'string') {\n    let encoded = encodeURI(unescapedPart).replace(extra, goog.Uri.encodeChar_);\n    if (opt_removeDoubleEncoding) {\n      // encodeURI double-escapes %XX sequences used to represent restricted\n      // characters in some URI components, remove the double escaping here.\n      encoded = goog.Uri.removeDoubleEncoding_(encoded);\n    }\n    return encoded;\n  }\n  return null;\n};\n\n\n/**\n * Converts a character in [\\01-\\177] to its unicode character equivalent.\n * @param {string} ch One character string.\n * @return {string} Encoded string.\n * @private\n */\ngoog.Uri.encodeChar_ = function(ch) {\n  'use strict';\n  const n = ch.charCodeAt(0);\n  return '%' + ((n >> 4) & 0xf).toString(16) + (n & 0xf).toString(16);\n};\n\n\n/**\n * Removes double percent-encoding from a string.\n * @param  {string} doubleEncodedString String\n * @return {string} String with double encoding removed.\n * @private\n */\ngoog.Uri.removeDoubleEncoding_ = function(doubleEncodedString) {\n  'use strict';\n  return doubleEncodedString.replace(/%25([0-9a-fA-F]{2})/g, '%$1');\n};\n\n\n/**\n * Regular expression for characters that are disallowed in the scheme or\n * userInfo part of the URI.\n * @type {RegExp}\n * @private\n */\ngoog.Uri.reDisallowedInSchemeOrUserInfo_ = /[#\\/\\?@]/g;\n\n\n/**\n * Regular expression for characters that are disallowed in a relative path.\n * Colon is included due to RFC 3986 3.3.\n * @type {RegExp}\n * @private\n */\ngoog.Uri.reDisallowedInRelativePath_ = /[\\#\\?:]/g;\n\n\n/**\n * Regular expression for characters that are disallowed in an absolute path.\n * @type {RegExp}\n * @private\n */\ngoog.Uri.reDisallowedInAbsolutePath_ = /[\\#\\?]/g;\n\n\n/**\n * Regular expression for characters that are disallowed in the query.\n * @type {RegExp}\n * @private\n */\ngoog.Uri.reDisallowedInQuery_ = /[\\#\\?@]/g;\n\n\n/**\n * Regular expression for characters that are disallowed in the fragment.\n * @type {RegExp}\n * @private\n */\ngoog.Uri.reDisallowedInFragment_ = /#/g;\n\n\n/**\n * Checks whether two URIs have the same domain.\n * @param {string} uri1String First URI string.\n * @param {string} uri2String Second URI string.\n * @return {boolean} true if the two URIs have the same domain; false otherwise.\n */\ngoog.Uri.haveSameDomain = function(uri1String, uri2String) {\n  'use strict';\n  // Differs from goog.uri.utils.haveSameDomain, since this ignores scheme.\n  // TODO(gboyer): Have this just call goog.uri.util.haveSameDomain.\n  const pieces1 = goog.uri.utils.split(uri1String);\n  const pieces2 = goog.uri.utils.split(uri2String);\n  return pieces1[goog.uri.utils.ComponentIndex.DOMAIN] ==\n      pieces2[goog.uri.utils.ComponentIndex.DOMAIN] &&\n      pieces1[goog.uri.utils.ComponentIndex.PORT] ==\n      pieces2[goog.uri.utils.ComponentIndex.PORT];\n};\n\n\n\n/**\n * Class used to represent URI query parameters.  It is essentially a hash of\n * name-value pairs, though a name can be present more than once.\n *\n * Has the same interface as the collections in goog.structs.\n *\n * @param {?string=} opt_query Optional encoded query string to parse into\n *     the object.\n * @param {boolean=} opt_ignoreCase If true, ignore the case of the parameter\n *     name in #get.\n * @constructor\n * @struct\n * @final\n */\ngoog.Uri.QueryData = function(opt_query, opt_ignoreCase) {\n  'use strict';\n  /**\n   * The map containing name/value or name/array-of-values pairs.\n   * May be null if it requires parsing from the query string.\n   *\n   * We need to use a Map because we cannot guarantee that the key names will\n   * not be problematic for IE.\n   *\n   * @private {?Map<string, !Array<*>>}\n   */\n  this.keyMap_ = null;\n\n  /**\n   * The number of params, or null if it requires computing.\n   * @private {?number}\n   */\n  this.count_ = null;\n\n  /**\n   * Encoded query string, or null if it requires computing from the key map.\n   * @private {?string}\n   */\n  this.encodedQuery_ = opt_query || null;\n\n  /**\n   * If true, ignore the case of the parameter name in #get.\n   * @private {boolean}\n   */\n  this.ignoreCase_ = !!opt_ignoreCase;\n};\n\n\n/**\n * If the underlying key map is not yet initialized, it parses the\n * query string and fills the map with parsed data.\n * @private\n */\ngoog.Uri.QueryData.prototype.ensureKeyMapInitialized_ = function() {\n  'use strict';\n  if (!this.keyMap_) {\n    this.keyMap_ = /** @type {!Map<string, !Array<*>>} */ (new Map());\n    this.count_ = 0;\n    if (this.encodedQuery_) {\n      const self = this;\n      goog.uri.utils.parseQueryData(this.encodedQuery_, function(name, value) {\n        'use strict';\n        self.add(goog.string.urlDecode(name), value);\n      });\n    }\n  }\n};\n\n\n/**\n * Creates a new query data instance from a map of names and values.\n *\n * @param {!goog.collections.maps.MapLike<string, ?>|!Object} map Map of string\n *     parameter names to parameter value. If parameter value is an array, it is\n *     treated as if the key maps to each individual value in the\n *     array.\n * @param {boolean=} opt_ignoreCase If true, ignore the case of the parameter\n *     name in #get.\n * @return {!goog.Uri.QueryData} The populated query data instance.\n */\ngoog.Uri.QueryData.createFromMap = function(map, opt_ignoreCase) {\n  'use strict';\n  const keys = goog.structs.getKeys(map);\n  if (typeof keys == 'undefined') {\n    throw new Error('Keys are undefined');\n  }\n\n  const queryData = new goog.Uri.QueryData(null, opt_ignoreCase);\n  const values = goog.structs.getValues(map);\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const value = values[i];\n    if (!Array.isArray(value)) {\n      queryData.add(key, value);\n    } else {\n      queryData.setValues(key, value);\n    }\n  }\n  return queryData;\n};\n\n\n/**\n * Creates a new query data instance from parallel arrays of parameter names\n * and values. Allows for duplicate parameter names. Throws an error if the\n * lengths of the arrays differ.\n *\n * @param {!Array<string>} keys Parameter names.\n * @param {!Array<?>} values Parameter values.\n * @param {boolean=} opt_ignoreCase If true, ignore the case of the parameter\n *     name in #get.\n * @return {!goog.Uri.QueryData} The populated query data instance.\n */\ngoog.Uri.QueryData.createFromKeysValues = function(\n    keys, values, opt_ignoreCase) {\n  'use strict';\n  if (keys.length != values.length) {\n    throw new Error('Mismatched lengths for keys/values');\n  }\n  const queryData = new goog.Uri.QueryData(null, opt_ignoreCase);\n  for (let i = 0; i < keys.length; i++) {\n    queryData.add(keys[i], values[i]);\n  }\n  return queryData;\n};\n\n\n/**\n * @return {?number} The number of parameters.\n */\ngoog.Uri.QueryData.prototype.getCount = function() {\n  'use strict';\n  this.ensureKeyMapInitialized_();\n  return this.count_;\n};\n\n\n/**\n * Adds a key value pair.\n * @param {string} key Name.\n * @param {*} value Value.\n * @return {!goog.Uri.QueryData} Instance of this object.\n */\ngoog.Uri.QueryData.prototype.add = function(key, value) {\n  'use strict';\n  this.ensureKeyMapInitialized_();\n  this.invalidateCache_();\n\n  key = this.getKeyName_(key);\n  let values = this.keyMap_.get(key);\n  if (!values) {\n    this.keyMap_.set(key, (values = []));\n  }\n  values.push(value);\n  this.count_ = goog.asserts.assertNumber(this.count_) + 1;\n  return this;\n};\n\n\n/**\n * Removes all the params with the given key.\n * @param {string} key Name.\n * @return {boolean} Whether any parameter was removed.\n */\ngoog.Uri.QueryData.prototype.remove = function(key) {\n  'use strict';\n  this.ensureKeyMapInitialized_();\n\n  key = this.getKeyName_(key);\n  if (this.keyMap_.has(key)) {\n    this.invalidateCache_();\n\n    // Decrement parameter count.\n    this.count_ =\n        goog.asserts.assertNumber(this.count_) - this.keyMap_.get(key).length;\n    return this.keyMap_.delete(key);\n  }\n  return false;\n};\n\n\n/**\n * Clears the parameters.\n */\ngoog.Uri.QueryData.prototype.clear = function() {\n  'use strict';\n  this.invalidateCache_();\n  this.keyMap_ = null;\n  this.count_ = 0;\n};\n\n\n/**\n * @return {boolean} Whether we have any parameters.\n */\ngoog.Uri.QueryData.prototype.isEmpty = function() {\n  'use strict';\n  this.ensureKeyMapInitialized_();\n  return this.count_ == 0;\n};\n\n\n/**\n * Whether there is a parameter with the given name\n * @param {string} key The parameter name to check for.\n * @return {boolean} Whether there is a parameter with the given name.\n */\ngoog.Uri.QueryData.prototype.containsKey = function(key) {\n  'use strict';\n  this.ensureKeyMapInitialized_();\n  key = this.getKeyName_(key);\n  return this.keyMap_.has(key);\n};\n\n\n/**\n * Whether there is a parameter with the given value.\n * @param {*} value The value to check for.\n * @return {boolean} Whether there is a parameter with the given value.\n */\ngoog.Uri.QueryData.prototype.containsValue = function(value) {\n  'use strict';\n  // NOTE(arv): This solution goes through all the params even if it was the\n  // first param. We can get around this by not reusing code or by switching to\n  // iterators.\n  const vals = this.getValues();\n  return goog.array.contains(vals, value);\n};\n\n\n/**\n * Runs a callback on every key-value pair in the map, including duplicate keys.\n * This won't maintain original order when duplicate keys are interspersed (like\n * getKeys() / getValues()).\n * @param {function(this:SCOPE, ?, string, !goog.Uri.QueryData)} f\n * @param {SCOPE=} opt_scope The value of \"this\" inside f.\n * @template SCOPE\n */\ngoog.Uri.QueryData.prototype.forEach = function(f, opt_scope) {\n  'use strict';\n  this.ensureKeyMapInitialized_();\n  this.keyMap_.forEach(function(values, key) {\n    'use strict';\n    values.forEach(function(value) {\n      'use strict';\n      f.call(opt_scope, value, key, this);\n    }, this);\n  }, this);\n};\n\n\n/**\n * Returns all the keys of the parameters. If a key is used multiple times\n * it will be included multiple times in the returned array\n * @return {!Array<string>} All the keys of the parameters.\n */\ngoog.Uri.QueryData.prototype.getKeys = function() {\n  'use strict';\n  this.ensureKeyMapInitialized_();\n  // We need to get the values to know how many keys to add.\n  const vals = Array.from(this.keyMap_.values());\n  const keys = Array.from(this.keyMap_.keys());\n  const rv = [];\n  for (let i = 0; i < keys.length; i++) {\n    const val = vals[i];\n    for (let j = 0; j < val.length; j++) {\n      rv.push(keys[i]);\n    }\n  }\n  return rv;\n};\n\n\n/**\n * Returns all the values of the parameters with the given name. If the query\n * data has no such key this will return an empty array. If no key is given\n * all values wil be returned.\n * @param {string=} opt_key The name of the parameter to get the values for.\n * @return {!Array<?>} All the values of the parameters with the given name.\n */\ngoog.Uri.QueryData.prototype.getValues = function(opt_key) {\n  'use strict';\n  this.ensureKeyMapInitialized_();\n  let rv = [];\n  if (typeof opt_key === 'string') {\n    if (this.containsKey(opt_key)) {\n      rv = rv.concat(this.keyMap_.get(this.getKeyName_(opt_key)));\n    }\n  } else {\n    // Return all values.\n    const values = Array.from(this.keyMap_.values());\n    for (let i = 0; i < values.length; i++) {\n      rv = rv.concat(values[i]);\n    }\n  }\n  return rv;\n};\n\n\n/**\n * Sets a key value pair and removes all other keys with the same value.\n *\n * @param {string} key Name.\n * @param {*} value Value.\n * @return {!goog.Uri.QueryData} Instance of this object.\n */\ngoog.Uri.QueryData.prototype.set = function(key, value) {\n  'use strict';\n  this.ensureKeyMapInitialized_();\n  this.invalidateCache_();\n\n  // TODO(chrishenry): This could be better written as\n  // this.remove(key), this.add(key, value), but that would reorder\n  // the key (since the key is first removed and then added at the\n  // end) and we would have to fix unit tests that depend on key\n  // ordering.\n  key = this.getKeyName_(key);\n  if (this.containsKey(key)) {\n    this.count_ =\n        goog.asserts.assertNumber(this.count_) - this.keyMap_.get(key).length;\n  }\n  this.keyMap_.set(key, [value]);\n  this.count_ = goog.asserts.assertNumber(this.count_) + 1;\n  return this;\n};\n\n\n/**\n * Returns the first value associated with the key. If the query data has no\n * such key this will return undefined or the optional default.\n * @param {string} key The name of the parameter to get the value for.\n * @param {*=} opt_default The default value to return if the query data\n *     has no such key.\n * @return {*} The first string value associated with the key, or opt_default\n *     if there's no value.\n */\ngoog.Uri.QueryData.prototype.get = function(key, opt_default) {\n  'use strict';\n  if (!key) {\n    return opt_default;\n  }\n  const values = this.getValues(key);\n  return values.length > 0 ? String(values[0]) : opt_default;\n};\n\n\n/**\n * Sets the values for a key. If the key already exists, this will\n * override all of the existing values that correspond to the key.\n * @param {string} key The key to set values for.\n * @param {!Array<?>} values The values to set.\n */\ngoog.Uri.QueryData.prototype.setValues = function(key, values) {\n  'use strict';\n  this.remove(key);\n\n  if (values.length > 0) {\n    this.invalidateCache_();\n    this.keyMap_.set(this.getKeyName_(key), goog.array.clone(values));\n    this.count_ = goog.asserts.assertNumber(this.count_) + values.length;\n  }\n};\n\n\n/**\n * @return {string} Encoded query string.\n * @override\n */\ngoog.Uri.QueryData.prototype.toString = function() {\n  'use strict';\n  if (this.encodedQuery_) {\n    return this.encodedQuery_;\n  }\n\n  if (!this.keyMap_) {\n    return '';\n  }\n\n  const sb = [];\n\n  // In the past, we use this.getKeys() and this.getVals(), but that\n  // generates a lot of allocations as compared to simply iterating\n  // over the keys.\n  const keys = Array.from(this.keyMap_.keys());\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const encodedKey = goog.string.urlEncode(key);\n    const val = this.getValues(key);\n    for (let j = 0; j < val.length; j++) {\n      let param = encodedKey;\n      // Ensure that null and undefined are encoded into the url as\n      // literal strings.\n      if (val[j] !== '') {\n        param += '=' + goog.string.urlEncode(val[j]);\n      }\n      sb.push(param);\n    }\n  }\n\n  return this.encodedQuery_ = sb.join('&');\n};\n\n\n/**\n * @throws URIError If URI is malformed (that is, if decodeURIComponent fails on\n *     any of the URI components).\n * @return {string} Decoded query string.\n */\ngoog.Uri.QueryData.prototype.toDecodedString = function() {\n  'use strict';\n  return goog.Uri.decodeOrEmpty_(this.toString());\n};\n\n\n/**\n * Invalidate the cache.\n * @private\n */\ngoog.Uri.QueryData.prototype.invalidateCache_ = function() {\n  'use strict';\n  this.encodedQuery_ = null;\n};\n\n\n/**\n * Removes all keys that are not in the provided list. (Modifies this object.)\n * @param {Array<string>} keys The desired keys.\n * @return {!goog.Uri.QueryData} a reference to this object.\n */\ngoog.Uri.QueryData.prototype.filterKeys = function(keys) {\n  'use strict';\n  this.ensureKeyMapInitialized_();\n  this.keyMap_.forEach(function(value, key) {\n    'use strict';\n    if (!goog.array.contains(keys, key)) {\n      this.remove(key);\n    }\n  }, this);\n  return this;\n};\n\n\n/**\n * Clone the query data instance.\n * @return {!goog.Uri.QueryData} New instance of the QueryData object.\n */\ngoog.Uri.QueryData.prototype.clone = function() {\n  'use strict';\n  const rv = new goog.Uri.QueryData();\n  rv.encodedQuery_ = this.encodedQuery_;\n  if (this.keyMap_) {\n    rv.keyMap_ = /** @type {!Map<string, !Array<*>>} */ (new Map(this.keyMap_));\n    rv.count_ = this.count_;\n  }\n  return rv;\n};\n\n\n/**\n * Helper function to get the key name from a JavaScript object. Converts\n * the object to a string, and to lower case if necessary.\n * @private\n * @param {*} arg The object to get a key name from.\n * @return {string} valid key name which can be looked up in #keyMap_.\n */\ngoog.Uri.QueryData.prototype.getKeyName_ = function(arg) {\n  'use strict';\n  let keyName = String(arg);\n  if (this.ignoreCase_) {\n    keyName = keyName.toLowerCase();\n  }\n  return keyName;\n};\n\n\n/**\n * Ignore case in parameter names.\n * NOTE: If there are already key/value pairs in the QueryData, and\n * ignoreCase_ is set to false, the keys will all be lower-cased.\n * @param {boolean} ignoreCase whether this goog.Uri should ignore case.\n */\ngoog.Uri.QueryData.prototype.setIgnoreCase = function(ignoreCase) {\n  'use strict';\n  const resetKeys = ignoreCase && !this.ignoreCase_;\n  if (resetKeys) {\n    this.ensureKeyMapInitialized_();\n    this.invalidateCache_();\n    this.keyMap_.forEach(function(value, key) {\n      'use strict';\n      const lowerCase = key.toLowerCase();\n      if (key != lowerCase) {\n        this.remove(key);\n        this.setValues(lowerCase, value);\n      }\n    }, this);\n  }\n  this.ignoreCase_ = ignoreCase;\n};\n\n\n/**\n * Extends a query data object with another query data or map like object. This\n * operates 'in-place', it does not create a new QueryData object.\n *\n * @param {...(?goog.Uri.QueryData|?goog.collections.maps.MapLike<?,\n *     ?>|?Object)} var_args The object from which key value pairs will be\n *     copied. Note: does not accept null.\n * @suppress {deprecated} Use deprecated goog.structs.forEach to allow different\n * types of parameters.\n */\ngoog.Uri.QueryData.prototype.extend = function(var_args) {\n  'use strict';\n  for (let i = 0; i < arguments.length; i++) {\n    const data = arguments[i];\n    goog.structs.forEach(data, function(value, key) {\n      'use strict';\n      this.add(key, value);\n    }, this);\n  }\n};\n","// source: google/rpc/code.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$e.google$rpc$Code');\n\n/**\n * @enum {number}\n */\njspb$e.google$rpc$Code = {\n  OK: 0,\n  CANCELLED: 1,\n  UNKNOWN: 2,\n  INVALID_ARGUMENT: 3,\n  DEADLINE_EXCEEDED: 4,\n  NOT_FOUND: 5,\n  ALREADY_EXISTS: 6,\n  PERMISSION_DENIED: 7,\n  UNAUTHENTICATED: 16,\n  RESOURCE_EXHAUSTED: 8,\n  FAILED_PRECONDITION: 9,\n  ABORTED: 10,\n  OUT_OF_RANGE: 11,\n  UNIMPLEMENTED: 12,\n  INTERNAL: 13,\n  UNAVAILABLE: 14,\n  DATA_LOSS: 15\n};\n\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Implementation of a WebChannel transport using WebChannelBase.\n *\n * When WebChannelBase is used as the underlying transport, the capabilities\n * of the WebChannel are limited to what's supported by the implementation.\n * Particularly, multiplexing is not possible, and only strings are\n * supported as message types.\n */\n\ngoog.module('goog.labs.net.webChannel.WebChannelBaseTransport');\ngoog.module.declareLegacyNamespace();\n\nconst ChannelRequest = goog.require('goog.labs.net.webChannel.ChannelRequest');\nconst GoogEventTarget = goog.require('goog.events.EventTarget');\nconst WebChannel = goog.require('goog.net.WebChannel');\nconst WebChannelBase = goog.require('goog.labs.net.webChannel.WebChannelBase');\nconst WebChannelTransport = goog.require('goog.net.WebChannelTransport');\nconst Wire = goog.require('goog.labs.net.webChannel.Wire');\nconst asserts = goog.require('goog.asserts');\nconst googJson = goog.require('goog.json');\nconst googObject = goog.require('goog.object');\nconst googString = goog.require('goog.string');\nconst log = goog.require('goog.log');\nconst maps = goog.require('goog.collections.maps');\n\n/**\n * Implementation of {@link WebChannelTransport} with\n * {@link WebChannelBase} as the underlying channel\n * implementation.\n *\n * @constructor\n * @struct\n * @implements {WebChannelTransport}\n * @final\n */\nfunction WebChannelBaseTransport() {\n  if (!ChannelRequest.supportsXhrStreaming()) {\n    throw new Error('Environmental error: no available transport.');\n  }\n}\n\n/**\n * @override\n */\nWebChannelBaseTransport.prototype.createWebChannel = function(\n    url, opt_options) {\n  return new WebChannelBaseTransport.Channel(url, opt_options);\n};\n\n/**\n * Implementation of the {@link WebChannel} interface.\n *\n * @param {string} url The URL path for the new WebChannel instance.\n * @param {!WebChannel.Options=} opt_options Configuration for the\n *     new WebChannel instance.\n *\n * @constructor\n * @implements {WebChannel}\n * @extends {GoogEventTarget}\n * @final\n */\nWebChannelBaseTransport.Channel = function(url, opt_options) {\n  WebChannelBaseTransport.Channel.base(this, 'constructor');\n\n  /**\n   * @private {!WebChannelBase} The underlying channel object.\n   */\n  this.channel_ =\n      new WebChannelBase(opt_options, WebChannelTransport.CLIENT_VERSION);\n\n  /**\n   * @private {string} The URL of the target server end-point.\n   */\n  this.url_ = url;\n\n  /**\n   * @private {log.Logger} The logger for this class.\n   */\n  this.logger_ =\n      log.getLogger('goog.labs.net.webChannel.WebChannelBaseTransport');\n\n  /**\n   * @private {Object<string, string>} Extra URL parameters\n   * to be added to each HTTP request.\n   */\n  this.messageUrlParams_ =\n      (opt_options && opt_options.messageUrlParams) || null;\n\n  let messageHeaders = (opt_options && opt_options.messageHeaders) || null;\n\n  // default is false\n  if (opt_options && opt_options.clientProtocolHeaderRequired) {\n    if (messageHeaders) {\n      googObject.set(\n          messageHeaders, WebChannel.X_CLIENT_PROTOCOL,\n          WebChannel.X_CLIENT_PROTOCOL_WEB_CHANNEL);\n    } else {\n      messageHeaders = googObject.create(\n          WebChannel.X_CLIENT_PROTOCOL,\n          WebChannel.X_CLIENT_PROTOCOL_WEB_CHANNEL);\n    }\n  }\n\n  this.channel_.setExtraHeaders(messageHeaders);\n\n  let initHeaders = (opt_options && opt_options.initMessageHeaders) || null;\n\n  if (opt_options && opt_options.messageContentType) {\n    if (initHeaders) {\n      googObject.set(\n          initHeaders, WebChannel.X_WEBCHANNEL_CONTENT_TYPE,\n          opt_options.messageContentType);\n    } else {\n      initHeaders = googObject.create(\n          WebChannel.X_WEBCHANNEL_CONTENT_TYPE, opt_options.messageContentType);\n    }\n  }\n\n  if (opt_options && opt_options.clientProfile) {\n    if (initHeaders) {\n      googObject.set(\n          initHeaders, WebChannel.X_WEBCHANNEL_CLIENT_PROFILE,\n          opt_options.clientProfile);\n    } else {\n      initHeaders = googObject.create(\n          WebChannel.X_WEBCHANNEL_CLIENT_PROFILE, opt_options.clientProfile);\n    }\n  }\n\n  this.channel_.setInitHeaders(initHeaders);\n\n  const httpHeadersOverwriteParam =\n      opt_options && opt_options.httpHeadersOverwriteParam;\n  if (httpHeadersOverwriteParam &&\n      !googString.isEmptyOrWhitespace(httpHeadersOverwriteParam)) {\n    this.channel_.setHttpHeadersOverwriteParam(httpHeadersOverwriteParam);\n  }\n\n  /**\n   * @private {boolean} Whether to enable CORS.\n   */\n  this.supportsCrossDomainXhr_ =\n      (opt_options && opt_options.supportsCrossDomainXhr) || false;\n\n  /**\n   * @private {boolean} Whether to send raw Json and bypass v8 wire format.\n   */\n  this.sendRawJson_ = (opt_options && opt_options.sendRawJson) || false;\n\n  // Note that httpSessionIdParam will be ignored if the same parameter name\n  // has already been specified with messageUrlParams\n  const httpSessionIdParam = opt_options && opt_options.httpSessionIdParam;\n  if (httpSessionIdParam &&\n      !googString.isEmptyOrWhitespace(httpSessionIdParam)) {\n    this.channel_.setHttpSessionIdParam(httpSessionIdParam);\n    if (googObject.containsKey(this.messageUrlParams_, httpSessionIdParam)) {\n      googObject.remove(this.messageUrlParams_, httpSessionIdParam);\n      log.warning(\n          this.logger_,\n          'Ignore httpSessionIdParam also specified with messageUrlParams: ' +\n              httpSessionIdParam);\n    }\n  }\n\n  /**\n   * The channel handler.\n   *\n   * @private {!WebChannelBaseTransport.Channel.Handler_}\n   */\n  this.channelHandler_ = new WebChannelBaseTransport.Channel.Handler_(this);\n};\ngoog.inherits(WebChannelBaseTransport.Channel, GoogEventTarget);\n\n/**\n * @override\n */\nWebChannelBaseTransport.Channel.prototype.open = function() {\n  this.channel_.setHandler(this.channelHandler_);\n  if (this.supportsCrossDomainXhr_) {\n    this.channel_.setSupportsCrossDomainXhrs(true);\n  }\n  this.channel_.connect(this.url_, (this.messageUrlParams_ || undefined));\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.Channel.prototype.close = function() {\n  this.channel_.disconnect();\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.Channel.prototype.halfClose = function() {\n  // to be implemented\n  throw new Error('Not implemented');\n};\n\n/**\n * The WebChannelBase only supports object types.\n *\n * @param {!WebChannel.MessageData} message The message to send.\n *\n * @override\n */\nWebChannelBaseTransport.Channel.prototype.send = function(message) {\n  this.channel_.sendMap(this.messageToMapObject_(message));\n};\n\n/**\n * Converts a message to the map used by the underlying channel.\n *\n * @param {!WebChannel.MessageData} message\n * @return {!Object|!maps.MapLike}\n */\nWebChannelBaseTransport.Channel.prototype.messageToMapObject_ = function(\n    message) {\n  asserts.assert(\n      goog.isObject(message) || typeof message === 'string',\n      'only object type or raw string is supported');\n\n  if (typeof message === 'string') {\n    const rawJson = {};\n    rawJson[Wire.RAW_DATA_KEY] = message;\n    return rawJson;\n  }\n\n  if (this.sendRawJson_) {\n    const rawJson = {};\n    rawJson[Wire.RAW_DATA_KEY] = googJson.serialize(message);\n    return rawJson;\n  }\n\n  return message;\n};\n\n/**\n * Converts the map used by the underlying channel to a message.\n *\n * NOTE: In the case of the message being JS Object or string, the exact same\n * object passed during `messageToMapObject_()` is returned. In the case of raw\n * JSON, an equal (but not the same) object is returned (due to serialization).\n *\n * @param {!Object|!maps.MapLike} map\n * @return {!WebChannel.MessageData}\n */\nWebChannelBaseTransport.Channel.prototype.mapObjectToMessage_ = function(map) {\n  if (Wire.RAW_DATA_KEY in map) {\n    const rawMessage = map[Wire.RAW_DATA_KEY];\n\n    if (this.sendRawJson_) {\n      return /** @type {!WebChannel.MessageData} */ (\n          googJson.parse(rawMessage));\n    } else {  // string message\n      return rawMessage;\n    }\n  }\n\n  return map;\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.Channel.prototype.disposeInternal = function() {\n  this.channel_.setHandler(null);\n  delete this.channelHandler_;\n  this.channel_.disconnect();\n  delete this.channel_;\n\n  WebChannelBaseTransport.Channel.base(this, 'disposeInternal');\n};\n\n/**\n * The message event.\n *\n * @param {!Array<?>|!Object} array The data array from the underlying channel.\n * @constructor\n * @extends {WebChannel.MessageEvent}\n * @final\n */\nWebChannelBaseTransport.Channel.MessageEvent = function(array) {\n  WebChannelBaseTransport.Channel.MessageEvent.base(this, 'constructor');\n\n  // Metadata as HTTP headers and status code (always come in a pair).\n  if (array['__headers__']) {\n    this.headers = array['__headers__'];\n    this.statusCode = array['__status__'];\n    delete array['__headers__'];\n    delete array['__status__'];\n  }\n\n  // single-metadata only\n  const metadata = array['__sm__'];\n  if (metadata) {\n    this.metadataKey = googObject.getAnyKey(metadata);\n    if (this.metadataKey) {\n      this.data = googObject.get(metadata, this.metadataKey);\n    } else {\n      this.data = metadata;  // empty\n    }\n  } else {\n    this.data = array;\n  }\n};\ngoog.inherits(\n    WebChannelBaseTransport.Channel.MessageEvent, WebChannel.MessageEvent);\n\n/**\n * The error event.\n *\n * @param {WebChannelBase.Error} error The error code.\n * @constructor\n * @extends {WebChannel.ErrorEvent}\n * @final\n */\nWebChannelBaseTransport.Channel.ErrorEvent = function(error) {\n  WebChannelBaseTransport.Channel.ErrorEvent.base(this, 'constructor');\n\n  /**\n   * High-level status code.\n   */\n  this.status = WebChannel.ErrorStatus.NETWORK_ERROR;\n\n  /**\n   * @const {WebChannelBase.Error} Internal error code, for debugging use only.\n   */\n  this.errorCode = error;\n};\ngoog.inherits(\n    WebChannelBaseTransport.Channel.ErrorEvent, WebChannel.ErrorEvent);\n\n/**\n * Implementation of {@link WebChannelBase.Handler} interface.\n *\n * @param {!WebChannelBaseTransport.Channel} channel The enclosing WebChannel.\n *\n * @constructor\n * @extends {WebChannelBase.Handler}\n * @private\n */\nWebChannelBaseTransport.Channel.Handler_ = function(channel) {\n  WebChannelBaseTransport.Channel.Handler_.base(this, 'constructor');\n\n  /**\n   * @type {!WebChannelBaseTransport.Channel}\n   * @private\n   */\n  this.channel_ = channel;\n};\ngoog.inherits(WebChannelBaseTransport.Channel.Handler_, WebChannelBase.Handler);\n\n/**\n * @override\n */\nWebChannelBaseTransport.Channel.Handler_.prototype.channelOpened = function(\n    channel) {\n  log.info(this.channel_.logger_, 'WebChannel opened on ' + this.channel_.url_);\n  this.channel_.dispatchEvent(WebChannel.EventType.OPEN);\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.Channel.Handler_.prototype.channelHandleArray =\n    function(channel, array) {\n  asserts.assert(array, 'array expected to be defined');\n  this.channel_.dispatchEvent(\n      new WebChannelBaseTransport.Channel.MessageEvent(array));\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.Channel.Handler_.prototype.channelError = function(\n    channel, error) {\n  log.info(\n      this.channel_.logger_,\n      'WebChannel aborted on ' + this.channel_.url_ +\n          ' due to channel error: ' + error);\n  this.channel_.dispatchEvent(\n      new WebChannelBaseTransport.Channel.ErrorEvent(error));\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.Channel.Handler_.prototype.channelClosed = function(\n    channel, opt_pendingMaps, opt_undeliveredMaps) {\n  log.info(this.channel_.logger_, 'WebChannel closed on ' + this.channel_.url_);\n  this.channel_.dispatchEvent(WebChannel.EventType.CLOSE);\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.Channel.prototype.getRuntimeProperties = function() {\n  return new WebChannelBaseTransport.ChannelProperties(this, this.channel_);\n};\n\n/**\n * Implementation of the {@link WebChannel.RuntimeProperties}.\n *\n * @param {!WebChannelBaseTransport.Channel} transportChannel The transport\n *     channel object.\n * @param {!WebChannelBase} channel The underlying channel object.\n *\n * @constructor\n * @implements {WebChannel.RuntimeProperties}\n * @final\n */\nWebChannelBaseTransport.ChannelProperties = function(\n    transportChannel, channel) {\n  /**\n   * The transport channel object.\n   *\n   * @private @const {!WebChannelBaseTransport.Channel}\n   */\n  this.transportChannel_ = transportChannel;\n\n  /**\n   * The underlying channel object.\n   *\n   * @private @const {!WebChannelBase}\n   */\n  this.channel_ = channel;\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.ChannelProperties.prototype.getConcurrentRequestLimit =\n    function() {\n  return this.channel_.getForwardChannelRequestPool().getMaxSize();\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.ChannelProperties.prototype.isSpdyEnabled = function() {\n  return this.getConcurrentRequestLimit() > 1;\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.ChannelProperties.prototype.getPendingRequestCount =\n    function() {\n  return this.channel_.getForwardChannelRequestPool().getRequestCount();\n};\n\n/**\n * @override\n * @return {!Array<!WebChannel.MessageData>}\n */\nWebChannelBaseTransport.ChannelProperties.prototype.getNonAckedMessages =\n    function() {\n  return this.channel_.getNonAckedMaps().map(\n      queued_map => this.transportChannel_.mapObjectToMessage_(queued_map.map));\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.ChannelProperties.prototype.getHttpSessionId =\n    function() {\n  return this.channel_.getHttpSessionId();\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.ChannelProperties.prototype.commit = function(\n    callback) {\n  this.channel_.setForwardChannelFlushCallback(callback);\n};\n\n/**\n * @override\n * @return {number}\n */\nWebChannelBaseTransport.ChannelProperties.prototype.getNonAckedMessageGap =\n    function() {\n  return this.channel_.getNonAckedMessageGap();\n};\n\n/**\n * @override\n */\nWebChannelBaseTransport.ChannelProperties.prototype.notifyNonAckedMessageCount =\n    goog.abstractMethod;\n\n/**\n * @override\n */\nWebChannelBaseTransport.ChannelProperties.prototype.onCommit =\n    goog.abstractMethod;\n\n/**\n * @override\n */\nWebChannelBaseTransport.ChannelProperties.prototype.ackCommit =\n    goog.abstractMethod;\n\n/**\n * @override\n * @return {!Object<string, string>|undefined}\n */\nWebChannelBaseTransport.ChannelProperties.prototype.getLastResponseHeaders =\n    function() {\n  return this.channel_.getLastResponseHeaders();\n};\n\n/** @override */\nWebChannelBaseTransport.ChannelProperties.prototype.getLastStatusCode =\n    function() {\n  return this.channel_.getLastStatusCode();\n};\n\nexports = WebChannelBaseTransport;\n","import {Header} from 'google3/ipc/invalidation/punctual/client/proto/common.proto';\n\n/** Header to attach to client requests. */\nexport const HEADER: Header =\n  // TODO(b/178618389): investigate if it is possible to retrieve build info\n  // for typescript clients.\n  new Header()\n    // LINT.IfChange\n    .setVersion(9)\n    // Ensure the Punctual server continues to distinguish valid versions,\n    // and document version evolution in common.proto.\n    // LINT.ThenChange(\n    //   //depot/google3/ipc/invalidation/punctual/common/client_header.h,\n    //   //depot/google3/ipc/invalidation/punctual/client/proto/common.proto)\n    .setLibrary(Header.Library.TYPE_SCRIPT);\n","// source: ipc/invalidation/punctual/client/proto/common.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$e.punctual$proto$Header$Library');\n\n/**\n * @enum {number}\n */\njspb$e.punctual$proto$Header$Library = {\n  INVALID: 0,\n  CPP: 1,\n  CPP_CLERKLESS: 8,\n  JAVA: 2,\n  GO: 3,\n  MEMCACHEGV2: 4,\n  TYPE_SCRIPT: 5,\n  PROXY_FAN_PUBLISHER_ADAPTER: 6,\n  APRES: 7,\n  XPLAT: 9\n};\n\n","import {ObjectPath} from 'google3/ipc/invalidation/punctual/client/proto/common.proto';\n\n/**\n * A part type that can be posted by servers but does not have a suitable\n * TypeScript representation, cannot be constructed using the public API, or\n * is simply unknown to a version of the client library.\n */\nexport class OpaquePart {\n  // Note that Punctual customers are not able to call these methods due to the\n  // fact that TypeScript does not allow static methods to be called on re-\n  // exported types.\n\n  /** Creates an OpaquePart wrapping the given proto message. */\n  static create(part: ObjectPath.Part): OpaquePart {\n    return new OpaquePart(part);\n  }\n\n  // Returns the underlying proto representation of the part.\n  static getRep(part: OpaquePart): ObjectPath.Part {\n    return part.rep;\n  }\n\n  private constructor(\n    /** The raw, uninterpreted proto representation of the part. */\n    private readonly rep: ObjectPath.Part,\n  ) {}\n\n  /** Returns whether this is structurally equal to `other`. */\n  equals(other: OpaquePart): boolean {\n    return this.rep === other.rep;\n  }\n}\n","/**\n * @fileoverview Implements a token bucket, providing the ability to throttle\n * requests to a given rate but allowing for some burstiness.\n * Copied from //javascript/apps/chat/common/tokenbucket.js\n */\n\nimport * as asserts from 'google3/third_party/javascript/closure/asserts/asserts';\n\n/** A token bucket rate limiter. */\nexport class TokenBucket {\n  private tokens: number;\n  private lastAddedTimestampMs = Date.now();\n\n  /**\n   * @param start How many tokens to start with; defaults to 1.\n   */\n  constructor(\n    /** How many milliseconds elapse between adding a token. */\n    private readonly periodMs: number,\n\n    /** How many tokens can accumulate; defaults to 1. */\n    private readonly max = 1,\n\n    /**\n     * How many tokens to start with; defaults to 1. Must be less than or equal\n     * to `max`.\n     */\n    start = 1,\n  ) {\n    asserts.assert(this.periodMs > 0, 'negative period');\n    this.tokens = start;\n    asserts.assert(this.tokens <= this.max, 'start must not exceed max');\n  }\n\n  /**\n   * Determines if a request is permitted (as opposed to throttled), and\n   * consumes one token if so.\n   */\n  isPermitted(): boolean {\n    this.update();\n    if (this.tokens < 1) {\n      return false;\n    }\n    this.tokens--;\n    return true;\n  }\n\n  /** Updates the token count according to elapsed time. */\n  private update() {\n    const now = Date.now();\n    const newTokens =\n      this.tokens + (now - this.lastAddedTimestampMs) / this.periodMs;\n    // Let time advance if there are no tokens to add (due to floating point\n    // error).\n    if (this.tokens >= newTokens) {\n      return;\n    }\n    this.tokens = Math.min(newTokens, this.max);\n    this.lastAddedTimestampMs = now;\n  }\n}\n","/**\n * @fileoverview Internal details about the WebChannel, exposed for customers\n * who need visibility into the channel's behavior.\n */\n\nimport {ImmutableStatus} from 'google3/google/rpc/status.proto';\nimport {WebChannel} from 'google3/third_party/javascript/closure/labs/net/webchannel';\nimport * as requestStats from 'google3/third_party/javascript/closure/labs/net/webchannel/requeststats';\n\n/** Indicates that the client is attempting to start the ChooseServer RPC. */\nexport class ChooseServerStart {}\n\n/** Indicates that the ChooseServer RPC succeeded. */\nexport class ChooseServerSuccess {}\n\n/** Indicates that the ChooseServer RPC failed. */\nexport class ChooseServerFailure {\n  constructor(\n    /** The HTTP status code of the failed ChooseServer request if available. */\n    readonly httpStatusCode?: number,\n  ) {}\n}\n\n/** Indicates that the client is attempting to open a channel. */\nexport class ChannelTryOpen {}\n\n/** Indicates that the client has successfully opened a channel. */\nexport class ChannelOpen {}\n\n/** Indicates that the channel has closed. */\nexport class ChannelClose {}\n\n/** Indicates that the channel has encountered an error. */\nexport class ChannelError {\n  constructor(\n    /** The WebChannel error. */\n    readonly error: WebChannel.ErrorEvent,\n    /** The HTTP status code of the last request initiated by the WebChannel. */\n    readonly httpStatusCode: number,\n  ) {}\n}\n\n/**\n * Indicates that the server has encountered an error.\n */\nexport class ServerError {\n  constructor(\n    /** The status message returned by the server. */\n    readonly status: ImmutableStatus,\n  ) {}\n}\n\n/** Channel event types. */\nexport type ChannelEvent =\n  | ChooseServerStart\n  | ChooseServerSuccess\n  | ChooseServerFailure\n  | ChannelTryOpen\n  | ChannelOpen\n  | ChannelClose\n  | ChannelError\n  | ServerError\n  | requestStats.StatEvent;\n","/**\n * @fileoverview An interface to the Punctual service.\n * Punctual allows applications to watch streams of changes on objects\n * of interest.\n */\n\nimport {Status} from 'google3/google/rpc/status.proto';\nimport {Long} from 'google3/third_party/javascript/closure/math/long';\nimport {Observable} from 'rxjs';\n\nimport {ObjectId, ObjectIdTree} from './object_id';\n\n/**\n * A signal representing the knowledge that a specific object was changed.\n */\nexport class Change {\n  constructor(\n    /** An identifier for the element of state that has been changed. */\n    readonly objectId: ObjectId,\n\n    /** An application-defined version number associated with the change. */\n    readonly version: Long,\n\n    /** An optional payload associated with the change. */\n    readonly payload?: Uint8Array<ArrayBuffer> | undefined,\n\n    /**\n     * Whether the change was replayed from historical record. This is only a\n     * hint intended for latency monitoring purposes.\n     */\n    readonly isReplay = false,\n  ) {}\n}\n\n/** A signal that indicates that the watch stream has started. */\nexport class Start {}\n\n/**\n * A signal indicating that for all objects in the interest set, the client has\n * been made aware of the latest changes that were posted before the\n * specified `timestampMicros`. Note that 'latest' is defined with respect to\n * application version numbers, not with the timestamps at which the changes\n * were posted.\n */\nexport class Advance {\n  constructor(\n    /** Exclusive timestamp up to which the client's state is fresh. */\n    readonly timestampMicros: Long,\n  ) {}\n}\n\n/** Options for a {@code watch} call. */\nexport interface WatchOptions {\n  /**\n   * A custom project name to use instead of the one that was specified when\n   * creating the `Client`.\n   * <p>\n   * This should just be the project name itself, not a full project path.\n   */\n  projectOverride?: string;\n}\n\n/** Interface for the Punctual client. */\nexport interface Client {\n  /**\n   * Returns an observable stream of changes to the interest set. See\n   * go/punctual-correctness for best practices.\n   * <p>\n   * The first value on the watch stream, if any, is a Start signal. The\n   * watcher is responsible for learning on its own about any changes that\n   * were posted before its receipt of the Start signal. (For example, it could\n   * perform a consistent read from storage after receiving the Start signal.)\n   * <p>\n   * After the Start signal, only Change and Advance signals will appear on\n   * the stream. If Punctual detects a gap between its knowledge and the\n   * client's (typically because of an extended disconnection from the network),\n   * the stream will complete.\n   * <p>\n   * The `subscribe` function may be called repeatedly on the returned\n   * observable, even if other watchers have observed completion. Subscribing is\n   * always expected to make progress, since Punctual is free to begin a new\n   * stream subsequent to any gaps that may have caused earlier terminations.\n   */\n  watch(\n    interestSet: ObjectId | ObjectIdTree,\n    opts?: WatchOptions,\n  ): Observable<Start | Change | Advance>;\n\n  /**\n   * Returns an observable stream of changes to the interest set starting from a\n   * fixed time. See go/punctual-correctness for best practices.\n   * <p>\n   * By calling this function, the client asserts knowledge of state reflecting\n   * all changes posted with timestamps less than `knowledgeMicros`. (For\n   * example, it may have fetched full state from Spanner with a read timestamp\n   * of `knowledgeMicros - 1`.)\n   * <p>\n   * If Punctual detects a gap between its knowledge and the client's\n   * (typically because of an extended disconnection from the network), the\n   * stream will complete.\n   * <p>\n   * Although the `subscribe` function may be called repeatedly on the returned\n   * observable, doing so is discouraged, as it is likely to result in a stream\n   * that completes immediately. The recommended response to stream completion\n   * is to read newer state from storage and start watching from the timestamp\n   * returned by the read (or switch to the causal `watch` function instead).\n   */\n  watchWithStartTime(\n    interestSet: ObjectId | ObjectIdTree,\n    knowledgeMicros: Long,\n    opts?: WatchOptions,\n  ): Observable<Change | Advance>;\n\n  /**\n   * A hot observable stream of events that indicates, on a best-effort basis,\n   * the latest known status of the client's connection to Punctual.\n   * <p>\n   * The application may subscribe to this at any time, and it will\n   * immediately report the latest known status. However, until one of the\n   * {@code watch} methods is called, the status will not be very meaningful.\n   */\n  readonly status: Observable<Status>;\n}\n","/**\n * @fileoverview Defines nanosecond granularity Time type for use in Punctual\n * object paths.\n */\n\nimport {\n  ReadonlyTimestamp,\n  Timestamp,\n} from 'google3/google/protobuf/timestamp.proto';\nimport {DateTime} from 'google3/third_party/javascript/closure/date/date';\n\n/**\n * Nanosecond granularity Time value. Includes times in the closed-open\n * interval [0001-01-01T00:00:00Z, 10000-01-01:T00:00:00Z). Compatible with\n * google3/google/protobuf/timestamp.proto and Spanner's `TIMESTAMP` type.\n */\nexport class Time {\n  /** Constructs a Time value. */\n  private constructor(\n    /** Seconds since the Unix epoch. In [-62135596800, 253402300800). */\n    readonly seconds: number,\n\n    /** Nanosecond part of the time, In [0, 1e9). */\n    readonly nanos: number,\n  ) {}\n\n  /**\n   * Returns this as a `goog.date.DateTime`. Rounds down to millisecond\n   * granularity.\n   */\n  asDateTime(): DateTime {\n    return DateTime.fromTimestamp(this.toUnixMillis());\n  }\n\n  /** Returns this as a `Date`. Rounds down to millisecond granularity. */\n  asDate(): Date {\n    return new Date(this.toUnixMillis());\n  }\n\n  /** Returns this as a `Timestamp` proto. */\n  asTimestamp(): Timestamp {\n    const ts = new Timestamp();\n    ts.setSeconds(this.seconds);\n    ts.setNanos(this.nanos);\n    return ts;\n  }\n\n  private toUnixMillis(): number {\n    return this.seconds * 1000 + Math.floor(this.nanos / 1000000);\n  }\n\n  /**\n   * Returns a `Time` at Unix epoch + `seconds` seconds + `nanos` nanoseconds.\n   * <p>\n   * Throws error if `seconds` are not in [-62135596800, 253402300800) or\n   * `nanos` are not in [0, 1e9), since this type can only be used to represent\n   * times in [0001-01-01T00:00:00Z, 10000-01-01:T00:00:00Z).\n   * <p>\n   * Throws error if `seconds` or `nanos` are not integers.\n   */\n  static fromUnixSeconds(seconds: number, nanos: number): Time {\n    const minSeconds = -62135596800; // Seconds between 1970-01-01T00:00:00Z\n    const maxSeconds = 253402300800; // and 10000-01-01T00:00:00Z\n    const minNanos = 0;\n    const maxNanos = 1e9;\n    if (seconds < minSeconds) {\n      throw new Error(`seconds must be at least ${minSeconds}: ${seconds}`);\n    }\n    if (maxSeconds <= seconds) {\n      throw new Error(`seconds must be less than ${maxSeconds}: ${seconds}`);\n    }\n    if (nanos < minNanos) {\n      throw new Error(`nanos must be at least ${minNanos}: ${nanos}`);\n    }\n    if (maxNanos <= nanos) {\n      throw new Error(`nanos must be less than ${maxNanos}: ${nanos}`);\n    }\n    if (!Number.isInteger(seconds)) {\n      throw new Error(`seconds must be integer: ${seconds}`);\n    }\n    if (!Number.isInteger(nanos)) {\n      throw new Error(`nanos must be integer: ${nanos}`);\n    }\n    return new Time(seconds, nanos);\n  }\n\n  /**\n   * Returns a `Time` with the same value as `dateTime`.\n   * <p>\n   * Throws error if `dateTime` is not in [0001-01-01T00:00:00Z,\n   * 10000-01-01:T00:00:00Z).\n   */\n  static fromDateTime(dateTime: DateTime): Time {\n    return Time.fromDateOrDateTime(dateTime);\n  }\n\n  /**\n   * Returns a `Time` with the same value as `date`.\n   * <p>\n   * Throws error if `date` is not in [0001-01-01T00:00:00Z,\n   * 10000-01-01:T00:00:00Z).\n   */\n  static fromDate(date: Date): Time {\n    return Time.fromDateOrDateTime(date);\n  }\n\n  /**\n   * Parses proto representation of a timestamp. The function returns null if\n   * the proto is invalid (e.g., values are not within the ranges prescribed by\n   * `Time.fromUnixSeconds`).\n   */\n  static fromTimestamp(ts: ReadonlyTimestamp): Time | null {\n    try {\n      return Time.fromUnixSeconds(Number(ts.getSeconds()), ts.getNanos());\n    } catch (e) {\n      return null;\n    }\n  }\n\n  private static fromDateOrDateTime(date: Date | DateTime): Time {\n    const millis = date.getTime();\n    const seconds = Math.floor(millis / 1000);\n    const nanos = (millis - seconds * 1000) * 1000000;\n    return Time.fromUnixSeconds(seconds, nanos);\n  }\n\n  /** Returns whether this is equal to `other`. */\n  equals(other: Time): boolean {\n    return this.seconds === other.seconds && this.nanos === other.nanos;\n  }\n}\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Defines a Long class for representing a 64-bit two's-complement\n * integer value, which faithfully simulates the behavior of a Java \"long\". This\n * implementation is derived from LongLib in GWT.\n */\n\ngoog.module('goog.math.Long');\ngoog.module.declareLegacyNamespace();\n\nconst {NATIVE_BIGINT_AVAILABLE} = goog.require('google3.javascript.common.bigint.platform');\nconst {gbigintToBigInt} = goog.require('google3.javascript.common.bigint.to_bigint');\nconst {toGbigint} = goog.require('google3.javascript.common.bigint.index');\n\n/**\n * Represents a 64-bit two's-complement integer, given its low and high 32-bit\n * values as *signed* integers.  See the from* functions below for more\n * convenient ways of constructing Longs.\n *\n * The internal representation of a long is the two given signed, 32-bit values.\n * We use 32-bit pieces because these are the size of integers on which\n * JavaScript performs bit-operations.  For operations like addition and\n * multiplication, we split each number into 16-bit pieces, which can easily be\n * multiplied within JavaScript's floating-point representation without overflow\n * or change in sign.\n *\n * In the algorithms below, we frequently reduce the negative case to the\n * positive case by negating the input(s) and then post-processing the result.\n * Note that we must ALWAYS check specially whether those values are MIN_VALUE\n * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\n * a positive number, it overflows back into a negative).  Not handling this\n * case would often result in infinite recursion.\n * @final\n */\nclass Long {\n  /**\n   * @param {number} low  The low (signed) 32 bits of the long.\n   * @param {number} high  The high (signed) 32 bits of the long.\n   */\n  constructor(low, high) {\n    /**\n     * @const {number}\n     * @private\n     */\n    this.low_ = low | 0;  // force into 32 signed bits.\n\n    /**\n     * @const {number}\n     * @private\n     */\n    this.high_ = high | 0;  // force into 32 signed bits.\n  }\n\n  /** @return {number} The value, assuming it is a 32-bit integer. */\n  toInt() {\n    return this.low_;\n  }\n\n  /**\n   * @return {number} The closest floating-point representation to this value.\n   */\n  toNumber() {\n    return this.high_ * TWO_PWR_32_DBL_ + this.getLowBitsUnsigned();\n  }\n\n  /**\n   * Coerces this value to a `gbigint`.\n   * @return {!gbigint}\n   */\n  toGbigint() {\n    if (NATIVE_BIGINT_AVAILABLE) {\n      return toGbigint(\n          BigInt(this.getLowBitsUnsigned()) +\n          (BigInt(this.high_) << BigInt(32)));\n    }\n    return toGbigint(this.toString());\n  }\n\n  /**\n   * @return {boolean} if can be exactly represented using number (i.e.\n   *     abs(value) < 2^53).\n   */\n  isSafeInteger() {\n    const top11Bits = this.high_ >> 21;\n    // If top11Bits are all 0s, then the number is between [0, 2^53-1]\n    return top11Bits == 0\n        // If top11Bits are all 1s, then the number is between [-1, -2^53]\n        || (top11Bits == -1\n            // and exclude -2^53\n            && !(this.low_ == 0 && this.high_ == (0xffe00000 | 0)));\n  }\n\n  /**\n   * @param {number=} opt_radix The radix in which the text should be written.\n   * @return {string} The textual representation of this value.\n   * @override\n   */\n  toString(opt_radix) {\n    const radix = opt_radix || 10;\n    if (radix < 2 || 36 < radix) {\n      throw new Error('radix out of range: ' + radix);\n    }\n\n    // We can avoid very expensive division based code path for some common\n    // cases.\n    if (this.isSafeInteger()) {\n      const asNumber = this.toNumber();\n      // Shortcutting for radix 10 (common case) to avoid boxing via toString:\n      // https://jsperf.com/tostring-vs-vs-if\n      return radix == 10 ? ('' + asNumber) : asNumber.toString(radix);\n    }\n\n    // We need to split 64bit integer into: `a * radix**safeDigits + b` where\n    // neither `a` nor `b` exceeds 53 bits, meaning that safeDigits can be any\n    // number in a range: [(63 - 53) / log2(radix); 53 / log2(radix)].\n\n    // Other options that need to be benchmarked:\n    //   11..16 - (radix >> 2);\n    //   10..13 - (radix >> 3);\n    //   10..11 - (radix >> 4);\n    const safeDigits = 14 - (radix >> 2);\n\n    const radixPowSafeDigits = Math.pow(radix, safeDigits);\n    const radixToPower =\n        Long.fromBits(radixPowSafeDigits, radixPowSafeDigits / TWO_PWR_32_DBL_);\n\n    const remDiv = this.div(radixToPower);\n    let val = Math.abs(this.subtract(remDiv.multiply(radixToPower)).toNumber());\n    let digits = radix == 10 ? ('' + val) : val.toString(radix);\n\n    if (digits.length < safeDigits) {\n      // Up to 13 leading 0s we might need to insert as the greatest safeDigits\n      // value is 14 (for radix 2).\n      digits = '0000000000000'.slice(digits.length - safeDigits) + digits;\n    }\n\n    val = remDiv.toNumber();\n    return (radix == 10 ? val : val.toString(radix)) + digits;\n  }\n\n  /**\n   * @param {number=} opt_radix The radix in which the text should be written.\n   * @return {string} The unsigned textual representation of this value.\n   */\n  toUnsignedString(opt_radix) {\n    // If the sign bit isn't even set just use the normal flow\n    if (this.high_ >= 0) {\n      return this.toString(opt_radix);\n    }\n\n    const radix = opt_radix || 10;\n    if (radix < 2 || 36 < radix) {\n      throw new Error('radix out of range: ' + radix);\n    }\n    // Use fromInt() to get the 64-bit representation of the radix as the entire\n    // radix range should be cached.\n    const longRadix = Long.fromInt(radix);\n    // Divide as unsigned 64-bit numbers.\n    let quotient = this.shiftRightUnsigned(1).div(longRadix).shiftLeft(1);\n    let remainder = this.subtract(quotient.multiply(longRadix));\n    // Check if we need to sign adjust the quotient.\n    if (remainder.greaterThanOrEqual(longRadix)) {\n      quotient = quotient.add(Long.getOne());\n      remainder = this.subtract(quotient.multiply(longRadix));\n    }\n    return quotient.toString(radix) + remainder.toString(radix);\n  }\n\n  /** @return {number} The high 32-bits as a signed value. */\n  getHighBits() {\n    return this.high_;\n  }\n\n  /** @return {number} The low 32-bits as a signed value. */\n  getLowBits() {\n    return this.low_;\n  }\n\n  /** @return {number} The low 32-bits as an unsigned value. */\n  getLowBitsUnsigned() {\n    // The right shifting fixes negative values in the case when\n    // intval >= 2^31; for more details see\n    // https://github.com/google/closure-library/pull/498\n    return this.low_ >>> 0;\n  }\n\n  /**\n   * @return {number} Returns the number of bits needed to represent the\n   *     absolute value of this Long.\n   */\n  getNumBitsAbs() {\n    if (this.isNegative()) {\n      if (this.equals(Long.getMinValue())) {\n        return 64;\n      } else {\n        return this.negate().getNumBitsAbs();\n      }\n    } else {\n      const val = this.high_ != 0 ? this.high_ : this.low_;\n      let bit;\n      for (bit = 31; bit > 0; bit--) {\n        if ((val & (1 << bit)) != 0) {\n          break;\n        }\n      }\n      return this.high_ != 0 ? bit + 33 : bit + 1;\n    }\n  }\n\n  /** @return {boolean} Whether this value is zero. */\n  isZero() {\n    // Check low part first as there is high chance it's not 0.\n    return this.low_ == 0 && this.high_ == 0;\n  }\n\n  /** @return {boolean} Whether this value is negative. */\n  isNegative() {\n    return this.high_ < 0;\n  }\n\n  /** @return {boolean} Whether this value is odd. */\n  isOdd() {\n    return (this.low_ & 1) == 1;\n  }\n\n  /**\n   * Returns a hash code for this long object that similar java.lang.Long one.\n   *\n   * @return {number} 32 bit hash code for this object.\n   */\n  hashCode() {\n    return this.getLowBits() ^ this.getHighBits();\n  }\n\n  /**\n   * @param {?Long} other Long to compare against.\n   * @return {boolean} Whether this Long equals the other.\n   */\n  equals(other) {\n    if (other == null) {\n      return false;\n    }\n    // Compare low parts first as there is higher chance they are different.\n    return (this.low_ == other.low_) && (this.high_ == other.high_);\n  }\n\n  /**\n   * @param {?Long} other Long to compare against.\n   * @return {boolean} Whether this Long does not equal the other.\n   */\n  notEquals(other) {\n    return !this.equals(other);\n  }\n\n  /**\n   * @param {?Long} other Long to compare against.\n   * @return {boolean} Whether this Long is less than the other.\n   */\n  lessThan(other) {\n    return this.compare(other) < 0;\n  }\n\n  /**\n   * @param {?Long} other Long to compare against.\n   * @return {boolean} Whether this Long is less than or equal to the other.\n   */\n  lessThanOrEqual(other) {\n    return this.compare(other) <= 0;\n  }\n\n  /**\n   * @param {?Long} other Long to compare against.\n   * @return {boolean} Whether this Long is greater than the other.\n   */\n  greaterThan(other) {\n    return this.compare(other) > 0;\n  }\n\n  /**\n   * @param {?Long} other Long to compare against.\n   * @return {boolean} Whether this Long is greater than or equal to the other.\n   */\n  greaterThanOrEqual(other) {\n    return this.compare(other) >= 0;\n  }\n\n  /**\n   * Compares this Long with the given one.\n   * @param {?Long} other Long to compare against.\n   * @return {number} 0 if they are the same, 1 if the this is greater, and -1\n   *     if the given one is greater.\n   */\n  compare(other) {\n    if (this.high_ == other.high_) {\n      if (this.low_ == other.low_) {\n        return 0;\n      }\n      return this.getLowBitsUnsigned() > other.getLowBitsUnsigned() ? 1 : -1;\n    }\n    return this.high_ > other.high_ ? 1 : -1;\n  }\n\n  /** @return {!Long} The negation of this value. */\n  negate() {\n    const negLow = (~this.low_ + 1) | 0;\n    const overflowFromLow = !negLow;\n    const negHigh = (~this.high_ + overflowFromLow) | 0;\n    return Long.fromBits(negLow, negHigh);\n  }\n\n  /**\n   * Returns the sum of this and the given Long.\n   * @param {?Long} other Long to add to this one.\n   * @return {!Long} The sum of this and the given Long.\n   */\n  add(other) {\n    // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\n\n    const a48 = this.high_ >>> 16;\n    const a32 = this.high_ & 0xFFFF;\n    const a16 = this.low_ >>> 16;\n    const a00 = this.low_ & 0xFFFF;\n\n    const b48 = other.high_ >>> 16;\n    const b32 = other.high_ & 0xFFFF;\n    const b16 = other.low_ >>> 16;\n    const b00 = other.low_ & 0xFFFF;\n\n    let c48 = 0;\n    let c32 = 0;\n    let c16 = 0;\n    let c00 = 0;\n    c00 += a00 + b00;\n    c16 += c00 >>> 16;\n    c00 &= 0xFFFF;\n    c16 += a16 + b16;\n    c32 += c16 >>> 16;\n    c16 &= 0xFFFF;\n    c32 += a32 + b32;\n    c48 += c32 >>> 16;\n    c32 &= 0xFFFF;\n    c48 += a48 + b48;\n    c48 &= 0xFFFF;\n    return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32);\n  }\n\n  /**\n   * Returns the difference of this and the given Long.\n   * @param {?Long} other Long to subtract from this.\n   * @return {!Long} The difference of this and the given Long.\n   */\n  subtract(other) {\n    return this.add(other.negate());\n  }\n\n  /**\n   * Returns the product of this and the given long.\n   * @param {?Long} other Long to multiply with this.\n   * @return {!Long} The product of this and the other.\n   */\n  multiply(other) {\n    if (this.isZero()) {\n      return this;\n    }\n    if (other.isZero()) {\n      return other;\n    }\n\n    // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\n    // We can skip products that would overflow.\n\n    const a48 = this.high_ >>> 16;\n    const a32 = this.high_ & 0xFFFF;\n    const a16 = this.low_ >>> 16;\n    const a00 = this.low_ & 0xFFFF;\n\n    const b48 = other.high_ >>> 16;\n    const b32 = other.high_ & 0xFFFF;\n    const b16 = other.low_ >>> 16;\n    const b00 = other.low_ & 0xFFFF;\n\n    let c48 = 0;\n    let c32 = 0;\n    let c16 = 0;\n    let c00 = 0;\n    c00 += a00 * b00;\n    c16 += c00 >>> 16;\n    c00 &= 0xFFFF;\n    c16 += a16 * b00;\n    c32 += c16 >>> 16;\n    c16 &= 0xFFFF;\n    c16 += a00 * b16;\n    c32 += c16 >>> 16;\n    c16 &= 0xFFFF;\n    c32 += a32 * b00;\n    c48 += c32 >>> 16;\n    c32 &= 0xFFFF;\n    c32 += a16 * b16;\n    c48 += c32 >>> 16;\n    c32 &= 0xFFFF;\n    c32 += a00 * b32;\n    c48 += c32 >>> 16;\n    c32 &= 0xFFFF;\n    c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\n    c48 &= 0xFFFF;\n    return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32);\n  }\n\n  /**\n   * Returns this Long divided by the given one.\n   * @param {?Long} other Long by which to divide.\n   * @return {!Long} This Long divided by the given one.\n   */\n  div(other) {\n    if (other.isZero()) {\n      throw new Error('division by zero');\n    }\n    if (this.isNegative()) {\n      if (this.equals(Long.getMinValue())) {\n        if (other.equals(Long.getOne()) || other.equals(Long.getNegOne())) {\n          return Long.getMinValue();  // recall -MIN_VALUE == MIN_VALUE\n        }\n        if (other.equals(Long.getMinValue())) {\n          return Long.getOne();\n        }\n        // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\n        const halfThis = this.shiftRight(1);\n        const approx = halfThis.div(other).shiftLeft(1);\n        if (approx.equals(Long.getZero())) {\n          return other.isNegative() ? Long.getOne() : Long.getNegOne();\n        }\n        const rem = this.subtract(other.multiply(approx));\n        const result = approx.add(rem.div(other));\n        return result;\n      }\n      if (other.isNegative()) {\n        return this.negate().div(other.negate());\n      }\n      return this.negate().div(other).negate();\n    }\n    if (this.isZero()) {\n      return Long.getZero();\n    }\n    if (other.isNegative()) {\n      if (other.equals(Long.getMinValue())) {\n        return Long.getZero();\n      }\n      return this.div(other.negate()).negate();\n    }\n\n    // Repeat the following until the remainder is less than other:  find a\n    // floating-point that approximates remainder / other *from below*, add this\n    // into the result, and subtract it from the remainder.  It is critical that\n    // the approximate value is less than or equal to the real value so that the\n    // remainder never becomes negative.\n    let res = Long.getZero();\n    let rem = this;\n    while (rem.greaterThanOrEqual(other)) {\n      // Approximate the result of division. This may be a little greater or\n      // smaller than the actual value.\n      let approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber()));\n\n      // We will tweak the approximate result by changing it in the 48-th digit\n      // or the smallest non-fractional digit, whichever is larger.\n      const log2 = Math.ceil(Math.log(approx) / Math.LN2);\n      const delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48);\n\n      // Decrease the approximation until it is smaller than the remainder. Note\n      // that if it is too large, the product overflows and is negative.\n      let approxRes = Long.fromNumber(approx);\n      let approxRem = approxRes.multiply(other);\n      while (approxRem.isNegative() || approxRem.greaterThan(rem)) {\n        approx -= delta;\n        approxRes = Long.fromNumber(approx);\n        approxRem = approxRes.multiply(other);\n      }\n\n      // We know the answer can't be zero... and actually, zero would cause\n      // infinite recursion since we would make no progress.\n      if (approxRes.isZero()) {\n        approxRes = Long.getOne();\n      }\n\n      res = res.add(approxRes);\n      rem = rem.subtract(approxRem);\n    }\n    return res;\n  }\n\n  /**\n   * Returns this Long modulo the given one.\n   * @param {?Long} other Long by which to mod.\n   * @return {!Long} This Long modulo the given one.\n   */\n  modulo(other) {\n    return this.subtract(this.div(other).multiply(other));\n  }\n\n  /** @return {!Long} The bitwise-NOT of this value. */\n  not() {\n    return Long.fromBits(~this.low_, ~this.high_);\n  }\n\n  /**\n   * Returns the bitwise-AND of this Long and the given one.\n   * @param {?Long} other The Long with which to AND.\n   * @return {!Long} The bitwise-AND of this and the other.\n   */\n  and(other) {\n    return Long.fromBits(this.low_ & other.low_, this.high_ & other.high_);\n  }\n\n  /**\n   * Returns the bitwise-OR of this Long and the given one.\n   * @param {?Long} other The Long with which to OR.\n   * @return {!Long} The bitwise-OR of this and the other.\n   */\n  or(other) {\n    return Long.fromBits(this.low_ | other.low_, this.high_ | other.high_);\n  }\n\n  /**\n   * Returns the bitwise-XOR of this Long and the given one.\n   * @param {?Long} other The Long with which to XOR.\n   * @return {!Long} The bitwise-XOR of this and the other.\n   */\n  xor(other) {\n    return Long.fromBits(this.low_ ^ other.low_, this.high_ ^ other.high_);\n  }\n\n  /**\n   * Returns this Long with bits shifted to the left by the given amount.\n   * @param {number} numBits The number of bits by which to shift.\n   * @return {!Long} This shifted to the left by the given amount.\n   */\n  shiftLeft(numBits) {\n    numBits &= 63;\n    if (numBits == 0) {\n      return this;\n    } else {\n      const low = this.low_;\n      if (numBits < 32) {\n        const high = this.high_;\n        return Long.fromBits(\n            low << numBits, (high << numBits) | (low >>> (32 - numBits)));\n      } else {\n        return Long.fromBits(0, low << (numBits - 32));\n      }\n    }\n  }\n\n  /**\n   * Returns this Long with bits shifted to the right by the given amount.\n   * The new leading bits match the current sign bit.\n   * @param {number} numBits The number of bits by which to shift.\n   * @return {!Long} This shifted to the right by the given amount.\n   */\n  shiftRight(numBits) {\n    numBits &= 63;\n    if (numBits == 0) {\n      return this;\n    } else {\n      const high = this.high_;\n      if (numBits < 32) {\n        const low = this.low_;\n        return Long.fromBits(\n            (low >>> numBits) | (high << (32 - numBits)), high >> numBits);\n      } else {\n        return Long.fromBits(high >> (numBits - 32), high >= 0 ? 0 : -1);\n      }\n    }\n  }\n\n  /**\n   * Returns this Long with bits shifted to the right by the given amount, with\n   * zeros placed into the new leading bits.\n   * @param {number} numBits The number of bits by which to shift.\n   * @return {!Long} This shifted to the right by the given amount,\n   *     with zeros placed into the new leading bits.\n   */\n  shiftRightUnsigned(numBits) {\n    numBits &= 63;\n    if (numBits == 0) {\n      return this;\n    } else {\n      const high = this.high_;\n      if (numBits < 32) {\n        const low = this.low_;\n        return Long.fromBits(\n            (low >>> numBits) | (high << (32 - numBits)), high >>> numBits);\n      } else if (numBits == 32) {\n        return Long.fromBits(high, 0);\n      } else {\n        return Long.fromBits(high >>> (numBits - 32), 0);\n      }\n    }\n  }\n\n  /**\n   * Returns a Long representing the given (32-bit) integer value.\n   * @param {number} value The 32-bit integer in question.\n   * @return {!Long} The corresponding Long value.\n   */\n  static fromInt(value) {\n    const intValue = value | 0;\n    if (goog.DEBUG && value !== intValue) {\n      throw new Error('value should be a 32-bit integer');\n    }\n\n    if (-128 <= intValue && intValue < 128) {\n      return getCachedIntValue(intValue);\n    } else {\n      return new Long(intValue, intValue < 0 ? -1 : 0);\n    }\n  }\n\n  /**\n   * Returns a Long representing the given value.\n   * NaN will be returned as zero. Infinity is converted to max value and\n   * -Infinity to min value.\n   * @param {number} value The number in question.\n   * @return {!Long} The corresponding Long value.\n   */\n  static fromNumber(value) {\n    if (value > 0) {\n      if (value >= TWO_PWR_63_DBL_) {\n        return Long.getMaxValue();\n      }\n      return new Long(value, value / TWO_PWR_32_DBL_);\n    } else if (value < 0) {\n      if (value <= -TWO_PWR_63_DBL_) {\n        return Long.getMinValue();\n      }\n      return new Long(-value, -value / TWO_PWR_32_DBL_).negate();\n    } else {\n      // NaN or 0.\n      return Long.getZero();\n    }\n  }\n\n  /**\n   * Returns a Long representing the given value.\n   * @param {!gbigint} value The number in question.\n   * @return {!Long} The corresponding Long value.\n   */\n  static fromGbigint(value) {\n    if (NATIVE_BIGINT_AVAILABLE) {\n      const bigint = gbigintToBigInt(value);\n      const low = Number(BigInt.asIntN(32, bigint));\n      const high = Number(BigInt.asIntN(32, bigint >> BigInt(32)));\n      return Long.fromBits(low, high);\n    }\n    return Long.fromString(String(value));\n  }\n\n  /**\n   * Returns a Long representing the 64-bit integer that comes by concatenating\n   * the given high and low bits.  Each is assumed to use 32 bits.\n   * @param {number} lowBits The low 32-bits.\n   * @param {number} highBits The high 32-bits.\n   * @return {!Long} The corresponding Long value.\n   */\n  static fromBits(lowBits, highBits) {\n    return new Long(lowBits, highBits);\n  }\n\n  /**\n   * Returns a Long representation of the given string, written using the given\n   * radix.\n   * @param {string} str The textual representation of the Long.\n   * @param {number=} opt_radix The radix in which the text is written.\n   * @return {!Long} The corresponding Long value.\n   */\n  static fromString(str, opt_radix) {\n    if (str.charAt(0) == '-') {\n      return Long.fromString(str.substring(1), opt_radix).negate();\n    }\n\n    // We can avoid very expensive multiply based code path for some common\n    // cases.\n    const numberValue = parseInt(str, opt_radix || 10);\n    if (numberValue <= MAX_SAFE_INTEGER_) {\n      return new Long(\n          (numberValue % TWO_PWR_32_DBL_) | 0,\n          (numberValue / TWO_PWR_32_DBL_) | 0);\n    }\n\n    if (str.length == 0) {\n      throw new Error('number format error: empty string');\n    }\n    if (str.indexOf('-') >= 0) {\n      throw new Error('number format error: interior \"-\" character: ' + str);\n    }\n\n    const radix = opt_radix || 10;\n    if (radix < 2 || 36 < radix) {\n      throw new Error('radix out of range: ' + radix);\n    }\n\n    // Do several (8) digits each time through the loop, so as to\n    // minimize the calls to the very expensive emulated multiply.\n    const radixToPower = Long.fromNumber(Math.pow(radix, 8));\n\n    let result = Long.getZero();\n    for (let i = 0; i < str.length; i += 8) {\n      const size = Math.min(8, str.length - i);\n      const value = parseInt(str.substring(i, i + size), radix);\n      if (size < 8) {\n        const power = Long.fromNumber(Math.pow(radix, size));\n        result = result.multiply(power).add(Long.fromNumber(value));\n      } else {\n        result = result.multiply(radixToPower);\n        result = result.add(Long.fromNumber(value));\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Returns the boolean value of whether the input string is within a Long's\n   * range. Assumes an input string containing only numeric characters with an\n   * optional preceding '-'.\n   * @param {string} str The textual representation of the Long.\n   * @param {number=} opt_radix The radix in which the text is written.\n   * @return {boolean} Whether the string is within the range of a Long.\n   */\n  static isStringInRange(str, opt_radix) {\n    const radix = opt_radix || 10;\n    if (radix < 2 || 36 < radix) {\n      throw new Error('radix out of range: ' + radix);\n    }\n\n    const extremeValue = (str.charAt(0) == '-') ? MIN_VALUE_FOR_RADIX_[radix] :\n                                                  MAX_VALUE_FOR_RADIX_[radix];\n\n    if (str.length < extremeValue.length) {\n      return true;\n    } else if (str.length == extremeValue.length && str <= extremeValue) {\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * @return {!Long}\n   * @public\n   */\n  static getZero() {\n    return ZERO_;\n  }\n\n  /**\n   * @return {!Long}\n   * @public\n   */\n  static getOne() {\n    return ONE_;\n  }\n\n  /**\n   * @return {!Long}\n   * @public\n   */\n  static getNegOne() {\n    return NEG_ONE_;\n  }\n\n  /**\n   * @return {!Long}\n   * @public\n   */\n  static getMaxValue() {\n    return MAX_VALUE_;\n  }\n\n  /**\n   * @return {!Long}\n   * @public\n   */\n  static getMinValue() {\n    return MIN_VALUE_;\n  }\n\n  /**\n   * @return {!Long}\n   * @public\n   */\n  static getTwoPwr24() {\n    return TWO_PWR_24_;\n  }\n}\n\nexports = Long;\n\n// NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the\n// from* methods on which they depend.\n\n\n/**\n * A cache of the Long representations of small integer values.\n * @const {!Object<number, !Long>}\n */\nconst intCache = {};\n\n\n/**\n * Returns a cached long number representing the given (32-bit) integer value.\n * @param {number} val The 32-bit integer in question.\n * @return {!Long} The corresponding Long value.\n * @nosideeffects\n * @noinline\n */\nfunction getCachedIntValue(val) {\n  return intCache[val] || (intCache[val] = new Long(val, val < 0 ? -1 : 0));\n}\n\n/**\n * The array of maximum values of a Long in string representation for a given\n * radix between 2 and 36, inclusive.\n * @private @const {!Array<string>}\n */\nconst MAX_VALUE_FOR_RADIX_ = [\n  '', '',  // unused\n  '111111111111111111111111111111111111111111111111111111111111111',\n  // base 2\n  '2021110011022210012102010021220101220221',  // base 3\n  '13333333333333333333333333333333',          // base 4\n  '1104332401304422434310311212',              // base 5\n  '1540241003031030222122211',                 // base 6\n  '22341010611245052052300',                   // base 7\n  '777777777777777777777',                     // base 8\n  '67404283172107811827',                      // base 9\n  '9223372036854775807',                       // base 10\n  '1728002635214590697',                       // base 11\n  '41a792678515120367',                        // base 12\n  '10b269549075433c37',                        // base 13\n  '4340724c6c71dc7a7',                         // base 14\n  '160e2ad3246366807',                         // base 15\n  '7fffffffffffffff',                          // base 16\n  '33d3d8307b214008',                          // base 17\n  '16agh595df825fa7',                          // base 18\n  'ba643dci0ffeehh',                           // base 19\n  '5cbfjia3fh26ja7',                           // base 20\n  '2heiciiie82dh97',                           // base 21\n  '1adaibb21dckfa7',                           // base 22\n  'i6k448cf4192c2',                            // base 23\n  'acd772jnc9l0l7',                            // base 24\n  '64ie1focnn5g77',                            // base 25\n  '3igoecjbmca687',                            // base 26\n  '27c48l5b37oaop',                            // base 27\n  '1bk39f3ah3dmq7',                            // base 28\n  'q1se8f0m04isb',                             // base 29\n  'hajppbc1fc207',                             // base 30\n  'bm03i95hia437',                             // base 31\n  '7vvvvvvvvvvvv',                             // base 32\n  '5hg4ck9jd4u37',                             // base 33\n  '3tdtk1v8j6tpp',                             // base 34\n  '2pijmikexrxp7',                             // base 35\n  '1y2p0ij32e8e7'                              // base 36\n];\n\n\n/**\n * The array of minimum values of a Long in string representation for a given\n * radix between 2 and 36, inclusive.\n * @private @const {!Array<string>}\n */\nconst MIN_VALUE_FOR_RADIX_ = [\n  '', '',  // unused\n  '-1000000000000000000000000000000000000000000000000000000000000000',\n  // base 2\n  '-2021110011022210012102010021220101220222',  // base 3\n  '-20000000000000000000000000000000',          // base 4\n  '-1104332401304422434310311213',              // base 5\n  '-1540241003031030222122212',                 // base 6\n  '-22341010611245052052301',                   // base 7\n  '-1000000000000000000000',                    // base 8\n  '-67404283172107811828',                      // base 9\n  '-9223372036854775808',                       // base 10\n  '-1728002635214590698',                       // base 11\n  '-41a792678515120368',                        // base 12\n  '-10b269549075433c38',                        // base 13\n  '-4340724c6c71dc7a8',                         // base 14\n  '-160e2ad3246366808',                         // base 15\n  '-8000000000000000',                          // base 16\n  '-33d3d8307b214009',                          // base 17\n  '-16agh595df825fa8',                          // base 18\n  '-ba643dci0ffeehi',                           // base 19\n  '-5cbfjia3fh26ja8',                           // base 20\n  '-2heiciiie82dh98',                           // base 21\n  '-1adaibb21dckfa8',                           // base 22\n  '-i6k448cf4192c3',                            // base 23\n  '-acd772jnc9l0l8',                            // base 24\n  '-64ie1focnn5g78',                            // base 25\n  '-3igoecjbmca688',                            // base 26\n  '-27c48l5b37oaoq',                            // base 27\n  '-1bk39f3ah3dmq8',                            // base 28\n  '-q1se8f0m04isc',                             // base 29\n  '-hajppbc1fc208',                             // base 30\n  '-bm03i95hia438',                             // base 31\n  '-8000000000000',                             // base 32\n  '-5hg4ck9jd4u38',                             // base 33\n  '-3tdtk1v8j6tpq',                             // base 34\n  '-2pijmikexrxp8',                             // base 35\n  '-1y2p0ij32e8e8'                              // base 36\n];\n\n/**\n * TODO(goktug): Replace with Number.MAX_SAFE_INTEGER when polyfil is guaranteed\n * to be removed.\n * @type {number}\n * @private @const\n */\nconst MAX_SAFE_INTEGER_ = 0x1fffffffffffff;\n\n// NOTE: the compiler should inline these constant values below and then remove\n// these variables, so there should be no runtime penalty for these.\n\n/**\n * Number used repeated below in calculations.  This must appear before the\n * first call to any from* function above.\n * @const {number}\n * @private\n */\nconst TWO_PWR_32_DBL_ = 0x100000000;\n\n\n/**\n * @const {number}\n * @private\n */\nconst TWO_PWR_63_DBL_ = 0x8000000000000000;\n\n\n/**\n * @private @const {!Long}\n */\nconst ZERO_ = Long.fromBits(0, 0);\n\n\n/**\n * @private @const {!Long}\n */\nconst ONE_ = Long.fromBits(1, 0);\n\n/**\n * @private @const {!Long}\n */\nconst NEG_ONE_ = Long.fromBits(-1, -1);\n\n/**\n * @private @const {!Long}\n */\nconst MAX_VALUE_ = Long.fromBits(0xFFFFFFFF, 0x7FFFFFFF);\n\n/**\n * @private @const {!Long}\n */\nconst MIN_VALUE_ = Long.fromBits(0, 0x80000000);\n\n/**\n * @private @const {!Long}\n */\nconst TWO_PWR_24_ = Long.fromBits(1 << 24, 0);\n","/**\n * @fileoverview Defines the notion of an object identifier that can be watched\n * by a client. We also define the idea of a hierarchy or environment of objects\n * that a client may watch.\n */\n\nimport * as objectIdImpl from 'google3/ipc/invalidation/punctual/typescript/impl/object_id_impl';\nimport {assumeExhaustive} from 'google3/javascript/typescript/contrib/check';\nimport {Long} from 'google3/third_party/javascript/closure/math/long';\n\nimport {Time} from './time';\n\n/**\n * An object id part type that for which no meaningful representation currently\n * exists in TypeScript, which is defined to allow prefix watching in the\n * presence of arbitrary part types that are supported in other languages.\n *\n * <p>We deliberately define OpaquePart in an internal module and re-export it\n * here to prevent users from constructing it.\n */\nexport type OpaquePart = objectIdImpl.OpaquePart;\n\n/** For parts of an ObjectId */\nexport class ObjectIdPart {\n  /** Whether the part should be sorted in decreasing order. */\n  readonly isDecreasing: boolean;\n\n  /**\n   * Constructs an ObjectId part.\n   * <p>\n   * If no value is supplied for `isDecreasing`, the default is `false`\n   * (ascending sort order). Types for `value` are interpreted as follows: <ul>\n   *   <li>`string`: Unicode string</li>\n   *   <li>`Uint8Array`: byte string</li>\n   *   <li>`Long`: signed integer</li>\n   *   <li>`Time`: time</li>\n   *   <li>`null`: null part</li>\n   *   <li>`OpaquePart`: part without meaningful TypeScript representation</li>\n   * </ul>\n   */\n  private constructor(\n    /** The value of the object id part. */\n    readonly value: string | Long | OpaquePart | Uint8Array | Time | null,\n    /**\n     * Whether the part should be sorted in decreasing order. Ignored for\n     * opaque parts.\n     */\n    isDecreasing?: boolean,\n  ) {\n    this.isDecreasing = !!isDecreasing;\n  }\n\n  /** Returns whether this is structurally equal to `other`. */\n  equals(other: ObjectIdPart): boolean {\n    if (this.value === null) {\n      return other.value === null;\n    }\n    if (this.value instanceof objectIdImpl.OpaquePart) {\n      if (!(other.value instanceof objectIdImpl.OpaquePart)) {\n        return false;\n      }\n      return this.value.equals(other.value);\n    }\n    if (this.isDecreasing !== other.isDecreasing) {\n      return false;\n    }\n    if (typeof this.value === 'string' || typeof this.value === 'number') {\n      // Require type and value to match.\n      return this.value === other.value;\n    }\n    if (this.value instanceof Long) {\n      if (!(other.value instanceof Long)) {\n        return false;\n      }\n      return this.value.equals(other.value);\n    }\n    if (this.value instanceof Uint8Array) {\n      if (!(other.value instanceof Uint8Array)) {\n        return false;\n      }\n      return ObjectIdPart.bytesEqual(this.value, other.value);\n    }\n    if (this.value instanceof Time) {\n      if (!(other.value instanceof Time)) {\n        return false;\n      }\n      return this.value.equals(other.value);\n    }\n    assumeExhaustive(this.value);\n    return false;\n  }\n\n  /**\n   * Returns a part with the same value as this instance, but with decreasing\n   * sort order if the part is of a known type that supports notions of\n   * increasing and decreasing sort orders. Otherwise, this method has no\n   * effect.\n   */\n  decreasing(): ObjectIdPart {\n    if (this.value === null || this.value instanceof objectIdImpl.OpaquePart) {\n      return this;\n    }\n\n    return new ObjectIdPart(this.value, /* isDecreasing= */ true);\n  }\n\n  /** Returns whether `x` and `y` have the same contents. */\n  private static bytesEqual(x: Uint8Array, y: Uint8Array): boolean {\n    if (x.length !== y.length) {\n      return false;\n    }\n    for (let i = 0; i < x.length; ++i) {\n      if (x[i] !== y[i]) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /** Returns a signed integer part with the given value. */\n  static int(value: number): ObjectIdPart {\n    return new ObjectIdPart(Long.fromNumber(value));\n  }\n\n  /** Returns a part with the given value. */\n  static of(\n    value: string | Long | OpaquePart | Uint8Array | Time | null,\n  ): ObjectIdPart {\n    return new ObjectIdPart(value);\n  }\n}\n\n/**\n * Returns a part with the given value, which uses normal increasing sort order.\n */\nexport function increasing(\n  value: string | Long | Uint8Array | Time,\n): ObjectIdPart {\n  return ObjectIdPart.of(value);\n}\n\n/**\n * Shorthand to obtain a part using descending sort order. See\n * `ObjectIdPart.of()` for how `value` is interpreted.\n */\nexport function decreasing(\n  value: string | Long | Uint8Array | Time | ObjectIdPart,\n): ObjectIdPart {\n  const part = value instanceof ObjectIdPart ? value : ObjectIdPart.of(value);\n  return part.decreasing();\n}\n\n/** Re-export as top-level function for convenience. */\nexport function int(value: number): ObjectIdPart {\n  return ObjectIdPart.int(value);\n}\n\n/** An object identifier for the signaling service. */\nexport class ObjectId {\n  /**\n   * Constructs an id from its parts.\n   *\n   * @param parts Shorthand part arguments. See the `ObjectIdPart` constructor\n   *     for type mappings for ascending values. For descending values, use\n   *     `decreasing`.\n   */\n  static of(\n    ...parts: Array<string | Long | Uint8Array | Time | ObjectIdPart | null>\n  ): ObjectId {\n    return new ObjectId(canonicalizeParts(parts), /* isPrivate= */ false);\n  }\n\n  /**\n   * Constructs an id that is scoped to the currently authenticated user. In\n   * order to post a change to a private object, you must set a private user\n   * Gaia ID:\n   *\n   * C++:\n   * google3/ipc/invalidation/punctual/public/post.h?q=symbol:set_private_user_gaia_id\n   * Java:\n   * google3/java/com/google/ipc/invalidation/punctual/external/Poster.java?q=symbol:setPrivateUserGaiaId\n   * Go:\n   * google3/ipc/invalidation/punctual/go/public/post.go?q=symbol:PrivateUserGaiaID\n   */\n  static privateToUser(\n    ...parts: Array<string | Long | Uint8Array | Time | ObjectIdPart | null>\n  ): ObjectId {\n    return new ObjectId(canonicalizeParts(parts), /* isPrivate= */ true);\n  }\n\n  private constructor(\n    readonly parts: ObjectIdPart[],\n    private readonly isPrivate: boolean,\n  ) {}\n\n  /** Returns whether this is a private per-user object. */\n  isPrivateToUser(): boolean {\n    return this.isPrivate;\n  }\n\n  /** Returns whether this is a prefix of `other`. */\n  isPrefixOf(other: ObjectId): boolean {\n    if (this.isPrivate !== other.isPrivate) {\n      return false;\n    }\n    if (this.parts.length > other.parts.length) {\n      return false;\n    }\n    for (let i = 0; i < this.parts.length; ++i) {\n      if (!this.parts[i].equals(other.parts[i])) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /** Returns whether this is structurally equal to `other`. */\n  equals(other: ObjectId): boolean {\n    return this.parts.length === other.parts.length && this.isPrefixOf(other);\n  }\n\n  /** Formats an object id as a human-readable string. */\n  static debugString(objectId: ObjectId): string {\n    let result = '{';\n    const path = objectId.parts\n      .map((part) => part.value?.toString() ?? 'null')\n      .join('/');\n    // '/' would be encoded to '%2F' in the path.\n    result = result.concat(\n      ` path: \"${encodeURIComponent(path)}\"`,\n      ` ${objectId.isPrivateToUser() ? '(private)' : '(public)'} }`,\n    );\n    return result;\n  }\n}\n\n/**\n * An ObjectIdTree defines a collection of ObjectIds that begin with the same\n * sequence of parts as a specific 'root' object.\n */\nexport class ObjectIdTree {\n  constructor(\n    /** The root of the tree. */\n    readonly root: ObjectId,\n  ) {}\n\n  equals(other: ObjectIdTree): boolean {\n    return this.root.equals(other.root);\n  }\n}\n\n/** Returns whether two interest sets are equal. */\nexport function interestSetsEqual(\n  set1: ObjectId | ObjectIdTree,\n  set2: ObjectId | ObjectIdTree,\n): boolean {\n  if (set1 instanceof ObjectId && set2 instanceof ObjectId) {\n    return set1.equals(set2);\n  }\n  if (set1 instanceof ObjectIdTree && set2 instanceof ObjectIdTree) {\n    return set1.equals(set2);\n  }\n  return false;\n}\n\nfunction canonicalizeParts(\n  parts: Array<string | Long | Uint8Array | Time | ObjectIdPart | null>,\n): ObjectIdPart[] {\n  const result = new Array<ObjectIdPart>();\n  for (const part of parts) {\n    if (part instanceof ObjectIdPart) {\n      result.push(part);\n    } else {\n      result.push(ObjectIdPart.of(part));\n    }\n  }\n  return result;\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * An error thrown when one or more errors have occurred during the\n * `unsubscribe` of a {@link Subscription}.\n */\nexport class UnsubscriptionError extends Error {\n  /**\n   * @deprecated Internal implementation detail. Do not construct error instances.\n   * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n   */\n  constructor(public errors: any[]) {\n    super(\n      errors\n        ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n  ')}`\n        : ''\n    );\n    Object.setPrototypeOf(this, new.target.prototype);\n    this.name = 'UnsubscriptionError';\n  }\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\n\n/**\n * Removes an item from an array, mutating it.\n * @param arr The array to remove the item from\n * @param item The item to remove\n */\nexport function arrRemove<T>(arr: T[] | undefined | null, item: T) {\n  if (arr) {\n    const index = arr.indexOf(item);\n    0 <= index && arr.splice(index, 1);\n  }\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\n\n/**\n * Returns true if the object is a function.\n * @param value The value to check\n */\nexport function isFunction(value: any): value is (...args: any[]) => any {\n  return typeof value === 'function';\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { SubscriptionLike, TeardownLogic, Unsubscribable } from './types';\nimport { arrRemove } from './util/arrRemove';\n\n/**\n * Represents a disposable resource, such as the execution of an Observable. A\n * Subscription has one important method, `unsubscribe`, that takes no argument\n * and just disposes the resource held by the subscription.\n *\n * Additionally, subscriptions may be grouped together through the `add()`\n * method, which will attach a child Subscription to the current Subscription.\n * When a Subscription is unsubscribed, all its children (and its grandchildren)\n * will be unsubscribed as well.\n *\n * @class Subscription\n */\nexport class Subscription implements SubscriptionLike {\n  /** @nocollapse */\n  public static EMPTY = (() => {\n    const empty = new Subscription();\n    empty.closed = true;\n    return empty;\n  })();\n\n  /**\n   * A flag to indicate whether this Subscription has already been unsubscribed.\n   */\n  public closed = false;\n\n  private _parentage: Subscription[] | Subscription | null = null;\n\n  /**\n   * The list of registered teardowns to execute upon unsubscription. Adding and removing from this\n   * list occurs in the {@link add} and {@link remove} methods.\n   */\n  private _teardowns: Exclude<TeardownLogic, void>[] | null = null;\n\n  /**\n   * @param initialTeardown A function executed first as part of the teardown\n   * process that is kicked off when {@link unsubscribe} is called.\n   */\n  constructor(private initialTeardown?: () => void) {}\n\n  /**\n   * Disposes the resources held by the subscription. May, for instance, cancel\n   * an ongoing Observable execution or cancel any other type of work that\n   * started when the Subscription was created.\n   * @return {void}\n   */\n  unsubscribe(): void {\n    let errors: any[] | undefined;\n\n    if (!this.closed) {\n      this.closed = true;\n\n      // Remove this from it's parents.\n      const { _parentage } = this;\n      if (Array.isArray(_parentage)) {\n        for (const parent of _parentage) {\n          parent.remove(this);\n        }\n      } else {\n        _parentage?.remove(this);\n      }\n\n      const { initialTeardown } = this;\n      if (isFunction(initialTeardown)) {\n        try {\n          initialTeardown();\n        } catch (e) {\n          errors = e instanceof UnsubscriptionError ? e.errors : [e];\n        }\n      }\n\n      const { _teardowns } = this;\n      if (_teardowns) {\n        this._teardowns = null;\n        for (const teardown of _teardowns) {\n          try {\n            execTeardown(teardown);\n          } catch (err) {\n            errors = errors ?? [];\n            if (err instanceof UnsubscriptionError) {\n              errors = [...errors, ...err.errors];\n            } else {\n              errors.push(err);\n            }\n          }\n        }\n      }\n\n      if (errors) {\n        throw new UnsubscriptionError(errors);\n      }\n    }\n  }\n\n  /**\n   * Adds a teardown to this subscription, so that teardown will be unsubscribed/called\n   * when this subscription is unsubscribed. If this subscription is already {@link closed},\n   * because it has already been unsubscribed, then whatever teardown is passed to it\n   * will automatically be executed (unless the teardown itself is also a closed subscription).\n   *\n   * Closed Subscriptions cannot be added as teardowns to any subscription. Adding a closed\n   * subscription to a any subscription will result in no operation. (A noop).\n   *\n   * Adding a subscription to itself, or adding `null` or `undefined` will not perform any\n   * operation at all. (A noop).\n   *\n   * `Subscription` instances that are added to this instance will automatically remove themselves\n   * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove\n   * will need to be removed manually with {@link remove}\n   *\n   * @param teardown The teardown logic to add to this subscription.\n   */\n  add(teardown: TeardownLogic): void {\n    // Only add the teardown if it's not undefined\n    // and don't add a subscription to itself.\n    if (teardown && teardown !== this) {\n      if (this.closed) {\n        // If this subscription is already closed,\n        // execute whatever teardown is handed to it automatically.\n        execTeardown(teardown);\n      } else {\n        if (teardown instanceof Subscription) {\n          // We don't add closed subscriptions, and we don't add the same subscription\n          // twice. Subscription unsubscribe is idempotent.\n          if (teardown.closed || teardown._hasParent(this)) {\n            return;\n          }\n          teardown._addParent(this);\n        }\n        (this._teardowns = this._teardowns ?? []).push(teardown);\n      }\n    }\n  }\n\n  /**\n   * Checks to see if a this subscription already has a particular parent.\n   * This will signal that this subscription has already been added to the parent in question.\n   * @param parent the parent to check for\n   */\n  protected _hasParent(parent: Subscription) {\n    const { _parentage } = this;\n    return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n  }\n\n  /**\n   * Adds a parent to this subscription so it can be removed from the parent if it\n   * unsubscribes on it's own.\n   *\n   * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED.\n   * @param parent The parent subscription to add\n   */\n  protected _addParent(parent: Subscription) {\n    const { _parentage } = this;\n    this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n  }\n\n  /**\n   * Called on a child when it is removed via {@link remove}.\n   * @param parent The parent to remove\n   */\n  protected _removeParent(parent: Subscription) {\n    const { _parentage } = this;\n    if (_parentage === parent) {\n      this._parentage = null;\n    } else if (Array.isArray(_parentage)) {\n      arrRemove(_parentage, parent);\n    }\n  }\n\n  /**\n   * Removes a teardown from this subscription that was previously added with the {@link add} method.\n   *\n   * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves\n   * from every other `Subscription` they have been added to. This means that using the `remove` method\n   * is not a common thing and should be used thoughtfully.\n   *\n   * If you add the same teardown instance of a function or an unsubscribable object to a `Subcription` instance\n   * more than once, you will need to call `remove` the same number of times to remove all instances.\n   *\n   * All teardown instances are removed to free up memory upon unsubscription.\n   *\n   * @param teardown The teardown to remove from this subscription\n   */\n  remove(teardown: Exclude<TeardownLogic, void>): void {\n    const { _teardowns } = this;\n    _teardowns && arrRemove(_teardowns, teardown);\n\n    if (teardown instanceof Subscription) {\n      teardown._removeParent(this);\n    }\n  }\n}\n\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\n\nexport function isSubscription(value: any): value is Subscription {\n  return (\n    value instanceof Subscription ||\n    (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))\n  );\n}\n\nfunction execTeardown(teardown: Unsubscribable | (() => void)) {\n  if (isFunction(teardown)) {\n    teardown();\n  } else {\n    teardown.unsubscribe();\n  }\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* tslint:disable:no-empty */\nexport function noop() { }\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\n\n/**\n * Handles an error on another job either with the user-configured {@link onUnhandledError},\n * or by throwing it on that new job so it can be picked up by `window.onerror`, `process.on('error')`, etc.\n *\n * This should be called whenever there is an error that is out-of-band with the subscription\n * or when an error hits a terminal boundary of the subscription and no error handler was provided.\n *\n * @param err the error to report\n */\nexport function reportUnhandledError(err: any) {\n  timeoutProvider.setTimeout(() => {\n    const { onUnhandledError } = config;\n    if (onUnhandledError) {\n      // Execute the user-configured error handler.\n      onUnhandledError(err);\n    } else {\n      // Throw so it is picked up by the runtime's uncaught error mechanism.\n      throw err;\n    }\n  });\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\ntype SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => number;\ntype ClearTimeoutFunction = (handle: number) => void;\n\ninterface TimeoutProvider {\n  setTimeout: SetTimeoutFunction;\n  clearTimeout: ClearTimeoutFunction;\n  delegate:\n    | {\n        setTimeout: SetTimeoutFunction;\n        clearTimeout: ClearTimeoutFunction;\n      }\n    | undefined;\n}\n\nexport const timeoutProvider: TimeoutProvider = {\n  // When accessing the delegate, use the variable rather than `this` so that\n  // the functions can be called without being bound to the provider.\n  setTimeout(...args) {\n    const { delegate } = timeoutProvider;\n    return (delegate?.setTimeout || setTimeout)(...args);\n  },\n  clearTimeout(handle) {\n    const { delegate } = timeoutProvider;\n    return (delegate?.clearTimeout || clearTimeout)(handle);\n  },\n  delegate: undefined,\n};\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { isFunction } from './util/isFunction';\nimport { Observer, PartialObserver, ObservableNotification } from './types';\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';\n\n/**\n * Implements the {@link Observer} interface and extends the\n * {@link Subscription} class. While the {@link Observer} is the public API for\n * consuming the values of an {@link Observable}, all Observers get converted to\n * a Subscriber, in order to provide Subscription-like capabilities such as\n * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for\n * implementing operators, but it is rarely used as a public API.\n *\n * @class Subscriber<T>\n */\nexport class Subscriber<T> extends Subscription implements Observer<T> {\n  /**\n   * A static factory for a Subscriber, given a (potentially partial) definition\n   * of an Observer.\n   * @param next The `next` callback of an Observer.\n   * @param error The `error` callback of an\n   * Observer.\n   * @param complete The `complete` callback of an\n   * Observer.\n   * @return A Subscriber wrapping the (partially defined)\n   * Observer represented by the given arguments.\n   * @nocollapse\n   * @deprecated Do not use. Will be removed in v8. There is no replacement for this method, and there is no reason to be creating instances of `Subscriber` directly. If you have a specific use case, please file an issue.\n   */\n  static create<T>(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber<T> {\n    return new SafeSubscriber(next, error, complete);\n  }\n\n  protected isStopped: boolean = false;\n  protected destination: Subscriber<any> | Observer<any>; // this `any` is the escape hatch to erase extra type param (e.g. R)\n\n  /**\n   * @deprecated Do not use directly. There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons.\n   */\n  constructor(destination?: Subscriber<any> | Observer<any>) {\n    super();\n    this.destination = destination instanceof Subscriber ? destination : createSafeObserver(destination);\n\n    // Automatically chain subscriptions together here.\n    // if destination is a Subscription, then it is a Subscriber.\n    if (isSubscription(destination)) {\n      destination.add(this);\n    }\n  }\n\n  /**\n   * The {@link Observer} callback to receive notifications of type `next` from\n   * the Observable, with a value. The Observable may call this method 0 or more\n   * times.\n   * @param {T} [value] The `next` value.\n   * @return {void}\n   */\n  next(value?: T): void {\n    if (this.isStopped) {\n      handleStoppedNotification(nextNotification(value), this);\n    } else {\n      this._next(value!);\n    }\n  }\n\n  /**\n   * The {@link Observer} callback to receive notifications of type `error` from\n   * the Observable, with an attached `Error`. Notifies the Observer that\n   * the Observable has experienced an error condition.\n   * @param {any} [err] The `error` exception.\n   * @return {void}\n   */\n  error(err?: any): void {\n    if (this.isStopped) {\n      handleStoppedNotification(errorNotification(err), this);\n    } else {\n      this.isStopped = true;\n      this._error(err);\n    }\n  }\n\n  /**\n   * The {@link Observer} callback to receive a valueless notification of type\n   * `complete` from the Observable. Notifies the Observer that the Observable\n   * has finished sending push-based notifications.\n   * @return {void}\n   */\n  complete(): void {\n    if (this.isStopped) {\n      handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n    } else {\n      this.isStopped = true;\n      this._complete();\n    }\n  }\n\n  unsubscribe(): void {\n    if (!this.closed) {\n      this.isStopped = true;\n      super.unsubscribe();\n    }\n  }\n\n  protected _next(value: T): void {\n    this.destination.next(value);\n  }\n\n  protected _error(err: any): void {\n    this.destination.error(err);\n    this.unsubscribe();\n  }\n\n  protected _complete(): void {\n    this.destination.complete();\n    this.unsubscribe();\n  }\n}\n\n/**\n * This bind is captured here because we want to be able to have\n * compatibility with monoid libraries that tend to use a method named\n * `bind`. In particular, a library called Monio requires this.\n */\nconst _bind = Function.prototype.bind;\n\nfunction bind<Fn extends (...args: any[]) => any>(fn: Fn, thisArg: any): Fn {\n  return _bind.call(fn, thisArg);\n}\n\n/**\n * Internal optimization only, DO NOT EXPOSE.\n * @internal\n */\nclass ConsumerObserver<T> implements Observer<T> {\n  constructor(private partialObserver: Partial<Observer<T>>) {}\n\n  next(value: T): void {\n    const { partialObserver } = this;\n    if (partialObserver.next) {\n      try {\n        partialObserver.next(value);\n      } catch (error) {\n        handleUnhandledError(error);\n      }\n    }\n  }\n\n  error(err: any): void {\n    const { partialObserver } = this;\n    if (partialObserver.error) {\n      try {\n        partialObserver.error(err);\n      } catch (error) {\n        handleUnhandledError(error);\n      }\n    } else {\n      handleUnhandledError(err);\n    }\n  }\n\n  complete(): void {\n    const { partialObserver } = this;\n    if (partialObserver.complete) {\n      try {\n        partialObserver.complete();\n      } catch (error) {\n        handleUnhandledError(error);\n      }\n    }\n  }\n}\n\nfunction createSafeObserver<T>(observerOrNext?: Partial<Observer<T>> | ((value: T) => void) | null): Observer<T> {\n  return new ConsumerObserver(!observerOrNext || isFunction(observerOrNext) ? { next: observerOrNext ?? undefined } : observerOrNext);\n}\n\nexport class SafeSubscriber<T> extends Subscriber<T> {\n  constructor(\n    observerOrNext?: Partial<Observer<T>> | ((value: T) => void) | null,\n    error?: ((e?: any) => void) | null,\n    complete?: (() => void) | null\n  ) {\n    super();\n\n    let partialObserver: Partial<Observer<T>>;\n    if (isFunction(observerOrNext) || !observerOrNext) {\n      // The first argument is a function, not an observer. The next\n      // two arguments *could* be observers, or they could be empty.\n      partialObserver = {\n        next: observerOrNext ?? undefined,\n        error: error ?? undefined,\n        complete: complete ?? undefined,\n      };\n    } else {\n      // The first argument is a partial observer.\n      let context: any;\n      if (this && config.useDeprecatedNextContext) {\n        // This is a deprecated path that made `this.unsubscribe()` available in\n        // next handler functions passed to subscribe. This only exists behind a flag\n        // now, as it is *very* slow.\n        context = Object.create(observerOrNext);\n        context.unsubscribe = () => this.unsubscribe();\n        partialObserver = {\n          next: observerOrNext.next && bind(observerOrNext.next, context),\n          error: observerOrNext.error && bind(observerOrNext.error, context),\n          complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n        };\n      } else {\n        // The \"normal\" path. Just use the partial observer directly.\n        partialObserver = observerOrNext;\n      }\n    }\n\n    // Wrap the partial observer to ensure it's a full observer, and\n    // make sure proper error handling is accounted for.\n    this.destination = new ConsumerObserver(partialObserver);\n  }\n}\n\nfunction handleUnhandledError(error: any) {\n  if (config.useDeprecatedSynchronousErrorHandling) {\n    throw error;\n  } else {\n    // Ideal path, we report this as an unhandled error,\n    // which is thrown on a new call stack.\n    reportUnhandledError(error);\n  }\n}\n\n/**\n * An error handler used when no error handler was supplied\n * to the SafeSubscriber -- meaning no error handler was supplied\n * do the `subscribe` call on our observable.\n * @param err The error to handle\n */\nfunction defaultErrorHandler(err: any) {\n  throw err;\n}\n\n/**\n * A handler for notifications that cannot be sent to a stopped subscriber.\n * @param notification The notification being sent\n * @param subscriber The stopped subscriber\n */\nfunction handleStoppedNotification(notification: ObservableNotification<any>, subscriber: Subscriber<any>) {\n  const { onStoppedNotification } = config;\n  onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\n\n/**\n * The observer used as a stub for subscriptions where the user did not\n * pass any arguments to `subscribe`. Comes with the default error handling\n * behavior.\n */\nexport const EMPTY_OBSERVER: Readonly<Observer<any>> & { closed: true } = {\n  closed: true,\n  next: noop,\n  error: defaultErrorHandler,\n  complete: noop,\n};\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\n\n/** Symbol.observable or a string \"@@observable\". Used for interop */\nexport const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function identity<T>(x: T): T {\n  return x;\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { identity } from './identity';\nimport { UnaryFunction } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function pipe<T>(): UnaryFunction<T, T>;\nexport function pipe<T, A>(fn1: UnaryFunction<T, A>): UnaryFunction<T, A>;\nexport function pipe<T, A, B>(fn1: UnaryFunction<T, A>, fn2: UnaryFunction<A, B>): UnaryFunction<T, B>;\nexport function pipe<T, A, B, C>(fn1: UnaryFunction<T, A>, fn2: UnaryFunction<A, B>, fn3: UnaryFunction<B, C>): UnaryFunction<T, C>;\nexport function pipe<T, A, B, C, D>(fn1: UnaryFunction<T, A>, fn2: UnaryFunction<A, B>, fn3: UnaryFunction<B, C>, fn4: UnaryFunction<C, D>): UnaryFunction<T, D>;\nexport function pipe<T, A, B, C, D, E>(fn1: UnaryFunction<T, A>, fn2: UnaryFunction<A, B>, fn3: UnaryFunction<B, C>, fn4: UnaryFunction<C, D>, fn5: UnaryFunction<D, E>): UnaryFunction<T, E>;\nexport function pipe<T, A, B, C, D, E, F>(fn1: UnaryFunction<T, A>, fn2: UnaryFunction<A, B>, fn3: UnaryFunction<B, C>, fn4: UnaryFunction<C, D>, fn5: UnaryFunction<D, E>, fn6: UnaryFunction<E, F>): UnaryFunction<T, F>;\nexport function pipe<T, A, B, C, D, E, F, G>(fn1: UnaryFunction<T, A>, fn2: UnaryFunction<A, B>, fn3: UnaryFunction<B, C>, fn4: UnaryFunction<C, D>, fn5: UnaryFunction<D, E>, fn6: UnaryFunction<E, F>, fn7: UnaryFunction<F, G>): UnaryFunction<T, G>;\nexport function pipe<T, A, B, C, D, E, F, G, H>(fn1: UnaryFunction<T, A>, fn2: UnaryFunction<A, B>, fn3: UnaryFunction<B, C>, fn4: UnaryFunction<C, D>, fn5: UnaryFunction<D, E>, fn6: UnaryFunction<E, F>, fn7: UnaryFunction<F, G>, fn8: UnaryFunction<G, H>): UnaryFunction<T, H>;\nexport function pipe<T, A, B, C, D, E, F, G, H, I>(fn1: UnaryFunction<T, A>, fn2: UnaryFunction<A, B>, fn3: UnaryFunction<B, C>, fn4: UnaryFunction<C, D>, fn5: UnaryFunction<D, E>, fn6: UnaryFunction<E, F>, fn7: UnaryFunction<F, G>, fn8: UnaryFunction<G, H>, fn9: UnaryFunction<H, I>): UnaryFunction<T, I>;\nexport function pipe<T, A, B, C, D, E, F, G, H, I>(fn1: UnaryFunction<T, A>, fn2: UnaryFunction<A, B>, fn3: UnaryFunction<B, C>, fn4: UnaryFunction<C, D>, fn5: UnaryFunction<D, E>, fn6: UnaryFunction<E, F>, fn7: UnaryFunction<F, G>, fn8: UnaryFunction<G, H>, fn9: UnaryFunction<H, I>, ...fns: UnaryFunction<any, any>[]): UnaryFunction<T, {}>;\n/* tslint:enable:max-line-length */\n\nexport function pipe(...fns: Array<UnaryFunction<any, any>>): UnaryFunction<any, any> {\n  return pipeFromArray(fns);\n}\n\n/** @internal */\nexport function pipeFromArray<T, R>(fns: Array<UnaryFunction<T, R>>): UnaryFunction<T, R> {\n  if (fns.length === 0) {\n    return identity as UnaryFunction<any, any>;\n  }\n\n  if (fns.length === 1) {\n    return fns[0];\n  }\n\n  return function piped(input: T): R {\n    return fns.reduce((prev: any, fn: UnaryFunction<T, R>) => fn(prev), input as any);\n  };\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * \n */\nimport { Operator } from './Operator';\nimport { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription, Subscription } from './Subscription';\nimport { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\n\n/**\n * A representation of any set of values over any amount of time. This is the most basic building block\n * of RxJS.\n *\n * @class Observable<T>\n */\nexport class Observable<T> implements Subscribable<T> {\n  /** @deprecated This is an internal implementation detail, do not use. */\n  protected source: Observable<any> | undefined;\n\n  /** @deprecated This is an internal implementation detail, do not use. */\n  protected operator: Operator<any, T> | undefined;\n\n  /**\n   * @constructor\n   * @param {Function} subscribe the function that is called when the Observable is\n   * initially subscribed to. This function is given a Subscriber, to which new values\n   * can be `next`ed, or an `error` method can be called to raise an error, or\n   * `complete` can be called to notify of a successful completion.\n   */\n  constructor(subscribe?: (this: Observable<T>, subscriber: Subscriber<T>) => TeardownLogic) {\n    if (subscribe) {\n      this._subscribe = subscribe;\n    }\n  }\n\n  // HACK: Since TypeScript inherits static properties too, we have to\n  // fight against TypeScript here so Subject can have a different static create signature\n  /**\n   * Creates a new cold Observable by calling the Observable constructor\n   * @owner Observable\n   * @method create\n   * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor\n   * @return {Observable} a new cold observable\n   * @nocollapse\n   * @deprecated use new Observable() instead\n   */\n  static create: (...args: any[]) => any = <T>(subscribe?: (subscriber: Subscriber<T>) => TeardownLogic) => {\n    return new Observable<T>(subscribe);\n  };\n\n  /**\n   * Creates a new Observable, with this Observable instance as the source, and the passed\n   * operator defined as the new observable's operator.\n   * @method lift\n   * @param operator the operator defining the operation to take on the observable\n   * @return a new observable with the Operator applied\n   * @deprecated This is an internal implementation detail, do not use directly. If you have implemented an operator\n   * using `lift`, it is recommended that you create an operator by simply returning `new Observable()` directly.\n   * See \"Creating new operators from scratch\" section here: https://rxjs.dev/guide/operators\n   */\n  lift<R>(operator?: Operator<T, R>): Observable<R> {\n    const observable = new Observable<R>();\n    observable.source = this;\n    observable.operator = operator;\n    return observable;\n  }\n\n  subscribe(observer?: Partial<Observer<T>>): Subscription;\n  /** @deprecated Use an observer instead of a complete callback */\n  subscribe(next: null | undefined, error: null | undefined, complete: () => void): Subscription;\n  /** @deprecated Use an observer instead of an error callback */\n  subscribe(next: null | undefined, error: (error: any) => void, complete?: () => void): Subscription;\n  /** @deprecated Use an observer instead of a complete callback */\n  subscribe(next: (value: T) => void, error: null | undefined, complete: () => void): Subscription;\n  subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;\n  /**\n   * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.\n   *\n   * <span class=\"informal\">Use it when you have all these Observables, but still nothing is happening.</span>\n   *\n   * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It\n   * might be for example a function that you passed to Observable's constructor, but most of the time it is\n   * a library implementation, which defines what will be emitted by an Observable, and when it be will emitted. This means\n   * that calling `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often\n   * the thought.\n   *\n   * Apart from starting the execution of an Observable, this method allows you to listen for values\n   * that an Observable emits, as well as for when it completes or errors. You can achieve this in two\n   * of the following ways.\n   *\n   * The first way is creating an object that implements {@link Observer} interface. It should have methods\n   * defined by that interface, but note that it should be just a regular JavaScript object, which you can create\n   * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular do\n   * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also\n   * that your object does not have to implement all methods. If you find yourself creating a method that doesn't\n   * do anything, you can simply omit it. Note however, if the `error` method is not provided, all errors will\n   * be left uncaught.\n   *\n   * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.\n   * This means you can provide three functions as arguments to `subscribe`, where the first function is equivalent\n   * of a `next` method, the second of an `error` method and the third of a `complete` method. Just as in case of Observer,\n   * if you do not need to listen for something, you can omit a function, preferably by passing `undefined` or `null`,\n   * since `subscribe` recognizes these functions by where they were placed in function call. When it comes\n   * to `error` function, just as before, if not provided, errors emitted by an Observable will be thrown.\n   *\n   * Whichever style of calling `subscribe` you use, in both cases it returns a Subscription object.\n   * This object allows you to call `unsubscribe` on it, which in turn will stop the work that an Observable does and will clean\n   * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback\n   * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.\n   *\n   * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.\n   * It is an Observable itself that decides when these functions will be called. For example {@link of}\n   * by default emits all its values synchronously. Always check documentation for how given Observable\n   * will behave when subscribed and if its default behavior can be modified with a `scheduler`.\n   *\n   * ## Example\n   * ### Subscribe with an Observer\n   * ```ts\n   * import { of } from 'rxjs';\n   *\n   * const sumObserver = {\n   *   sum: 0,\n   *   next(value) {\n   *     console.log('Adding: ' + value);\n   *     this.sum = this.sum + value;\n   *   },\n   *   error() {\n   *     // We actually could just remove this method,\n   *     // since we do not really care about errors right now.\n   *   },\n   *   complete() {\n   *     console.log('Sum equals: ' + this.sum);\n   *   }\n   * };\n   *\n   * of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.\n   *   .subscribe(sumObserver);\n   *\n   * // Logs:\n   * // \"Adding: 1\"\n   * // \"Adding: 2\"\n   * // \"Adding: 3\"\n   * // \"Sum equals: 6\"\n   * ```\n   *\n   * ### Subscribe with functions\n   * ```ts\n   * import { of } from 'rxjs'\n   *\n   * let sum = 0;\n   *\n   * of(1, 2, 3).subscribe(\n   *   value => {\n   *     console.log('Adding: ' + value);\n   *     sum = sum + value;\n   *   },\n   *   undefined,\n   *   () => console.log('Sum equals: ' + sum)\n   * );\n   *\n   * // Logs:\n   * // \"Adding: 1\"\n   * // \"Adding: 2\"\n   * // \"Adding: 3\"\n   * // \"Sum equals: 6\"\n   * ```\n   *\n   * ### Cancel a subscription\n   * ```ts\n   * import { interval } from 'rxjs';\n   *\n   * const subscription = interval(1000).subscribe(\n   *   num => console.log(num),\n   *   undefined,\n   *   () => {\n   *     // Will not be called, even when cancelling subscription.\n   *     console.log('completed!');\n   *   }\n   * );\n   *\n   * setTimeout(() => {\n   *   subscription.unsubscribe();\n   *   console.log('unsubscribed!');\n   * }, 2500);\n   *\n   * // Logs:\n   * // 0 after 1s\n   * // 1 after 2s\n   * // \"unsubscribed!\" after 2.5s\n   * ```\n   *\n   * @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called,\n   *  or the first of three possible handlers, which is the handler for each value emitted from the subscribed\n   *  Observable.\n   * @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided,\n   *  the error will be thrown as unhandled.\n   * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion.\n   * @return {ISubscription} a subscription reference to the registered handlers\n   * @method subscribe\n   */\n  subscribe(\n    observerOrNext?: Partial<Observer<T>> | ((value: T) => void) | null,\n    error?: ((error: any) => void) | null,\n    complete?: (() => void) | null\n  ): Subscription {\n    const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n\n    // If we have an operator, it's the result of a lift, and we let the lift\n    // mechanism do the subscription for us in the operator call. Otherwise,\n    // if we have a source, it's a trusted observable we own, and we can call\n    // the _subscribe without wrapping it in a try/catch. If we are supposed to\n    // use the deprecated sync error handling, then we don't need the try/catch either\n    // otherwise, it may be from a user-made observable instance, and we want to\n    // wrap it in a try/catch so we can handle errors appropriately.\n    const { operator, source } = this;\n    subscriber.add(\n      operator\n        ? operator.call(subscriber, source)\n        : source || config.useDeprecatedSynchronousErrorHandling\n        ? this._subscribe(subscriber)\n        : this._trySubscribe(subscriber)\n    );\n\n    return subscriber;\n  }\n\n  /** @deprecated This is an internal implementation detail, do not use. */\n  protected _trySubscribe(sink: Subscriber<T>): TeardownLogic {\n    try {\n      return this._subscribe(sink);\n    } catch (err) {\n      if (config.useDeprecatedSynchronousErrorHandling) {\n        throw err;\n      }\n      sink.error(err);\n    }\n  }\n\n  /**\n   * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with\n   * APIs that expect promises, like `async/await`. You cannot unsubscribe from this.\n   *\n   * **WARNING**: Only use this with observables you *know* will complete. If the source\n   * observable does not complete, you will end up with a promise that is hung up, and\n   * potentially all of the state of an async function hanging out in memory. To avoid\n   * this situation, look into adding something like {@link timeout}, {@link take},\n   * {@link takeWhile}, or {@link takeUntil} amongst others.\n   *\n   * ### Example:\n   *\n   * ```ts\n   * import { interval } from 'rxjs';\n   * import { take } from 'rxjs/operators';\n   *\n   * const source$ = interval(1000).pipe(take(4));\n   *\n   * async function getTotal() {\n   *    let total = 0;\n   *\n   *    await source$.forEach(value => {\n   *      total += value;\n   *      console.log('observable -> ', value);\n   *    });\n   *\n   *    return total;\n   * }\n   *\n   * getTotal().then(\n   *    total => console.log('Total:', total)\n   * )\n   *\n   * // Expected:\n   * // \"observable -> 0\"\n   * // \"observable -> 1\"\n   * // \"observable -> 2\"\n   * // \"observable -> 3\"\n   * // \"Total: 6\"\n   * ```\n   * @param next a handler for each value emitted by the observable\n   * @return a promise that either resolves on observable completion or\n   *  rejects with the handled error\n   */\n  forEach(next: (value: T) => void): Promise<void>;\n\n  /**\n   * @param next a handler for each value emitted by the observable\n   * @param promiseCtor a constructor function used to instantiate the Promise\n   * @return a promise that either resolves on observable completion or\n   *  rejects with the handled error\n   * @deprecated remove in v8. Passing a Promise constructor will no longer be available\n   * in upcoming versions of RxJS. This is because it adds weight to the library, for very\n   * little benefit. If you need this functionality, it is recommended that you either\n   * polyfill Promise, or you create an adapter to convert the returned native promise\n   * to whatever promise implementation you wanted.\n   */\n  forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise<void>;\n\n  forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise<void> {\n    promiseCtor = getPromiseCtor(promiseCtor);\n\n    return new promiseCtor<void>((resolve, reject) => {\n      // Must be declared in a separate statement to avoid a ReferenceError when\n      // accessing subscription below in the closure due to Temporal Dead Zone.\n      let subscription: Subscription;\n      subscription = this.subscribe(\n        (value) => {\n          try {\n            next(value);\n          } catch (err) {\n            reject(err);\n            subscription?.unsubscribe();\n          }\n        },\n        reject,\n        resolve\n      );\n    }) as Promise<void>;\n  }\n\n  /** @internal This is an internal implementation detail, do not use. */\n  protected _subscribe(subscriber: Subscriber<any>): TeardownLogic {\n    return this.source?.subscribe(subscriber);\n  }\n\n  /**\n   * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable\n   * @method Symbol.observable\n   * @return {Observable} this instance of the observable\n   */\n  [Symbol_observable]() {\n    return this;\n  }\n\n  /* tslint:disable:max-line-length */\n  pipe(): Observable<T>;\n  pipe<A>(op1: OperatorFunction<T, A>): Observable<A>;\n  pipe<A, B>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>): Observable<B>;\n  pipe<A, B, C>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>): Observable<C>;\n  pipe<A, B, C, D>(\n    op1: OperatorFunction<T, A>,\n    op2: OperatorFunction<A, B>,\n    op3: OperatorFunction<B, C>,\n    op4: OperatorFunction<C, D>\n  ): Observable<D>;\n  pipe<A, B, C, D, E>(\n    op1: OperatorFunction<T, A>,\n    op2: OperatorFunction<A, B>,\n    op3: OperatorFunction<B, C>,\n    op4: OperatorFunction<C, D>,\n    op5: OperatorFunction<D, E>\n  ): Observable<E>;\n  pipe<A, B, C, D, E, F>(\n    op1: OperatorFunction<T, A>,\n    op2: OperatorFunction<A, B>,\n    op3: OperatorFunction<B, C>,\n    op4: OperatorFunction<C, D>,\n    op5: OperatorFunction<D, E>,\n    op6: OperatorFunction<E, F>\n  ): Observable<F>;\n  pipe<A, B, C, D, E, F, G>(\n    op1: OperatorFunction<T, A>,\n    op2: OperatorFunction<A, B>,\n    op3: OperatorFunction<B, C>,\n    op4: OperatorFunction<C, D>,\n    op5: OperatorFunction<D, E>,\n    op6: OperatorFunction<E, F>,\n    op7: OperatorFunction<F, G>\n  ): Observable<G>;\n  pipe<A, B, C, D, E, F, G, H>(\n    op1: OperatorFunction<T, A>,\n    op2: OperatorFunction<A, B>,\n    op3: OperatorFunction<B, C>,\n    op4: OperatorFunction<C, D>,\n    op5: OperatorFunction<D, E>,\n    op6: OperatorFunction<E, F>,\n    op7: OperatorFunction<F, G>,\n    op8: OperatorFunction<G, H>\n  ): Observable<H>;\n  pipe<A, B, C, D, E, F, G, H, I>(\n    op1: OperatorFunction<T, A>,\n    op2: OperatorFunction<A, B>,\n    op3: OperatorFunction<B, C>,\n    op4: OperatorFunction<C, D>,\n    op5: OperatorFunction<D, E>,\n    op6: OperatorFunction<E, F>,\n    op7: OperatorFunction<F, G>,\n    op8: OperatorFunction<G, H>,\n    op9: OperatorFunction<H, I>\n  ): Observable<I>;\n  pipe<A, B, C, D, E, F, G, H, I>(\n    op1: OperatorFunction<T, A>,\n    op2: OperatorFunction<A, B>,\n    op3: OperatorFunction<B, C>,\n    op4: OperatorFunction<C, D>,\n    op5: OperatorFunction<D, E>,\n    op6: OperatorFunction<E, F>,\n    op7: OperatorFunction<F, G>,\n    op8: OperatorFunction<G, H>,\n    op9: OperatorFunction<H, I>,\n    ...operations: OperatorFunction<any, any>[]\n  ): Observable<unknown>;\n  /* tslint:enable:max-line-length */\n\n  /**\n   * Used to stitch together functional operators into a chain.\n   * @method pipe\n   * @return {Observable} the Observable result of all of the operators having\n   * been called in the order they were passed in.\n   *\n   * ### Example\n   * ```ts\n   * import { interval } from 'rxjs';\n   * import { map, filter, scan } from 'rxjs/operators';\n   *\n   * interval(1000)\n   *   .pipe(\n   *     filter(x => x % 2 === 0),\n   *     map(x => x + x),\n   *     scan((acc, x) => acc + x)\n   *   )\n   *   .subscribe(x => console.log(x))\n   * ```\n   */\n  pipe(...operations: OperatorFunction<any, any>[]): Observable<any> {\n    return operations.length ? pipeFromArray(operations)(this) : this;\n  }\n\n  /* tslint:disable:max-line-length */\n  /** @deprecated Deprecated use {@link firstValueFrom} or {@link lastValueFrom} instead */\n  toPromise(): Promise<T>;\n  /** @deprecated Deprecated use {@link firstValueFrom} or {@link lastValueFrom} instead */\n  toPromise(PromiseCtor: typeof Promise): Promise<T>;\n  /** @deprecated Deprecated use {@link firstValueFrom} or {@link lastValueFrom} instead */\n  toPromise(PromiseCtor: PromiseConstructorLike): Promise<T>;\n  /* tslint:enable:max-line-length */\n\n  /**\n   * Subscribe to this Observable and get a Promise resolving on\n   * `complete` with the last emission (if any).\n   *\n   * **WARNING**: Only use this with observables you *know* will complete. If the source\n   * observable does not complete, you will end up with a promise that is hung up, and\n   * potentially all of the state of an async function hanging out in memory. To avoid\n   * this situation, look into adding something like {@link timeout}, {@link take},\n   * {@link takeWhile}, or {@link takeUntil} amongst others.\n   *\n   * @method toPromise\n   * @param [promiseCtor] a constructor function used to instantiate\n   * the Promise\n   * @return A Promise that resolves with the last value emit, or\n   * rejects on an error. If there were no emissions, Promise\n   * resolves with undefined.\n   * @deprecated Deprecated use {@link firstValueFrom} or {@link lastValueFrom} instead\n   */\n  toPromise(promiseCtor?: PromiseConstructorLike): Promise<T | undefined> {\n    promiseCtor = getPromiseCtor(promiseCtor);\n\n    return new promiseCtor((resolve, reject) => {\n      let value: T | undefined;\n      this.subscribe(\n        (x: T) => (value = x),\n        (err: any) => reject(err),\n        () => resolve(value)\n      );\n    }) as Promise<T | undefined>;\n  }\n}\n\n/**\n * Decides between a passed promise constructor from consuming code,\n * A default configured promise constructor, and the native promise\n * constructor and returns it. If nothing can be found, it will throw\n * an error.\n * @param promiseCtor The optional promise constructor to passed by consuming code\n */\nfunction getPromiseCtor(promiseCtor: PromiseConstructorLike | undefined) {\n  return promiseCtor ?? config.Promise ?? Promise;\n}\n\nfunction isObserver<T>(value: any): value is Observer<T> {\n  return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\n\nfunction isSubscriber<T>(value: any): value is Subscriber<T> {\n  return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { Subscriber } from './Subscriber';\nimport { ObservableNotification } from './types';\n\n/**\n * The global configuration object for RxJS, used to configure things\n * like what Promise constructor should used to create Promises\n */\nexport const config = {\n  /**\n   * A registration point for unhandled errors from RxJS. These are errors that\n   * cannot were not handled by consuming code in the usual subscription path. For\n   * example, if you have this configured, and you subscribe to an observable without\n   * providing an error handler, errors from that subscription will end up here. This\n   * will _always_ be called asynchronously on another job in the runtime. This is because\n   * we do not want errors thrown in this user-configured handler to interfere with the\n   * behavior of the library.\n   */\n  onUnhandledError: null as ((err: any) => void) | null,\n\n  /**\n   * A registration point for notifications that cannot be sent to subscribers because they\n   * have completed, errored or have been explicitly unsubscribed. By default, next, complete\n   * and error notifications sent to stopped subscribers are noops. However, sometimes callers\n   * might want a different behavior. For example, with sources that attempt to report errors\n   * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead.\n   * This will _always_ be called asynchronously on another job in the runtime. This is because\n   * we do not want errors thrown in this user-configured handler to interfere with the\n   * behavior of the library.\n   */\n  onStoppedNotification: null as ((notification: ObservableNotification<any>, subscriber: Subscriber<any>) => void) | null,\n\n  /**\n   * The promise constructor used by default for methods such as\n   * {@link toPromise} and {@link forEach}\n   *\n   * @deprecated remove in v8. RxJS will no longer support this sort of injection of a\n   * Promise constructor. If you need a Promise implementation other than native promises,\n   * please polyfill/patch Promises as you see appropriate.\n   */\n  Promise: undefined as PromiseConstructorLike | undefined,\n\n  /**\n   * If true, turns on synchronous error rethrowing, which is a deprecated behavior\n   * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe\n   * call in a try/catch block. It also enables producer interference, a nasty bug\n   * where a multicast can be broken for all observers by a downstream consumer with\n   * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BY TIME\n   * FOR MIGRATION REASONS.\n   *\n   * @deprecated remove in v8. As of version 8, RxJS will no longer support synchronous throwing\n   * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad\n   * behaviors described above.\n   */\n  useDeprecatedSynchronousErrorHandling: false,\n\n  /**\n   * If true, enables an as-of-yet undocumented feature from v5: The ability to access\n   * `unsubscribe()` via `this` context in `next` functions created in observers passed\n   * to `subscribe`.\n   *\n   * This is being removed because the performance was severely problematic, and it could also cause\n   * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have\n   * their `this` context overwritten.\n   *\n   * @deprecated remove in v8. As of version 8, RxJS will no longer support altering the\n   * context of next functions provided as part of an observer to Subscribe. Instead,\n   * you will have access to a subscription or a signal or token that will allow you to do things like\n   * unsubscribe and test closed status.\n   */\n  useDeprecatedNextContext: false,\n};\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * An error thrown when an action is invalid because the object has been\n * unsubscribed.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n *\n * @class ObjectUnsubscribedError\n */\nexport class ObjectUnsubscribedError extends Error {\n  /**\n   * @deprecated Internal implementation detail. Do not construct error instances.\n   * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n   */\n  constructor() {\n    super('object unsubscribed');\n    Object.setPrototypeOf(this, new.target.prototype);\n    this.name = 'ObjectUnsubscribedError';\n  }\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { Operator } from './Operator';\nimport { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { Observer, SubscriptionLike, TeardownLogic } from './types';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\n\n/**\n * A Subject is a special type of Observable that allows values to be\n * multicasted to many Observers. Subjects are like EventEmitters.\n *\n * Every Subject is an Observable and an Observer. You can subscribe to a\n * Subject, and you can call next to feed values as well as error and complete.\n */\nexport class Subject<T> extends Observable<T> implements SubscriptionLike {\n  observers: Observer<T>[] = [];\n\n  closed = false;\n\n  isStopped = false;\n\n  hasError = false;\n\n  thrownError: any = null;\n\n  /**\n   * Creates a \"subject\" by basically gluing an observer to an observable.\n   *\n   * @nocollapse\n   * @deprecated Recommended you do not use, will be removed at some point in the future. Plans for replacement still under discussion.\n   */\n  static create: (...args: any[]) => any = <T>(destination: Observer<T>, source: Observable<T>): AnonymousSubject<T> => {\n    return new AnonymousSubject<T>(destination, source);\n  };\n\n  constructor() {\n    // NOTE: This must be here to obscure Observable's constructor.\n    super();\n  }\n\n  lift<R>(operator: Operator<T, R>): Observable<R> {\n    const subject = new AnonymousSubject(this, this);\n    subject.operator = operator as any;\n    return subject as any;\n  }\n\n  protected _throwIfClosed() {\n    if (this.closed) {\n      throw new ObjectUnsubscribedError();\n    }\n  }\n\n  next(value: T): void;\n  /**\n   * @deprecated The overload of `next` with an optional value parameter is\n   *     deprecated and should no longer be used. It is unsafe because the value\n   * `undefined` will be passed to observables subscribed to this subject which\n   * all assume to receive a value of type `T`.\n   *\n   * The parameter was made mandatory in upstream RxJS 7.0.0-beta.0 [1] but the\n   * overload has been kept in google3 to avoid a large refactoring.\n   *\n   * Note that the overload declaration order matters. The more specific\n   * declaration needs to come first because the first matching declaration is\n   * picked.\n   *\n   * [1]: https://github.com/ReactiveX/rxjs/commit/3356152\n   */\n  next(value?: T): void;\n  next(value?: T) {\n    this._throwIfClosed();\n    if (!this.isStopped) {\n      const copy = this.observers.slice();\n      for (const observer of copy) {\n        observer.next(value!);\n      }\n    }\n  }\n\n  error(err: any) {\n    this._throwIfClosed();\n    if (!this.isStopped) {\n      this.hasError = this.isStopped = true;\n      this.thrownError = err;\n      const { observers } = this;\n      while (observers.length) {\n        observers.shift()!.error(err);\n      }\n    }\n  }\n\n  complete() {\n    this._throwIfClosed();\n    if (!this.isStopped) {\n      this.isStopped = true;\n      const { observers } = this;\n      while (observers.length) {\n        observers.shift()!.complete();\n      }\n    }\n  }\n\n  unsubscribe() {\n    this.isStopped = this.closed = true;\n    this.observers = null!;\n  }\n\n  get observed() {\n    return this.observers?.length > 0;\n  }\n\n  /** @deprecated This is an internal implementation detail, do not use. */\n  protected _trySubscribe(subscriber: Subscriber<T>): TeardownLogic {\n    this._throwIfClosed();\n    return super._trySubscribe(subscriber);\n  }\n\n  /** @deprecated This is an internal implementation detail, do not use. */\n  protected _subscribe(subscriber: Subscriber<T>): Subscription {\n    this._throwIfClosed();\n    this._checkFinalizedStatuses(subscriber);\n    return this._innerSubscribe(subscriber);\n  }\n\n  protected _innerSubscribe(subscriber: Subscriber<any>) {\n    const { hasError, isStopped, observers } = this;\n    return hasError || isStopped\n      ? EMPTY_SUBSCRIPTION\n      : (observers.push(subscriber), new Subscription(() => arrRemove(this.observers, subscriber)));\n  }\n\n  protected _checkFinalizedStatuses(subscriber: Subscriber<any>) {\n    const { hasError, thrownError, isStopped } = this;\n    if (hasError) {\n      subscriber.error(thrownError);\n    } else if (isStopped) {\n      subscriber.complete();\n    }\n  }\n  /**\n   * Creates a new Observable with this Subject as the source. You can do this\n   * to create customize Observer-side logic of the Subject and conceal it from\n   * code that uses the Observable.\n   * @return {Observable} Observable that the Subject casts to\n   */\n  asObservable(): Observable<T> {\n    const observable: any = new Observable<T>();\n    observable.source = this;\n    return observable;\n  }\n}\n\n/**\n * @class AnonymousSubject<T>\n */\nexport class AnonymousSubject<T> extends Subject<T> {\n  constructor(protected destination?: Observer<T>, source?: Observable<T>) {\n    super();\n    this.source = source;\n  }\n\n  next(value: T) {\n    this.destination?.next?.(value);\n  }\n\n  error(err: any) {\n    this.destination?.error?.(err);\n  }\n\n  complete() {\n    this.destination?.complete?.();\n  }\n\n  /** @deprecated This is an internal implementation detail, do not use. */\n  _subscribe(subscriber: Subscriber<T>): Subscription {\n    return this.source?.subscribe(subscriber) ?? EMPTY_SUBSCRIPTION;\n  }\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { Subject } from './Subject';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\n\n/**\n * A variant of Subject that requires an initial value and emits its current\n * value whenever it is subscribed to.\n *\n * @class BehaviorSubject<T>\n */\nexport class BehaviorSubject<T> extends Subject<T> {\n  constructor(private _value: T) {\n    super();\n  }\n\n  get value(): T {\n    return this.getValue();\n  }\n\n  /** @deprecated This is an internal implementation detail, do not use. */\n  protected _subscribe(subscriber: Subscriber<T>): Subscription {\n    const subscription = super._subscribe(subscriber);\n    !subscription.closed && subscriber.next(this._value);\n    return subscription;\n  }\n\n  getValue(): T {\n    const { hasError, thrownError, _value } = this;\n    if (hasError) {\n      throw thrownError;\n    }\n    this._throwIfClosed();\n    return _value;\n  }\n\n  next(value: T): void {\n    super.next((this._value = value));\n  }\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { Observable } from '../Observable';\nimport { SchedulerLike } from '../types';\n\nexport function scheduleArray<T>(input: ArrayLike<T>, scheduler: SchedulerLike) {\n  return new Observable<T>((subscriber) => {\n    // The current array index.\n    let i = 0;\n    // Start iterating over the array like on a schedule.\n    return scheduler.schedule(function () {\n      if (i === input.length) {\n        // If we have hit the end of the array like in the\n        // previous job, we can complete.\n        subscriber.complete();\n      } else {\n        // Otherwise let's next the value at the current index,\n        // then increment our index.\n        subscriber.next(input[i++]);\n        // If the last emission didn't cause us to close the subscriber\n        // (via take or some side effect), reschedule the job and we'll\n        // make another pass.\n        if (!subscriber.closed) {\n          this.schedule();\n        }\n      }\n    });\n  });\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getSymbolIterator(): symbol {\n  if (typeof Symbol !== 'function' || !Symbol.iterator) {\n    return '@@iterator' as any;\n  }\n\n  return Symbol.iterator;\n}\n\nexport const iterator = getSymbolIterator();\n\n/**\n * @deprecated use {@link iterator} instead\n */\nexport const $$iterator = iterator;\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { observable as Symbol_observable } from '../symbol/observable';\nimport { Subscriber } from '../Subscriber';\n\nimport { Observable } from '../Observable';\nimport { ObservableInput, SchedulerLike, ObservedValueOf } from '../types';\nimport { scheduled } from '../scheduled/scheduled';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\n\nexport function from<O extends ObservableInput<any>>(input: O): Observable<ObservedValueOf<O>>;\n/** @deprecated The scheduler argument is deprecated, use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument */\nexport function from<O extends ObservableInput<any>>(input: O, scheduler: SchedulerLike): Observable<ObservedValueOf<O>>;\n\n/**\n * Creates an Observable from an Array, an array-like object, a Promise, an iterable object, or an Observable-like object.\n *\n * <span class=\"informal\">Converts almost anything to an Observable.</span>\n *\n * ![](from.png)\n *\n * `from` converts various other objects and data types into Observables. It also converts a Promise, an array-like, or an\n * <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterable\" target=\"_blank\">iterable</a>\n * object into an Observable that emits the items in that promise, array, or iterable. A String, in this context, is treated\n * as an array of characters. Observable-like objects (contains a function named with the ES2015 Symbol for Observable) can also be\n * converted through this operator.\n *\n * ## Examples\n *\n * ### Converts an array to an Observable\n *\n * ```ts\n * import { from } from 'rxjs';\n *\n * const array = [10, 20, 30];\n * const result = from(array);\n *\n * result.subscribe(x => console.log(x));\n *\n * // Logs:\n * // 10\n * // 20\n * // 30\n * ```\n *\n * ---\n *\n * ### Convert an infinite iterable (from a generator) to an Observable\n *\n * ```ts\n * import { from } from 'rxjs';\n * import { take } from 'rxjs/operators';\n *\n * function* generateDoubles(seed) {\n *    let i = seed;\n *    while (true) {\n *      yield i;\n *      i = 2 * i; // double it\n *    }\n * }\n *\n * const iterator = generateDoubles(3);\n * const result = from(iterator).pipe(take(10));\n *\n * result.subscribe(x => console.log(x));\n *\n * // Logs:\n * // 3\n * // 6\n * // 12\n * // 24\n * // 48\n * // 96\n * // 192\n * // 384\n * // 768\n * // 1536\n * ```\n *\n * ---\n *\n * ### With async scheduler\n *\n * ```ts\n * import { from, asyncScheduler } from 'rxjs';\n *\n * console.log('start');\n *\n * const array = [10, 20, 30];\n * const result = from(array, asyncScheduler);\n *\n * result.subscribe(x => console.log(x));\n *\n * console.log('end');\n *\n * // Logs:\n * // start\n * // end\n * // 10\n * // 20\n * // 30\n * ```\n *\n * @see {@link fromEvent}\n * @see {@link fromEventPattern}\n *\n * @param {ObservableInput<T>} A subscription object, a Promise, an Observable-like,\n * an Array, an iterable, or an array-like object to be converted.\n * @param {SchedulerLike} An optional {@link SchedulerLike} on which to schedule the emission of values.\n * @return {Observable<T>}\n */\nexport function from<T>(input: ObservableInput<T>, scheduler?: SchedulerLike): Observable<T> {\n  return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n\n// TODO: Use this throughout the library, rather than the `from` above, to avoid\n// the unnecessary scheduling check and reduce bundled sizes of operators that use `from`.\n// TODO: Eventually, this just becomes `from`, as we don't have the deprecated scheduled path anymore.\nexport function innerFrom<T>(input: ObservableInput<T>): Observable<T> {\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  }\n\n  throw createInvalidObservableTypeError(input);\n}\n\n/**\n * Creates an RxJS Observable from an object that implements `Symbol.observable`.\n * @param obj An object that properly implements `Symbol.observable`.\n */\nfunction fromInteropObservable<T>(obj: any) {\n  return new Observable((subscriber: Subscriber<T>) => {\n    const obs = obj[Symbol_observable]();\n    if (isFunction(obs.subscribe)) {\n      return obs.subscribe(subscriber);\n    }\n    // Should be caught by observable subscribe function error handling.\n    throw new TypeError('Provided object does not correctly implement Symbol.observable');\n  });\n}\n\n/**\n * Synchronously emits the values of an array like and completes.\n * This is exported because there are creation functions and operators that need to\n * make direct use of the same logic, and there's no reason to make them run through\n * `from` conditionals because we *know* they're dealing with an array.\n * @param array The array to emit values from\n */\nexport function fromArrayLike<T>(array: ArrayLike<T>) {\n  return new Observable((subscriber: Subscriber<T>) => {\n    // Loop over the array and emit each value. Note two things here:\n    // 1. We're making sure that the subscriber is not closed on each loop.\n    //    This is so we don't continue looping over a very large array after\n    //    something like a `take`, `takeWhile`, or other synchronous unsubscription\n    //    has already unsubscribed.\n    // 2. In this form, reentrant code can alter that array we're looping over.\n    //    This is a known issue, but considered an edge case. The alternative would\n    //    be to copy the array before executing the loop, but this has\n    //    performance implications.\n    for (let i = 0; i < array.length && !subscriber.closed; i++) {\n      subscriber.next(array[i]);\n    }\n    subscriber.complete();\n  });\n}\n\nfunction fromPromise<T>(promise: PromiseLike<T>) {\n  return new Observable((subscriber: Subscriber<T>) => {\n    promise\n      .then(\n        (value) => {\n          if (!subscriber.closed) {\n            subscriber.next(value);\n            subscriber.complete();\n          }\n        },\n        (err: any) => subscriber.error(err)\n      )\n      .then(null, reportUnhandledError);\n  });\n}\n\nfunction fromIterable<T>(iterable: Iterable<T>) {\n  return new Observable((subscriber: Subscriber<T>) => {\n    const iterator = (iterable as any)[Symbol_iterator]();\n\n    while (!subscriber.closed) {\n      // Note that any error thrown in the iterator here\n      // will be caught by the subscribe call in `Observable`,\n      // and sent to the consumer via `subscriber.error`.\n      const { done, value } = iterator.next();\n      if (done) {\n        // If we're done, just complete. This will set\n        // subscriber.closed to `true` and kill the loop.\n        // We don't next values from an \"done\" iterator result.\n        // This is to mirror the behavior of JavaScripts `for..of`.\n        subscriber.complete();\n      } else {\n        subscriber.next(value);\n      }\n    }\n\n    // Finalize the iterator if it happens to be a Generator\n    return () => isFunction(iterator?.return) && iterator.return();\n  });\n}\n\nfunction fromAsyncIterable<T>(asyncIterable: AsyncIterable<T>) {\n  return new Observable((subscriber: Subscriber<T>) => {\n    process(asyncIterable, subscriber).catch((err) => subscriber.error(err));\n  });\n}\n\nasync function process<T>(asyncIterable: AsyncIterable<T>, subscriber: Subscriber<T>) {\n  for await (const value of asyncIterable) {\n    subscriber.next(value);\n  }\n  subscriber.complete();\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { InteropObservable } from '../types';\nimport { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being Observable (but not necessary an Rx Observable) */\nexport function isInteropObservable(input: any): input is InteropObservable<any> {\n  return isFunction(input[Symbol_observable]);\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const isArrayLike = (<T>(x: any): x is ArrayLike<T> => x && typeof x.length === 'number' && typeof x !== 'function');","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { isFunction } from \"./isFunction\";\n\n/**\n * Tests to see if the object is \"thennable\".\n * @param value the object to test\n */\nexport function isPromise(value: any): value is PromiseLike<any> {\n  return isFunction(value?.then);\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { isFunction } from './isFunction';\n\nexport function isAsyncIterable<T>(obj: any): obj is AsyncIterable<T> {\n  return Symbol.asyncIterator && isFunction(obj?.[Symbol.asyncIterator]);\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being an Iterable */\nexport function isIterable(input: any): input is Iterable<any> {\n  return isFunction(input?.[Symbol_iterator]);\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\n\n/**\n * Creates the TypeError to throw if an invalid object is passed to `from` or `scheduled`.\n * @param input The object that was passed.\n */\nexport function createInvalidObservableTypeError(input: any) {\n  // TODO: We should create error codes that can be looked up, so this can be less verbose.\n  return new TypeError(\n    `You provided ${\n      input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`\n    } where a stream was expected. You can provide an Observable, Promise, Array, AsyncIterable, or Iterable.`\n  );\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport function isScheduler(value: any): value is SchedulerLike {\n  return value && isFunction(value.schedule);\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * An error thrown when an Observable or a sequence was queried but has no\n * elements.\n *\n * @see {@link first}\n * @see {@link last}\n * @see {@link single}\n * @see {@link firstValueFrom}\n * @see {@link lastValueFrom}\n */\nexport class EmptyError extends Error {\n  /**\n   * @deprecated Internal implementation detail. Do not construct error instances.\n   * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n   */\n  constructor() {\n    super('no elements in sequence');\n    Object.setPrototypeOf(this, new.target.prototype);\n    this.name = 'EmptyError';\n  }\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Observable } from './Observable';\nimport { EmptyError } from './util/EmptyError';\nimport { SafeSubscriber } from './Subscriber';\n\n/**\n * Converts an observable to a promise by subscribing to the observable,\n * and returning a promise that will resolve as soon as the first value\n * arrives from the observable. The subscription will then be closed.\n *\n * If the observable stream completes before any values were emitted, the\n * returned promise will reject with {@link EmptyError}.\n *\n * If the observable stream emits an error, the returned promise will reject\n * with that error.\n *\n * **WARNING**: Only use this with observables you *know* will emit at least one value,\n * *OR* complete. If the source observable does not emit one value or complete, you will\n * end up with a promise that is hung up, and potentially all of the state of an\n * async function hanging out in memory. To avoid this situation, look into adding\n * something like {@link timeout}, {@link take}, {@link takeWhile}, or {@link takeUntil}\n * amongst others.\n *\n * ### Example\n *\n * Wait for the first value from a stream and emit it from a promise in\n * an async function.\n *\n * ```ts\n * import { interval, firstValueFrom } from 'rxjs';\n *\n * async function execute() {\n *    const source$ = interval(2000);\n *    const firstNumber = await firstValueFrom(source$);\n *    console.log(`The first number is ${firstNumber}`);\n * }\n *\n * execute();\n *\n * // Expected output:\n * // \"The first number is 0\"\n * ```\n *\n * @param source the observable to convert to a promise\n */\nexport function firstValueFrom<T>(source: Observable<T>) {\n  return new Promise<T>((resolve, reject) => {\n    const subscriber = new SafeSubscriber<T>({\n      next: value => {\n        resolve(value);\n        subscriber.unsubscribe();\n      },\n      error: reject,\n      complete: () => {\n        reject(new EmptyError());\n      },\n    });\n    source.subscribe(subscriber);\n  });\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { Subscriber } from '../Subscriber';\n\n/**\n * A generic helper for allowing operators to be created with a Subscriber and\n * use closures to capture neceessary state from the operator function itself.\n */\nexport class OperatorSubscriber<T> extends Subscriber<T> {\n  /**\n   * Creates an instance of an `OperatorSubscriber`.\n   * @param destination The downstream subscriber.\n   * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n   * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n   * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n   * and send to the `destination` error handler.\n   * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n   * this handler are sent to the `destination` error handler.\n   * @param onUnsubscribe Additional teardown logic here. This will only be called on teardown if the\n   * subscriber itself is not already closed. Called before any additional teardown logic is called.\n   */\n  constructor(\n    destination: Subscriber<any>,\n    onNext?: (value: T) => void,\n    onError?: (err: any) => void,\n    onComplete?: () => void,\n    private onUnsubscribe?: () => void\n  ) {\n    super(destination);\n    if (onNext) {\n      this._next = function (value: T) {\n        try {\n          onNext(value);\n        } catch (err) {\n          this.destination.error(err);\n        }\n      };\n    }\n    if (onError) {\n      this._error = function (err) {\n        try {\n          onError(err);\n        } catch (err) {\n          // Send any errors that occur down stream.\n          this.destination.error(err);\n        }\n        // Ensure teardown.\n        this.unsubscribe();\n      };\n    }\n    if (onComplete) {\n      this._complete = function () {\n        try {\n          onComplete();\n        } catch (err) {\n          // Send any errors that occur down stream.\n          this.destination.error(err);\n        }\n        // Ensure teardown.\n        this.unsubscribe();\n      };\n    }\n  }\n\n  unsubscribe() {\n    // Execute additional teardown if we have any and we didn't already do so.\n    !this.closed && this.onUnsubscribe?.();\n    super.unsubscribe();\n  }\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction } from '../types';\nimport { isFunction } from './isFunction';\n\n/**\n * Used to determine if an object is an Observable with a lift function.\n */\nexport function hasLift(source: any): source is { lift: InstanceType<typeof Observable>['lift'] } {\n  return isFunction(source?.lift);\n}\n\n/**\n * Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way.\n * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription.\n */\nexport function operate<T, R>(\n  init: (liftedSource: Observable<T>, subscriber: Subscriber<R>) => (() => void) | void\n): OperatorFunction<T, R> {\n  return (source: Observable<T>) => {\n    if (hasLift(source)) {\n      return source.lift(function (this: Subscriber<R>, liftedSource: Observable<T>) {\n        try {\n          return init(liftedSource, this);\n        } catch (err) {\n          this.error(err);\n        }\n      });\n    }\n    throw new TypeError('Unable to lift unknown Observable type');\n  };\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { OperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Applies a given `project` function to each value emitted by the source\n * Observable, and emits the resulting values as an Observable.\n *\n * <span class=\"informal\">Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map),\n * it passes each source value through a transformation function to get\n * corresponding output values.</span>\n *\n * ![](map.png)\n *\n * Similar to the well known `Array.prototype.map` function, this operator\n * applies a projection to each value and emits that projection in the output\n * Observable.\n *\n * ## Example\n * Map every click to the clientX position of that click\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { map } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const positions = clicks.pipe(map(ev => ev.clientX));\n * positions.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link mapTo}\n * @see {@link pluck}\n *\n * @param {function(value: T, index: number): R} project The function to apply\n * to each `value` emitted by the source Observable. The `index` parameter is\n * the number `i` for the i-th emission that has happened since the\n * subscription, starting from the number `0`.\n * @param {any} [thisArg] An optional argument to define what `this` is in the\n * `project` function.\n * @return {Observable<R>} An Observable that emits the values from the source\n * Observable transformed by the given `project` function.\n */\nexport function map<T, R>(project: (value: T, index: number) => R, thisArg?: any): OperatorFunction<T, R> {\n  return operate((source, subscriber) => {\n    // The index of the value from the source. Used with projection.\n    let index = 0;\n    // Subscribe to the source, all errors and completions are sent along\n    // to the consumer.\n    source.subscribe(\n      new OperatorSubscriber(subscriber, (value: T) => {\n        // Call the projection function with the appropriate this context,\n        // and send the resulting value to the consumer.\n        subscriber.next(project.call(thisArg, value, index++));\n      })\n    );\n  });\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { Observable } from '../Observable';\nimport { innerFrom } from '../observable/from';\nimport { Subscriber } from '../Subscriber';\nimport { ObservableInput, SchedulerLike } from '../types';\nimport { OperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * A process embodying the general \"merge\" strategy. This is used in\n * `mergeMap` and `mergeScan` because the logic is otherwise nearly identical.\n * @param source The original source observable\n * @param subscriber The consumer subscriber\n * @param project The projection function to get our inner sources\n * @param concurrent The number of concurrent inner subscriptions\n * @param onBeforeNext Additional logic to apply before nexting to our consumer\n * @param expand If `true` this will perform an \"expand\" strategy, which differs only\n * in that it recurses, and the inner subscription must be schedule-able.\n * @param innerSubScheduler A scheduler to use to schedule inner subscriptions,\n * this is to support the expand strategy, mostly, and should be deprecated\n */\nexport function mergeInternals<T, R>(\n  source: Observable<T>,\n  subscriber: Subscriber<R>,\n  project: (value: T, index: number) => ObservableInput<R>,\n  concurrent: number,\n  onBeforeNext?: (innerValue: R) => void,\n  expand?: boolean,\n  innerSubScheduler?: SchedulerLike,\n  additionalTeardown?: () => void\n) {\n  // Buffered values, in the event of going over our concurrency limit\n  let buffer: T[] = [];\n  // The number of active inner subscriptions.\n  let active = 0;\n  // An index to pass to our accumulator function\n  let index = 0;\n  // Whether or not the outer source has completed.\n  let isComplete = false;\n\n  /**\n   * Checks to see if we can complete our result or not.\n   */\n  const checkComplete = () => {\n    // If the outer has completed, and nothing is left in the buffer,\n    // and we don't have any active inner subscriptions, then we can\n    // Emit the state and complete.\n    if (isComplete && !buffer.length && !active) {\n      subscriber.complete();\n    }\n  };\n\n  // If we're under our concurrency limit, just start the inner subscription, otherwise buffer and wait.\n  const outerNext = (value: T) => (active < concurrent ? doInnerSub(value) : buffer.push(value));\n\n  const doInnerSub = (value: T) => {\n    // If we're expanding, we need to emit the outer values and the inner values\n    // as the inners will \"become outers\" in a way as they are recursively fed\n    // back to the projection mechanism.\n    expand && subscriber.next(value as any);\n\n    // Increment the number of active subscriptions so we can track it\n    // against our concurrency limit later.\n    active++;\n\n    // Start our inner subscription.\n    innerFrom(project(value, index++)).subscribe(\n      new OperatorSubscriber(\n        subscriber,\n        (innerValue) => {\n          // `mergeScan` has additional handling here. For example\n          // taking the inner value and updating state.\n          onBeforeNext?.(innerValue);\n\n          if (expand) {\n            // If we're expanding, then just recurse back to our outer\n            // handler. It will emit the value first thing.\n            outerNext(innerValue as any);\n          } else {\n            // Otherwise, emit the inner value.\n            subscriber.next(innerValue);\n          }\n        },\n        // Errors are passed to the destination.\n        undefined,\n        () => {\n          // INNER SOURCE COMPLETE\n          // Decrement the active count to ensure that the next time\n          // we try to call `doInnerSub`, the number is accurate.\n          active--;\n          // If we have more values in the buffer, try to process those\n          // Note that this call will increment `active` ahead of the\n          // next conditional, if there were any more inner subscriptions\n          // to start.\n          while (buffer.length && active < concurrent) {\n            const bufferedValue = buffer.shift()!;\n            // Particularly for `expand`, we need to check to see if a scheduler was provided\n            // for when we want to start our inner subscription. Otherwise, we just start\n            // are next inner subscription.\n            innerSubScheduler ? subscriber.add(innerSubScheduler.schedule(() => doInnerSub(bufferedValue))) : doInnerSub(bufferedValue);\n          }\n          // Check to see if we can complete, and complete if so.\n          checkComplete();\n        }\n      )\n    );\n  };\n\n  // Subscribe to our source observable.\n  source.subscribe(\n    new OperatorSubscriber(\n      subscriber,\n      outerNext,\n      // Errors are passed through\n      undefined,\n      () => {\n        // Outer completed, make a note of it, and check to see if we can complete everything.\n        isComplete = true;\n        checkComplete();\n      }\n    )\n  );\n\n  // Additional teardown (for when the destination is torn down).\n  // Other teardown is added implicitly via subscription above.\n  return () => {\n    // Ensure buffered values are released.\n    buffer = null!;\n    additionalTeardown?.();\n  };\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\nimport { map } from './map';\nimport { innerFrom } from '../observable/from';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\n\n/* tslint:disable:max-line-length */\nexport function mergeMap<T, O extends ObservableInput<any>>(\n  project: (value: T, index: number) => O,\n  concurrent?: number\n): OperatorFunction<T, ObservedValueOf<O>>;\n/** @deprecated resultSelector no longer supported, use inner map instead */\nexport function mergeMap<T, O extends ObservableInput<any>>(\n  project: (value: T, index: number) => O,\n  resultSelector: undefined,\n  concurrent?: number\n): OperatorFunction<T, ObservedValueOf<O>>;\n/** @deprecated resultSelector no longer supported, use inner map instead */\nexport function mergeMap<T, R, O extends ObservableInput<any>>(\n  project: (value: T, index: number) => O,\n  resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R,\n  concurrent?: number\n): OperatorFunction<T, R>;\n/* tslint:enable:max-line-length */\n\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable.\n *\n * <span class=\"informal\">Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link mergeAll}.</span>\n *\n * ![](mergeMap.png)\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an Observable, and then merging those resulting Observables and\n * emitting the results of this merger.\n *\n * ## Example\n * Map and flatten each letter to an Observable ticking every 1 second\n * ```ts\n * import { of, interval } from 'rxjs';\n * import { mergeMap, map } from 'rxjs/operators';\n *\n * const letters = of('a', 'b', 'c');\n * const result = letters.pipe(\n *   mergeMap(x => interval(1000).pipe(map(i => x+i))),\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // a0\n * // b0\n * // c0\n * // a1\n * // b1\n * // c1\n * // continues to list a,b,c with respective ascending integers\n * ```\n *\n * @see {@link concatMap}\n * @see {@link exhaustMap}\n * @see {@link merge}\n * @see {@link mergeAll}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\n * @see {@link switchMap}\n *\n * @param {function(value: T, ?index: number): ObservableInput} project A function\n * that, when applied to an item emitted by the source Observable, returns an\n * Observable.\n * @param {number} [concurrent=Infinity] Maximum number of input\n * Observables being subscribed to concurrently.\n * @return {Observable} An Observable that emits the result of applying the\n * projection function (and the optional deprecated `resultSelector`) to each item\n * emitted by the source Observable and merging the results of the Observables\n * obtained from this transformation.\n */\nexport function mergeMap<T, R, O extends ObservableInput<any>>(\n  project: (value: T, index: number) => O,\n  resultSelector?: ((outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R) | number,\n  concurrent: number = Infinity\n): OperatorFunction<T, ObservedValueOf<O> | R> {\n  if (isFunction(resultSelector)) {\n    // DEPRECATED PATH\n    return mergeMap((a, i) => map((b: any, ii: number) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n  } else if (typeof resultSelector === 'number') {\n    concurrent = resultSelector;\n  }\n\n  return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n\n/**\n * @deprecated renamed. Use {@link mergeMap}.\n */\nexport const flatMap = mergeMap;\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Observable } from '../Observable';\nimport { noop } from '../util/noop';\n\n/**\n * An Observable that emits no items to the Observer and never completes.\n *\n * ![](never.png)\n *\n * A simple Observable that emits neither values nor errors nor the completion\n * notification. It can be used for testing purposes or for composing with other\n * Observables. Please note that by never emitting a complete notification, this\n * Observable keeps the subscription from being disposed automatically.\n * Subscriptions need to be manually disposed.\n *\n * ##  Example\n * ### Emit the number 7, then never emit anything else (not even complete)\n * ```ts\n * import { NEVER } from 'rxjs';\n * import { startWith } from 'rxjs/operators';\n *\n * function info() {\n *   console.log('Will not be called');\n * }\n * const result = NEVER.pipe(startWith(7));\n * result.subscribe(x => console.log(x), info, info);\n *\n * ```\n *\n * @see {@link Observable}\n * @see {@link index/EMPTY}\n * @see {@link of}\n * @see {@link throwError}\n */\nexport const NEVER = new Observable<never>(noop);\n\n/**\n * @deprecated Deprecated in favor of using {@link NEVER} constant.\n */\nexport function never () {\n  return NEVER;\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\n\nexport function filter<T, S extends T>(predicate: (value: T, index: number) => value is S, thisArg?: any): OperatorFunction<T, S>;\nexport function filter<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;\nexport function filter<T>(predicate: (value: T, index: number) => boolean, thisArg?: any): MonoTypeOperatorFunction<T>;\n\n/**\n * Filter items emitted by the source Observable by only emitting those that\n * satisfy a specified predicate.\n *\n * <span class=\"informal\">Like\n * [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\n * it only emits a value from the source if it passes a criterion function.</span>\n *\n * ![](filter.png)\n *\n * Similar to the well-known `Array.prototype.filter` method, this operator\n * takes values from the source Observable, passes them through a `predicate`\n * function and only emits those values that yielded `true`.\n *\n * ## Example\n * Emit only click events whose target was a DIV element\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { filter } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const clicksOnDivs = clicks.pipe(filter(ev => ev.target.tagName === 'DIV'));\n * clicksOnDivs.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link distinct}\n * @see {@link distinctUntilChanged}\n * @see {@link distinctUntilKeyChanged}\n * @see {@link ignoreElements}\n * @see {@link partition}\n * @see {@link skip}\n *\n * @param predicate A function that\n * evaluates each value emitted by the source Observable. If it returns `true`,\n * the value is emitted, if `false` the value is not passed to the output\n * Observable. The `index` parameter is the number `i` for the i-th source\n * emission that has happened since the subscription, starting from the number\n * `0`.\n * @param thisArg An optional argument to determine the value of `this`\n * in the `predicate` function.\n */\nexport function filter<T>(predicate: (value: T, index: number) => boolean, thisArg?: any): MonoTypeOperatorFunction<T> {\n  return operate((source, subscriber) => {\n    // An index passed to our predicate function on each call.\n    let index = 0;\n\n    // Subscribe to the source, all errors and completions are\n    // forwarded to the consumer.\n    source.subscribe(\n      // Call the predicate with the appropriate `this` context,\n      // if the predicate returns `true`, then send the value\n      // to the consumer.\n      new OperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value))\n    );\n  });\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { Observable } from '../Observable';\nimport { innerFrom } from './from';\nimport { Subscription } from '../Subscription';\nimport { ObservableInput, ObservableInputTuple } from '../types';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { OperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { Subscriber } from '../Subscriber';\n\nexport function race<T extends readonly unknown[]>(inputs: [...ObservableInputTuple<T>]): Observable<T[number]>;\nexport function race<T extends readonly unknown[]>(...inputs: [...ObservableInputTuple<T>]): Observable<T[number]>;\n\n/**\n * Returns an observable that mirrors the first source observable to emit an item.\n *\n * ![](race.png)\n *\n * `race` returns an observable, that when subscribed to, subscribes to all source observables immediately.\n * As soon as one of the source observables emits a value, the result unsubscribes from the other sources.\n * The resulting observable will forward all notifications, including error and completion, from the \"winning\"\n * source observable.\n *\n * If one of the used source observable throws an errors before a first notification\n * the race operator will also throw an error, no matter if another source observable\n * could potentially win the race.\n *\n * `race` can be useful for selecting the response from the fastest network connection for\n * HTTP or WebSockets. `race` can also be useful for switching observable context based on user\n * input.\n *\n * ## Example\n * ### Subscribes to the observable that was the first to start emitting.\n *\n * ```ts\n * import { race, interval } from 'rxjs';\n * import { mapTo } from 'rxjs/operators';\n *\n * const obs1 = interval(1000).pipe(mapTo('fast one'));\n * const obs2 = interval(3000).pipe(mapTo('medium one'));\n * const obs3 = interval(5000).pipe(mapTo('slow one'));\n *\n * race(obs3, obs1, obs2)\n * .subscribe(\n *   winner => console.log(winner)\n * );\n *\n * // Outputs\n * // a series of 'fast one'\n * ```\n *\n * @param {...Observables} ...observables sources used to race for which Observable emits first.\n * @return {Observable} an Observable that mirrors the output of the first Observable to emit an item.\n */\nexport function race<T>(...sources: (ObservableInput<T> | ObservableInput<T>[])[]): Observable<any> {\n  sources = argsOrArgArray(sources);\n  // If only one source was passed, just return it. Otherwise return the race.\n  return sources.length === 1 ? innerFrom(sources[0] as ObservableInput<T>) : new Observable<T>(raceInit(sources as ObservableInput<T>[]));\n}\n\n/**\n * An observable initializer function for both the static version and the\n * operator version of race.\n * @param sources The sources to race\n */\nexport function raceInit<T>(sources: ObservableInput<T>[]) {\n  return (subscriber: Subscriber<T>) => {\n    let subscriptions: Subscription[] = [];\n\n    // Subscribe to all of the sources. Note that we are checking `subscriptions` here\n    // Is is an array of all actively \"racing\" subscriptions, and it is `null` after the\n    // race has been won. So, if we have racer that synchronously \"wins\", this loop will\n    // stop before it subscribes to any more.\n    for (let i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) {\n      subscriptions.push(\n        innerFrom(sources[i] as ObservableInput<T>).subscribe(\n          new OperatorSubscriber(subscriber, (value) => {\n            if (subscriptions) {\n              // We're still racing, but we won! So unsubscribe\n              // all other subscriptions that we have, except this one.\n              for (let s = 0; s < subscriptions.length; s++) {\n                s !== i && subscriptions[s].unsubscribe();\n              }\n              subscriptions = null!;\n            }\n            subscriber.next(value);\n          })\n        )\n      );\n    }\n  };\n}\n","import {\n  AUTHORIZATION_HEADER,\n  X_GOOG_AUTHUSER_HEADER,\n} from 'google3/buzz/channel/javascript/internal/sharedconstants';\nimport * as firstPartyAuth from 'google3/ipc/invalidation/javascript/utils/firstpartyauth';\nimport {BehaviorSubject, Observable, firstValueFrom} from 'rxjs';\n\nimport {XhrOptions} from './jspb_client';\n\n/** A type for HTTP headers. */\ninterface Headers {\n  [header: string]: string;\n}\n\n/** A type of domain that requests can be sent to. */\nexport enum DomainType {\n  /** A *.clients6.google.com domain. */\n  FIRST_PARTY,\n  /** A *.googleapis.com domain. */\n  THIRD_PARTY,\n  /** A *.youtube.com domain. */\n  YOUTUBE,\n}\n\n/**\n * Returns the {@code XhrOptions} to use for an HTTP request with the given auth\n * method.\n */\nexport function buildRequestOpts(authMethod: AuthMethod): XhrOptions {\n  return {\n    queryParams: authMethod.getQueryParameters(),\n    extraHeaders: authMethod.getHeaders(),\n    withCredentials: authMethod.usesCredentialedRequests(),\n  };\n}\n\n/** The type of auth params supported by Punctual. */\nexport type PunctualAuthParams = AuthParams<Observable<string>>;\n\n/** The type of auth params supported by Tango. */\nexport type TangoAuthParams = AuthParams<BehaviorSubject<string>>;\n\n/** A builder for authentication details. */\nexport class AuthParams<OAuthTokensType> {\n  /** An optional 'authuser' cookie index for Gaia multi-signin. */\n  authUser?: number;\n\n  /**\n   * An optional API key (required when using first-party authentication to\n   * the production service) that identifies the application to the\n   * signaling service.\n   */\n  apiKey?: string;\n\n  /** An optional observable stream of OAuth tokens. */\n  oauthTokens?: OAuthTokensType;\n\n  /** An optional observable stream of anonymous/app auth tokens. */\n  appAuthTokens?: BehaviorSubject<string>;\n\n  /** An optional observable stream of Bearer tokens. */\n  bearerTokens?: BehaviorSubject<string>;\n\n  /** @nocollapse */\n  static forPunctual(): PunctualAuthParams {\n    return new AuthParams<Observable<string>>();\n  }\n\n  /** @nocollapse */\n  static forTango(): TangoAuthParams {\n    return new AuthParams<BehaviorSubject<string>>();\n  }\n\n  private constructor() {}\n\n  /**\n   * Sets an 'authuser' cookie index for the client and channel. This field is\n   * only relevant when using first-party auth.\n   */\n  withAuthUser(authUser: number): this {\n    this.authUser = authUser;\n    return this;\n  }\n\n  /** Sets an API key to identify the application. */\n  withApiKey(apiKey: string): this {\n    this.apiKey = apiKey;\n    return this;\n  }\n\n  /** Sets a stream of OAuth tokens. */\n  withOAuthTokens(oauthTokens: OAuthTokensType): this {\n    this.oauthTokens = oauthTokens;\n    return this;\n  }\n\n  /**\n   * Sets a stream of App tokens. Removes any previously set stream of auth\n   * tokens, whether OAuth or App auth.\n   */\n  withAppAuthTokens(appAuthTokens: BehaviorSubject<string>): this {\n    this.appAuthTokens = appAuthTokens;\n    this.oauthTokens = undefined;\n    return this;\n  }\n\n  /**\n   * Sets a stream of Bearer tokens. Removes any previously set stream of auth\n   * tokens, whether OAuth or App auth.\n   */\n  withBearerTokens(bearerTokens: BehaviorSubject<string>): this {\n    this.bearerTokens = bearerTokens;\n    this.oauthTokens = undefined;\n    this.appAuthTokens = undefined;\n    return this;\n  }\n}\n\n/** Synchronously converts Tango auth params to an AuthMethod. */\nexport function toAuthMethod(params: TangoAuthParams): AuthMethod {\n  if (params.oauthTokens) {\n    const tokens = params.oauthTokens;\n    return new AuthMethodOAuth(tokens);\n  } else {\n    if (!params.apiKey) {\n      throw new Error('An API key or OAuth token stream is required');\n    }\n    if (params.appAuthTokens) {\n      return new AuthMethodAnonymous(params.apiKey);\n    } else {\n      return new AuthMethodFirstParty(params.apiKey, params.authUser);\n    }\n  }\n}\n\n/**\n * Asynchronously converts either Tango or Punctual auth params to an\n * AuthMethod. The promise resolves as soon as the first OAuth token is\n * available, or immediately if not using OAuth.\n */\nexport function toAuthMethodPromise(\n  params: PunctualAuthParams | TangoAuthParams,\n): Promise<AuthMethod> {\n  if (params.oauthTokens) {\n    const tokens = params.oauthTokens;\n    return firstValueFrom(tokens).then((firstToken) => {\n      const cachedTokens = new BehaviorSubject(firstToken);\n      tokens.subscribe(cachedTokens);\n      return new AuthMethodOAuth(cachedTokens);\n    });\n  } else {\n    if (!params.apiKey) {\n      return Promise.reject(\n        new Error('An API key or OAuth token stream is required'),\n      );\n    }\n    if (params.bearerTokens) {\n      return Promise.resolve(\n        new AuthMethodBearerToken(params.apiKey, params.bearerTokens),\n      );\n    }\n    if (params.appAuthTokens) {\n      return Promise.resolve(new AuthMethodAnonymous(params.apiKey));\n    } else {\n      return Promise.resolve(\n        new AuthMethodFirstParty(params.apiKey, params.authUser),\n      );\n    }\n  }\n}\n\n/**\n * Interface for authentication methods used by the Tango client\n * implementation(s).\n */\nexport interface AuthMethod {\n  /** Returns any authentication-related headers. */\n  getHeaders(): Headers;\n\n  /** Returns any authentication-related query parameters. */\n  getQueryParameters(): {[param: string]: string};\n\n  /**\n   * The type of domain to which requests with this auth method should be sent.\n   */\n  domainType(): DomainType;\n\n  /** Returns whether this auth method makes 'credentialed' CORS requests. */\n  usesCredentialedRequests(): boolean;\n\n  /** Returns the index of the authenticated user, if any. */\n  getAuthUser(): number | undefined;\n}\n\n/** First-party authentication. */\nexport class AuthMethodFirstParty implements AuthMethod {\n  constructor(\n    /** The client's API key. */\n    readonly apiKey: string,\n    /** An optional authuser parameter for Gaia multi-signin. */\n    readonly authUser?: number,\n  ) {}\n\n  getHeaders(): Headers {\n    const result: Headers = {};\n    const authSchemeAndHash = firstPartyAuth.getFirstPartyAuthSchemeAndHash();\n    if (authSchemeAndHash != null) {\n      result[AUTHORIZATION_HEADER] =\n        `${authSchemeAndHash.scheme} ${authSchemeAndHash.hash}`;\n      result[X_GOOG_AUTHUSER_HEADER] = String(this.authUser || 0);\n    }\n    return result;\n  }\n\n  getQueryParameters(): {[param: string]: string} {\n    return {'key': this.apiKey};\n  }\n\n  domainType(): DomainType {\n    return DomainType.FIRST_PARTY;\n  }\n\n  usesCredentialedRequests(): boolean {\n    return true;\n  }\n\n  getAuthUser(): number | undefined {\n    return this.authUser;\n  }\n}\n\n/** Authentication via OAuth tokens. */\nexport class AuthMethodOAuth implements AuthMethod {\n  constructor(\n    /** An observable stream of OAuth tokens. */\n    readonly oauthTokens: BehaviorSubject<string>,\n  ) {}\n\n  getHeaders(): Headers {\n    const result: Headers = {};\n    result[AUTHORIZATION_HEADER] = `OAuth ${this.oauthTokens.getValue()}`;\n    return result;\n  }\n\n  getQueryParameters(): {[param: string]: string} {\n    return {};\n  }\n\n  domainType(): DomainType {\n    return DomainType.THIRD_PARTY;\n  }\n\n  usesCredentialedRequests(): boolean {\n    return true;\n  }\n\n  getAuthUser(): number | undefined {\n    return undefined;\n  }\n}\n\n/** Application-only authentication (API key, anonymous app auth token). */\nexport class AuthMethodAnonymous implements AuthMethod {\n  constructor(\n    /** The client's API key. */\n    readonly apiKey: string,\n  ) {}\n\n  getHeaders(): Headers {\n    return {};\n  }\n\n  getQueryParameters(): {\n    key: string;\n  } {\n    return {'key': this.apiKey};\n  }\n\n  domainType(): DomainType {\n    return DomainType.THIRD_PARTY;\n  }\n\n  usesCredentialedRequests(): boolean {\n    return false;\n  }\n\n  getAuthUser(): number | undefined {\n    return undefined;\n  }\n}\n\n/** First-party application-only authentication (API key, oAuth token). */\nexport class AuthMethodBearerToken implements AuthMethod {\n  constructor(\n    /** The client's API key. */\n    readonly apiKey: string,\n    /** An observable stream of anonymous (app only) auth tokens. */\n    readonly oauthTokens: BehaviorSubject<string>,\n  ) {}\n\n  getHeaders(): Headers {\n    const token = this.oauthTokens.getValue();\n\n    const result: Headers = {};\n    result[AUTHORIZATION_HEADER] = `Bearer ${token}`;\n    return result;\n  }\n\n  getQueryParameters(): {\n    key: string;\n  } {\n    return {'key': this.apiKey};\n  }\n\n  domainType(): DomainType {\n    return DomainType.FIRST_PARTY;\n  }\n\n  usesCredentialedRequests(): boolean {\n    return true;\n  }\n\n  getAuthUser(): number | undefined {\n    return undefined;\n  }\n}\n","// Copyright 2012 Google Inc. All Rights Reserved.\n\n/**\n * @fileoverview First-party auth utility. A thin shim over:\n *     google3/javascript/abc/libs/gapi/client/auth/firstparty.js\n *\n * This file is intended to be internal to Tango and Marmoset. Please do not\n * call the function in this file except from code in\n * ipc/invalidation/javascript/... or buzz/channel/javascript/...\n *\n * @author ghc@google.com (Greg Cooper)\n */\n\ngoog.module('invalidation.FirstPartyAuth');\n\n\nconst auth_firstparty = goog.require('gapix.auth_firstparty');\n\n/**\n * If the user appears to be logged in, this will return an array containing the\n * first-party authentication scheme to use, along with the API session cookie\n * hash for that scheme.\n * @param {string=} opt_unusedOrigin Compatibility param for chat code that\n *     calls this.\n * @return {{scheme: string, hash: string}|null} A record containing the\n *     authentication scheme and hash, or `null` if the required\n *     cookies/variables were absent.\n */\nfunction getFirstPartyAuthSchemeAndHash(opt_unusedOrigin) {\n  const header = auth_firstparty.getAuthHeaderValueForFirstParty([]);\n  if (header) {\n    const arr = header.split(' ');\n    // TODO(ghc): [bug 27834779] Look into just returning the header instead of\n    // separate scheme and hash.\n    return {\n      scheme: arr[0],\n      hash: arr[1]\n    };\n  }\n  return null;\n}\n\nexports = {\n  getFirstPartyAuthSchemeAndHash,\n};\n","/**\n * @fileoverview Constants used both by cross-page browser channel and LCS\n * client.\n *\n * @suppress {extraRequire} (Needed due to tsickle quirks.)\n */\n\nimport AuthenticationParameters from 'goog:buzz.channel.proto.AuthenticationParameters'; // from //buzz/channel/proto:browser_channel_closure_js_proto\nimport Scheme from 'goog:buzz.channel.proto.AuthenticationParameters.Scheme'; // from //buzz/channel/proto:browser_channel_closure_js_proto\n\n/**\n * Constants identifying functions in the browser channel API when split across\n * an iframe via xpc.\n */\nexport enum XpcFunctions {\n  // Host => iframe.\n  START = 's',\n  START_HANDOFF = 'sh',\n  CLOSE = 'c',\n  SEND_MAP = 'sm',\n  UPDATE_AUTH_PARAMS = 'uap',\n  TRY_CONNECT_NOW = 'tcn',\n\n  // Iframe => host.\n  CHANNEL_OPENED = 'co',\n  CHANNEL_HANDLE_ARRAY = 'cha',\n  CHANNEL_HANDLE_MESSAGE = 'chm',\n  CHANNEL_ERROR = 'ce',\n  CHANNEL_CLOSED = 'cc',\n  CHANNEL_STAT_EVENT = 'cse',\n\n  // Client <=> shared channel protocol.\n  CLIENT_TO_SHARED_WORKER = 'c2sw',\n  SHARED_WORKER_TO_CLIENT = 'sw2c',\n}\n\n/**\n * The key in the browser channel map that is used for gsessionid messages.\n * Must be kept in sync with j/c/g/buzz/channel/server/Constants.java.\n */\nexport const GSESSIONID_KEY = 'gsid';\n\n/**\n * The key in the browser channel map used for out-of-band status codes. Must\n * be kept in sync with j/c/g/buzz/channel/server/Constants.java.\n */\nexport const OOB_STATUS_CODE_KEY = 'osc';\n\n/**\n * The name of the query parameter that indicates which session to use in the\n * presence of multi-login.  See:\n * https://wiki.corp.google.com/twiki/bin/view/Main/GaiaFrontendMultipleLogin\n */\nexport const AUTHUSER = 'authuser';\n\n/**\n * The name of the query parameter that can be used to pass a sticky session id\n * for the request to be routed to a specific server.\n */\nexport const GSESSIONID_PARAM = 'gsessionid';\n\n/**\n * The name of the http query parameter used to indicate the type of the client.\n * Must match the constant with the same name in\n * java/com/google/buzz/channel/common/Constants.java.\n */\nexport const CLIENT_TYPE_PARAM = 'ctype';\n\n/**\n * The name of the http query parameter used to indicate a Buzz property id.\n * Must match the constant with the same name in\n * java/com/google/buzz/channel/common/Constants.java.\n */\nexport const PROPERTY_ID_PARAM = 'prop';\n\n/**\n * The name of the http query parameter used to indicate an appication version.\n * Must match the constant with the same name in\n * java/com/google/buzz/channel/common/Constants.java.\n */\nexport const APPLICATION_VERSION_PARAM = 'appver';\n\n/**\n * The name of the http query parameter used to indicate a Gaia service override\n * for this application.  Must match the constant with the same name in\n * java/com/google/buzz/channel/common/Constants.java.\n */\nexport const GAIA_SERVICE_PARAM = 'service';\n\n/**\n * The name of the http query parameter used to indicate whether the browser\n * channel client is running inside a SharedWorker. Must match the constant with\n * the same name in java/com/google/buzz/channel/common/Constants.java.\n */\nexport const IS_IN_SHARED_WORKER_PARAM = 'sw';\n\n/**\n * The name of the http query parameter used to indicate the browser channel\n * configuration in the uri of the iframe.\n */\nexport const BROWSER_CHANNEL_CONFIG_PARAM = 'cfg';\n\n/**\n * The name of the http query parameter used to indicate a gapi src override\n * for this application.\n */\nexport const GAPI_SRC_PARAM = 'gapi_src';\n\n/**\n * The name of the query parameter that can be used to pass an OAuth token (for\n * iframe requests where we can't set the Authorization header).\n */\nexport const OAUTH_TOKEN_PARAM = 'oauth_token';\n\n/**\n * The name of the query parameter used to specify an application-only auth\n * token.\n */\nexport const APP_AUTH_TOKEN_PARAM = 'app_auth';\n\n/**\n * The name of the scheme for OAuth authentication.  Used as a prefix in the\n * value of the Authorization http header.\n */\nexport const OAUTH_SCHEME_NAME = 'OAuth';\n\n/**\n * Name of the authorization header.\n */\nexport const AUTHORIZATION_HEADER = 'Authorization';\n\n/**\n * Name of the Google AuthUser header.\n */\nexport const X_GOOG_AUTHUSER_HEADER = 'X-Goog-AuthUser';\n\n/**\n * Name of the Origin header.\n */\nexport const X_ORIGIN_HEADER = 'X-Origin';\n\n/**\n * Name of authorization scheme for secure first-party authentication.\n */\nconst SECURE_FIRST_PARTY_AUTH_SCHEME = 'SAPISIDHASH';\n\n/**\n * Name of authorization scheme for unsecured first-party authentication.\n */\nconst UNSECURED_FIRST_PARTY_AUTH_SCHEME = 'APISIDHASH';\n\n/**\n * The authentication schemes we support, by name.\n */\nexport const AUTH_SCHEMES: {[key: string]: Scheme} = {};\nAUTH_SCHEMES[UNSECURED_FIRST_PARTY_AUTH_SCHEME] =\n  AuthenticationParameters.Scheme.APISIDHASH;\nAUTH_SCHEMES[SECURE_FIRST_PARTY_AUTH_SCHEME] =\n  AuthenticationParameters.Scheme.SAPISIDHASH;\nAUTH_SCHEMES[OAUTH_SCHEME_NAME] = AuthenticationParameters.Scheme.OAUTH;\n\n/**\n * The names of the authentication schemes we support.\n */\nexport const AUTH_SCHEME_NAMES: {[key: string]: string} = {};\nAUTH_SCHEME_NAMES[AuthenticationParameters.Scheme.APISIDHASH] =\n  UNSECURED_FIRST_PARTY_AUTH_SCHEME;\nAUTH_SCHEME_NAMES[AuthenticationParameters.Scheme.SAPISIDHASH] =\n  SECURE_FIRST_PARTY_AUTH_SCHEME;\nAUTH_SCHEME_NAMES[AuthenticationParameters.Scheme.OAUTH] = OAUTH_SCHEME_NAME;\n\n/**\n * Event type for a new connection to the shared worker.\n */\nexport const CONNECT_EVENT = 'connect';\n\n/**\n * Event type for message reception on a port.\n */\nexport const MESSAGE_EVENT = 'message';\n\n/**\n * The initial delay in milliseconds when retrying to authenticate the client.\n */\nexport const INITIAL_AUTH_RETRY_DELAY_MS: number = 10 * 1000;\n\n/**\n * The maximum factor by which to back off on first-party authentication\n * retries.\n */\nexport const MAX_BACKOFF_FACTOR_FOR_AUTH_RETRY = 180;\n","/**\n * @fileoverview Utilities to help implementation of the Tango client library.\n */\n\nimport {Code} from 'google3/google/rpc/code.proto';\nimport {HttpStatus} from 'google3/third_party/javascript/closure/net/httpstatus';\n\n/**\n * Defers execution of the given code.\n * @param thunk The thunk to execute later.\n */\nexport function defer(thunk: () => void): void {\n  Promise.resolve().then(thunk);\n}\n\n/**\n * A more type-safe PromiseLike interface. Since it's a sub-interface of the\n * standard PromiseLike interface, it should be usable wherever a standard\n * PromiseLike can be used.\n */\n// TODO(b/146028881): Interface 'SafePromiseLike<T, E>' incorrectly extends\n// interface 'PromiseLike<T>'.\n// tslint:disable-next-line:ban-ts-suppressions\n// @ts-ignore\nexport interface SafePromiseLike<T, E> extends PromiseLike<T> {\n  /** @inheritDoc */\n  then<TResult1 = T, TResult2 = never, E1 = never, E2 = never>(\n      onfulfilled?: ((value: T) => TResult1 | SafePromiseLike<TResult1, E1>)|\n      undefined|null,\n      onrejected?: ((reason: E) => TResult2 | SafePromiseLike<TResult2, E2>)|\n      undefined|null): SafePromiseLike<TResult1|TResult2, E|E1|E2>;\n}\n\n/**\n * A more type-safe Promise interface, since it includes a generic type\n * parameter for the error type. Since it implements the standard Promise\n * interface, it should be usable wherever a standard Promise can be used.\n */\nexport abstract class SafePromise<T, E> implements Promise<T> {\n  /**\n   * @see new Promise\n   * The type parameters default to never in order to force us to specify them.\n   * Otherwise, the compiler would default them to the {} type, which would\n   * cause us to lose a lot of type safety.\n   */\n  static create<T = never, E = never>(\n    executor: (\n      resolve: (value: T | PromiseLike<T>) => void,\n      reject: (reason: E) => void,\n    ) => void,\n  ): SafePromise<T, E> {\n    return new Promise(executor) as SafePromise<T, E>;\n  }\n\n  /** @see Promise.resolve */\n  static resolve<T, E>(value: T): SafePromise<T, E> {\n    return Promise.resolve(value) as SafePromise<T, E>;\n  }\n\n  /** @see Promise.reject */\n  static reject<T, E>(reason: E): SafePromise<T, E> {\n    return Promise.reject(reason) as SafePromise<T, E>;\n  }\n\n  /** @inheritDoc */\n  // TODO(b/146028881): Property 'then' in type 'SafePromise<T, E>' is not\n  // assignable to the same property in base type 'Promise<T>'.\n  // tslint:disable-next-line:ban-ts-suppressions\n  // @ts-ignore\n  abstract then<TResult1 = never, TResult2 = never, E1 = never, E2 = never>(\n      onfulfilled: ((value: T) => TResult1 | SafePromiseLike<TResult1, E1>)|\n      undefined|null,\n      onrejected?:\n          ((reason: E|Error) => TResult2 | SafePromiseLike<TResult2, E2>)|\n      undefined|null): SafePromise<TResult1|TResult2, E|E1|E2>;\n\n  /** @inheritDoc */\n  // TODO(b/146028881): Property 'catch' in type 'SafePromise<T, E>' is not\n  // assignable to the same property in base type 'Promise<T>'.\n  // tslint:disable-next-line:ban-ts-suppressions\n  // @ts-ignore\n  abstract catch<TResult = never, E1 = never>(\n      onrejected: ((reason: E|Error) => TResult | SafePromiseLike<TResult, E1>)|\n      undefined|null): SafePromise<T|TResult, E1>;\n\n  /** @inheritDoc */\n  // TODO(b/146028881): Property 'finally' in type 'SafePromise<T, E>' is not\n  // assignable to the same property in base type 'Promise<T>'.\n  // tslint:disable-next-line:ban-ts-suppressions\n  // @ts-ignore\n  abstract finally(onfinally?: (() => void)|undefined|null): SafePromise<T, E>;\n}\n\n/**\n * @param httpStatus An HTTP status code.\n * @return An RPC status code with roughly the same meaning as the HTTP status\n *     code, or {@code UNKNOWN} if it's not a code we know how to interpret.\n */\nexport function codeForHttpStatus(httpStatus: number): Code {\n  const statusEnum = httpStatus as HttpStatus;\n  switch (statusEnum) {\n    case HttpStatus.OK:\n      return Code.OK;\n    case HttpStatus.BAD_REQUEST:\n      return Code.INVALID_ARGUMENT;\n    case HttpStatus.UNAUTHORIZED:\n      return Code.UNAUTHENTICATED;\n    case HttpStatus.FORBIDDEN:\n      return Code.PERMISSION_DENIED;\n    case HttpStatus.NOT_FOUND:\n      return Code.NOT_FOUND;\n    case HttpStatus.CONFLICT:\n      return Code.ABORTED;\n    case HttpStatus.PRECONDITION_FAILED:\n      return Code.FAILED_PRECONDITION;\n    case HttpStatus.TOO_MANY_REQUESTS:\n      return Code.RESOURCE_EXHAUSTED;\n    case HttpStatus.NOT_IMPLEMENTED:\n      return Code.UNIMPLEMENTED;\n    case HttpStatus.SERVICE_UNAVAILABLE:\n      return Code.UNAVAILABLE;\n    case HttpStatus.GATEWAY_TIMEOUT:\n      return Code.DEADLINE_EXCEEDED;\n    /* everything else is unknown */\n    default:\n      return Code.UNKNOWN;\n  }\n}\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Constants for HTTP status codes.\n */\n\ngoog.provide('goog.net.HttpStatus');\n\n\n/**\n * HTTP Status Codes defined in RFC 2616, RFC 6585, RFC 4918 and RFC 7538.\n * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\n * @see http://tools.ietf.org/html/rfc6585\n * @see https://tools.ietf.org/html/rfc4918\n * @see https://tools.ietf.org/html/rfc7538\n * @enum {number}\n */\ngoog.net.HttpStatus = {\n  // Informational 1xx\n  CONTINUE: 100,\n  SWITCHING_PROTOCOLS: 101,\n\n  // Successful 2xx\n  OK: 200,\n  CREATED: 201,\n  ACCEPTED: 202,\n  NON_AUTHORITATIVE_INFORMATION: 203,\n  NO_CONTENT: 204,\n  RESET_CONTENT: 205,\n  PARTIAL_CONTENT: 206,\n  MULTI_STATUS: 207,\n\n  // Redirection 3xx\n  MULTIPLE_CHOICES: 300,\n  MOVED_PERMANENTLY: 301,\n  FOUND: 302,\n  SEE_OTHER: 303,\n  NOT_MODIFIED: 304,\n  USE_PROXY: 305,\n  TEMPORARY_REDIRECT: 307,\n  PERMANENT_REDIRECT: 308,\n\n  // Client Error 4xx\n  BAD_REQUEST: 400,\n  UNAUTHORIZED: 401,\n  PAYMENT_REQUIRED: 402,\n  FORBIDDEN: 403,\n  NOT_FOUND: 404,\n  METHOD_NOT_ALLOWED: 405,\n  NOT_ACCEPTABLE: 406,\n  PROXY_AUTHENTICATION_REQUIRED: 407,\n  REQUEST_TIMEOUT: 408,\n  CONFLICT: 409,\n  GONE: 410,\n  LENGTH_REQUIRED: 411,\n  PRECONDITION_FAILED: 412,\n  REQUEST_ENTITY_TOO_LARGE: 413,\n  REQUEST_URI_TOO_LONG: 414,\n  UNSUPPORTED_MEDIA_TYPE: 415,\n  REQUEST_RANGE_NOT_SATISFIABLE: 416,\n  EXPECTATION_FAILED: 417,\n  UNPROCESSABLE_ENTITY: 422,\n  LOCKED: 423,\n  FAILED_DEPENDENCY: 424,\n  PRECONDITION_REQUIRED: 428,\n  TOO_MANY_REQUESTS: 429,\n  REQUEST_HEADER_FIELDS_TOO_LARGE: 431,\n  CLIENT_CLOSED_REQUEST: 499,  // Nonstandard, used by GRPC\n\n  // Server Error 5xx\n  INTERNAL_SERVER_ERROR: 500,\n  NOT_IMPLEMENTED: 501,\n  BAD_GATEWAY: 502,\n  SERVICE_UNAVAILABLE: 503,\n  GATEWAY_TIMEOUT: 504,\n  HTTP_VERSION_NOT_SUPPORTED: 505,\n  INSUFFICIENT_STORAGE: 507,\n  NETWORK_AUTHENTICATION_REQUIRED: 511,\n\n  /*\n   * IE returns this code for 204 due to its use of URLMon, which returns this\n   * code for 'Operation Aborted'. The status text is 'Unknown', the response\n   * headers are ''. Known to occur on IE 6 on XP through IE9 on Win7.\n   */\n  QUIRK_IE_NO_CONTENT: 1223,\n};\n\n\n/**\n * Returns whether the given status should be considered successful.\n *\n * Successful codes are OK (200), CREATED (201), ACCEPTED (202),\n * NO CONTENT (204), PARTIAL CONTENT (206), NOT MODIFIED (304),\n * and IE's no content code (1223).\n *\n * @param {number} status The status code to test.\n * @return {boolean} Whether the status code should be considered successful.\n */\ngoog.net.HttpStatus.isSuccess = function(status) {\n  'use strict';\n  switch (status) {\n    case goog.net.HttpStatus.OK:\n    case goog.net.HttpStatus.CREATED:\n    case goog.net.HttpStatus.ACCEPTED:\n    case goog.net.HttpStatus.NO_CONTENT:\n    case goog.net.HttpStatus.PARTIAL_CONTENT:\n    case goog.net.HttpStatus.NOT_MODIFIED:\n    case goog.net.HttpStatus.QUIRK_IE_NO_CONTENT:\n      return true;\n\n    default:\n      return false;\n  }\n};\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n","/** @fileoverview Exports a null-safe `propagateAsyncContext` function. */\n\n/**\n * Null-safe and polyfill-safe wrapper to propagate the current context into the\n * given function.\n */\nexport const propagateAsyncContext: <F extends Function | null | undefined>(\n  fn: F,\n) => F =\n  typeof AsyncContext !== 'undefined' &&\n  typeof AsyncContext.Snapshot === 'function'\n    ? (fn) => fn && AsyncContext.Snapshot.wrap(fn)\n    : (fn) => fn;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview JSON utility functions.\n */\ngoog.module('goog.json');\ngoog.module.declareLegacyNamespace();\n\n/**\n * @define {boolean} If true, use the native JSON parsing API.\n * NOTE: The default `parse` implementation is able to handle\n * invalid JSON. JSPB used to produce invalid JSON which is not the case\n * anymore so this is safe to enable for parsing JSPB. Using native JSON is\n * faster and safer than the default implementation using `eval`.\n */\nconst USE_NATIVE_JSON = goog.define('goog.json.USE_NATIVE_JSON', false);\n\n/**\n * Tests if a string is an invalid JSON string. This only ensures that we are\n * not using any invalid characters\n * @param {string} s The string to test.\n * @return {boolean} True if the input is a valid JSON string.\n */\nfunction isValid(s) {\n  // All empty whitespace is not valid.\n  if (/^\\s*$/.test(s)) {\n    return false;\n  }\n\n  // This is taken from http://www.json.org/json2.js which is released to the\n  // public domain.\n  // Changes: We dissallow \\u2028 Line separator and \\u2029 Paragraph separator\n  // inside strings.  We also treat \\u2028 and \\u2029 as whitespace which they\n  // are in the RFC but IE and Safari does not match \\s to these so we need to\n  // include them in the reg exps in all places where whitespace is allowed.\n  // We allowed \\x7f inside strings because some tools don't escape it,\n  // e.g. http://www.json.org/java/org/json/JSONObject.java\n\n  // Parsing happens in three stages. In the first stage, we run the text\n  // against regular expressions that look for non-JSON patterns. We are\n  // especially concerned with '()' and 'new' because they can cause invocation,\n  // and '=' because it can cause mutation. But just to be safe, we want to\n  // reject all unexpected forms.\n\n  // We split the first stage into 4 regexp operations in order to work around\n  // crippling inefficiencies in IE's and Safari's regexp engines. First we\n  // replace all backslash pairs with '@' (a non-JSON character). Second, we\n  // replace all simple value tokens with ']' characters, but only when followed\n  // by a colon, comma, closing bracket or end of string. Third, we delete all\n  // open brackets that follow a colon or comma or that begin the text. Finally,\n  // we look to see that the remaining characters are only whitespace or ']' or\n  // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.\n\n  // Don't make these static since they have the global flag.\n  const backslashesRe = /\\\\[\"\\\\\\/bfnrtu]/g;\n  const simpleValuesRe =\n      /(?:\"[^\"\\\\\\n\\r\\u2028\\u2029\\x00-\\x08\\x0a-\\x1f]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)[\\s\\u2028\\u2029]*(?=:|,|]|}|$)/g;\n  const openBracketsRe = /(?:^|:|,)(?:[\\s\\u2028\\u2029]*\\[)+/g;\n  const remainderRe = /^[\\],:{}\\s\\u2028\\u2029]*$/;\n\n  return remainderRe.test(\n      s.replace(backslashesRe, '@')\n          .replace(simpleValuesRe, ']')\n          .replace(openBracketsRe, ''));\n}\n\n/**\n * Logs a parsing error in `JSON.parse` solvable by using `eval`.\n * @type {function(string, !Error)} The first parameter is the error message,\n *     the second is the exception thrown by `JSON.parse`.\n */\nlet errorLoggerInternal = () => {};\n\n/**\n * Sets an error logger to use if there's a recoverable parsing error.\n * @param {function(string, !Error)} errorLogger The first parameter is the\n *     error message, the second is the exception thrown by `JSON.parse`.\n */\nfunction setErrorLogger(errorLogger) {\n  errorLoggerInternal = errorLogger;\n}\n\n/**\n * Parses a JSON string and returns the result. This throws an exception if\n * the string is an invalid JSON string.\n *\n * Note that this is very slow on large strings. Use JSON.parse if possible.\n *\n * @param {*} s The JSON string to parse.\n * @throws Error if s is invalid JSON.\n * @return {Object} The object generated from the JSON string, or null.\n * @deprecated Use JSON.parse.\n */\nconst parse = USE_NATIVE_JSON ?\n    /** @type {function(*):Object} */ (goog.global['JSON']['parse']) :\n    function(s) {\n      let error;\n      try {\n        return goog.global['JSON']['parse'](s);\n      } catch (ex) {\n        error = ex;\n      }\n      const o = String(s);\n      if (isValid(o)) {\n        try {\n          const result = /** @type {?Object} */ (eval('(' + o + ')'));\n          if (error) {\n            errorLoggerInternal('Invalid JSON: ' + o, error);\n          }\n          return result;\n        } catch (ex) {\n        }\n      }\n      throw new Error('Invalid JSON string: ' + o);\n    };\n\n/**\n * JSON replacer, as defined in Section 15.12.3 of the ES5 spec.\n * @see http://ecma-international.org/ecma-262/5.1/#sec-15.12.3\n *\n * TODO(nicksantos): Array should also be a valid replacer.\n *\n * @typedef {function(this:Object, string, *): *}\n */\nlet Replacer;\n\n/**\n * JSON reviver, as defined in Section 15.12.2 of the ES5 spec.\n * @see http://ecma-international.org/ecma-262/5.1/#sec-15.12.3\n *\n * @typedef {function(this:Object, string, *): *}\n */\nlet Reviver;\n\n/**\n * Serializes an object or a value to a JSON string.\n *\n * @param {*} object The object to serialize.\n * @param {?goog.json.Replacer=} opt_replacer A replacer function\n *     called for each (key, value) pair that determines how the value\n *     should be serialized. By defult, this just returns the value\n *     and allows default serialization to kick in.\n * @throws Error if there are loops in the object graph.\n * @return {string} A JSON string representation of the input.\n */\nconst serialize = USE_NATIVE_JSON ?\n    /** @type {function(*, ?goog.json.Replacer=):string} */\n    (goog.global['JSON']['stringify']) :\n    function(object, opt_replacer) {\n      // NOTE(nicksantos): Currently, we never use JSON.stringify.\n      //\n      // The last time I evaluated this, JSON.stringify had subtle bugs and\n      // behavior differences on all browsers, and the performance win was not\n      // large enough to justify all the issues. This may change in the future\n      // as browser implementations get better.\n      //\n      // assertSerialize in json_test contains if branches for the cases\n      // that fail.\n      return new Serializer(opt_replacer).serialize(object);\n    };\n\n/**\n * Class that is used to serialize JSON objects to a string.\n * @param {?goog.json.Replacer=} opt_replacer Replacer.\n * @constructor\n */\nfunction Serializer(opt_replacer) {\n  /**\n   * @type {goog.json.Replacer|null|undefined}\n   * @private\n   */\n  this.replacer_ = opt_replacer;\n}\n\n/**\n * Serializes an object or a value to a JSON string.\n *\n * @param {*} object The object to serialize.\n * @throws Error if there are loops in the object graph.\n * @return {string} A JSON string representation of the input.\n */\nSerializer.prototype.serialize = function(object) {\n  const sb = [];\n  this.serializeInternal(object, sb);\n  return sb.join('');\n};\n\n/**\n * Serializes a generic value to a JSON string\n * @protected\n * @param {*} object The object to serialize.\n * @param {Array<string>} sb Array used as a string builder.\n * @throws Error if there are loops in the object graph.\n */\nSerializer.prototype.serializeInternal = function(object, sb) {\n  if (object == null) {\n    // undefined == null so this branch covers undefined as well as null\n    sb.push('null');\n    return;\n  }\n\n  if (typeof object == 'object') {\n    if (Array.isArray(object)) {\n      this.serializeArray(object, sb);\n      return;\n    } else if (\n        object instanceof String || object instanceof Number ||\n        object instanceof Boolean) {\n      object = object.valueOf();\n      // Fall through to switch below.\n    } else {\n      this.serializeObject_(/** @type {!Object} */ (object), sb);\n      return;\n    }\n  }\n\n  switch (typeof object) {\n    case 'string':\n      this.serializeString_(object, sb);\n      break;\n    case 'number':\n      this.serializeNumber_(object, sb);\n      break;\n    case 'boolean':\n      sb.push(String(object));\n      break;\n    case 'function':\n      sb.push('null');\n      break;\n    default:\n      throw new Error('Unknown type: ' + typeof object);\n  }\n};\n\n/**\n * Character mappings used internally for goog.string.quote\n * @private\n * @type {!Object}\n */\nSerializer.charToJsonCharCache_ = {\n  '\\\"': '\\\\\"',\n  '\\\\': '\\\\\\\\',\n  '/': '\\\\/',\n  '\\b': '\\\\b',\n  '\\f': '\\\\f',\n  '\\n': '\\\\n',\n  '\\r': '\\\\r',\n  '\\t': '\\\\t',\n\n  '\\x0B': '\\\\u000b'  // '\\v' is not supported in JScript\n};\n\n/**\n * Regular expression used to match characters that need to be replaced.\n * The S60 browser has a bug where unicode characters are not matched by\n * regular expressions. The condition below detects such behaviour and\n * adjusts the regular expression accordingly.\n * @private\n * @type {!RegExp}\n */\nSerializer.charsToReplace_ = /\\uffff/.test('\\uffff') ?\n    /[\\\\\\\"\\x00-\\x1f\\x7f-\\uffff]/g :\n    /[\\\\\\\"\\x00-\\x1f\\x7f-\\xff]/g;\n\n/**\n * Serializes a string to a JSON string\n * @private\n * @param {string} s The string to serialize.\n * @param {Array<string>} sb Array used as a string builder.\n */\nSerializer.prototype.serializeString_ = function(s, sb) {\n  // The official JSON implementation does not work with international\n  // characters.\n  sb.push('\"', s.replace(Serializer.charsToReplace_, function(c) {\n    // caching the result improves performance by a factor 2-3\n    let rv = Serializer.charToJsonCharCache_[c];\n    if (!rv) {\n      rv = '\\\\u' + (c.charCodeAt(0) | 0x10000).toString(16).slice(1);\n      Serializer.charToJsonCharCache_[c] = rv;\n    }\n    return rv;\n  }), '\"');\n};\n\n/**\n * Serializes a number to a JSON string\n * @private\n * @param {number} n The number to serialize.\n * @param {Array<string>} sb Array used as a string builder.\n */\nSerializer.prototype.serializeNumber_ = function(n, sb) {\n  sb.push(isFinite(n) && !isNaN(n) ? String(n) : 'null');\n};\n\n/**\n * Serializes an array to a JSON string\n * @param {Array<string>} arr The array to serialize.\n * @param {Array<string>} sb Array used as a string builder.\n * @protected\n */\nSerializer.prototype.serializeArray = function(arr, sb) {\n  const l = arr.length;\n  sb.push('[');\n  let sep = '';\n  for (let i = 0; i < l; i++) {\n    sb.push(sep);\n\n    const value = arr[i];\n    this.serializeInternal(\n        this.replacer_ ? this.replacer_.call(arr, String(i), value) : value,\n        sb);\n\n    sep = ',';\n  }\n  sb.push(']');\n};\n\n/**\n * Serializes an object to a JSON string\n * @private\n * @param {!Object} obj The object to serialize.\n * @param {Array<string>} sb Array used as a string builder.\n */\nSerializer.prototype.serializeObject_ = function(obj, sb) {\n  sb.push('{');\n  let sep = '';\n  for (const key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) {\n      const value = obj[key];\n      // Skip functions.\n      if (typeof value != 'function') {\n        sb.push(sep);\n        this.serializeString_(key, sb);\n        sb.push(':');\n\n        this.serializeInternal(\n            this.replacer_ ? this.replacer_.call(obj, key, value) : value, sb);\n\n        sep = ',';\n      }\n    }\n  }\n  sb.push('}');\n};\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n\nexports.Replacer = Replacer;\nexports.Reviver = Reviver;\nexports.Serializer = Serializer;\nexports.USE_NATIVE_JSON = USE_NATIVE_JSON;\nexports.isValid = isValid;\nexports.parse = parse;\nexports.serialize = serialize;\nexports.setErrorLogger = setErrorLogger;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Low level handling of XMLHttpRequest.\n */\n\ngoog.provide('goog.net.DefaultXmlHttpFactory');\ngoog.provide('goog.net.XmlHttp');\ngoog.provide('goog.net.XmlHttp.ReadyState');\n\ngoog.require('goog.net.XmlHttpFactory');\ngoog.requireType('goog.net.XhrLike');\n\n\n/**\n * Static class for creating XMLHttpRequest objects.\n * @return {!goog.net.XhrLike.OrNative} A new XMLHttpRequest object.\n */\ngoog.net.XmlHttp = function() {\n  'use strict';\n  return goog.net.XmlHttp.factory_.createInstance();\n};\n\n\n\n/**\n * Status constants for XMLHTTP, matches:\n * https://msdn.microsoft.com/en-us/library/ms534361(v=vs.85).aspx\n * @enum {number}\n */\ngoog.net.XmlHttp.ReadyState = {\n  /**\n   * Constant for when xmlhttprequest.readyState is uninitialized\n   */\n  UNINITIALIZED: 0,\n\n  /**\n   * Constant for when xmlhttprequest.readyState is loading.\n   */\n  LOADING: 1,\n\n  /**\n   * Constant for when xmlhttprequest.readyState is loaded.\n   */\n  LOADED: 2,\n\n  /**\n   * Constant for when xmlhttprequest.readyState is in an interactive state.\n   */\n  INTERACTIVE: 3,\n\n  /**\n   * Constant for when xmlhttprequest.readyState is completed\n   */\n  COMPLETE: 4,\n};\n\n\n/**\n * The global factory instance for creating XMLHttpRequest objects.\n * @type {goog.net.XmlHttpFactory}\n * @private\n */\ngoog.net.XmlHttp.factory_;\n\n\n/**\n * Sets the global factory object.\n * @param {!goog.net.XmlHttpFactory} factory New global factory object.\n */\ngoog.net.XmlHttp.setGlobalFactory = function(factory) {\n  'use strict';\n  goog.net.XmlHttp.factory_ = factory;\n};\n\n\n\n/**\n * Default factory to use when creating xhr objects.  You probably shouldn't be\n * instantiating this directly, but rather using it via goog.net.XmlHttp.\n * @extends {goog.net.XmlHttpFactory}\n * @constructor\n */\ngoog.net.DefaultXmlHttpFactory = function() {\n  'use strict';\n  goog.net.XmlHttpFactory.call(this);\n};\ngoog.inherits(goog.net.DefaultXmlHttpFactory, goog.net.XmlHttpFactory);\n\n\n/** @override */\ngoog.net.DefaultXmlHttpFactory.prototype.createInstance = function() {\n  'use strict';\n  return new XMLHttpRequest();\n};\n\n\n// Set the global factory to an instance of the default factory.\ngoog.net.XmlHttp.setGlobalFactory(new goog.net.DefaultXmlHttpFactory());\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Simple utilities for dealing with URI strings.\n *\n * This package is deprecated in favour of the Closure URL package (goog.url)\n * when manipulating URIs for use by a browser. This package uses regular\n * expressions to parse a potential URI which can fall out of sync with how a\n * browser will actually interpret the URI. See\n * `goog.uri.utils.setUrlPackageSupportLoggingHandler` for one way to identify\n * URIs that should instead be parsed using the URL package.\n *\n * This is intended to be a lightweight alternative to constructing goog.Uri\n * objects.  Whereas goog.Uri adds several kilobytes to the binary regardless\n * of how much of its functionality you use, this is designed to be a set of\n * mostly-independent utilities so that the compiler includes only what is\n * necessary for the task.  Estimated savings of porting is 5k pre-gzip and\n * 1.5k post-gzip.  To ensure the savings remain, future developers should\n * avoid adding new functionality to existing functions, but instead create\n * new ones and factor out shared code.\n *\n * Many of these utilities have limited functionality, tailored to common\n * cases.  The query parameter utilities assume that the parameter keys are\n * already encoded, since most keys are compile-time alphanumeric strings.  The\n * query parameter mutation utilities also do not tolerate fragment identifiers.\n *\n * By design, these functions can be slower than goog.Uri equivalents.\n * Repeated calls to some of functions may be quadratic in behavior for IE,\n * although the effect is somewhat limited given the 2kb limit.\n *\n * One advantage of the limited functionality here is that this approach is\n * less sensitive to differences in URI encodings than goog.Uri, since these\n * functions operate on strings directly, rather than decoding them and\n * then re-encoding.\n *\n * Uses features of RFC 3986 for parsing/formatting URIs:\n *   http://www.ietf.org/rfc/rfc3986.txt\n */\n\ngoog.module('goog.uri.utils');\ngoog.module.declareLegacyNamespace();\n\nconst asserts = goog.require('goog.asserts');\nconst googString = goog.require('goog.string');\n\n/**\n * Character codes inlined to avoid object allocations due to charCode.\n * @enum {number}\n */\nconst CharCode = {\n  AMPERSAND: 38,\n  EQUAL: 61,\n  HASH: 35,\n  QUESTION: 63\n};\n\n/**\n * Builds a URI string from already-encoded parts.\n *\n * No encoding is performed.  Any component may be omitted as either null or\n * undefined.\n *\n * @param {?string=} opt_scheme The scheme such as 'http'.\n * @param {?string=} opt_userInfo The user name before the '@'.\n * @param {?string=} opt_domain The domain such as 'www.google.com', already\n *     URI-encoded.\n * @param {(string|number|null)=} opt_port The port number.\n * @param {?string=} opt_path The path, already URI-encoded.  If it is not\n *     empty, it must begin with a slash.\n * @param {?string=} opt_queryData The URI-encoded query data.\n * @param {?string=} opt_fragment The URI-encoded fragment identifier.\n * @return {string} The fully combined URI.\n */\nfunction buildFromEncodedParts(\n    opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData,\n    opt_fragment) {\n  let out = '';\n\n  if (opt_scheme) {\n    out += opt_scheme + ':';\n  }\n\n  if (opt_domain) {\n    out += '//';\n\n    if (opt_userInfo) {\n      out += opt_userInfo + '@';\n    }\n\n    out += opt_domain;\n\n    if (opt_port) {\n      out += ':' + opt_port;\n    }\n  }\n\n  if (opt_path) {\n    out += opt_path;\n  }\n\n  if (opt_queryData) {\n    out += '?' + opt_queryData;\n  }\n\n  if (opt_fragment) {\n    out += '#' + opt_fragment;\n  }\n\n  return out;\n}\n\n/**\n * A regular expression for breaking a URI into its component parts.\n * {@link http://www.ietf.org/rfc/rfc3986.txt} says in Appendix B\n * As the \"first-match-wins\" algorithm is identical to the \"greedy\"\n * disambiguation method used by POSIX regular expressions, it is natural and\n * commonplace to use a regular expression for parsing the potential five\n * components of a URI reference.\n * The following line is the regular expression for breaking-down a\n * well-formed URI reference into its components.\n * <pre>\n * ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?\n *  12            3  4          5       6  7        8 9\n * </pre>\n * The numbers in the second line above are only to assist readability; they\n * indicate the reference points for each subexpression (i.e., each paired\n * parenthesis). We refer to the value matched for subexpression <n> as $<n>.\n * For example, matching the above expression to\n * <pre>\n *     http://www.ics.uci.edu/pub/ietf/uri/#Related\n * </pre>\n * results in the following subexpression matches:\n * <pre>\n *    $1 = http:\n *    $2 = http\n *    $3 = //www.ics.uci.edu\n *    $4 = www.ics.uci.edu\n *    $5 = /pub/ietf/uri/\n *    $6 = <undefined>\n *    $7 = <undefined>\n *    $8 = #Related\n *    $9 = Related\n * </pre>\n * where <undefined> indicates that the component is not present, as is the\n * case for the query component in the above example. Therefore, we can\n * determine the value of the five components as\n * <pre>\n *    scheme    = $2\n *    authority = $4\n *    path      = $5\n *    query     = $7\n *    fragment  = $9\n * </pre>\n * The regular expression has been modified slightly to expose the\n * userInfo, domain, and port separately from the authority.\n * The modified version yields\n * <pre>\n *    $1 = http              scheme\n *    $2 = <undefined>       userInfo -\\\n *    $3 = www.ics.uci.edu   domain     | authority\n *    $4 = <undefined>       port     -/\n *    $5 = /pub/ietf/uri/    path\n *    $6 = <undefined>       query without ?\n *    $7 = Related           fragment without #\n * </pre>\n * TODO(jameswr): separate out the authority terminating characters once this\n * file is moved to ES6.\n * @type {!RegExp}\n */\nconst splitRe = new RegExp(\n    '^' +  // Anchor against the entire string.\n    '(?:' +\n    '([^:/?#.]+)' +  // scheme - ignore special characters\n                     // used by other URL parts such as :,\n                     // ?, /, #, and .\n    ':)?' +\n    '(?://' +\n    '(?:([^\\\\\\\\/?#]*)@)?' +  // userInfo\n    '([^\\\\\\\\/?#]*?)' +       // domain\n    '(?::([0-9]+))?' +       // port\n    '(?=[\\\\\\\\/?#]|$)' +      // authority-terminating character.\n    ')?' +\n    '([^?#]+)?' +          // path\n    '(?:\\\\?([^#]*))?' +    // query\n    '(?:#([\\\\s\\\\S]*))?' +  // fragment. Can't use '.*' with 's' flag as Firefox\n                           // doesn't support the flag, and can't use an\n                           // \"everything set\" ([^]) as IE10 doesn't match any\n                           // characters with it.\n    '$');\n\n/**\n * The index of each URI component in the return value of split.\n * @enum {number}\n */\nconst ComponentIndex = {\n  SCHEME: 1,\n  USER_INFO: 2,\n  DOMAIN: 3,\n  PORT: 4,\n  PATH: 5,\n  QUERY_DATA: 6,\n  FRAGMENT: 7\n};\n\n/** @type {?function(string)} */\nlet urlPackageSupportLoggingHandler = null;\n\n/**\n * @param {?function(string)} handler The handler function to call when a URI\n *     with a protocol that is better supported by the Closure URL package is\n *     detected.\n */\nfunction setUrlPackageSupportLoggingHandler(handler) {\n  urlPackageSupportLoggingHandler = handler;\n}\n\n/**\n * Splits a URI into its component parts.\n *\n * Each component can be accessed via the component indices; for example:\n * <pre>\n * split(someStr)[ComponentIndex.QUERY_DATA];\n * </pre>\n *\n * @param {string} uri The URI string to examine.\n * @return {!Array<string|undefined>} Each component still URI-encoded.\n *     Each component that is present will contain the encoded value, whereas\n *     components that are not present will be undefined or empty, depending\n *     on the browser's regular expression implementation.  Never null, since\n *     arbitrary strings may still look like path names.\n */\nfunction split(uri) {\n  // See @return comment -- never null.\n  const result = /** @type {!Array<string|undefined>} */ (uri.match(splitRe));\n  if (urlPackageSupportLoggingHandler &&\n      ['http', 'https', 'ws', 'wss',\n       'ftp'].indexOf(result[ComponentIndex.SCHEME]) >= 0) {\n    urlPackageSupportLoggingHandler(uri);\n  }\n  return result;\n}\n\n/**\n * @param {?string} uri A possibly null string.\n * @param {boolean=} opt_preserveReserved If true, percent-encoding of RFC-3986\n *     reserved characters will not be removed.\n * @return {?string} The string URI-decoded, or null if uri is null.\n */\nfunction decodeIfPossible(uri, opt_preserveReserved) {\n  if (!uri) {\n    return uri;\n  }\n\n  return opt_preserveReserved ? decodeURI(uri) : decodeURIComponent(uri);\n}\n\n/**\n * Gets a URI component by index.\n * It is preferred to use the getPathEncoded() variety of functions ahead,\n * since they are more readable.\n * @param {ComponentIndex} componentIndex The component index.\n * @param {string} uri The URI to examine.\n * @return {?string} The still-encoded component, or null if the component\n *     is not present.\n */\nfunction getComponentByIndex(componentIndex, uri) {\n  // Convert undefined, null, and empty string into null.\n  return split(uri)[componentIndex] || null;\n}\n\n/**\n * @param {string} uri The URI to examine.\n * @return {?string} The protocol or scheme, or null if none.  Does not\n *     include trailing colons or slashes.\n */\nfunction getScheme(uri) {\n  return getComponentByIndex(ComponentIndex.SCHEME, uri);\n}\n\n/**\n * Gets the effective scheme for the URL.  If the URL is relative then the\n * scheme is derived from the page's location.\n * @param {string} uri The URI to examine.\n * @return {string} The protocol or scheme, always lower case.\n */\nfunction getEffectiveScheme(uri) {\n  let scheme = getScheme(uri);\n  if (!scheme && goog.global.self && goog.global.self.location) {\n    const protocol = goog.global.self.location.protocol;\n    scheme = protocol.slice(0, -1);\n  }\n  // NOTE: When called from a web worker in Firefox 3.5, location may be null.\n  // All other browsers with web workers support self.location from the worker.\n  return scheme ? scheme.toLowerCase() : '';\n}\n\n/**\n * @param {string} uri The URI to examine.\n * @return {?string} The user name still encoded, or null if none.\n */\nfunction getUserInfoEncoded(uri) {\n  return getComponentByIndex(ComponentIndex.USER_INFO, uri);\n}\n\n/**\n * @param {string} uri The URI to examine.\n * @return {?string} The decoded user info, or null if none.\n */\nfunction getUserInfo(uri) {\n  return decodeIfPossible(getUserInfoEncoded(uri));\n}\n\n/**\n * @param {string} uri The URI to examine.\n * @return {?string} The domain name still encoded, or null if none.\n */\nfunction getDomainEncoded(uri) {\n  return getComponentByIndex(ComponentIndex.DOMAIN, uri);\n}\n\n/**\n * @param {string} uri The URI to examine.\n * @return {?string} The decoded domain, or null if none.\n */\nfunction getDomain(uri) {\n  return decodeIfPossible(\n      getDomainEncoded(uri), true /* opt_preserveReserved */);\n}\n\n/**\n * @param {string} uri The URI to examine.\n * @return {?number} The port number, or null if none.\n */\nfunction getPort(uri) {\n  // Coerce to a number.  If the result of getComponentByIndex_ is null or\n  // non-numeric, the number coersion yields NaN.  This will then return\n  // null for all non-numeric cases (though also zero, which isn't a relevant\n  // port number).\n  return Number(getComponentByIndex(ComponentIndex.PORT, uri)) || null;\n}\n\n/**\n * @param {string} uri The URI to examine.\n * @return {?string} The path still encoded, or null if none. Includes the\n *     leading slash, if any.\n */\nfunction getPathEncoded(uri) {\n  return getComponentByIndex(ComponentIndex.PATH, uri);\n}\n\n/**\n * @param {string} uri The URI to examine.\n * @return {?string} The decoded path, or null if none.  Includes the leading\n *     slash, if any.\n */\nfunction getPath(uri) {\n  return decodeIfPossible(getPathEncoded(uri), true /* opt_preserveReserved */);\n}\n\n/**\n * @param {string} uri The URI to examine.\n * @return {?string} The query data still encoded, or null if none.  Does not\n *     include the question mark itself.\n */\nfunction getQueryData(uri) {\n  return getComponentByIndex(ComponentIndex.QUERY_DATA, uri);\n}\n\n/**\n * @param {string} uri The URI to examine.\n * @return {?string} The fragment identifier, or null if none.  Does not\n *     include the hash mark itself.\n */\nfunction getFragmentEncoded(uri) {\n  // The hash mark may not appear in any other part of the URL.\n  const hashIndex = uri.indexOf('#');\n  return hashIndex < 0 ? null : uri.slice(hashIndex + 1);\n}\n\n/**\n * @param {string} uri The URI to examine.\n * @param {?string} fragment The encoded fragment identifier, or null if none.\n *     Does not include the hash mark itself.\n * @return {string} The URI with the fragment set.\n */\nfunction setFragmentEncoded(uri, fragment) {\n  return removeFragment(uri) + (fragment ? '#' + fragment : '');\n}\n\n/**\n * @param {string} uri The URI to examine.\n * @return {?string} The decoded fragment identifier, or null if none.  Does\n *     not include the hash mark.\n */\nfunction getFragment(uri) {\n  return decodeIfPossible(getFragmentEncoded(uri));\n}\n\n/**\n * Extracts everything up to the port of the URI.\n * @param {string} uri The URI string.\n * @return {string} Everything up to and including the port.\n */\nfunction getHost(uri) {\n  const pieces = split(uri);\n  return buildFromEncodedParts(\n      pieces[ComponentIndex.SCHEME], pieces[ComponentIndex.USER_INFO],\n      pieces[ComponentIndex.DOMAIN], pieces[ComponentIndex.PORT]);\n}\n\n/**\n * Returns the origin for a given URL.\n * @param {string} uri The URI string.\n * @return {string} Everything up to and including the port.\n */\nfunction getOrigin(uri) {\n  const pieces = split(uri);\n  return buildFromEncodedParts(\n      pieces[ComponentIndex.SCHEME], null /* opt_userInfo */,\n      pieces[ComponentIndex.DOMAIN], pieces[ComponentIndex.PORT]);\n}\n\n/**\n * Extracts the path of the URL and everything after.\n * @param {string} uri The URI string.\n * @return {string} The URI, starting at the path and including the query\n *     parameters and fragment identifier.\n */\nfunction getPathAndAfter(uri) {\n  const pieces = split(uri);\n  return buildFromEncodedParts(\n      null, null, null, null, pieces[ComponentIndex.PATH],\n      pieces[ComponentIndex.QUERY_DATA], pieces[ComponentIndex.FRAGMENT]);\n}\n\n/**\n * Gets the URI with the fragment identifier removed.\n * @param {string} uri The URI to examine.\n * @return {string} Everything preceding the hash mark.\n */\nfunction removeFragment(uri) {\n  // The hash mark may not appear in any other part of the URL.\n  const hashIndex = uri.indexOf('#');\n  return hashIndex < 0 ? uri : uri.slice(0, hashIndex);\n}\n\n/**\n * Ensures that two URI's have the exact same domain, scheme, and port.\n *\n * Unlike the version in goog.Uri, this checks protocol, and therefore is\n * suitable for checking against the browser's same-origin policy.\n *\n * @param {string} uri1 The first URI.\n * @param {string} uri2 The second URI.\n * @return {boolean} Whether they have the same scheme, domain and port.\n */\nfunction haveSameDomain(uri1, uri2) {\n  const pieces1 = split(uri1);\n  const pieces2 = split(uri2);\n  return pieces1[ComponentIndex.DOMAIN] == pieces2[ComponentIndex.DOMAIN] &&\n      pieces1[ComponentIndex.SCHEME] == pieces2[ComponentIndex.SCHEME] &&\n      pieces1[ComponentIndex.PORT] == pieces2[ComponentIndex.PORT];\n}\n\n/**\n * Asserts that there are no fragment or query identifiers, only in uncompiled\n * mode.\n * @param {string} uri The URI to examine.\n */\nfunction assertNoFragmentsOrQueries(uri) {\n  asserts.assert(\n      uri.indexOf('#') < 0 && uri.indexOf('?') < 0,\n      'goog.uri.utils: Fragment or query identifiers are not supported: [%s]',\n      uri);\n}\n\n/**\n * Supported query parameter values by the parameter serializing utilities.\n *\n * If a value is null or undefined, the key-value pair is skipped, as an easy\n * way to omit parameters conditionally.  Non-array parameters are converted\n * to a string and URI encoded.  Array values are expanded into multiple\n * &key=value pairs, with each element stringized and URI-encoded.\n *\n * @typedef {*}\n */\nlet QueryValue;\n\n/**\n * An array representing a set of query parameters with alternating keys\n * and values.\n *\n * Keys are assumed to be URI encoded already and live at even indices.  See\n * goog.uri.utils.QueryValue for details on how parameter values are encoded.\n *\n * Example:\n * <pre>\n * var data = [\n *   // Simple param: ?name=BobBarker\n *   'name', 'BobBarker',\n *   // Conditional param -- may be omitted entirely.\n *   'specialDietaryNeeds', hasDietaryNeeds() ? getDietaryNeeds() : null,\n *   // Multi-valued param: &house=LosAngeles&house=NewYork&house=null\n *   'house', ['LosAngeles', 'NewYork', null]\n * ];\n * </pre>\n *\n * @typedef {!Array<string|goog.uri.utils.QueryValue>}\n */\nlet QueryArray;\n\n/**\n * Parses encoded query parameters and calls callback function for every\n * parameter found in the string.\n *\n * Missing value of parameter (e.g. \u201c\u2026&key&\u2026\u201d) is treated as if the value was an\n * empty string.  Keys may be empty strings (e.g. \u201c\u2026&=value&\u2026\u201d) which also means\n * that \u201c\u2026&=&\u2026\u201d and \u201c\u2026&&\u2026\u201d will result in an empty key and value.\n *\n * @param {string} encodedQuery Encoded query string excluding question mark at\n *     the beginning.\n * @param {function(string, string)} callback Function called for every\n *     parameter found in query string.  The first argument (name) will not be\n *     urldecoded (so the function is consistent with buildQueryData), but the\n *     second will.  If the parameter has no value (i.e. \u201c=\u201d was not present)\n *     the second argument (value) will be an empty string.\n */\nfunction parseQueryData(encodedQuery, callback) {\n  if (!encodedQuery) {\n    return;\n  }\n  const pairs = encodedQuery.split('&');\n  for (let i = 0; i < pairs.length; i++) {\n    const indexOfEquals = pairs[i].indexOf('=');\n    let name = null;\n    let value = null;\n    if (indexOfEquals >= 0) {\n      name = pairs[i].substring(0, indexOfEquals);\n      value = pairs[i].substring(indexOfEquals + 1);\n    } else {\n      name = pairs[i];\n    }\n    callback(name, value ? googString.urlDecode(value) : '');\n  }\n}\n\n/**\n * Split the URI into 3 parts where the [1] is the queryData without a leading\n * '?'. For example, the URI http://foo.com/bar?a=b#abc returns\n * ['http://foo.com/bar','a=b','#abc'].\n * @param {string} uri The URI to parse.\n * @return {!Array<string>} An array representation of uri of length 3 where the\n *     middle value is the queryData without a leading '?'.\n */\nfunction splitQueryData(uri) {\n  // Find the query data and hash.\n  let hashIndex = uri.indexOf('#');\n  if (hashIndex < 0) {\n    hashIndex = uri.length;\n  }\n  let questionIndex = uri.indexOf('?');\n  let queryData;\n  if (questionIndex < 0 || questionIndex > hashIndex) {\n    questionIndex = hashIndex;\n    queryData = '';\n  } else {\n    queryData = uri.substring(questionIndex + 1, hashIndex);\n  }\n  return [uri.slice(0, questionIndex), queryData, uri.slice(hashIndex)];\n}\n\n/**\n * Join an array created by splitQueryData back into a URI.\n * @param {!Array<string>} parts A URI in the form generated by splitQueryData.\n * @return {string} The joined URI.\n */\nfunction joinQueryData(parts) {\n  return parts[0] + (parts[1] ? '?' + parts[1] : '') + parts[2];\n}\n\n/**\n * @param {string} queryData\n * @param {string} newData\n * @return {string}\n */\nfunction appendQueryData(queryData, newData) {\n  if (!newData) {\n    return queryData;\n  }\n  return queryData ? queryData + '&' + newData : newData;\n}\n\n/**\n * @param {string} uri\n * @param {string} queryData\n * @return {string}\n */\nfunction appendQueryDataToUri(uri, queryData) {\n  if (!queryData) {\n    return uri;\n  }\n  const parts = splitQueryData(uri);\n  parts[1] = appendQueryData(parts[1], queryData);\n  return joinQueryData(parts);\n}\n\n/**\n * Appends key=value pairs to an array, supporting multi-valued objects.\n * @param {*} key The key prefix.\n * @param {goog.uri.utils.QueryValue} value The value to serialize.\n * @param {!Array<string>} pairs The array to which the 'key=value' strings\n *     should be appended.\n */\nfunction appendKeyValuePairs(key, value, pairs) {\n  asserts.assertString(key);\n  if (Array.isArray(value)) {\n    // Convince the compiler it's an array.\n    asserts.assertArray(value);\n    for (let j = 0; j < value.length; j++) {\n      // Convert to string explicitly, to short circuit the null and array\n      // logic in this function -- this ensures that null and undefined get\n      // written as literal 'null' and 'undefined', and arrays don't get\n      // expanded out but instead encoded in the default way.\n      appendKeyValuePairs(key, String(value[j]), pairs);\n    }\n  } else if (value != null) {\n    // Skip a top-level null or undefined entirely.\n    pairs.push(\n        key +\n        // Check for empty string. Zero gets encoded into the url as literal\n        // strings.  For empty string, skip the equal sign, to be consistent\n        // with UriBuilder.java.\n        (value === '' ? '' : '=' + googString.urlEncode(value)));\n  }\n}\n\n/**\n * Builds a query data string from a sequence of alternating keys and values.\n * Currently generates \"&key&\" for empty args.\n *\n * @param {!IArrayLike<string|goog.uri.utils.QueryValue>} keysAndValues\n *     Alternating keys and values. See the QueryArray typedef.\n * @param {number=} opt_startIndex A start offset into the arary, defaults to 0.\n * @return {string} The encoded query string, in the form 'a=1&b=2'.\n */\nfunction buildQueryData(keysAndValues, opt_startIndex) {\n  asserts.assert(\n      Math.max(keysAndValues.length - (opt_startIndex || 0), 0) % 2 == 0,\n      'goog.uri.utils: Key/value lists must be even in length.');\n\n  const params = [];\n  for (let i = opt_startIndex || 0; i < keysAndValues.length; i += 2) {\n    const key = /** @type {string} */ (keysAndValues[i]);\n    appendKeyValuePairs(key, keysAndValues[i + 1], params);\n  }\n  return params.join('&');\n}\n\n/**\n * Builds a query data string from a map.\n * Currently generates \"&key&\" for empty args.\n *\n * @param {!Object<string, goog.uri.utils.QueryValue>} map An object where keys\n *     are URI-encoded parameter keys, and the values are arbitrary types\n *     or arrays. Keys with a null value are dropped.\n * @return {string} The encoded query string, in the form 'a=1&b=2'.\n */\nfunction buildQueryDataFromMap(map) {\n  const params = [];\n  for (const key in map) {\n    appendKeyValuePairs(key, map[key], params);\n  }\n  return params.join('&');\n}\n\n/**\n * Appends URI parameters to an existing URI.\n *\n * The variable arguments may contain alternating keys and values.  Keys are\n * assumed to be already URI encoded.  The values should not be URI-encoded,\n * and will instead be encoded by this function.\n * <pre>\n * appendParams('http://www.foo.com?existing=true',\n *     'key1', 'value1',\n *     'key2', 'value?willBeEncoded',\n *     'key3', ['valueA', 'valueB', 'valueC'],\n *     'key4', null);\n * result: 'http://www.foo.com?existing=true&' +\n *     'key1=value1&' +\n *     'key2=value%3FwillBeEncoded&' +\n *     'key3=valueA&key3=valueB&key3=valueC'\n * </pre>\n *\n * A single call to this function will not exhibit quadratic behavior in IE,\n * whereas multiple repeated calls may, although the effect is limited by\n * fact that URL's generally can't exceed 2kb.\n *\n * @param {string} uri The original URI, which may already have query data.\n * @param {...(goog.uri.utils.QueryArray|goog.uri.utils.QueryValue)}\n * var_args\n *     An array or argument list conforming to goog.uri.utils.QueryArray.\n * @return {string} The URI with all query parameters added.\n */\nfunction appendParams(uri, var_args) {\n  const queryData = arguments.length == 2 ? buildQueryData(arguments[1], 0) :\n                                            buildQueryData(arguments, 1);\n  return appendQueryDataToUri(uri, queryData);\n}\n\n/**\n * Appends query parameters from a map.\n *\n * @param {string} uri The original URI, which may already have query data.\n * @param {!Object<goog.uri.utils.QueryValue>} map An object where keys are\n *     URI-encoded parameter keys, and the values are arbitrary types or arrays.\n *     Keys with a null value are dropped.\n * @return {string} The new parameters.\n */\nfunction appendParamsFromMap(uri, map) {\n  const queryData = buildQueryDataFromMap(map);\n  return appendQueryDataToUri(uri, queryData);\n}\n\n/**\n * Appends a single URI parameter.\n *\n * Repeated calls to this can exhibit quadratic behavior in IE6 due to the\n * way string append works, though it should be limited given the 2kb limit.\n *\n * @param {string} uri The original URI, which may already have query data.\n * @param {string} key The key, which must already be URI encoded.\n * @param {*=} opt_value The value, which will be stringized and encoded\n *     (assumed not already to be encoded).  If omitted, undefined, or null, the\n *     key will be added as a valueless parameter.\n * @return {string} The URI with the query parameter added.\n */\nfunction appendParam(uri, key, opt_value) {\n  const value =\n      (opt_value != null) ? '=' + googString.urlEncode(opt_value) : '';\n  return appendQueryDataToUri(uri, key + value);\n}\n\n/**\n * Finds the next instance of a query parameter with the specified name.\n * Does not instantiate any objects.\n * @param {string} uri The URI to search.  May contain a fragment identifier\n *     if opt_hashIndex is specified.\n * @param {number} startIndex The index to begin searching for the key at.  A\n *     match may be found even if this is one character after the ampersand.\n * @param {string} keyEncoded The URI-encoded key.\n * @param {number} hashOrEndIndex Index to stop looking at.  If a hash\n *     mark is present, it should be its index, otherwise it should be the\n *     length of the string.\n * @return {number} The position of the first character in the key's name,\n *     immediately after either a question mark or a dot.\n */\nfunction findParam(uri, startIndex, keyEncoded, hashOrEndIndex) {\n  let index = startIndex;\n  const keyLength = keyEncoded.length;\n\n  // Search for the key itself and post-filter for surronuding punctuation,\n  // rather than expensively building a regexp.\n  while ((index = uri.indexOf(keyEncoded, index)) >= 0 &&\n         index < hashOrEndIndex) {\n    const precedingChar = uri.charCodeAt(index - 1);\n    // Ensure that the preceding character is '&' or '?'.\n    if (precedingChar == CharCode.AMPERSAND ||\n        precedingChar == CharCode.QUESTION) {\n      // Ensure the following character is '&', '=', '#', or NaN\n      // (end of string).\n      const followingChar = uri.charCodeAt(index + keyLength);\n      if (!followingChar || followingChar == CharCode.EQUAL ||\n          followingChar == CharCode.AMPERSAND ||\n          followingChar == CharCode.HASH) {\n        return index;\n      }\n    }\n    index += keyLength + 1;\n  }\n\n  return -1;\n}\n\n/**\n * Regular expression for finding a hash mark or end of string.\n * @type {RegExp}\n */\nconst hashOrEndRe = /#|$/;\n\n/**\n * Determines if the URI contains a specific key.\n *\n * Performs no object instantiations.\n *\n * @param {string} uri The URI to process.  May contain a fragment\n *     identifier.\n * @param {string} keyEncoded The URI-encoded key.  Case-sensitive.\n * @return {boolean} Whether the key is present.\n */\nfunction hasParam(uri, keyEncoded) {\n  return findParam(uri, 0, keyEncoded, uri.search(hashOrEndRe)) >= 0;\n}\n\n/**\n * Gets the first value of a query parameter.\n * @param {string} uri The URI to process.  May contain a fragment.\n * @param {string} keyEncoded The URI-encoded key.  Case-sensitive.\n * @return {?string} The first value of the parameter (URI-decoded), or null\n *     if the parameter is not found.\n */\nfunction getParamValue(uri, keyEncoded) {\n  const hashOrEndIndex = uri.search(hashOrEndRe);\n  let foundIndex = findParam(uri, 0, keyEncoded, hashOrEndIndex);\n\n  if (foundIndex < 0) {\n    return null;\n  } else {\n    let endPosition = uri.indexOf('&', foundIndex);\n    if (endPosition < 0 || endPosition > hashOrEndIndex) {\n      endPosition = hashOrEndIndex;\n    }\n    // Progress forth to the end of the \"key=\" or \"key&\" substring.\n    foundIndex += keyEncoded.length + 1;\n    return googString.urlDecode(\n        uri.slice(foundIndex, endPosition !== -1 ? endPosition : 0));\n  }\n}\n\n/**\n * Gets all values of a query parameter.\n * @param {string} uri The URI to process.  May contain a fragment.\n * @param {string} keyEncoded The URI-encoded key.  Case-sensitive.\n * @return {!Array<string>} All URI-decoded values with the given key.\n *     If the key is not found, this will have length 0, but never be null.\n */\nfunction getParamValues(uri, keyEncoded) {\n  const hashOrEndIndex = uri.search(hashOrEndRe);\n  let position = 0;\n  let foundIndex;\n  const result = [];\n\n  while ((foundIndex = findParam(uri, position, keyEncoded, hashOrEndIndex)) >=\n         0) {\n    // Find where this parameter ends, either the '&' or the end of the\n    // query parameters.\n    position = uri.indexOf('&', foundIndex);\n    if (position < 0 || position > hashOrEndIndex) {\n      position = hashOrEndIndex;\n    }\n\n    // Progress forth to the end of the \"key=\" or \"key&\" substring.\n    foundIndex += keyEncoded.length + 1;\n    result.push(\n        googString.urlDecode(uri.slice(foundIndex, Math.max(position, 0))));\n  }\n\n  return result;\n}\n\n/**\n * Regexp to find trailing question marks and ampersands.\n * @type {RegExp}\n */\nconst trailingQueryPunctuationRe = /[?&]($|#)/;\n\n/**\n * Removes all instances of a query parameter.\n * @param {string} uri The URI to process.  Must not contain a fragment.\n * @param {string} keyEncoded The URI-encoded key.\n * @return {string} The URI with all instances of the parameter removed.\n */\nfunction removeParam(uri, keyEncoded) {\n  const hashOrEndIndex = uri.search(hashOrEndRe);\n  let position = 0;\n  let foundIndex;\n  const buffer = [];\n\n  // Look for a query parameter.\n  while ((foundIndex = findParam(uri, position, keyEncoded, hashOrEndIndex)) >=\n         0) {\n    // Get the portion of the query string up to, but not including, the ?\n    // or & starting the parameter.\n    buffer.push(uri.substring(position, foundIndex));\n    // Progress to immediately after the '&'.  If not found, go to the end.\n    // Avoid including the hash mark.\n    position = Math.min(\n        (uri.indexOf('&', foundIndex) + 1) || hashOrEndIndex, hashOrEndIndex);\n  }\n\n  // Append everything that is remaining.\n  buffer.push(uri.slice(position));\n\n  // Join the buffer, and remove trailing punctuation that remains.\n  return buffer.join('').replace(trailingQueryPunctuationRe, '$1');\n}\n\n/**\n * Replaces all existing definitions of a parameter with a single definition.\n *\n * Repeated calls to this can exhibit quadratic behavior due to the need to\n * find existing instances and reconstruct the string, though it should be\n * limited given the 2kb limit.  Consider using appendParams or setParamsFromMap\n * to update multiple parameters in bulk.\n *\n * @param {string} uri The original URI, which may already have query data.\n * @param {string} keyEncoded The key, which must already be URI encoded.\n * @param {*} value The value, which will be stringized and encoded (assumed\n *     not already to be encoded).\n * @return {string} The URI with the query parameter added.\n */\nfunction setParam(uri, keyEncoded, value) {\n  return appendParam(removeParam(uri, keyEncoded), keyEncoded, value);\n}\n\n/**\n * Effeciently set or remove multiple query parameters in a URI. Order of\n * unchanged parameters will not be modified, all updated parameters will be\n * appended to the end of the query. Params with values of null or undefined are\n * removed.\n *\n * @param {string} uri The URI to process.\n * @param {!Object<string, goog.uri.utils.QueryValue>} params A list of\n *     parameters to update. If null or undefined, the param will be removed.\n * @return {string} An updated URI where the query data has been updated with\n *     the params.\n */\nfunction setParamsFromMap(uri, params) {\n  const parts = splitQueryData(uri);\n  const queryData = parts[1];\n  const buffer = [];\n  if (queryData) {\n    queryData.split('&').forEach(function(pair) {\n      const indexOfEquals = pair.indexOf('=');\n      const name = indexOfEquals >= 0 ? pair.slice(0, indexOfEquals) : pair;\n      if (!params.hasOwnProperty(name)) {\n        buffer.push(pair);\n      }\n    });\n  }\n  parts[1] = appendQueryData(buffer.join('&'), buildQueryDataFromMap(params));\n  return joinQueryData(parts);\n}\n\n/**\n * Generates a URI path using a given URI and a path with checks to\n * prevent consecutive \"//\". The baseUri passed in must not contain\n * query or fragment identifiers. The path to append may not contain query or\n * fragment identifiers.\n *\n * @param {string} baseUri URI to use as the base.\n * @param {string} path Path to append.\n * @return {string} Updated URI.\n */\nfunction appendPath(baseUri, path) {\n  assertNoFragmentsOrQueries(baseUri);\n\n  // Remove any trailing '/'\n  if (googString.endsWith(baseUri, '/')) {\n    baseUri = baseUri.slice(0, -1);\n  }\n  // Remove any leading '/'\n  if (googString.startsWith(path, '/')) {\n    path = path.slice(1);\n  }\n  return '' + baseUri + '/' + path;\n}\n\n/**\n * Replaces the path.\n * @param {string} uri URI to use as the base.\n * @param {string} path New path.\n * @return {string} Updated URI.\n */\nfunction setPath(uri, path) {\n  // Add any missing '/'.\n  if (!googString.startsWith(path, '/')) {\n    path = '/' + path;\n  }\n  const parts = split(uri);\n  return buildFromEncodedParts(\n      parts[ComponentIndex.SCHEME], parts[ComponentIndex.USER_INFO],\n      parts[ComponentIndex.DOMAIN], parts[ComponentIndex.PORT], path,\n      parts[ComponentIndex.QUERY_DATA], parts[ComponentIndex.FRAGMENT]);\n}\n\n/**\n * Standard supported query parameters.\n * @enum {string}\n */\nconst StandardQueryParam = {\n\n  /** Unused parameter for unique-ifying. */\n  RANDOM: 'zx'\n};\n\n/**\n * Sets the zx parameter of a URI to a random value.\n * @param {string} uri Any URI.\n * @return {string} That URI with the \"zx\" parameter added or replaced to\n *     contain a random string.\n */\nfunction makeUnique(uri) {\n  return setParam(uri, StandardQueryParam.RANDOM, googString.getRandomString());\n}\n\nexports = {\n  ComponentIndex,\n  StandardQueryParam,\n  QueryArray,\n  QueryValue,\n  appendParam,\n  appendParams,\n  appendParamsFromMap,\n  appendPath,\n  buildFromEncodedParts,\n  buildQueryData,\n  buildQueryDataFromMap,\n  getDomain,\n  getDomainEncoded,\n  getEffectiveScheme,\n  getFragment,\n  getFragmentEncoded,\n  getHost,\n  getOrigin,\n  getParamValue,\n  getParamValues,\n  getPath,\n  getPathAndAfter,\n  getPathEncoded,\n  getPort,\n  getQueryData,\n  getScheme,\n  getUserInfo,\n  getUserInfoEncoded,\n  hasParam,\n  haveSameDomain,\n  makeUnique,\n  parseQueryData,\n  removeFragment,\n  removeParam,\n  setFragmentEncoded,\n  setParam,\n  setParamsFromMap,\n  setPath,\n  setUrlPackageSupportLoggingHandler,\n  split,\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Error codes shared between goog.net.IframeIo and\n * goog.net.XhrIo.\n */\ngoog.module('goog.net.ErrorCode');\ngoog.module.declareLegacyNamespace();\n\n/**\n * Error codes\n * @enum {number}\n */\nconst ErrorCode = {\n\n  /**\n   * There is no error condition.\n   */\n  NO_ERROR: 0,\n\n  /**\n   * The most common error from iframeio, unfortunately, is that the browser\n   * responded with an error page that is classed as a different domain. The\n   * situations, are when a browser error page  is shown -- 404, access denied,\n   * DNS failure, connection reset etc.)\n   *\n   */\n  ACCESS_DENIED: 1,\n\n  /**\n   * Currently the only case where file not found will be caused is when the\n   * code is running on the local file system and a non-IE browser makes a\n   * request to a file that doesn't exist.\n   */\n  FILE_NOT_FOUND: 2,\n\n  /**\n   * If Firefox shows a browser error page, such as a connection reset by\n   * server or access denied, then it will fail silently without the error or\n   * load handlers firing.\n   */\n  FF_SILENT_ERROR: 3,\n\n  /**\n   * Custom error provided by the client through the error check hook.\n   */\n  CUSTOM_ERROR: 4,\n\n  /**\n   * Exception was thrown while processing the request.\n   */\n  EXCEPTION: 5,\n\n  /**\n   * The Http response returned a non-successful http status code.\n   */\n  HTTP_ERROR: 6,\n\n  /**\n   * The request was aborted.\n   */\n  ABORT: 7,\n\n  /**\n   * The request timed out.\n   */\n  TIMEOUT: 8,\n\n  /**\n   * The resource is not available offline.\n   */\n  OFFLINE: 9,\n};\n\n/**\n * Returns a friendly error message for an error code. These messages are for\n * debugging and are not localized.\n * @param {!ErrorCode} errorCode An error code.\n * @return {string} A message for debugging.\n */\nErrorCode.getDebugMessage = function(errorCode) {\n  switch (errorCode) {\n    case ErrorCode.NO_ERROR:\n      return 'No Error';\n\n    case ErrorCode.ACCESS_DENIED:\n      return 'Access denied to content document';\n\n    case ErrorCode.FILE_NOT_FOUND:\n      return 'File not found';\n\n    case ErrorCode.FF_SILENT_ERROR:\n      return 'Firefox silently errored';\n\n    case ErrorCode.CUSTOM_ERROR:\n      return 'Application custom error';\n\n    case ErrorCode.EXCEPTION:\n      return 'An exception occurred';\n\n    case ErrorCode.HTTP_ERROR:\n      return 'Http response at 400 or 500 level';\n\n    case ErrorCode.ABORT:\n      return 'Request was aborted';\n\n    case ErrorCode.TIMEOUT:\n      return 'Request timed out';\n\n    case ErrorCode.OFFLINE:\n      return 'The resource is not available offline';\n\n    default:\n      return 'Unrecognized error code';\n  }\n};\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n\nexports = ErrorCode;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Common events for the network classes.\n */\n\n\ngoog.provide('goog.net.EventType');\n\n\n/**\n * Event names for network events\n * @enum {string}\n */\ngoog.net.EventType = {\n  COMPLETE: 'complete',\n  SUCCESS: 'success',\n  ERROR: 'error',\n  ABORT: 'abort',\n  READY: 'ready',\n  READY_STATE_CHANGE: 'readystatechange',\n  TIMEOUT: 'timeout',\n  INCREMENTAL_DATA: 'incrementaldata',\n  PROGRESS: 'progress',\n  // DOWNLOAD_PROGRESS and UPLOAD_PROGRESS are special events dispatched by\n  // goog.net.XhrIo to allow binding listeners specific to each type of\n  // progress.\n  DOWNLOAD_PROGRESS: 'downloadprogress',\n  UPLOAD_PROGRESS: 'uploadprogress',\n};\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n","/**\n * @fileoverview An interface for the XhrIo send operation so that mock versions\n * of it can be provided by our tests.\n */\n\nimport {EventType} from 'google3/third_party/javascript/closure/net/eventtype';\nimport {XhrIo} from 'google3/third_party/javascript/closure/net/xhrio';\nimport {XmlHttpFactory} from 'google3/third_party/javascript/closure/net/xmlhttpfactory';\nimport {Uri} from 'google3/third_party/javascript/closure/uri/uri';\n\n/** A map of HTTP header names to values. */\nexport interface Headers {\n  [tag: string]: string;\n}\n\n/** An interface for the XhrIo send operation. */\nexport interface XhrIoInterface {\n  send(\n    url: string | Uri,\n    callback: (this: XhrIo, event: Event) => void,\n    method: string,\n    content: string,\n    headers: Headers,\n    timeoutInterval?: number,\n    withCredentials?: boolean,\n  ): void;\n}\n\n/**\n * Creates an implementation of XhrIoInterface that uses the real XhrIo.\n * @param factory The factory to use for creating the XhrIo instances.\n */\nexport function makeRealXhrIo(factory?: XmlHttpFactory): XhrIoInterface {\n  return {\n    send(\n      url: string | Uri,\n      callback: (this: XhrIo, event: Event) => void,\n      method: string,\n      content: string,\n      headers: Headers,\n      timeoutInterval?: number,\n      withCredentials?: boolean,\n    ) {\n      // This is essentially an inlined copy of the static XhrIo.send, but with\n      // the instance constructed using the provided factory.\n      const xhrIo = new XhrIo(factory);\n      xhrIo.listen(EventType.COMPLETE, callback);\n      xhrIo.listenOnce(EventType.READY, () => {\n        xhrIo.dispose();\n      });\n      if (timeoutInterval) {\n        xhrIo.setTimeoutInterval(timeoutInterval);\n      }\n      if (withCredentials) {\n        xhrIo.setWithCredentials(withCredentials);\n      }\n      xhrIo.send(url, method, content, headers);\n      return xhrIo;\n    },\n  };\n}\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Generics method for collection-like classes and objects.\n *\n *\n * This file contains functions to work with collections. It supports using\n * Map, Set, Array and Object and other classes that implement collection-like\n * methods.\n * @suppress {strictMissingProperties}\n */\n\n\ngoog.provide('goog.structs');\n\ngoog.require('goog.array');\ngoog.require('goog.object');\n\n\n// We treat an object as a dictionary if it has getKeys or it is an object that\n// isn't arrayLike.\n\n\n/**\n * Returns the number of values in the collection-like object.\n * @param {Object} col The collection-like object.\n * @return {number} The number of values in the collection-like object.\n */\ngoog.structs.getCount = function(col) {\n  'use strict';\n  if (col.getCount && typeof col.getCount == 'function') {\n    return col.getCount();\n  }\n  if (goog.isArrayLike(col) || typeof col === 'string') {\n    return col.length;\n  }\n  return goog.object.getCount(col);\n};\n\n\n/**\n * Returns the values of the collection-like object.\n * @param {Object} col The collection-like object.\n * @return {!Array<?>} The values in the collection-like object.\n */\ngoog.structs.getValues = function(col) {\n  'use strict';\n  if (col.getValues && typeof col.getValues == 'function') {\n    return col.getValues();\n  }\n  // ES6 Map and Set both define a values function that returns an iterator.\n  // The typeof check allows the compiler to remove the Map and Set polyfills\n  // if they are otherwise unused throughout the entire binary.\n  if ((typeof Map !== 'undefined' && col instanceof Map) ||\n      (typeof Set !== 'undefined' && col instanceof Set)) {\n    return Array.from(col.values());\n  }\n  if (typeof col === 'string') {\n    return col.split('');\n  }\n  if (goog.isArrayLike(col)) {\n    const rv = [];\n    const l = col.length;\n    for (let i = 0; i < l; i++) {\n      rv.push(col[i]);\n    }\n    return rv;\n  }\n  return goog.object.getValues(col);\n};\n\n\n/**\n * Returns the keys of the collection. Some collections have no notion of\n * keys/indexes and this function will return undefined in those cases.\n * @param {Object} col The collection-like object.\n * @return {!Array|undefined} The keys in the collection.\n */\ngoog.structs.getKeys = function(col) {\n  'use strict';\n  if (col.getKeys && typeof col.getKeys == 'function') {\n    return col.getKeys();\n  }\n  // if we have getValues but no getKeys we know this is a key-less collection\n  if (col.getValues && typeof col.getValues == 'function') {\n    return undefined;\n  }\n  // ES6 Map and Set both define a keys function that returns an iterator. For\n  // Sets this iterates over the same values as the values iterator.\n  // The typeof check allows the compiler to remove the Map and Set polyfills\n  // if they are otherwise unused throughout the entire binary.\n  if (typeof Map !== 'undefined' && col instanceof Map) {\n    return Array.from(col.keys());\n  }\n  // Unlike the native Set, goog.structs.Set does not expose keys as the values.\n  if (typeof Set !== 'undefined' && col instanceof Set) {\n    return undefined;\n  }\n  if (goog.isArrayLike(col) || typeof col === 'string') {\n    const rv = [];\n    const l = col.length;\n    for (let i = 0; i < l; i++) {\n      rv.push(i);\n    }\n    return rv;\n  }\n\n  return goog.object.getKeys(col);\n};\n\n\n/**\n * Whether the collection contains the given value. This is O(n) and uses\n * equals (==) to test the existence.\n * @param {Object} col The collection-like object.\n * @param {*} val The value to check for.\n * @return {boolean} True if the map contains the value.\n */\ngoog.structs.contains = function(col, val) {\n  'use strict';\n  if (col.contains && typeof col.contains == 'function') {\n    return col.contains(val);\n  }\n  if (col.containsValue && typeof col.containsValue == 'function') {\n    return col.containsValue(val);\n  }\n  if (goog.isArrayLike(col) || typeof col === 'string') {\n    return goog.array.contains(/** @type {!Array<?>} */ (col), val);\n  }\n  return goog.object.containsValue(col, val);\n};\n\n\n/**\n * Whether the collection is empty.\n * @param {Object} col The collection-like object.\n * @return {boolean} True if empty.\n */\ngoog.structs.isEmpty = function(col) {\n  'use strict';\n  if (col.isEmpty && typeof col.isEmpty == 'function') {\n    return col.isEmpty();\n  }\n\n  // We do not use goog.string.isEmptyOrWhitespace because here we treat the\n  // string as\n  // collection and as such even whitespace matters\n\n  if (goog.isArrayLike(col) || typeof col === 'string') {\n    return /** @type {!Array<?>} */ (col).length === 0;\n  }\n  return goog.object.isEmpty(col);\n};\n\n\n/**\n * Removes all the elements from the collection.\n * @param {Object} col The collection-like object.\n * @return {void}\n */\ngoog.structs.clear = function(col) {\n  'use strict';\n  // NOTE(arv): This should not contain strings because strings are immutable\n  if (col.clear && typeof col.clear == 'function') {\n    col.clear();\n  } else if (goog.isArrayLike(col)) {\n    goog.array.clear(/** @type {IArrayLike<?>} */ (col));\n  } else {\n    goog.object.clear(col);\n  }\n};\n\n\n/**\n * Calls a function for each value in a collection. The function takes\n * three arguments; the value, the key and the collection.\n *\n * @param {S} col The collection-like object.\n * @param {function(this:T,?,?,S):?} f The function to call for every value.\n *     This function takes\n *     3 arguments (the value, the key or undefined if the collection has no\n *     notion of keys, and the collection) and the return value is irrelevant.\n * @param {T=} opt_obj The object to be used as the value of 'this'\n *     within `f`.\n * @return {void}\n * @template T,S\n * @deprecated Use a more specific method, e.g. native Array.prototype.forEach,\n *     or for-of.\n */\ngoog.structs.forEach = function(col, f, opt_obj) {\n  'use strict';\n  if (col.forEach && typeof col.forEach == 'function') {\n    col.forEach(f, opt_obj);\n  } else if (goog.isArrayLike(col) || typeof col === 'string') {\n    Array.prototype.forEach.call(/** @type {!Array<?>} */ (col), f, opt_obj);\n  } else {\n    const keys = goog.structs.getKeys(col);\n    const values = goog.structs.getValues(col);\n    const l = values.length;\n    for (let i = 0; i < l; i++) {\n      f.call(/** @type {?} */ (opt_obj), values[i], keys && keys[i], col);\n    }\n  }\n};\n\n\n/**\n * Calls a function for every value in the collection. When a call returns true,\n * adds the value to a new collection (Array is returned by default).\n *\n * @param {S} col The collection-like object.\n * @param {function(this:T,?,?,S):boolean} f The function to call for every\n *     value. This function takes\n *     3 arguments (the value, the key or undefined if the collection has no\n *     notion of keys, and the collection) and should return a Boolean. If the\n *     return value is true the value is added to the result collection. If it\n *     is false the value is not included.\n * @param {T=} opt_obj The object to be used as the value of 'this'\n *     within `f`.\n * @return {!Object|!Array<?>} A new collection where the passed values are\n *     present. If col is a key-less collection an array is returned.  If col\n *     has keys and values a plain old JS object is returned.\n * @template T,S\n */\ngoog.structs.filter = function(col, f, opt_obj) {\n  'use strict';\n  if (typeof col.filter == 'function') {\n    return col.filter(f, opt_obj);\n  }\n  if (goog.isArrayLike(col) || typeof col === 'string') {\n    return Array.prototype.filter.call(\n        /** @type {!Array<?>} */ (col), f, opt_obj);\n  }\n\n  let rv;\n  const keys = goog.structs.getKeys(col);\n  const values = goog.structs.getValues(col);\n  const l = values.length;\n  if (keys) {\n    rv = {};\n    for (let i = 0; i < l; i++) {\n      if (f.call(/** @type {?} */ (opt_obj), values[i], keys[i], col)) {\n        rv[keys[i]] = values[i];\n      }\n    }\n  } else {\n    // We should not use Array#filter here since we want to make sure that\n    // the index is undefined as well as make sure that col is passed to the\n    // function.\n    rv = [];\n    for (let i = 0; i < l; i++) {\n      if (f.call(opt_obj, values[i], undefined, col)) {\n        rv.push(values[i]);\n      }\n    }\n  }\n  return rv;\n};\n\n\n/**\n * Calls a function for every value in the collection and adds the result into a\n * new collection (defaults to creating a new Array).\n *\n * @param {S} col The collection-like object.\n * @param {function(this:T,?,?,S):V} f The function to call for every value.\n *     This function takes 3 arguments (the value, the key or undefined if the\n *     collection has no notion of keys, and the collection) and should return\n *     something. The result will be used as the value in the new collection.\n * @param {T=} opt_obj  The object to be used as the value of 'this'\n *     within `f`.\n * @return {!Object<V>|!Array<V>} A new collection with the new values.  If\n *     col is a key-less collection an array is returned.  If col has keys and\n *     values a plain old JS object is returned.\n * @template T,S,V\n */\ngoog.structs.map = function(col, f, opt_obj) {\n  'use strict';\n  if (typeof col.map == 'function') {\n    return col.map(f, opt_obj);\n  }\n  if (goog.isArrayLike(col) || typeof col === 'string') {\n    return Array.prototype.map.call(/** @type {!Array<?>} */ (col), f, opt_obj);\n  }\n\n  let rv;\n  const keys = goog.structs.getKeys(col);\n  const values = goog.structs.getValues(col);\n  const l = values.length;\n  if (keys) {\n    rv = {};\n    for (let i = 0; i < l; i++) {\n      rv[keys[i]] = f.call(/** @type {?} */ (opt_obj), values[i], keys[i], col);\n    }\n  } else {\n    // We should not use Array#map here since we want to make sure that\n    // the index is undefined as well as make sure that col is passed to the\n    // function.\n    rv = [];\n    for (let i = 0; i < l; i++) {\n      rv[i] = f.call(/** @type {?} */ (opt_obj), values[i], undefined, col);\n    }\n  }\n  return rv;\n};\n\n\n/**\n * Calls f for each value in a collection. If any call returns true this returns\n * true (without checking the rest). If all returns false this returns false.\n *\n * @param {S} col The collection-like object.\n * @param {function(this:T,?,?,S):boolean} f The function to call for every\n *     value. This function takes 3 arguments (the value, the key or undefined\n *     if the collection has no notion of keys, and the collection) and should\n *     return a boolean.\n * @param {T=} opt_obj  The object to be used as the value of 'this'\n *     within `f`.\n * @return {boolean} True if any value passes the test.\n * @template T,S\n */\ngoog.structs.some = function(col, f, opt_obj) {\n  'use strict';\n  if (typeof col.some == 'function') {\n    return col.some(f, opt_obj);\n  }\n  if (goog.isArrayLike(col) || typeof col === 'string') {\n    return Array.prototype.some.call(\n        /** @type {!Array<?>} */ (col), f, opt_obj);\n  }\n  const keys = goog.structs.getKeys(col);\n  const values = goog.structs.getValues(col);\n  const l = values.length;\n  for (let i = 0; i < l; i++) {\n    if (f.call(/** @type {?} */ (opt_obj), values[i], keys && keys[i], col)) {\n      return true;\n    }\n  }\n  return false;\n};\n\n\n/**\n * Calls f for each value in a collection. If all calls return true this return\n * true this returns true. If any returns false this returns false at this point\n *  and does not continue to check the remaining values.\n *\n * @param {S} col The collection-like object.\n * @param {function(this:T,?,?,S):boolean} f The function to call for every\n *     value. This function takes 3 arguments (the value, the key or\n *     undefined if the collection has no notion of keys, and the collection)\n *     and should return a boolean.\n * @param {T=} opt_obj  The object to be used as the value of 'this'\n *     within `f`.\n * @return {boolean} True if all key-value pairs pass the test.\n * @template T,S\n */\ngoog.structs.every = function(col, f, opt_obj) {\n  'use strict';\n  if (typeof col.every == 'function') {\n    return col.every(f, opt_obj);\n  }\n  if (goog.isArrayLike(col) || typeof col === 'string') {\n    return Array.prototype.every.call(\n        /** @type {!Array<?>} */ (col), f, opt_obj);\n  }\n  const keys = goog.structs.getKeys(col);\n  const values = goog.structs.getValues(col);\n  const l = values.length;\n  for (let i = 0; i < l; i++) {\n    if (!f.call(/** @type {?} */ (opt_obj), values[i], keys && keys[i], col)) {\n      return false;\n    }\n  }\n  return true;\n};\n","import {Message} from 'google3/javascript/apps/jspb/message';\nimport {ErrorCode} from 'google3/third_party/javascript/closure/net/errorcode';\nimport {XhrIo} from 'google3/third_party/javascript/closure/net/xhrio';\nimport {Uri} from 'google3/third_party/javascript/closure/uri/uri';\n\nimport {SafePromise} from './util';\nimport {makeRealXhrIo, XhrIoInterface} from './xhrio';\n\n/** Timeout for HTTP requests. */\nconst DEFAULT_TIMEOUT_MS = 20000;\n\n/** Options for making an HTTP request. */\nexport interface XhrOptions {\n  /** Query parameters to include in the URI. */\n  queryParams?: {[key: string]: string};\n\n  /**\n   * Additional headers to send. Do not include the \"Content-Type\" header here,\n   * as it will be set automatically.\n   */\n  extraHeaders?: {[tag: string]: string};\n\n  /**\n   * Whether this should be sent as a credentialed request. (Only applicable for\n   * cross-domain requests.)\n   *\n   * See google3/third_party/javascript/closure/net/xhrio.js?l=188&rcl=311478605\n   * for more detail.\n   */\n  withCredentials?: boolean;\n\n  /**\n   * A custom timeout for the request. If not specified, then the default\n   * timeout will be applied.\n   */\n  timeoutMs?: number;\n}\n\n/** Errors that can result from HTTP requests. */\nexport class XhrError extends Error {\n  constructor(\n    /** The error code returned by XhrIo. */\n    readonly code: ErrorCode,\n\n    /** A description of the error that occurred. */\n    override readonly message: string,\n\n    /**\n     * The HTTP status code in the response. If undefined, then we did not\n     * receive a response.\n     */\n    readonly status?: number,\n  ) {\n    super(message);\n    // See go/typescript-extending-builtins\n    Object.setPrototypeOf(this, XhrError.prototype);\n    this.name = 'XhrError';\n  }\n}\n\n/**\n * A utility for performing HTTP requests in which the request and response are\n * protos encoded with JsPb.\n */\nexport class JspbClient {\n  constructor(\n    /** The base URI for the server. */\n    private readonly baseUri: Uri,\n    private readonly xhrIo: XhrIoInterface = makeRealXhrIo(),\n  ) {}\n\n  /**\n   * Sends a POST request to the given server with a JSPB-serialized version of\n   * the `request` proto as the body. The path used for the request is the\n   * logical concatenation of the base URI path and the `pathSuffix` (with a\n   * slash being added or omitted as needed). Attempts to parse the response\n   * from the server with `responseCtor`. The returned promise will resolve to\n   * the parsed response if successful, or will fail with an `XhrError` if the\n   * request failed or the response could not be parsed.\n   */\n  post<ResponseT extends Message>(\n    pathSuffix: string,\n    request: Message,\n    responseCtor: new (args?: unknown[] | null) => ResponseT,\n    opts: XhrOptions = {},\n  ): SafePromise<ResponseT, XhrError> {\n    return this.request('POST', pathSuffix, request, responseCtor, opts);\n  }\n\n  /**\n   * Returns the logical concatenation of the base URI path and the `pathSuffix`\n   * (with a slash added as needed, or stripped if redundant in order to ensure\n   * a single slash between the two parts).\n   */\n  static concatPaths(basePath: string, pathSuffix: string): string {\n    if (basePath.endsWith('/')) {\n      basePath = basePath.substring(0, basePath.length - 1);\n    }\n    if (pathSuffix.startsWith('/')) {\n      pathSuffix = pathSuffix.substring(1);\n    }\n    return basePath + '/' + pathSuffix;\n  }\n\n  private request<ResponseT extends Message>(\n    method: string,\n    pathSuffix: string,\n    request: Message,\n    responseCtor: new (args?: unknown[] | null) => ResponseT,\n    opts: XhrOptions,\n  ): SafePromise<ResponseT, XhrError> {\n    const uri = new Uri(this.baseUri);\n    uri.setPath(JspbClient.concatPaths(uri.getPath(), pathSuffix));\n    if (opts.queryParams) {\n      for (const [key, value] of Object.entries(opts.queryParams)) {\n        uri.setParameterValue(key, value);\n      }\n    }\n\n    // Prepare the headers.\n    const headers: {[tag: string]: string} = {\n      'Content-type': 'application/json+protobuf',\n    };\n    Object.assign(headers, opts.extraHeaders);\n\n    // Serialize the request proto.\n    const body = request.serialize();\n\n    // Make the request.\n    return SafePromise.create((resolve, reject) => {\n      this.xhrIo.send(\n        uri,\n\n        // Response callback.\n        function (this: XhrIo) {\n          const xhrIo = this;\n          const status =\n            xhrIo.getStatus() === -1 ? undefined : xhrIo.getStatus();\n\n          if (xhrIo.isSuccess()) {\n            try {\n              resolve(\n                Message.deserializeWithCtor(\n                  responseCtor,\n                  xhrIo.getResponseText(),\n                ),\n              );\n            } catch (err) {\n              reject(\n                new XhrError(\n                  ErrorCode.CUSTOM_ERROR,\n                  `Failed to deserialize response from ${uri}: ` +\n                    xhrIo.getResponseText(),\n                  status,\n                ),\n              );\n            }\n          } else {\n            reject(\n              new XhrError(\n                xhrIo.getLastErrorCode(),\n                xhrIo.getLastError(),\n                status,\n              ),\n            );\n          }\n        },\n\n        method,\n        body,\n        headers,\n        opts.timeoutMs ?? DEFAULT_TIMEOUT_MS,\n        opts.withCredentials,\n      );\n    });\n  }\n}\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Static utilities for collecting stats associated with\n * ChannelRequest.\n *\n */\ngoog.module('goog.labs.net.webChannel.requestStats');\ngoog.module.declareLegacyNamespace();\n\nconst GoogEvent = goog.require('goog.events.Event');\nconst GoogEventTarget = goog.require('goog.events.EventTarget');\n\n/**\n * Events fired.\n * @const\n */\nconst Event = {};\n\n/**\n * Singleton event target for firing stat events\n * @type {?GoogEventTarget}\n */\nlet eventTargetInternal = null;\n\n/**\n * Singleton event target for firing stat events\n * @return {!GoogEventTarget}\n */\nfunction getStatEventTargetInternal() {\n  eventTargetInternal = eventTargetInternal || new GoogEventTarget();\n  return eventTargetInternal;\n}\n\n/**\n * The type of event that occurs every time some information about how reachable\n * the server is is discovered.\n */\nEvent.SERVER_REACHABILITY_EVENT = 'serverreachability';\n\n/**\n * Types of events which reveal information about the reachability of the\n * server.\n * @enum {number}\n */\nconst ServerReachability = {\n  REQUEST_MADE: 1,\n  REQUEST_SUCCEEDED: 2,\n  REQUEST_FAILED: 3,\n  BACK_CHANNEL_ACTIVITY: 4  // any response data received\n};\n\n/**\n * Event class for SERVER_REACHABILITY_EVENT.\n *\n * @param {GoogEventTarget} target The stat event target for\n       the channel.\n * @param {ServerReachability} reachabilityType\n *     The reachability event type.\n * @constructor\n * @extends {GoogEvent}\n */\nfunction ServerReachabilityEvent(target, reachabilityType) {\n  GoogEvent.call(this, Event.SERVER_REACHABILITY_EVENT, target);\n\n  /**\n   * @type {ServerReachability}\n   */\n  this.reachabilityType = reachabilityType;\n}\ngoog.inherits(ServerReachabilityEvent, GoogEvent);\n\n/**\n * Notify the channel that a particular fine grained network event has occurred.\n * Should be considered package-private.\n * @param {ServerReachability} reachabilityType\n *     The reachability event type.\n */\nfunction notifyServerReachabilityEvent(reachabilityType) {\n  const target = getStatEventTargetInternal();\n  target.dispatchEvent(new ServerReachabilityEvent(target, reachabilityType));\n}\n\n/**\n * Stat Event that fires when things of interest happen that may be useful for\n * applications to know about for stats or debugging purposes.\n */\nEvent.STAT_EVENT = 'statevent';\n\n/**\n * Enum that identifies events for statistics that are interesting to track.\n * @enum {number}\n */\nconst Stat = {\n  /** Event indicating a new connection attempt. */\n  CONNECT_ATTEMPT: 0,\n\n  /** Event indicating a connection error due to a general network problem. */\n  ERROR_NETWORK: 1,\n\n  /**\n   * Event indicating a connection error that isn't due to a general network\n   * problem.\n   */\n  ERROR_OTHER: 2,\n\n  /** Event indicating the start of test stage one. */\n  TEST_STAGE_ONE_START: 3,\n\n  /** Event indicating the start of test stage two. */\n  TEST_STAGE_TWO_START: 4,\n\n  /** Event indicating the first piece of test data was received. */\n  TEST_STAGE_TWO_DATA_ONE: 5,\n\n  /**\n   * Event indicating that the second piece of test data was received and it was\n   * received separately from the first.\n   */\n  TEST_STAGE_TWO_DATA_TWO: 6,\n\n  /** Event indicating both pieces of test data were received simultaneously. */\n  TEST_STAGE_TWO_DATA_BOTH: 7,\n\n  /** Event indicating stage one of the test request failed. */\n  TEST_STAGE_ONE_FAILED: 8,\n\n  /** Event indicating stage two of the test request failed. */\n  TEST_STAGE_TWO_FAILED: 9,\n\n  /**\n   * Event indicating that a buffering proxy is likely between the client and\n   * the server.\n   */\n  PROXY: 10,\n\n  /**\n   * Event indicating that no buffering proxy is likely between the client and\n   * the server.\n   */\n  NOPROXY: 11,\n\n  /** Event indicating an unknown SID error. */\n  REQUEST_UNKNOWN_SESSION_ID: 12,\n\n  /** Event indicating a bad status code was received. */\n  REQUEST_BAD_STATUS: 13,\n\n  /** Event indicating incomplete data was received */\n  REQUEST_INCOMPLETE_DATA: 14,\n\n  /** Event indicating bad data was received */\n  REQUEST_BAD_DATA: 15,\n\n  /** Event indicating no data was received when data was expected. */\n  REQUEST_NO_DATA: 16,\n\n  /** Event indicating a request timeout. */\n  REQUEST_TIMEOUT: 17,\n\n  /**\n   * Event indicating that the server never received our hanging GET and so it\n   * is being retried.\n   */\n  BACKCHANNEL_MISSING: 18,\n\n  /**\n   * Event indicating that we have determined that our hanging GET is not\n   * receiving data when it should be. Thus it is dead dead and will be retried.\n   */\n  BACKCHANNEL_DEAD: 19,\n\n  /**\n   * The browser declared itself offline during the lifetime of a request, or\n   * was offline when a request was initially made.\n   */\n  BROWSER_OFFLINE: 20\n};\n\n/**\n * Event class for STAT_EVENT.\n *\n * @param {GoogEventTarget} eventTarget The stat event target for\n       the channel.\n * @param {Stat} stat The stat.\n * @constructor\n * @extends {GoogEvent}\n */\nfunction StatEvent(eventTarget, stat) {\n  GoogEvent.call(this, Event.STAT_EVENT, eventTarget);\n\n  /**\n   * The stat\n   * @type {Stat}\n   */\n  this.stat = stat;\n}\ngoog.inherits(StatEvent, GoogEvent);\n\n/**\n * Returns the singleton event target for stat events.\n * @return {!GoogEventTarget} The event target for stat events.\n */\nfunction getStatEventTarget() {\n  return getStatEventTargetInternal();\n}\n\n/**\n * Helper function to call the stat event callback.\n * @param {Stat} stat The stat.\n */\nfunction notifyStatEvent(stat) {\n  const target = getStatEventTargetInternal();\n  target.dispatchEvent(new StatEvent(target, stat));\n}\n\n/**\n * An event that fires when POST requests complete successfully, indicating\n * the size of the POST and the round trip time.\n */\nEvent.TIMING_EVENT = 'timingevent';\n\n/**\n * Event class for Event.TIMING_EVENT\n *\n * @param {GoogEventTarget} target The stat event target for\n       the channel.\n * @param {number} size The number of characters in the POST data.\n * @param {number} rtt The total round trip time from POST to response in MS.\n * @param {number} retries The number of times the POST had to be retried.\n * @constructor\n * @extends {GoogEvent}\n */\nfunction TimingEvent(target, size, rtt, retries) {\n  GoogEvent.call(this, Event.TIMING_EVENT, target);\n\n  /**\n   * @type {number}\n   */\n  this.size = size;\n\n  /**\n   * @type {number}\n   */\n  this.rtt = rtt;\n\n  /**\n   * @type {number}\n   */\n  this.retries = retries;\n}\ngoog.inherits(TimingEvent, GoogEvent);\n\n/**\n * Helper function to notify listeners about POST request performance.\n *\n * @param {number} size Number of characters in the POST data.\n * @param {number} rtt The amount of time from POST start to response.\n * @param {number} retries The number of times the POST had to be retried.\n */\nfunction notifyTimingEvent(size, rtt, retries) {\n  const target = getStatEventTargetInternal();\n  target.dispatchEvent(new TimingEvent(target, size, rtt, retries));\n}\n\n/**\n * Allows the application to set an execution hooks for when a channel\n * starts processing requests. This is useful to track timing or logging\n * special information. The function takes no parameters and return void.\n * @param {Function} startHook  The function for the start hook.\n */\nfunction setStartThreadExecutionHook(startHook) {\n  startExecutionHook = startHook;\n}\n\n/**\n * Allows the application to set an execution hooks for when a channel\n * stops processing requests. This is useful to track timing or logging\n * special information. The function takes no parameters and return void.\n * @param {Function} endHook  The function for the end hook.\n */\nfunction setEndThreadExecutionHook(endHook) {\n  endExecutionHook = endHook;\n}\n\n/**\n * Application provided execution hook for the start hook.\n * @type {Function}\n */\nlet startExecutionHook = function() {};\n\n/**\n * Application provided execution hook for the end hook.\n * @type {Function}\n */\nlet endExecutionHook = function() {};\n\n/**\n * Helper function to call the start hook\n */\nfunction onStartExecution() {\n  startExecutionHook();\n}\n\n/**\n * Helper function to call the end hook\n */\nfunction onEndExecution() {\n  endExecutionHook();\n}\n\n/**\n * Wrapper around SafeTimeout which calls the start and end execution hooks\n * with a try...finally block.\n * @param {Function} fn The callback function.\n * @param {number} ms The time in MS for the timer.\n * @return {number} The ID of the timer.\n */\nfunction setTimeout(fn, ms) {\n  if (typeof fn !== 'function') {\n    throw new Error('Fn must not be null and must be a function');\n  }\n  return goog.global.setTimeout(function() {\n    onStartExecution();\n    try {\n      fn();\n    } finally {\n      onEndExecution();\n    }\n  }, ms);\n}\n\nexports.Event = Event;\nexports.ServerReachability = ServerReachability;\nexports.ServerReachabilityEvent = ServerReachabilityEvent;\nexports.Stat = Stat;\nexports.StatEvent = StatEvent;\nexports.TimingEvent = TimingEvent;\nexports.getStatEventTarget = getStatEventTarget;\nexports.notifyServerReachabilityEvent = notifyServerReachabilityEvent;\nexports.notifyStatEvent = notifyStatEvent;\nexports.notifyTimingEvent = notifyTimingEvent;\nexports.onEndExecution = onEndExecution;\nexports.onStartExecution = onStartExecution;\nexports.setEndThreadExecutionHook = setEndThreadExecutionHook;\nexports.setStartThreadExecutionHook = setStartThreadExecutionHook;\nexports.setTimeout = setTimeout;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Simple freelist.\n *\n * An anterative to goog.structs.SimplePool, it imposes the requirement that the\n * objects in the list contain a \"next\" property that can be used to maintain\n * the pool.\n */\ngoog.module('goog.async.FreeList');\ngoog.module.declareLegacyNamespace();\n\n/** @template ITEM */\nclass FreeList {\n  /**\n   * @param {function():ITEM} create\n   * @param {function(ITEM):void} reset\n   * @param {number} limit\n   */\n  constructor(create, reset, limit) {\n    /** @private @const {number} */\n    this.limit_ = limit;\n    /** @private @const {function()} */\n    this.create_ = create;\n    /** @private @const {function(ITEM):void} */\n    this.reset_ = reset;\n\n    /** @private {number} */\n    this.occupants_ = 0;\n    /** @private {ITEM} */\n    this.head_ = null;\n  }\n\n  /** @return {ITEM} */\n  get() {\n    let item;\n    if (this.occupants_ > 0) {\n      this.occupants_--;\n      item = this.head_;\n      this.head_ = item.next;\n      item.next = null;\n    } else {\n      item = this.create_();\n    }\n    return item;\n  }\n\n  /** @param {ITEM} item An item available for possible future reuse. */\n  put(item) {\n    this.reset_(item);\n    if (this.occupants_ < this.limit_) {\n      this.occupants_++;\n      item.next = this.head_;\n      this.head_ = item;\n    }\n  }\n\n  /**\n   * Visible for testing.\n   * @return {number}\n   * @package\n   */\n  occupants() {\n    return this.occupants_;\n  }\n}\n\nexports = FreeList;\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\ngoog.module('goog.async.WorkQueue');\ngoog.module.declareLegacyNamespace();\n\nconst FreeList = goog.require('goog.async.FreeList');\nconst {assert} = goog.require('goog.asserts');\n\n// TODO(johnlenz): generalize the WorkQueue if this is used by more\n// than goog.async.run.\n\n\n/**\n * A low GC workqueue. The key elements of this design:\n *   - avoids the need for goog.bind or equivalent by carrying scope\n *   - avoids the need for array reallocation by using a linked list\n *   - minimizes work entry objects allocation by recycling objects\n * @final\n * @struct\n */\nclass WorkQueue {\n  constructor() {\n    this.workHead_ = null;\n    this.workTail_ = null;\n  }\n\n  /**\n   * @param {function()} fn\n   * @param {Object|null|undefined} scope\n   */\n  add(fn, scope) {\n    const item = this.getUnusedItem_();\n    item.set(fn, scope);\n\n    if (this.workTail_) {\n      this.workTail_.next = item;\n      this.workTail_ = item;\n    } else {\n      assert(!this.workHead_);\n      this.workHead_ = item;\n      this.workTail_ = item;\n    }\n  }\n\n  /**\n   * @return {?WorkItem}\n   */\n  remove() {\n    let item = null;\n\n    if (this.workHead_) {\n      item = this.workHead_;\n      this.workHead_ = this.workHead_.next;\n      if (!this.workHead_) {\n        this.workTail_ = null;\n      }\n      item.next = null;\n    }\n    return item;\n  }\n\n  /**\n   * @param {!WorkItem} item\n   */\n  returnUnused(item) {\n    WorkQueue.freelist_.put(item);\n  }\n\n  /**\n   * @return {!WorkItem}\n   * @private\n   */\n  getUnusedItem_() {\n    return WorkQueue.freelist_.get();\n  }\n}\n\n/** @define {number} The maximum number of entries to keep for recycling. */\nWorkQueue.DEFAULT_MAX_UNUSED =\n    goog.define('goog.async.WorkQueue.DEFAULT_MAX_UNUSED', 100);\n\n/** @const @private {!FreeList<!WorkItem>} */\nWorkQueue.freelist_ = new FreeList(\n    () => new WorkItem(), item => item.reset(), WorkQueue.DEFAULT_MAX_UNUSED);\n\n/**\n * @final\n * @struct\n */\nclass WorkItem {\n  constructor() {\n    /** @type {?function()} */\n    this.fn = null;\n    /** @type {?Object|null|undefined} */\n    this.scope = null;\n    /** @type {?WorkItem} */\n    this.next = null;\n  }\n\n  /**\n   * @param {function()} fn\n   * @param {Object|null|undefined} scope\n   */\n  set(fn, scope) {\n    this.fn = fn;\n    this.scope = scope;\n    this.next = null;\n  }\n\n  /** Reset the work item so they don't prevent GC before reuse */\n  reset() {\n    this.fn = null;\n    this.scope = null;\n    this.next = null;\n  }\n}\n\nexports = WorkQueue;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\ngoog.module('goog.async.run');\ngoog.module.declareLegacyNamespace();\n\nconst WorkQueue = goog.require('goog.async.WorkQueue');\nconst asyncStackTag = goog.require('goog.debug.asyncStackTag');\nconst nextTick = goog.require('goog.async.nextTick');\nconst throwException = goog.require('goog.async.throwException');\n\n/**\n * @define {boolean} If true, use queueMicrotask to implement run rather\n * that its own work queue and scheduling.\n *\n * TODO(johnlenz): Enable this for goog.FEATURESET_YEAR >= 2021\n */\nconst USE_QUEUE_MICROTASK =\n    goog.define('goog.async.run.USE_QUEUE_MICROTASK', false);\n\n/**\n * The function used to schedule work asynchronousely.\n * @private {function()}\n */\nlet schedule;\n\n/** @private {boolean} */\nlet workQueueScheduled = false;\n\n/** @type {!WorkQueue} */\nlet workQueue = new WorkQueue();\n\n/**\n * Fires the provided callback just before the current callstack unwinds, or as\n * soon as possible after the current JS execution context.\n * @param {function(this:THIS)} callback\n * @param {THIS=} context Object to use as the \"this value\" when calling the\n *     provided function.\n * @template THIS\n * @deprecated Use `queueMicrotask` instead.\n */\nlet run = (callback, context = undefined) => {\n  callback = asyncStackTag.wrap(callback, 'goog.async.run');\n\n  if (USE_QUEUE_MICROTASK) {\n    queueMicrotask((context == null) ? callback : callback.bind(context));\n    return;\n  }\n  if (!schedule) {\n    initializeRunner();\n  }\n  if (!workQueueScheduled) {\n    // Nothing is currently scheduled, schedule it now.\n    schedule();\n    workQueueScheduled = true;\n  }\n\n  workQueue.add(callback, context);\n};\n\n/** Initializes the function to use to process the work queue. */\nlet initializeRunner = () => {\n  const promise = Promise.resolve(undefined);\n  schedule = () => {\n    promise.then(processWorkQueueInternal);\n  };\n};\n\n/**\n * Forces run to use nextTick instead of Promise.\n * This should only be done in unit tests. It's useful because MockClock\n * replaces nextTick, but not the browser Promise implementation, so it allows\n * Promise-based code to be tested with MockClock.\n * However, we also want to run promises if the MockClock is no longer in\n * control so we schedule a backup \"setTimeout\" to the unmocked timeout if\n * provided.\n * @param {function(function())=} realSetTimeout\n */\nrun.forceNextTick = (realSetTimeout = undefined) => {\n  if (goog.DISALLOW_TEST_ONLY_CODE) {\n    throw new Error(\n        'goog.async.run.forceNextTick is only available with goog.DEBUG');\n  }\n  schedule = () => {\n    nextTick(processWorkQueueInternal);\n    if (realSetTimeout) {\n      realSetTimeout(processWorkQueueInternal);\n    }\n  };\n};\n\nif (goog.DEBUG) {\n  /** Reset the work queue. Only available for tests in debug mode. */\n  run.resetQueue = () => {\n    workQueueScheduled = false;\n    workQueue = new WorkQueue();\n  };\n\n  /** Resets the scheduler. Only available for tests in debug mode. */\n  run.resetSchedulerForTest = () => {\n    initializeRunner();\n  };\n}\n\n/**\n * Run any pending run work items. This function is not intended\n * for general use.\n */\nfunction processWorkQueueInternal() {\n  // NOTE: additional work queue items may be added while processing.\n  let item = null;\n  while (item = workQueue.remove()) {\n    try {\n      item.fn.call(item.scope);\n    } catch (e) {\n      throwException(e);\n    }\n    workQueue.returnUnused(item);\n  }\n\n  // There are no more work items, allow processing to be scheduled again.\n  workQueueScheduled = false;\n}\n\n/**\n * Run any pending run work items. This function is not intended\n * for general use.\n */\nrun.processWorkQueue =\n    () => {\n      if (goog.DISALLOW_TEST_ONLY_CODE) {\n        throw new Error(\n            'goog.async.run.processWorkQueue is only available for tests.');\n      }\n      processWorkQueueInternal();\n    };\n\nexports = run;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview A timer class to which other classes and objects can listen on.\n * This is only an abstraction above `setInterval`.\n */\n\ngoog.provide('goog.Timer');\n\ngoog.require('goog.Promise');\ngoog.require('goog.events.EventTarget');\ngoog.requireType('goog.Thenable');\n\n\n\n/**\n * Class for handling timing events.\n *\n * @param {number=} opt_interval Number of ms between ticks (default: 1ms).\n * @param {?Object=} opt_timerObject  An object that has `setTimeout`,\n *     `setInterval`, `clearTimeout` and `clearInterval`\n *     (e.g., `window`).\n * @constructor\n * @extends {goog.events.EventTarget}\n */\ngoog.Timer = function(opt_interval, opt_timerObject) {\n  'use strict';\n  goog.events.EventTarget.call(this);\n\n  /**\n   * Number of ms between ticks\n   * @private {number}\n   */\n  this.interval_ = opt_interval || 1;\n\n  /**\n   * An object that implements `setTimeout`, `setInterval`,\n   * `clearTimeout` and `clearInterval`. We default to the window\n   * object. Changing this on {@link goog.Timer.prototype} changes the object\n   * for all timer instances which can be useful if your environment has some\n   * other implementation of timers than the `window` object.\n   * @private {{setTimeout:!Function, clearTimeout:!Function}}\n   */\n  this.timerObject_ = /** @type {{setTimeout, clearTimeout}} */ (\n      opt_timerObject || goog.Timer.defaultTimerObject);\n\n  /**\n   * Cached `tick_` bound to the object for later use in the timer.\n   * @private {!Function}\n   * @const\n   */\n  this.boundTick_ = goog.bind(this.tick_, this);\n\n  /**\n   * Firefox browser often fires the timer event sooner (sometimes MUCH sooner)\n   * than the requested timeout. So we compare the time to when the event was\n   * last fired, and reschedule if appropriate. See also\n   * {@link goog.Timer.intervalScale}.\n   * @private {number}\n   */\n  this.last_ = goog.now();\n};\ngoog.inherits(goog.Timer, goog.events.EventTarget);\n\n\n/**\n * Maximum timeout value.\n *\n * Timeout values too big to fit into a signed 32-bit integer may cause overflow\n * in FF, Safari, and Chrome, resulting in the timeout being scheduled\n * immediately. It makes more sense simply not to schedule these timeouts, since\n * 24.8 days is beyond a reasonable expectation for the browser to stay open.\n *\n * @private {number}\n * @const\n */\ngoog.Timer.MAX_TIMEOUT_ = 2147483647;\n\n\n/**\n * A timer ID that cannot be returned by any known implementation of\n * `window.setTimeout`. Passing this value to `window.clearTimeout`\n * should therefore be a no-op.\n *\n * @private {number}\n * @const\n */\ngoog.Timer.INVALID_TIMEOUT_ID_ = -1;\n\n\n/**\n * Whether this timer is enabled\n * @type {boolean}\n */\ngoog.Timer.prototype.enabled = false;\n\n\n/**\n * An object that implements `setTimeout`, `setInterval`,\n * `clearTimeout` and `clearInterval`. We default to the global\n * object. Changing `goog.Timer.defaultTimerObject` changes the object for\n * all timer instances which can be useful if your environment has some other\n * implementation of timers you'd like to use.\n * @type {{setTimeout, clearTimeout}}\n */\ngoog.Timer.defaultTimerObject = goog.global;\n\n\n/**\n * Variable that controls the timer error correction. If the timer is called\n * before the requested interval times `intervalScale`, which often\n * happens on Mozilla, the timer is rescheduled.\n * @see {@link #last_}\n * @type {number}\n */\ngoog.Timer.intervalScale = 0.8;\n\n\n/**\n * Variable for storing the result of `setInterval`.\n * @private {?number}\n */\ngoog.Timer.prototype.timer_ = null;\n\n\n/**\n * Gets the interval of the timer.\n * @return {number} interval Number of ms between ticks.\n */\ngoog.Timer.prototype.getInterval = function() {\n  'use strict';\n  return this.interval_;\n};\n\n\n/**\n * Sets the interval of the timer.\n * @param {number} interval Number of ms between ticks.\n */\ngoog.Timer.prototype.setInterval = function(interval) {\n  'use strict';\n  this.interval_ = interval;\n  if (this.timer_ && this.enabled) {\n    // Stop and then start the timer to reset the interval.\n    this.stop();\n    this.start();\n  } else if (this.timer_) {\n    this.stop();\n  }\n};\n\n\n/**\n * Callback for the `setTimeout` used by the timer.\n * @private\n */\ngoog.Timer.prototype.tick_ = function() {\n  'use strict';\n  if (this.enabled) {\n    const elapsed = goog.now() - this.last_;\n    if (elapsed > 0 && elapsed < this.interval_ * goog.Timer.intervalScale) {\n      this.timer_ = this.timerObject_.setTimeout(\n          this.boundTick_, this.interval_ - elapsed);\n      return;\n    }\n\n    // Prevents setInterval from registering a duplicate timeout when called\n    // in the timer event handler.\n    if (this.timer_) {\n      this.timerObject_.clearTimeout(this.timer_);\n      this.timer_ = null;\n    }\n\n    this.dispatchTick();\n    // The timer could be stopped in the timer event handler.\n    if (this.enabled) {\n      // Stop and start to ensure there is always only one timeout even if\n      // start is called in the timer event handler.\n      this.stop();\n      this.start();\n    }\n  }\n};\n\n\n/**\n * Dispatches the TICK event. This is its own method so subclasses can override.\n */\ngoog.Timer.prototype.dispatchTick = function() {\n  'use strict';\n  this.dispatchEvent(goog.Timer.TICK);\n};\n\n\n/**\n * Starts the timer.\n */\ngoog.Timer.prototype.start = function() {\n  'use strict';\n  this.enabled = true;\n\n  // If there is no interval already registered, start it now\n  if (!this.timer_) {\n    // IMPORTANT!\n    // window.setInterval in FireFox has a bug - it fires based on\n    // absolute time, rather than on relative time. What this means\n    // is that if a computer is sleeping/hibernating for 24 hours\n    // and the timer interval was configured to fire every 1000ms,\n    // then after the PC wakes up the timer will fire, in rapid\n    // succession, 3600*24 times.\n    // This bug is described here and is already fixed, but it will\n    // take time to propagate, so for now I am switching this over\n    // to setTimeout logic.\n    //     https://bugzilla.mozilla.org/show_bug.cgi?id=376643\n    //\n    this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_);\n    this.last_ = goog.now();\n  }\n};\n\n\n/**\n * Stops the timer.\n */\ngoog.Timer.prototype.stop = function() {\n  'use strict';\n  this.enabled = false;\n  if (this.timer_) {\n    this.timerObject_.clearTimeout(this.timer_);\n    this.timer_ = null;\n  }\n};\n\n\n/** @override */\ngoog.Timer.prototype.disposeInternal = function() {\n  'use strict';\n  goog.Timer.superClass_.disposeInternal.call(this);\n  this.stop();\n  delete this.timerObject_;\n};\n\n\n/**\n * Constant for the timer's event type.\n * @const\n */\ngoog.Timer.TICK = 'tick';\n\n\n/**\n * Calls the given function once, after the optional pause.\n * <p>\n * The function is always called asynchronously, even if the delay is 0. This\n * is a common trick to schedule a function to run after a batch of browser\n * event processing.\n *\n * @param {function(this:SCOPE)|{handleEvent:function()}|null} listener Function\n *     or object that has a handleEvent method.\n * @param {number=} opt_delay Milliseconds to wait; default is 0.\n * @param {SCOPE=} opt_handler Object in whose scope to call the listener.\n * @return {number} A handle to the timer ID.\n * @template SCOPE\n */\ngoog.Timer.callOnce = function(listener, opt_delay, opt_handler) {\n  'use strict';\n  if (typeof listener === 'function') {\n    if (opt_handler) {\n      listener = goog.bind(listener, opt_handler);\n    }\n  } else if (listener && typeof listener.handleEvent == 'function') {\n    // using typeof to prevent strict js warning\n    listener = goog.bind(listener.handleEvent, listener);\n  } else {\n    throw new Error('Invalid listener argument');\n  }\n\n  if (Number(opt_delay) > goog.Timer.MAX_TIMEOUT_) {\n    // Timeouts greater than MAX_INT return immediately due to integer\n    // overflow in many browsers.  Since MAX_INT is 24.8 days, just don't\n    // schedule anything at all.\n    return goog.Timer.INVALID_TIMEOUT_ID_;\n  } else {\n    return goog.Timer.defaultTimerObject.setTimeout(listener, opt_delay || 0);\n  }\n};\n\n\n/**\n * Clears a timeout initiated by {@link #callOnce}.\n * @param {?number} timerId A timer ID.\n */\ngoog.Timer.clear = function(timerId) {\n  'use strict';\n  goog.Timer.defaultTimerObject.clearTimeout(timerId);\n};\n\n\n/**\n * @param {number} delay Milliseconds to wait.\n * @param {(RESULT|?goog.Thenable<RESULT>|?Thenable)=} opt_result The value\n *     with which the promise will be resolved.\n * @return {!goog.Promise<RESULT>} A promise that will be resolved after\n *     the specified delay, unless it is canceled first.\n * @template RESULT\n * @deprecated This method uses `goog.Promise`.Use\n *    `//javascript/common/async:timeout` or simply\n *    `new Promise(r => void setTimeout(r, timeout))` instead.\n */\ngoog.Timer.promise = function(delay, opt_result) {\n  'use strict';\n  let timerKey = null;\n  return new goog\n      .Promise(function(resolve, reject) {\n        'use strict';\n        timerKey = goog.Timer.callOnce(function() {\n          'use strict';\n          resolve(opt_result);\n        }, delay);\n        if (timerKey == goog.Timer.INVALID_TIMEOUT_ID_) {\n          reject(new Error('Failed to schedule timer.'));\n        }\n      })\n      .thenCatch(function(error) {\n        'use strict';\n        // Clear the timer. The most likely reason is \"cancel\" signal.\n        goog.Timer.clear(timerKey);\n        throw error;\n      });\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Definition of the goog.async.Throttle class.\n */\n\ngoog.module('goog.async.Throttle');\ngoog.module.declareLegacyNamespace();\n\nconst Disposable = goog.require('goog.Disposable');\nconst Timer = goog.require('goog.Timer');\n\n\n/**\n * Throttle will perform an action that is passed in no more than once\n * per interval (specified in milliseconds). If it gets multiple signals\n * to perform the action while it is waiting, it will only perform the action\n * once at the end of the interval.\n * @final\n * @template T\n */\nclass Throttle extends Disposable {\n  /**\n   * @param {function(this: T, ...?)} listener Function to callback when the\n   *     action is triggered.\n   * @param {number} interval Interval over which to throttle. The listener can\n   *     only be called once per interval.\n   * @param {T=} handler Object in whose scope to call the listener.\n   */\n  constructor(listener, interval, handler) {\n    super();\n    /**\n     * Function to callback\n     * @type {function(this: T, ...?)}\n     * @private\n     */\n    this.listener_ = handler != null ? listener.bind(handler) : listener;\n\n    /**\n     * Interval for the throttle time\n     * @type {number}\n     * @private\n     */\n    this.interval_ = interval;\n\n    /**\n     * The last arguments passed into `fire`, or null if there is no pending\n     * call.\n     * @private {?IArrayLike}\n     */\n    this.args_ = null;\n\n    /**\n     * Indicates that the action is pending and needs to be fired.\n     * @type {boolean}\n     * @private\n     */\n    this.shouldFire_ = false;\n\n    /**\n     * Indicates the count of nested pauses currently in effect on the throttle.\n     * When this count is not zero, fired actions will be postponed until the\n     * throttle is resumed enough times to drop the pause count to zero.\n     * @type {number}\n     * @private\n     */\n    this.pauseCount_ = 0;\n\n    /**\n     * Timer for scheduling the next callback\n     * @type {?number}\n     * @private\n     */\n    this.timer_ = null;\n  }\n\n  /**\n   * Notifies the throttle that the action has happened. It will throttle\n   * the call so that the callback is not called too often according to the\n   * interval parameter passed to the constructor, passing the arguments\n   * from the last call of this function into the throttled function.\n   * @param {...?} var_args Arguments to pass on to the throttled function.\n   */\n  fire(var_args) {\n    this.args_ = arguments;\n    if (!this.timer_ && !this.pauseCount_) {\n      this.doAction_();\n    } else {\n      this.shouldFire_ = true;\n    }\n  }\n\n  /**\n   * Cancels any pending action callback. The throttle can be restarted by\n   * calling {@link #fire}.\n   */\n  stop() {\n    if (this.timer_) {\n      Timer.clear(this.timer_);\n      this.timer_ = null;\n      this.shouldFire_ = false;\n      this.args_ = null;\n    }\n  }\n\n  /**\n   * Pauses the throttle.  All pending and future action callbacks will be\n   * delayed until the throttle is resumed.  Pauses can be nested.\n   */\n  pause() {\n    this.pauseCount_++;\n  }\n\n  /**\n   * Resumes the throttle.  If doing so drops the pausing count to zero,\n   * pending action callbacks will be executed as soon as possible, but\n   * still no sooner than an interval's delay after the previous call.\n   * Future action callbacks will be executed as normal.\n   */\n  resume() {\n    this.pauseCount_--;\n    if (!this.pauseCount_ && this.shouldFire_ && !this.timer_) {\n      this.shouldFire_ = false;\n      this.doAction_();\n    }\n  }\n\n  /** @override */\n  disposeInternal() {\n    super.disposeInternal();\n    this.stop();\n  }\n\n  /**\n   * Handler for the timer to fire the throttle\n   * @private\n   */\n  onTimer_() {\n    this.timer_ = null;\n\n    if (this.shouldFire_ && !this.pauseCount_) {\n      this.shouldFire_ = false;\n      this.doAction_();\n    }\n  }\n\n  /**\n   * Calls the callback\n   * @private\n   */\n  doAction_() {\n    this.timer_ = Timer.callOnce(() => this.onTimer_(), this.interval_);\n    const args = this.args_;\n    // release memory first so it always happens even if listener throws\n    this.args_ = null;\n    this.listener_.apply(null, args);\n  }\n}\n\nexports = Throttle;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Provides a utility for tracing and debugging WebChannel\n *     requests.\n *\n */\n\ngoog.module('goog.labs.net.webChannel.WebChannelDebug');\ngoog.module.declareLegacyNamespace();\n\nconst Uri = goog.requireType('goog.Uri');\nconst XmlHttp = goog.requireType('goog.net.XmlHttp');\nconst googJson = goog.require('goog.json');\nconst log = goog.require('goog.log');\n\n/**\n * Logs and keeps a buffer of debugging info for the Channel.\n *\n * @constructor\n * @struct\n * @final\n */\nfunction WebChannelDebug() {\n  /**\n   * The logger instance.\n   * @const\n   * @private {?log.Logger}\n   */\n  this.logger_ = log.getLogger('goog.labs.net.webChannel.WebChannelDebug');\n\n  /**\n   * Whether to enable redact. Defaults to true.\n   * @private {boolean}\n   */\n  this.redactEnabled_ = true;\n}\n\n/**\n * Turns off redact.\n */\nWebChannelDebug.prototype.disableRedact = function() {\n  this.redactEnabled_ = false;\n};\n\n/**\n * Logs that the browser went offline during the lifetime of a request.\n * @param {Uri} url The URL being requested.\n */\nWebChannelDebug.prototype.browserOfflineResponse = function(url) {\n  this.info(function() {\n    return 'BROWSER_OFFLINE: ' + url;\n  });\n};\n\n/**\n * Logs an XmlHttp request..\n * @param {string} verb The request type (GET/POST).\n * @param {Uri} uri The request destination.\n * @param {string|number|undefined} id The request id.\n * @param {number} attempt Which attempt # the request was.\n * @param {?string} postData The data posted in the request.\n */\nWebChannelDebug.prototype.xmlHttpChannelRequest = function(\n    verb, uri, id, attempt, postData) {\n  const self = this;\n  this.info(function() {\n    return 'XMLHTTP REQ (' + id + ') [attempt ' + attempt + ']: ' + verb +\n        '\\n' + uri + '\\n' + self.maybeRedactPostData_(postData);\n  });\n};\n\n/**\n * Logs the meta data received from an XmlHttp request.\n * @param {string} verb The request type (GET/POST).\n * @param {Uri} uri The request destination.\n * @param {string|number|undefined} id The request id.\n * @param {number} attempt Which attempt # the request was.\n * @param {XmlHttp.ReadyState} readyState The ready state.\n * @param {number} statusCode The HTTP status code.\n */\nWebChannelDebug.prototype.xmlHttpChannelResponseMetaData = function(\n    verb, uri, id, attempt, readyState, statusCode) {\n  this.info(function() {\n    return 'XMLHTTP RESP (' + id + ') [ attempt ' + attempt + ']: ' + verb +\n        '\\n' + uri + '\\n' + readyState + ' ' + statusCode;\n  });\n};\n\n/**\n * Logs the response data received from an XmlHttp request.\n * @param {string|number|undefined} id The request id.\n * @param {?string} responseText The response text.\n * @param {?string=} opt_desc Optional request description.\n */\nWebChannelDebug.prototype.xmlHttpChannelResponseText = function(\n    id, responseText, opt_desc) {\n  const self = this;\n  this.info(function() {\n    return 'XMLHTTP TEXT (' + id + '): ' + self.redactResponse_(responseText) +\n        (opt_desc ? ' ' + opt_desc : '');\n  });\n};\n\n/**\n * Logs a request timeout.\n * @param {Uri} uri The uri that timed out.\n */\nWebChannelDebug.prototype.timeoutResponse = function(uri) {\n  this.info(function() {\n    return 'TIMEOUT: ' + uri;\n  });\n};\n\n/**\n * Logs a debug message.\n * @param {!log.Loggable} text The message.\n */\nWebChannelDebug.prototype.debug = function(text) {\n  log.fine(this.logger_, text);\n};\n\n/**\n * Logs an exception\n * @param {Error} e The error or error event.\n * @param {log.Loggable=} opt_msg The optional message,\n *     defaults to 'Exception'.\n */\nWebChannelDebug.prototype.dumpException = function(e, opt_msg) {\n  log.error(this.logger_, opt_msg || 'Exception', e);\n};\n\n/**\n * Logs an info message.\n * @param {!log.Loggable} text The message.\n */\nWebChannelDebug.prototype.info = function(text) {\n  log.info(this.logger_, text);\n};\n\n/**\n * Logs a warning message.\n * @param {!log.Loggable} text The message.\n */\nWebChannelDebug.prototype.warning = function(text) {\n  log.warning(this.logger_, text);\n};\n\n/**\n * Logs a severe message.\n * @param {!log.Loggable} text The message.\n */\nWebChannelDebug.prototype.severe = function(text) {\n  log.error(this.logger_, text);\n};\n\n/**\n * Removes potentially private data from a response so that we don't\n * accidentally save private and personal data to the server logs.\n * @param {?string} responseText A JSON response to clean.\n * @return {?string} The cleaned response.\n * @private\n * @suppress {strictMissingProperties} Added to tighten compiler checks\n */\nWebChannelDebug.prototype.redactResponse_ = function(responseText) {\n  if (!this.redactEnabled_) {\n    return responseText;\n  }\n\n  if (!responseText) {\n    return null;\n  }\n\n  try {\n    const responseArray = JSON.parse(responseText);\n    if (responseArray) {\n      for (let i = 0; i < responseArray.length; i++) {\n        if (Array.isArray(responseArray[i])) {\n          this.maybeRedactArray_(responseArray[i]);\n        }\n      }\n    }\n\n    return googJson.serialize(responseArray);\n  } catch (e) {\n    this.debug('Exception parsing expected JS array - probably was not JS');\n    return responseText;\n  }\n};\n\n/**\n * Removes data from a response array that may be sensitive.\n * @param {!Array<?>} array The array to clean.\n * @private\n */\nWebChannelDebug.prototype.maybeRedactArray_ = function(array) {\n  if (array.length < 2) {\n    return;\n  }\n  const dataPart = array[1];\n  if (!Array.isArray(dataPart)) {\n    return;\n  }\n  if (dataPart.length < 1) {\n    return;\n  }\n\n  const type = dataPart[0];\n  if (type != 'noop' && type != 'stop' && type != 'close') {\n    // redact all fields in the array\n    for (let i = 1; i < dataPart.length; i++) {\n      dataPart[i] = '';\n    }\n  }\n};\n\n/**\n * Removes potentially private data from a request POST body so that we don't\n * accidentally save private and personal data to the server logs.\n * @param {?string} data The data string to clean.\n * @return {?string} The data string with sensitive data replaced by 'redacted'.\n * @private\n */\nWebChannelDebug.prototype.maybeRedactPostData_ = function(data) {\n  if (!this.redactEnabled_) {\n    return data;\n  }\n\n  if (!data) {\n    return null;\n  }\n  let out = '';\n  const params = data.split('&');\n  for (let i = 0; i < params.length; i++) {\n    const param = params[i];\n    const keyValue = param.split('=');\n    if (keyValue.length > 1) {\n      const key = keyValue[0];\n      const value = keyValue[1];\n\n      const keyParts = key.split('_');\n      if (keyParts.length >= 2 && keyParts[1] == 'type') {\n        out += key + '=' + value + '&';\n      } else {\n        out += key + '=' +\n            'redacted' +\n            '&';\n      }\n    }\n  }\n  return out;\n};\n\nexports = WebChannelDebug;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Definition of the ChannelRequest class. The request\n * object encapsulates the logic for making a single request, either for the\n * forward channel, back channel, or test channel, to the server. It contains\n * the logic for the two types of transports we use:\n * XMLHTTP and Image request. It provides timeout detection. More transports\n * to be added in future, such as Fetch, WebSocket.\n *\n */\n\ngoog.module('goog.labs.net.webChannel.ChannelRequest');\ngoog.module.declareLegacyNamespace();\n\nconst Channel = goog.require('goog.labs.net.webChannel.Channel');\nconst ErrorCode = goog.require('goog.net.ErrorCode');\nconst EventHandler = goog.require('goog.events.EventHandler');\nconst EventType = goog.require('goog.net.EventType');\nconst GoogEvent = goog.requireType('goog.events.Event');\nconst Throttle = goog.require('goog.async.Throttle');\nconst Uri = goog.requireType('goog.Uri');\nconst WebChannel = goog.require('goog.net.WebChannel');\nconst WebChannelDebug = goog.require('goog.labs.net.webChannel.WebChannelDebug');\nconst Wire = goog.requireType('goog.labs.net.webChannel.Wire');\nconst XhrIo = goog.requireType('goog.net.XhrIo');\nconst XmlHttp = goog.require('goog.net.XmlHttp');\nconst asserts = goog.require('goog.asserts');\nconst dispose = goog.require('goog.dispose');\n/** @suppress {extraRequire} unused, try to remove this. */\nconst environment = goog.require('goog.labs.net.webChannel.environment');\nconst googObject = goog.require('goog.object');\nconst googString = goog.require('goog.string');\nconst requestStats = goog.require('goog.labs.net.webChannel.requestStats');\n\n/**\n * A new ChannelRequest is created for each request to the server.\n *\n * @param {Channel} channel\n *     The channel that owns this request.\n * @param {WebChannelDebug} channelDebug A\n *     WebChannelDebug to use for logging.\n * @param {string=} opt_sessionId The session id for the channel.\n * @param {string|number=} opt_requestId The request id for this request.\n * @param {number=} opt_retryId The retry id for this request.\n * @constructor\n * @struct\n * @final\n */\nfunction ChannelRequest(\n    channel, channelDebug, opt_sessionId, opt_requestId, opt_retryId) {\n  /**\n   * The channel object that owns the request.\n   * @private {Channel}\n   */\n  this.channel_ = channel;\n\n  /**\n   * The channel debug to use for logging\n   * @private {WebChannelDebug}\n   */\n  this.channelDebug_ = channelDebug;\n\n  /**\n   * The Session ID for the channel.\n   * @private {string|undefined}\n   */\n  this.sid_ = opt_sessionId;\n\n  /**\n   * The RID (request ID) for the request.\n   * @private {string|number|undefined}\n   */\n  this.rid_ = opt_requestId;\n\n  /**\n   * The attempt number of the current request.\n   * @private {number}\n   */\n  this.retryId_ = opt_retryId || 1;\n\n  /**\n   * An object to keep track of the channel request event listeners.\n   * @private {!EventHandler<\n   *     !ChannelRequest>}\n   */\n  this.eventHandler_ = new EventHandler(this);\n\n  /**\n   * The timeout in ms before failing the request.\n   * @private {number}\n   */\n  this.timeout_ = ChannelRequest.TIMEOUT_MS_;\n\n  /**\n   * Extra HTTP headers to add to all the requests sent to the server.\n   * @private {?Object}\n   */\n  this.extraHeaders_ = null;\n\n  /**\n   * Whether the request was successful. This is only set to true after the\n   * request successfully completes.\n   * @private {boolean}\n   */\n  this.successful_ = false;\n\n  /**\n   * The TimerID of the timer used to detect if the request has timed-out.\n   * @type {?number}\n   * @private\n   */\n  this.watchDogTimerId_ = null;\n\n  /**\n   * The time in the future when the request will timeout.\n   * @private {?number}\n   */\n  this.watchDogTimeoutTime_ = null;\n\n  /**\n   * The time the request started.\n   * @private {?number}\n   */\n  this.requestStartTime_ = null;\n\n  /**\n   * The type of request (XMLHTTP, IMG)\n   * @private {?number}\n   */\n  this.type_ = null;\n\n  /**\n   * The base Uri for the request. The includes all the parameters except the\n   * one that indicates the retry number.\n   * @private {?Uri}\n   */\n  this.baseUri_ = null;\n\n  /**\n   * The request Uri that was actually used for the most recent request attempt.\n   * @private {?Uri}\n   */\n  this.requestUri_ = null;\n\n  /**\n   * The post data, if the request is a post.\n   * @private {?string}\n   */\n  this.postData_ = null;\n\n  /**\n   * An array of pending messages that we have either received a non-successful\n   * response for, or no response at all, and which therefore may or may not\n   * have been received by the server.\n   * @private {!Array<Wire.QueuedMap>}\n   */\n  this.pendingMessages_ = [];\n\n  /**\n   * The XhrLte request if the request is using XMLHTTP\n   * @private {?XhrIo}\n   */\n  this.xmlHttp_ = null;\n\n  /**\n   * The position of where the next unprocessed chunk starts in the response\n   * text.\n   * @private {number}\n   */\n  this.xmlHttpChunkStart_ = 0;\n\n  /**\n   * The verb (Get or Post) for the request.\n   * @private {?string}\n   */\n  this.verb_ = null;\n\n  /**\n   * The last error if the request failed.\n   * @private {?ChannelRequest.Error}\n   */\n  this.lastError_ = null;\n\n  /**\n   * The response headers received along with the non-200 status.\n   *\n   * @private {!Object<string, string>|undefined}\n   */\n  this.errorResponseHeaders_ = undefined;\n\n  /**\n   * The last status code received.\n   * @private {number}\n   */\n  this.lastStatusCode_ = -1;\n\n  /**\n   * Whether the request has been cancelled due to a call to cancel.\n   * @private {boolean}\n   */\n  this.cancelled_ = false;\n\n  /**\n   * A throttle time in ms for readystatechange events for the backchannel.\n   * Useful for throttling when ready state is INTERACTIVE (partial data).\n   * If set to zero no throttle is used.\n   *\n   * See WebChannelBase.prototype.readyStateChangeThrottleMs_\n   *\n   * @private {number}\n   */\n  this.readyStateChangeThrottleMs_ = 0;\n\n  /**\n   * The throttle for readystatechange events for the current request, or null\n   * if there is none.\n   * @private {?Throttle}\n   */\n  this.readyStateChangeThrottle_ = null;\n\n  /**\n   * Whether to the result is expected to be encoded for chunking and thus\n   * requires decoding.\n   * @private {boolean}\n   */\n  this.decodeChunks_ = false;\n\n  /**\n   * Whether to decode x-http-initial-response.\n   * @private {boolean}\n   */\n  this.decodeInitialResponse_ = false;\n\n  /**\n   * Whether x-http-initial-response has been decoded (dispatched).\n   * @private {boolean}\n   */\n  this.initialResponseDecoded_ = false;\n\n  /**\n   * Whether the first byte of response body has arrived, for a successful\n   * response.\n   * @private {boolean}\n   */\n  this.firstByteReceived_ = false;\n\n  /**\n   * The current state of fetch responses if webchannel is using WHATWG\n   * fetch/streams.\n   * @private {!goog.labs.net.webChannel.FetchResponseState}\n   */\n  this.fetchResponseState_ = new goog.labs.net.webChannel.FetchResponseState();\n}\n\n/**\n * A collection of fetch/stream properties.\n * @struct\n * @constructor\n */\ngoog.labs.net.webChannel.FetchResponseState = function() {\n  /**\n   * The TextDecoder for decoding Uint8Array responses from fetch request.\n   * @type {?goog.global.TextDecoder}\n   */\n  this.textDecoder = null;\n\n  /**\n   * The unconsumed response text from the fetch requests.\n   * @type {string}\n   */\n  this.responseBuffer = '';\n\n  /**\n   * Whether or not the response body has arrived.\n   * @type {boolean}\n   */\n  this.responseArrivedForFetch = false;\n};\n\n/**\n * Default timeout in MS for a request. The server must return data within this\n * time limit for the request to not timeout.\n * @private {number}\n */\nChannelRequest.TIMEOUT_MS_ = 45 * 1000;\n\n/**\n * Enum for channel requests type\n * @enum {number}\n * @private\n */\nChannelRequest.Type_ = {\n  /**\n   * XMLHTTP requests.\n   */\n  XML_HTTP: 1,\n\n  /**\n   * IMG requests.\n   */\n  CLOSE_REQUEST: 2\n};\n\n/**\n * Enum type for identifying an error.\n * @enum {number}\n */\nChannelRequest.Error = {\n  /**\n   * Errors due to a non-200 status code.\n   */\n  STATUS: 0,\n\n  /**\n   * Errors due to no data being returned.\n   */\n  NO_DATA: 1,\n\n  /**\n   * Errors due to a timeout.\n   */\n  TIMEOUT: 2,\n\n  /**\n   * Errors due to the server returning an unknown.\n   */\n  UNKNOWN_SESSION_ID: 3,\n\n  /**\n   * Errors due to bad data being received.\n   */\n  BAD_DATA: 4,\n\n  /**\n   * Errors due to the handler throwing an exception.\n   */\n  HANDLER_EXCEPTION: 5,\n\n  /**\n   * The browser declared itself offline during the request.\n   */\n  BROWSER_OFFLINE: 6\n};\n\n/**\n * Returns a useful error string for debugging based on the specified error\n * code.\n * @param {?ChannelRequest.Error} errorCode The error code.\n * @param {number} statusCode The HTTP status code.\n * @return {string} The error string for the given code combination.\n */\nChannelRequest.errorStringFromCode = function(errorCode, statusCode) {\n  switch (errorCode) {\n    case ChannelRequest.Error.STATUS:\n      return 'Non-200 return code (' + statusCode + ')';\n    case ChannelRequest.Error.NO_DATA:\n      return 'XMLHTTP failure (no data)';\n    case ChannelRequest.Error.TIMEOUT:\n      return 'HttpConnection timeout';\n    default:\n      return 'Unknown error';\n  }\n};\n\n/**\n * Sentinel value used to indicate an invalid chunk in a multi-chunk response.\n * @private {!Object}\n */\nChannelRequest.INVALID_CHUNK_ = {};\n\n/**\n * Sentinel value used to indicate an incomplete chunk in a multi-chunk\n * response.\n * @private {!Object}\n */\nChannelRequest.INCOMPLETE_CHUNK_ = {};\n\n/**\n * Returns whether XHR streaming is supported on this browser.\n *\n * @return {boolean} Whether XHR streaming is supported.\n * @see http://code.google.com/p/closure-library/issues/detail?id=346\n */\nChannelRequest.supportsXhrStreaming = function() {\n  // TODO: b/334909604 - Remove this function.\n  return true;\n};\n\n/**\n * Sets extra HTTP headers to add to all the requests sent to the server.\n *\n * @param {Object} extraHeaders The HTTP headers.\n */\nChannelRequest.prototype.setExtraHeaders = function(extraHeaders) {\n  this.extraHeaders_ = extraHeaders;\n};\n\n/**\n * Overrides the default HTTP method.\n *\n * @param {string} verb The HTTP method\n */\nChannelRequest.prototype.setVerb = function(verb) {\n  this.verb_ = verb;\n};\n\n/**\n * Sets the timeout for a request\n *\n * @param {number} timeout   The timeout in MS for when we fail the request.\n */\nChannelRequest.prototype.setTimeout = function(timeout) {\n  this.timeout_ = timeout;\n};\n\n/**\n * Sets the throttle for handling onreadystatechange events for the request.\n *\n * @param {number} throttle The throttle in ms.  A value of zero indicates\n *     no throttle.\n */\nChannelRequest.prototype.setReadyStateChangeThrottle = function(throttle) {\n  this.readyStateChangeThrottleMs_ = throttle;\n};\n\n/**\n * Sets the pending messages that this request is handling.\n *\n * @param {!Array<Wire.QueuedMap>} pendingMessages\n *     The pending messages for this request.\n */\nChannelRequest.prototype.setPendingMessages = function(pendingMessages) {\n  this.pendingMessages_ = pendingMessages;\n};\n\n/**\n * Gets the pending messages that this request is handling, in case of a retry.\n *\n * @return {!Array<Wire.QueuedMap>} The pending\n *     messages for this request.\n */\nChannelRequest.prototype.getPendingMessages = function() {\n  return this.pendingMessages_;\n};\n\n/**\n * Uses XMLHTTP to send an HTTP POST to the server.\n *\n * @param {Uri} uri  The uri of the request.\n * @param {?string} postData  The data for the post body.\n * @param {boolean} decodeChunks  Whether to the result is expected to be\n *     encoded for chunking and thus requires decoding.\n */\nChannelRequest.prototype.xmlHttpPost = function(uri, postData, decodeChunks) {\n  this.type_ = ChannelRequest.Type_.XML_HTTP;\n  this.baseUri_ = uri.clone().makeUnique();\n  this.postData_ = postData;\n  this.decodeChunks_ = decodeChunks;\n  this.sendXmlHttp_(null /* hostPrefix */);\n};\n\n/**\n * Uses XMLHTTP to send an HTTP GET to the server.\n *\n * @param {Uri} uri  The uri of the request.\n * @param {boolean} decodeChunks  Whether to the result is expected to be\n *     encoded for chunking and thus requires decoding.\n * @param {?string} hostPrefix  The host prefix, if we might be using a\n *     secondary domain.  Note that it should also be in the URL, adding this\n *     won't cause it to be added to the URL.\n */\nChannelRequest.prototype.xmlHttpGet = function(uri, decodeChunks, hostPrefix) {\n  this.type_ = ChannelRequest.Type_.XML_HTTP;\n  this.baseUri_ = uri.clone().makeUnique();\n  this.postData_ = null;\n  this.decodeChunks_ = decodeChunks;\n\n  this.sendXmlHttp_(hostPrefix);\n};\n\n/**\n * Sends a request via XMLHTTP according to the current state of the request\n * object.\n *\n * @param {?string} hostPrefix The host prefix, if we might be using a secondary\n *     domain.\n * @private\n */\nChannelRequest.prototype.sendXmlHttp_ = function(hostPrefix) {\n  this.requestStartTime_ = Date.now();\n  this.ensureWatchDogTimer_();\n\n  // clone the base URI to create the request URI. The request uri has the\n  // attempt number as a parameter which helps in debugging.\n  this.requestUri_ = this.baseUri_.clone();\n  this.requestUri_.setParameterValues('t', this.retryId_);\n\n  // send the request either as a POST or GET\n  this.xmlHttpChunkStart_ = 0;\n  const useSecondaryDomains = this.channel_.shouldUseSecondaryDomains();\n  this.fetchResponseState_ = new goog.labs.net.webChannel.FetchResponseState();\n  // If the request is a GET request, start a backchannel to transfer streaming\n  // data. Note that WebChannel GET request can also be used for closing the\n  // channel as in method ChannelRequest#sendCloseRequest.\n  // The second parameter of Channel#createXhrIo is JS only.\n  this.xmlHttp_ = this.channel_.createXhrIo(\n      useSecondaryDomains ? hostPrefix : null, !this.postData_);\n\n  if (this.readyStateChangeThrottleMs_ > 0) {\n    this.readyStateChangeThrottle_ = new Throttle(\n        goog.bind(this.xmlHttpHandler_, this, this.xmlHttp_),\n        this.readyStateChangeThrottleMs_);\n  }\n\n  this.eventHandler_.listen(\n      this.xmlHttp_, EventType.READY_STATE_CHANGE,\n      this.readyStateChangeHandler_);\n\n  const headers =\n      this.extraHeaders_ ? googObject.clone(this.extraHeaders_) : {};\n  if (this.postData_) {\n    if (!this.verb_) {\n      this.verb_ = 'POST';\n    }\n    headers['Content-Type'] = 'application/x-www-form-urlencoded';\n    this.xmlHttp_.send(this.requestUri_, this.verb_, this.postData_, headers);\n  } else {\n    this.verb_ = 'GET';\n    this.xmlHttp_.send(this.requestUri_, this.verb_, null, headers);\n  }\n  requestStats.notifyServerReachabilityEvent(\n      requestStats.ServerReachability.REQUEST_MADE);\n  this.channelDebug_.xmlHttpChannelRequest(\n      this.verb_, this.requestUri_, this.rid_, this.retryId_, this.postData_);\n};\n\n/**\n * Handles a readystatechange event.\n * @param {GoogEvent} evt The event.\n * @private\n */\nChannelRequest.prototype.readyStateChangeHandler_ = function(evt) {\n  const xhr = /** @type {XhrIo} */ (evt.target);\n  const throttle = this.readyStateChangeThrottle_;\n  if (throttle && xhr.getReadyState() == XmlHttp.ReadyState.INTERACTIVE) {\n    // Only throttle in the partial data case.\n    this.channelDebug_.debug('Throttling readystatechange.');\n    throttle.fire();\n  } else {\n    // If we haven't throttled, just handle response directly.\n    this.xmlHttpHandler_(xhr);\n  }\n};\n\n/**\n * XmlHttp handler\n * @param {XhrIo} xmlhttp The XhrIo object for the current request.\n * @private\n */\nChannelRequest.prototype.xmlHttpHandler_ = function(xmlhttp) {\n  requestStats.onStartExecution();\n\n  try {\n    if (xmlhttp == this.xmlHttp_) {\n      this.onXmlHttpReadyStateChanged_();\n    } else {\n      this.channelDebug_.warning(\n          'Called back with an ' +\n          'unexpected xmlhttp');\n    }\n  } catch (ex) {\n    this.channelDebug_.debug('Failed call to OnXmlHttpReadyStateChanged_');\n    if (this.hasResponseBody_()) {\n      const channelRequest = this;\n      this.channelDebug_.dumpException(ex, function() {\n        return 'ResponseText: ' + channelRequest.xmlHttp_.getResponseText();\n      });\n    } else {\n      this.channelDebug_.dumpException(ex, 'No response text');\n    }\n  } finally {\n    requestStats.onEndExecution();\n  }\n};\n\n/**\n * Called by the readystate handler for XMLHTTP requests.\n *\n * @private\n */\nChannelRequest.prototype.onXmlHttpReadyStateChanged_ = function() {\n  const readyState = this.xmlHttp_.getReadyState();\n  const errorCode = this.xmlHttp_.getLastErrorCode();\n  const statusCode = this.xmlHttp_.getStatus();\n\n  // we get partial results in browsers that support ready state interactive.\n  // We also make sure that getResponseText is not null in interactive mode\n  // before we continue.\n  if (readyState < XmlHttp.ReadyState.INTERACTIVE ||\n      (readyState == XmlHttp.ReadyState.INTERACTIVE &&\n       !this.hasResponseBody_())) {\n    return;  // not yet ready\n  }\n\n  // Dispatch any appropriate network events.\n  if (!this.cancelled_ && readyState == XmlHttp.ReadyState.COMPLETE &&\n      errorCode != ErrorCode.ABORT) {\n    // Pretty conservative, these are the only known scenarios which we'd\n    // consider indicative of a truly non-functional network connection.\n    if (errorCode == ErrorCode.TIMEOUT || statusCode <= 0) {\n      requestStats.notifyServerReachabilityEvent(\n          requestStats.ServerReachability.REQUEST_FAILED);\n    } else {\n      requestStats.notifyServerReachabilityEvent(\n          requestStats.ServerReachability.REQUEST_SUCCEEDED);\n    }\n  }\n\n  // got some data so cancel the watchdog timer\n  this.cancelWatchDogTimer_();\n\n  const status = this.xmlHttp_.getStatus();\n  this.lastStatusCode_ = status;\n  const responseText = this.decodeXmlHttpResponse_();\n\n  if (!this.hasResponseBody_()) {\n    const channelRequest = this;\n    this.channelDebug_.debug(function() {\n      return 'No response text for uri ' + channelRequest.requestUri_ +\n          ' status ' + status;\n    });\n  }\n  this.successful_ = (status == 200);\n\n  this.channelDebug_.xmlHttpChannelResponseMetaData(\n      /** @type {string} */ (this.verb_), this.requestUri_, this.rid_,\n      this.retryId_, readyState, status);\n\n  if (!this.successful_) {\n    this.errorResponseHeaders_ = this.xmlHttp_.getResponseHeaders();\n    if (status == 400 && responseText.indexOf('Unknown SID') > 0) {\n      // the server error string will include 'Unknown SID' which indicates the\n      // server doesn't know about the session (maybe it got restarted, maybe\n      // the user got moved to another server, etc.,). Handlers can special\n      // case this error\n      this.lastError_ = ChannelRequest.Error.UNKNOWN_SESSION_ID;\n      requestStats.notifyStatEvent(\n          requestStats.Stat.REQUEST_UNKNOWN_SESSION_ID);\n      this.channelDebug_.warning('XMLHTTP Unknown SID (' + this.rid_ + ')');\n    } else {\n      this.lastError_ = ChannelRequest.Error.STATUS;\n      requestStats.notifyStatEvent(requestStats.Stat.REQUEST_BAD_STATUS);\n      this.channelDebug_.warning(\n          'XMLHTTP Bad status ' + status + ' (' + this.rid_ + ')');\n    }\n    this.cleanup_();\n    this.dispatchFailure_();\n    return;\n  }\n\n  if (this.shouldCheckInitialResponse_()) {\n    const initialResponse = this.getInitialResponse_();\n    if (initialResponse) {\n      this.channelDebug_.xmlHttpChannelResponseText(\n          this.rid_, initialResponse,\n          'Initial handshake response via ' +\n              WebChannel.X_HTTP_INITIAL_RESPONSE);\n      this.initialResponseDecoded_ = true;\n      this.safeOnRequestData_(initialResponse);\n    } else {\n      this.successful_ = false;\n      this.lastError_ = ChannelRequest.Error.UNKNOWN_SESSION_ID;  // fail-fast\n      requestStats.notifyStatEvent(\n          requestStats.Stat.REQUEST_UNKNOWN_SESSION_ID);\n      this.channelDebug_.warning(\n          'XMLHTTP Missing X_HTTP_INITIAL_RESPONSE' +\n          ' (' + this.rid_ + ')');\n      this.cleanup_();\n      this.dispatchFailure_();\n      return;\n    }\n  }\n\n  if (this.decodeChunks_) {\n    this.decodeNextChunks_(readyState, responseText);\n  } else {\n    this.channelDebug_.xmlHttpChannelResponseText(\n        this.rid_, responseText, null);\n    this.safeOnRequestData_(responseText);\n  }\n\n  if (readyState == XmlHttp.ReadyState.COMPLETE) {\n    this.cleanup_();\n  }\n\n  if (!this.successful_) {\n    return;\n  }\n\n  if (!this.cancelled_) {\n    if (readyState == XmlHttp.ReadyState.COMPLETE) {\n      this.channel_.onRequestComplete(this);\n    } else {\n      // The default is false, the result from this callback shouldn't carry\n      // over to the next callback, otherwise the request looks successful if\n      // the watchdog timer gets called\n      this.successful_ = false;\n      this.ensureWatchDogTimer_();\n    }\n  }\n};\n\n/**\n * Whether we need check the initial-response header that is sent during the\n * fast handshake.\n *\n * @return {boolean} true if the initial-response header is yet to be processed.\n * @private\n */\nChannelRequest.prototype.shouldCheckInitialResponse_ = function() {\n  return this.decodeInitialResponse_ && !this.initialResponseDecoded_;\n};\n\n/**\n * Queries the initial response header that is sent during the handshake.\n *\n * @return {?string} The non-empty header value or null.\n * @private\n */\nChannelRequest.prototype.getInitialResponse_ = function() {\n  if (this.xmlHttp_) {\n    const value = this.xmlHttp_.getStreamingResponseHeader(\n        WebChannel.X_HTTP_INITIAL_RESPONSE);\n    if (value && !googString.isEmptyOrWhitespace(value)) {\n      return value;\n    }\n  }\n\n  return null;\n};\n\n/**\n * Check if the initial response header has been handled.\n *\n * @return {boolean} true if X_HTTP_INITIAL_RESPONSE has been handled.\n */\nChannelRequest.prototype.isInitialResponseDecoded = function() {\n  return this.initialResponseDecoded_;\n};\n\n/**\n * Decodes X_HTTP_INITIAL_RESPONSE if present.\n */\nChannelRequest.prototype.setDecodeInitialResponse = function() {\n  this.decodeInitialResponse_ = true;\n};\n\n/**\n * Decodes the responses from XhrIo object.\n * @returns {string} responseText\n * @private\n */\nChannelRequest.prototype.decodeXmlHttpResponse_ = function() {\n  if (!this.useFetchStreamsForResponse_()) {\n    return this.xmlHttp_.getResponseText();\n  }\n  const responseChunks =\n      /** @type {!Array<!Uint8Array>|string} */ (this.xmlHttp_.getResponse());\n  if (responseChunks === '') {\n    // in case of net::ERR_INTERNET_DISCONNECTED, this.xmlHttp_.getResponse()\n    // returns '' (empty string)\n    return '';\n  }\n  let responseText = '';\n  const responseLength = responseChunks.length;\n  const requestCompleted =\n      this.xmlHttp_.getReadyState() == XmlHttp.ReadyState.COMPLETE;\n  if (!this.fetchResponseState_.textDecoder) {\n    if (typeof TextDecoder === 'undefined') {\n      this.channelDebug_.severe(\n          'TextDecoder is not supported by this browser.');\n      this.cleanup_();\n      this.dispatchFailure_();\n      return '';\n    }\n    this.fetchResponseState_.textDecoder = new goog.global.TextDecoder();\n  }\n  for (let i = 0; i < responseLength; i++) {\n    this.fetchResponseState_.responseArrivedForFetch = true;\n    const isLastChunk = requestCompleted && i == responseLength - 1;\n    responseText += this.fetchResponseState_.textDecoder.decode(\n        responseChunks[i], {stream: !isLastChunk});\n  }\n  responseChunks.length = 0;  // Empty the `responseChunks` array.\n  this.fetchResponseState_.responseBuffer += responseText;\n  this.xmlHttpChunkStart_ = 0;\n  return this.fetchResponseState_.responseBuffer;\n};\n\n/**\n * Whether or not the response has response body.\n * @private\n * @returns {boolean}\n */\nChannelRequest.prototype.hasResponseBody_ = function() {\n  if (!this.xmlHttp_) {\n    return false;\n  }\n  if (this.fetchResponseState_.responseArrivedForFetch) {\n    return true;\n  }\n  return !(!this.xmlHttp_.getResponseText() && !this.xmlHttp_.getResponse());\n};\n\n/**\n * Whether or not the response body is streamed.\n * @private\n * @returns {boolean}\n */\nChannelRequest.prototype.useFetchStreamsForResponse_ = function() {\n  if (!this.xmlHttp_) {\n    return false;\n  }\n  return (\n      this.verb_ == 'GET' && this.type_ != ChannelRequest.Type_.CLOSE_REQUEST &&\n      this.channel_.usesFetchStreams());\n};\n\n/**\n * Decodes the next set of available chunks in the response.\n * @param {number} readyState The value of readyState.\n * @param {string} responseText The value of responseText.\n * @private\n */\nChannelRequest.prototype.decodeNextChunks_ = function(\n    readyState, responseText) {\n  let decodeNextChunksSuccessful = true;\n\n  let chunkText;\n  while (!this.cancelled_ && this.xmlHttpChunkStart_ < responseText.length) {\n    chunkText = this.getNextChunk_(responseText);\n    if (chunkText == ChannelRequest.INCOMPLETE_CHUNK_) {\n      if (readyState == XmlHttp.ReadyState.COMPLETE) {\n        // should have consumed entire response when the request is done\n        this.lastError_ = ChannelRequest.Error.BAD_DATA;\n        requestStats.notifyStatEvent(requestStats.Stat.REQUEST_INCOMPLETE_DATA);\n        decodeNextChunksSuccessful = false;\n      }\n      this.channelDebug_.xmlHttpChannelResponseText(\n          this.rid_, null, '[Incomplete Response]');\n      break;\n    } else if (chunkText == ChannelRequest.INVALID_CHUNK_) {\n      this.lastError_ = ChannelRequest.Error.BAD_DATA;\n      requestStats.notifyStatEvent(requestStats.Stat.REQUEST_BAD_DATA);\n      this.channelDebug_.xmlHttpChannelResponseText(\n          this.rid_, responseText, '[Invalid Chunk]');\n      decodeNextChunksSuccessful = false;\n      break;\n    } else {\n      this.channelDebug_.xmlHttpChannelResponseText(\n          this.rid_, /** @type {string} */ (chunkText), null);\n      this.safeOnRequestData_(/** @type {string} */ (chunkText));\n    }\n  }\n\n  if (this.useFetchStreamsForResponse_() && this.xmlHttpChunkStart_ != 0) {\n    // Remove processed chunk text from response buffer.\n    this.fetchResponseState_.responseBuffer =\n        this.fetchResponseState_.responseBuffer.slice(this.xmlHttpChunkStart_);\n    this.xmlHttpChunkStart_ = 0;\n  }\n\n  if (readyState == XmlHttp.ReadyState.COMPLETE && responseText.length == 0 &&\n      !this.fetchResponseState_.responseArrivedForFetch) {\n    // also an error if we didn't get any response\n    this.lastError_ = ChannelRequest.Error.NO_DATA;\n    requestStats.notifyStatEvent(requestStats.Stat.REQUEST_NO_DATA);\n    decodeNextChunksSuccessful = false;\n  }\n\n  this.successful_ = this.successful_ && decodeNextChunksSuccessful;\n\n  if (!decodeNextChunksSuccessful) {\n    // malformed response - we make this trigger retry logic\n    this.channelDebug_.xmlHttpChannelResponseText(\n        this.rid_, responseText, '[Invalid Chunked Response]');\n    this.cleanup_();\n    this.dispatchFailure_();\n  } else {\n    if (responseText.length > 0 && !this.firstByteReceived_) {\n      this.firstByteReceived_ = true;\n      this.channel_.onFirstByteReceived(this, responseText);\n    }\n  }\n};\n\n/**\n * Returns the next chunk of a chunk-encoded response. This is not standard\n * HTTP chunked encoding because browsers don't expose the chunk boundaries to\n * the application through XMLHTTP. So we have an additional chunk encoding at\n * the application level that lets us tell where the beginning and end of\n * individual responses are so that we can only try to eval a complete JS array.\n *\n * The encoding is the size of the chunk encoded as a decimal string followed\n * by a newline followed by the data.\n *\n * @param {string} responseText The response text from the XMLHTTP response.\n * @return {string|!Object} The next chunk string or a sentinel object\n *                         indicating a special condition.\n * @private\n */\nChannelRequest.prototype.getNextChunk_ = function(responseText) {\n  const sizeStartIndex = this.xmlHttpChunkStart_;\n  const sizeEndIndex = responseText.indexOf('\\n', sizeStartIndex);\n  if (sizeEndIndex == -1) {\n    return ChannelRequest.INCOMPLETE_CHUNK_;\n  }\n\n  const sizeAsString = responseText.substring(sizeStartIndex, sizeEndIndex);\n  const size = Number(sizeAsString);\n  if (isNaN(size)) {\n    return ChannelRequest.INVALID_CHUNK_;\n  }\n\n  const chunkStartIndex = sizeEndIndex + 1;\n  if (chunkStartIndex + size > responseText.length) {\n    return ChannelRequest.INCOMPLETE_CHUNK_;\n  }\n\n  const chunkText = responseText.slice(chunkStartIndex, chunkStartIndex + size);\n  this.xmlHttpChunkStart_ = chunkStartIndex + size;\n  return chunkText;\n};\n\n/**\n * Uses an IMG tag or navigator.sendBeacon to send an HTTP get to the server.\n *\n * This is only currently used to terminate the connection, as an IMG tag is\n * the most reliable way to send something to the server while the page\n * is getting torn down.\n *\n * Navigator.sendBeacon is available on Chrome and Firefox as a formal\n * solution to ensure delivery without blocking window close. See\n * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon\n *\n * For Chrome Apps, sendBeacon is always necessary due to Content Security\n * Policy (CSP) violation of using an IMG tag.\n *\n * For react-native, we use xhr to send the actual close request, and assume\n * there is no page-close issue with react-native.\n *\n * @param {Uri} uri The uri to send a request to.\n */\nChannelRequest.prototype.sendCloseRequest = function(uri) {\n  this.type_ = ChannelRequest.Type_.CLOSE_REQUEST;\n  this.baseUri_ = uri.clone().makeUnique();\n\n  let requestSent = false;\n\n  if (goog.global.navigator && goog.global.navigator.sendBeacon) {\n    try {\n      // empty string body to avoid 413 error on chrome < 41\n      requestSent =\n          goog.global.navigator.sendBeacon(this.baseUri_.toString(), '');\n    } catch {\n      // Intentionally left empty; sendBeacon might throw TypeError in certain\n      // unexpected cases.\n    }\n  }\n\n  if (!requestSent && goog.global.Image) {\n    const eltImg = new Image();\n    eltImg.src = this.baseUri_;\n    requestSent = true;\n  }\n\n  if (!requestSent) {\n    // no handler is set to match the sendBeacon/Image behavior\n    this.xmlHttp_ = this.channel_.createXhrIo(null);\n    this.xmlHttp_.send(this.baseUri_);\n  }\n\n  this.requestStartTime_ = Date.now();\n  this.ensureWatchDogTimer_();\n};\n\n/**\n * Cancels the request no matter what the underlying transport is.\n */\nChannelRequest.prototype.cancel = function() {\n  this.cancelled_ = true;\n  this.cleanup_();\n};\n\n/**\n * Resets the timeout.\n *\n * @param {number=} opt_timeout The new timeout\n */\nChannelRequest.prototype.resetTimeout = function(opt_timeout) {\n  if (opt_timeout) {\n    this.setTimeout(opt_timeout);\n  }\n  // restart only if a timer is currently set\n  if (this.watchDogTimerId_) {\n    this.cancelWatchDogTimer_();\n    this.ensureWatchDogTimer_();\n  }\n};\n\n/**\n * Ensures that there is watchdog timeout which is used to ensure that\n * the connection completes in time.\n *\n * @private\n */\nChannelRequest.prototype.ensureWatchDogTimer_ = function() {\n  this.watchDogTimeoutTime_ = Date.now() + this.timeout_;\n  this.startWatchDogTimer_(this.timeout_);\n};\n\n/**\n * Starts the watchdog timer which is used to ensure that the connection\n * completes in time.\n * @param {number} time The number of milliseconds to wait.\n * @private\n */\nChannelRequest.prototype.startWatchDogTimer_ = function(time) {\n  if (this.watchDogTimerId_ != null) {\n    // assertion\n    throw new Error('WatchDog timer not null');\n  }\n  this.watchDogTimerId_ =\n      requestStats.setTimeout(goog.bind(this.onWatchDogTimeout_, this), time);\n};\n\n/**\n * Cancels the watchdog timer if it has been started.\n *\n * @private\n */\nChannelRequest.prototype.cancelWatchDogTimer_ = function() {\n  if (this.watchDogTimerId_) {\n    goog.global.clearTimeout(this.watchDogTimerId_);\n    this.watchDogTimerId_ = null;\n  }\n};\n\n/**\n * Called when the watchdog timer is triggered. It also handles a case where it\n * is called too early which we suspect may be happening sometimes\n * (not sure why)\n *\n * @private\n */\nChannelRequest.prototype.onWatchDogTimeout_ = function() {\n  this.watchDogTimerId_ = null;\n  const now = Date.now();\n  asserts.assert(this.watchDogTimeoutTime_, 'WatchDog timeout time missing?');\n  if (now - this.watchDogTimeoutTime_ >= 0) {\n    this.handleTimeout_();\n  } else {\n    // got called too early for some reason\n    this.channelDebug_.warning('WatchDog timer called too early');\n    this.startWatchDogTimer_(this.watchDogTimeoutTime_ - now);\n  }\n};\n\n/**\n * Called when the request has actually timed out. Will cleanup and notify the\n * channel of the failure.\n *\n * @private\n */\nChannelRequest.prototype.handleTimeout_ = function() {\n  if (this.successful_) {\n    // Should never happen.\n    this.channelDebug_.severe(\n        'Received watchdog timeout even though request loaded successfully');\n  }\n\n  this.channelDebug_.timeoutResponse(this.requestUri_);\n\n  // IMG or SendBeacon requests never notice if they were successful,\n  // and always 'time out'. This fact says nothing about reachability.\n  if (this.type_ != ChannelRequest.Type_.CLOSE_REQUEST) {\n    requestStats.notifyServerReachabilityEvent(\n        requestStats.ServerReachability.REQUEST_FAILED);\n    requestStats.notifyStatEvent(requestStats.Stat.REQUEST_TIMEOUT);\n  }\n\n  this.cleanup_();\n\n  // Set error and dispatch failure.\n  // This is called for CLOSE_REQUEST too to ensure channel_.onRequestComplete.\n  this.lastError_ = ChannelRequest.Error.TIMEOUT;\n  this.dispatchFailure_();\n};\n\n/**\n * Notifies the channel that this request failed.\n * @private\n */\nChannelRequest.prototype.dispatchFailure_ = function() {\n  if (this.channel_.isClosed() || this.cancelled_) {\n    return;\n  }\n\n  this.channel_.onRequestComplete(this);\n};\n\n/**\n * Cleans up the objects used to make the request. This function is\n * idempotent.\n *\n * @private\n */\nChannelRequest.prototype.cleanup_ = function() {\n  this.cancelWatchDogTimer_();\n\n  dispose(this.readyStateChangeThrottle_);\n  this.readyStateChangeThrottle_ = null;\n\n  // Unhook all event handlers.\n  this.eventHandler_.removeAll();\n\n  if (this.xmlHttp_) {\n    // clear out this.xmlHttp_ before aborting so we handle getting reentered\n    // inside abort\n    const xmlhttp = this.xmlHttp_;\n    this.xmlHttp_ = null;\n    xmlhttp.abort();\n    xmlhttp.dispose();\n  }\n};\n\n/**\n * Indicates whether the request was successful. Only valid after the handler\n * is called to indicate completion of the request.\n *\n * @return {boolean} True if the request succeeded.\n */\nChannelRequest.prototype.getSuccess = function() {\n  return this.successful_;\n};\n\n/**\n * If the request was not successful, returns the reason.\n *\n * @return {?ChannelRequest.Error}  The last error.\n */\nChannelRequest.prototype.getLastError = function() {\n  return this.lastError_;\n};\n\n/**\n * @return {!Object<string, string>|undefined} Response headers received\n *     along with the non-200 status, as a key-value map.\n */\nChannelRequest.prototype.getErrorResponseHeaders = function() {\n  return this.errorResponseHeaders_;\n};\n\n/**\n * Returns the status code of the last request.\n *\n * @return {number} The status code of the last request.\n */\nChannelRequest.prototype.getLastStatusCode = function() {\n  return this.lastStatusCode_;\n};\n\n/**\n * Returns the session id for this channel.\n *\n * @return {string|undefined} The session ID.\n */\nChannelRequest.prototype.getSessionId = function() {\n  return this.sid_;\n};\n\n/**\n * Returns the request id for this request. Each request has a unique request\n * id and the request IDs are a sequential increasing count.\n *\n * @return {string|number|undefined} The request ID.\n */\nChannelRequest.prototype.getRequestId = function() {\n  return this.rid_;\n};\n\n/**\n * Returns the data for a post, if this request is a post.\n *\n * @return {?string} The POST data provided by the request initiator.\n */\nChannelRequest.prototype.getPostData = function() {\n  return this.postData_;\n};\n\n/**\n * Returns the XhrIo request object.\n *\n * @return {?XhrIo} Any XhrIo request created for this object.\n */\nChannelRequest.prototype.getXhr = function() {\n  return this.xmlHttp_;\n};\n\n/**\n * Returns the time that the request started, if it has started.\n *\n * @return {?number} The time the request started, as returned by Date.now().\n */\nChannelRequest.prototype.getRequestStartTime = function() {\n  return this.requestStartTime_;\n};\n\n/**\n * Helper to call the callback's onRequestData, which catches any\n * exception.\n * @param {string} data The request data.\n * @private\n */\nChannelRequest.prototype.safeOnRequestData_ = function(data) {\n  try {\n    this.channel_.onRequestData(this, data);\n    const stats = requestStats.ServerReachability;\n    requestStats.notifyServerReachabilityEvent(stats.BACK_CHANNEL_ACTIVITY);\n  } catch (e) {\n    // Dump debug info, but keep going without closing the channel.\n    this.channelDebug_.dumpException(e, 'Error in httprequest callback');\n  }\n};\n\n/**\n * Convenience factory method.\n *\n * @param {Channel} channel The channel object that owns this request.\n * @param {WebChannelDebug} channelDebug A WebChannelDebug to use for logging.\n * @param {string=} opt_sessionId  The session id for the channel.\n * @param {string|number=} opt_requestId  The request id for this request.\n * @param {number=} opt_retryId  The retry id for this request.\n * @return {!ChannelRequest} The created channel request.\n */\nChannelRequest.createChannelRequest = function(\n    channel, channelDebug, opt_sessionId, opt_requestId, opt_retryId) {\n  return new ChannelRequest(\n      channel, channelDebug, opt_sessionId, opt_requestId, opt_retryId);\n};\n\nexports = ChannelRequest;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Base WebChannel implementation.\n */\n\n\ngoog.module('goog.labs.net.webChannel.WebChannelBase');\ngoog.module.declareLegacyNamespace();\n\nconst Channel = goog.require('goog.labs.net.webChannel.Channel');\nconst ChannelRequest = goog.require('goog.labs.net.webChannel.ChannelRequest');\nconst ConnectionState = goog.require('goog.labs.net.webChannel.ConnectionState');\nconst FetchXmlHttpFactory = goog.require('goog.net.FetchXmlHttpFactory');\nconst ForwardChannelRequestPool = goog.require('goog.labs.net.webChannel.ForwardChannelRequestPool');\nconst Uri = goog.require('goog.Uri');\nconst WebChannel = goog.require('goog.net.WebChannel');\nconst WebChannelDebug = goog.require('goog.labs.net.webChannel.WebChannelDebug');\nconst Wire = goog.require('goog.labs.net.webChannel.Wire');\nconst WireV8 = goog.require('goog.labs.net.webChannel.WireV8');\nconst XhrIo = goog.require('goog.net.XhrIo');\nconst XmlHttpFactory = goog.require('goog.net.XmlHttpFactory');\nconst asserts = goog.require('goog.asserts');\nconst environment = goog.require('goog.labs.net.webChannel.environment');\nconst googArray = goog.require('goog.array');\nconst googJson = goog.require('goog.json');\nconst googObject = goog.require('goog.object');\nconst googString = goog.require('goog.string');\nconst httpCors = goog.require('goog.net.rpc.HttpCors');\nconst maps = goog.require('goog.collections.maps');\nconst netUtils = goog.require('goog.labs.net.webChannel.netUtils');\nconst requestStats = goog.require('goog.labs.net.webChannel.requestStats');\nconst run = goog.require('goog.async.run');\n\n/**\n * @define {boolean} If WebChannel should compile with Origin Trial features.\n */\nconst ALLOW_ORIGIN_TRIAL_FEATURES =\n    goog.define('goog.net.webChannel.ALLOW_ORIGIN_TRIAL_FEATURES', false);\n\n/**\n * Gets an internal channel parameter in a type-safe way.\n *\n * @param {string} paramName the key of the parameter to fetch.\n * @param {!T} defaultValue the default value to return\n * @param {!WebChannel.Options=} options Configuration for the\n *        WebChannel instance.\n * @return {T}\n * @template T\n */\nfunction getInternalChannelParam(paramName, defaultValue, options) {\n  if (!options || !options.internalChannelParams) {\n    return defaultValue;\n  }\n  return /** @type {T} */ (options.internalChannelParams[paramName]) ||\n      defaultValue;\n}\n\n/**\n * This WebChannel implementation is branched off goog.net.BrowserChannel\n * for now. Ongoing changes to goog.net.BrowserChannel will be back\n * ported to this implementation as needed.\n *\n * @param {!WebChannel.Options=} opt_options Configuration for the\n *        WebChannel instance.\n * @param {number=} opt_clientVersion An application-specific version number\n *        that is sent to the server when connected.\n * @param {!ConnectionState=} opt_conn Previously determined connection\n *        conditions.\n * @constructor\n * @struct\n * @implements {Channel}\n */\nfunction WebChannelBase(opt_options, opt_clientVersion, opt_conn) {\n  /**\n   * The client library version (capabilities).\n   * @private @const {number}\n   */\n  this.clientVersion_ = opt_clientVersion || 0;\n\n  /**\n   * The server library version (capabilities).\n   * @private {number}\n   */\n  this.serverVersion_ = 0;\n\n  /**\n   * An array of queued maps that need to be sent to the server.\n   * @private {!Array<Wire.QueuedMap>}\n   */\n  this.outgoingMaps_ = [];\n\n  /**\n   * The channel debug used for logging\n   * @private {!WebChannelDebug}\n   */\n  this.channelDebug_ = new WebChannelDebug();\n\n  /**\n   * Connectivity state.\n   * @private @const {!ConnectionState}\n   */\n  this.connState_ = opt_conn || new ConnectionState();\n\n  /**\n   * Extra HTTP headers to add to all the requests sent to the server.\n   * @private {?Object}\n   */\n  this.extraHeaders_ = null;\n\n  /**\n   * Extra HTTP headers to add to the init request(s) sent to the server.\n   * @private {?Object}\n   */\n  this.initHeaders_ = null;\n\n  /**\n   * @private {?string} The URL param name to overwrite custom HTTP headers\n   * to bypass CORS preflight.\n   */\n  this.httpHeadersOverwriteParam_ = null;\n\n  /**\n   * Extra parameters to add to all the requests sent to the server.\n   * @private {?Object}\n   */\n  this.extraParams_ = null;\n\n  /**\n   * Parameter name for the http session id.\n   * @private {?string}\n   */\n  this.httpSessionIdParam_ = null;\n\n  /**\n   * The http session id, to be sent with httpSessionIdParam_ with each\n   * request after the initial handshake.\n   * @private {?string}\n   */\n  this.httpSessionId_ = null;\n\n  /**\n   * The ChannelRequest object for the backchannel.\n   * @private {?ChannelRequest}\n   */\n  this.backChannelRequest_ = null;\n\n  /**\n   * The relative path (in the context of the page hosting the browser channel)\n   * for making requests to the server.\n   * @private {?string}\n   */\n  this.path_ = null;\n\n  /**\n   * The absolute URI for the forwardchannel request.\n   * @private {?Uri}\n   */\n  this.forwardChannelUri_ = null;\n\n  /**\n   * The absolute URI for the backchannel request.\n   * @private {?Uri}\n   */\n  this.backChannelUri_ = null;\n\n  /**\n   * A subdomain prefix for using a subdomain in IE for the backchannel\n   * requests.\n   * @private {?string}\n   */\n  this.hostPrefix_ = null;\n\n  /**\n   * Whether we allow the use of a subdomain in IE for the backchannel requests.\n   * @private {boolean}\n   */\n  this.allowHostPrefix_ = true;\n\n  /**\n   * The next id to use for the RID (request identifier) parameter. This\n   * identifier uniquely identifies the forward channel request.\n   * @private {number}\n   */\n  this.nextRid_ = 0;\n\n  /**\n   * The id to use for the next outgoing map. This identifier uniquely\n   * identifies a sent map.\n   * @private {number}\n   */\n  this.nextMapId_ = 0;\n\n  /**\n   * Whether to fail forward-channel requests after one try or a few tries.\n   * @private {boolean}\n   */\n  this.failFast_ = getInternalChannelParam('failFast', false, opt_options);\n\n  /**\n   * The handler that receive callbacks for state changes and data.\n   * @private {?WebChannelBase.Handler}\n   */\n  this.handler_ = null;\n\n  /**\n   * Timer identifier for asynchronously making a forward channel request.\n   * This is set to true if the func is scheduled with async.run, which\n   * is equivalent to setTimeout(0).\n   * @private {?number|?boolean}\n   */\n  this.forwardChannelTimerId_ = null;\n\n  /**\n   * Timer identifier for asynchronously making a back channel request.\n   * @private {?number}\n   */\n  this.backChannelTimerId_ = null;\n\n  /**\n   * Timer identifier for the timer that waits for us to retry the backchannel\n   * in the case where it is dead and no longer receiving data.\n   * @private {?number}\n   */\n  this.deadBackChannelTimerId_ = null;\n\n  /**\n   * Whether the client's network conditions can support streamed responses.\n   * @private {?boolean}\n   */\n  this.enableStreaming_ = null;\n\n  /**\n   * Whether streaming mode is allowed. In certain debugging situations, it's\n   * useful to disable this.\n   * @private {boolean}\n   */\n  this.allowStreamingMode_ = true;\n\n  /**\n   * The array identifier of the last array received from the server for the\n   * backchannel request.\n   * @private {number}\n   */\n  this.lastArrayId_ = -1;\n\n  /**\n   * The array id of the last array sent by the server that we know about.\n   * @private {number}\n   */\n  this.lastPostResponseArrayId_ = -1;\n\n  /**\n   * The non-200 status code received that causes the channel to be aborted.\n   * @private {number}\n   */\n  this.errorResponseStatusCode_ = -1;\n\n  /**\n   * The response headers received along with the non-200 status.\n   * @private {!Object<string, string>|undefined}\n   */\n  this.errorResponseHeaders_ = undefined;\n\n  /**\n   * Number of times we have retried the current forward channel request.\n   * @private {number}\n   */\n  this.forwardChannelRetryCount_ = 0;\n\n  /**\n   * Number of times in a row that we have retried the current back channel\n   * request and received no data.\n   * @private {number}\n   */\n  this.backChannelRetryCount_ = 0;\n\n  /**\n   * The attempt id for the current back channel request. Starts at 1 and\n   * increments for each reconnect. The server uses this to log if our\n   * connection is flaky or not.\n   * @private {number}\n   */\n  this.backChannelAttemptId_ = 0;\n\n  /**\n   * The base part of the time before firing next retry request. Default is 5\n   * seconds. Note that a random delay is added (see {@link retryDelaySeedMs_})\n   * for all retries, and linear backoff is applied to the sum for subsequent\n   * retries.\n   * @private {number}\n   */\n  this.baseRetryDelayMs_ =\n      getInternalChannelParam('baseRetryDelayMs', 5 * 1000, opt_options);\n\n  /**\n   * A random time between 0 and this number of MS is added to the\n   * {@link baseRetryDelayMs_}. Default is 10 seconds.\n   * @private {number}\n   */\n  this.retryDelaySeedMs_ =\n      getInternalChannelParam('retryDelaySeedMs', 10 * 1000, opt_options);\n\n  /**\n   * Maximum number of attempts to connect to the server for forward channel\n   * requests. Defaults to 2.\n   * @private {number}\n   */\n  this.forwardChannelMaxRetries_ =\n      getInternalChannelParam('forwardChannelMaxRetries', 2, opt_options);\n\n  /**\n   * The timeout in milliseconds for a forward channel request. Defaults to 20\n   * seconds. Note that part of this timeout can be randomized.\n   * @private {number}\n   */\n  this.forwardChannelRequestTimeoutMs_ = getInternalChannelParam(\n      'forwardChannelRequestTimeoutMs', 20 * 1000, opt_options);\n\n  /**\n   * The custom factory used to create XMLHttpRequest objects.\n   * @private @const {!XmlHttpFactory | undefined}\n   */\n  this.xmlHttpFactory_ =\n      (opt_options && opt_options.xmlHttpFactory) || undefined;\n\n  /**\n   * The server URL to use for test network availability.\n   * @private @const {string|undefined}\n   */\n  this.networkTestUrl_ =\n      (opt_options && opt_options.networkTestUrl) || undefined;\n\n  /**\n   * Whether or not this channel uses WHATWG Fetch/streams.\n   * @private @const {boolean}\n   */\n  this.usesFetchStreams_ =\n      (opt_options && opt_options.useFetchStreams) || false;\n\n  /**\n   * The timeout in milliseconds for a back channel request. Defaults to using\n   * the timeout configured in ChannelRequest (45s). If server-side\n   * keepaliveInterval is known to the client, set the backchannel request\n   * timeout to 1.5 * keepaliveInterval (ms).\n   *\n   * @private {number|undefined}\n   */\n  this.backChannelRequestTimeoutMs_ = undefined;\n\n  /**\n   * A throttle time in ms for readystatechange events for the backchannel.\n   * Useful for throttling when ready state is INTERACTIVE (partial data).\n   *\n   * This throttle is useful if the server sends large data chunks down the\n   * backchannel.  It prevents examining XHR partial data on every readystate\n   * change event.  This is useful because large chunks can trigger hundreds\n   * of readystatechange events, each of which takes ~5ms or so to handle,\n   * in turn making the UI unresponsive for a significant period.\n   *\n   * If set to zero no throttle is used.\n   * @private {number}\n   */\n  this.readyStateChangeThrottleMs_ = 0;\n\n  /**\n   * Whether cross origin requests are supported for the channel.\n   *\n   * See {@link XhrIo#setWithCredentials}.\n   * @private {boolean}\n   */\n  this.supportsCrossDomainXhrs_ =\n      (opt_options && opt_options.supportsCrossDomainXhr) || false;\n\n  /**\n   * The current session id.\n   * @private {string}\n   */\n  this.sid_ = '';\n\n  /**\n   * The current ChannelRequest pool for the forward channel.\n   * @private @const {!ForwardChannelRequestPool}\n   */\n  this.forwardChannelRequestPool_ = new ForwardChannelRequestPool(\n      opt_options && opt_options.concurrentRequestLimit);\n\n  /**\n   * The maximum number of maps that can be sent in one POST.\n   *\n   * Defaults to 1000 and cannot exceed 1000.\n   * @private @const {number}\n   */\n  this.maxMapsPerRequest_ = Math.min(\n      (opt_options && opt_options.maxMessagesPerRequest) || 1000, 1000);\n\n  /**\n   * The V8 codec.\n   * @private @const {!WireV8}\n   */\n  this.wireCodec_ = new WireV8();\n\n  /**\n   * Whether to turn on the fast handshake behavior.\n   *\n   * @private @const {boolean}\n   */\n  this.fastHandshake_ = (opt_options && opt_options.fastHandshake) || false;\n\n  /**\n   * Whether to encode initMessageHeaders in the body.\n   *\n   * @private {boolean}\n   */\n  this.encodeInitMessageHeaders_ =\n      (opt_options && opt_options.encodeInitMessageHeaders) || false;\n\n  if (this.fastHandshake_ && this.encodeInitMessageHeaders_) {\n    this.channelDebug_.warning(\n        'Ignore encodeInitMessageHeaders because fastHandshake is set.');\n    this.encodeInitMessageHeaders_ = false;\n  }\n\n  /**\n   * Whether to signal to the server to enable blocking handshake.\n   *\n   * @private @const {boolean}\n   */\n  this.blockingHandshake_ =\n      (opt_options && opt_options.blockingHandshake) || false;\n\n  if (opt_options && opt_options.disableRedact) {\n    this.channelDebug_.disableRedact();\n  }\n\n  if (opt_options && opt_options.forceLongPolling) {\n    this.allowStreamingMode_ = false;\n  }\n\n  /**\n   * Whether to detect buffering proxies.\n   *\n   * fastHandshake + detectBufferingProxy are yet to be implemented.\n   *\n   * @private @const {boolean}\n   */\n  this.detectBufferingProxy_ =\n      (!this.fastHandshake_ && this.allowStreamingMode_ && opt_options &&\n       opt_options.detectBufferingProxy) ||\n      false;\n\n  /**\n   * Long polling timeout interval for the server to complete the handing GET.\n   *\n   * @private {number|undefined}\n   */\n  this.longPollingTimeout_ = undefined;\n\n  if (opt_options && opt_options.longPollingTimeout &&\n      opt_options.longPollingTimeout > 0) {\n    this.longPollingTimeout_ = opt_options.longPollingTimeout;\n  }\n\n  /**\n   * Callback when all the pending client-sent messages have been flushed.\n   *\n   * @private {function()|undefined}\n   */\n  this.forwardChannelFlushedCallback_ = undefined;\n\n  /**\n   * TODO(wenboz): move all backchannel states to its own class similar to\n   * forwardchannelrequestpool.js and log more stats.\n   *\n   * The estimated handshake RTT (ms) as measured from when the handshake\n   * request is sent and when the handshake response headers are received.\n   * If the value is 0, the RTT is unknown.\n   *\n   * @private {number}\n   */\n  this.handshakeRttMs_ = 0;\n\n  /**\n   * If BP detection is done or still in progress.\n   * Should only be checked when detectBufferingProxy is turned on.\n   * @private {boolean}\n   */\n  this.bpDetectionDone_ = false;\n\n  /**\n   * The timer for detecting buffering proxy. This needs be reset with each\n   * backchannel request. If this is not null, bpDetectionDone_ == false.\n   * @private {?number}\n   */\n  this.bpDetectionTimerId_ = null;\n\n  /***\n   * Whether to attempt Chrome Origin Trials as part of the handshake.\n   * @private @const {boolean}\n   */\n  this.enableOriginTrials_ = ALLOW_ORIGIN_TRIAL_FEATURES &&\n      (!opt_options || opt_options.enableOriginTrials !== false);\n\n  /**\n   * The array of non-acked maps at the time of channel close. Refer to\n   * `getNonAckedMessagesWithClosedChannel()` API for definitions of non-acked\n   * messages.\n   *\n   * @private {?Array<!Wire.QueuedMap>}\n   */\n  this.nonAckedMapsAtChannelClose_ = null;\n}\n\n/**\n * The channel version that we negotiated with the server for this session.\n * Starts out as the version we request, and then is changed to the negotiated\n * version after the initial open.\n * @private {number}\n */\nWebChannelBase.prototype.channelVersion_ = Wire.LATEST_CHANNEL_VERSION;\n\n/**\n * Enum type for the channel state machine.\n * @enum {number}\n */\nWebChannelBase.State = {\n  /** The channel is closed. */\n  CLOSED: 0,\n\n  /** The channel has been initialized but hasn't yet initiated a connection. */\n  INIT: 1,\n\n  /** The channel is in the process of opening a connection to the server. */\n  OPENING: 2,\n\n  /** The channel is open. */\n  OPENED: 3\n};\n\n/**\n * The current state of the WebChannel.\n * @private {!WebChannelBase.State}\n */\nWebChannelBase.prototype.state_ = WebChannelBase.State.INIT;\n\n/**\n * The timeout in milliseconds for a forward channel request.\n * @type {number}\n */\nWebChannelBase.FORWARD_CHANNEL_RETRY_TIMEOUT = 20 * 1000;\n\n/**\n * Maximum number of attempts to connect to the server for back channel\n * requests.\n * @type {number}\n */\nWebChannelBase.BACK_CHANNEL_MAX_RETRIES = 3;\n\n/**\n * A number in MS of how long we guess the maxmium amount of time a round trip\n * to the server should take. In the future this could be substituted with a\n * real measurement of the RTT.\n * @type {number}\n */\nWebChannelBase.RTT_ESTIMATE = 3 * 1000;\n\n/**\n * When retrying for an inactive channel, we will multiply the total delay by\n * this number.\n * @type {number}\n */\nWebChannelBase.INACTIVE_CHANNEL_RETRY_FACTOR = 2;\n\n/**\n * Enum type for identifying an error.\n * @enum {number}\n */\nWebChannelBase.Error = {\n  /** Value that indicates no error has occurred. */\n  OK: 0,\n\n  /** An error due to a request failing. */\n  REQUEST_FAILED: 2,\n\n  /** An error due to the user being logged out. */\n  LOGGED_OUT: 4,\n\n  /** An error due to server response which contains no data. */\n  NO_DATA: 5,\n\n  /** An error due to a server response indicating an unknown session id */\n  UNKNOWN_SESSION_ID: 6,\n\n  /** An error due to a server response requesting to stop the channel. */\n  STOP: 7,\n\n  /** A general network error. */\n  NETWORK: 8,\n\n  /** An error due to bad data being returned from the server. */\n  BAD_DATA: 10,\n\n  /** An error due to a response that is not parsable. */\n  BAD_RESPONSE: 11\n};\n\n/**\n * Internal enum type for the two channel types.\n * @enum {number}\n * @private\n */\nWebChannelBase.ChannelType_ = {\n  FORWARD_CHANNEL: 1,\n\n  BACK_CHANNEL: 2\n};\n\n/**\n * The maximum number of utf-8 chars that can be sent in one GET to enable 0-RTT\n * handshake.\n *\n *  @const @private {number}\n */\nWebChannelBase.MAX_CHARS_PER_GET_ = 4 * 1024;\n\n/**\n * A guess at a cutoff at which to no longer assume the backchannel is dead\n * when we are slow to receive data. Number in bytes.\n *\n * Assumption: The worst bandwidth we work on is 50 kilobits/sec\n * 50kbits/sec * (1 byte / 8 bits) * 6 sec dead backchannel timeout\n * @type {number}\n */\nWebChannelBase.OUTSTANDING_DATA_BACKCHANNEL_RETRY_CUTOFF = 37500;\n\n/**\n * @return {number} The server version or 0 if undefined\n */\nWebChannelBase.prototype.getServerVersion = function() {\n  return this.serverVersion_;\n};\n\n/**\n * @return {!ForwardChannelRequestPool} The forward channel request pool.\n */\nWebChannelBase.prototype.getForwardChannelRequestPool = function() {\n  return this.forwardChannelRequestPool_;\n};\n\n/**\n * @return {!Object} The codec object.\n */\nWebChannelBase.prototype.getWireCodec = function() {\n  return this.wireCodec_;\n};\n\n/**\n * Returns the logger.\n *\n * @return {!WebChannelDebug} The channel debug object.\n */\nWebChannelBase.prototype.getChannelDebug = function() {\n  return this.channelDebug_;\n};\n\n/**\n * Sets the logger.\n *\n * @param {!WebChannelDebug} channelDebug The channel debug object.\n */\nWebChannelBase.prototype.setChannelDebug = function(channelDebug) {\n  this.channelDebug_ = channelDebug;\n};\n\n/**\n * Starts the channel. This initiates connections to the server.\n *\n * @param {string} channelPath  The path for the channel connection.\n * @param {!Object=} opt_extraParams Extra parameter keys and values to add to\n *     the requests.\n * @param {string=} opt_oldSessionId  Session ID from a previous session.\n * @param {number=} opt_oldArrayId  The last array ID from a previous session.\n */\nWebChannelBase.prototype.connect = function(\n    channelPath, opt_extraParams, opt_oldSessionId, opt_oldArrayId) {\n  this.channelDebug_.debug('connect()');\n\n  this.startOriginTrials_(channelPath);\n\n  requestStats.notifyStatEvent(requestStats.Stat.CONNECT_ATTEMPT);\n\n  this.path_ = channelPath;\n  this.extraParams_ = opt_extraParams || {};\n\n  // Attach parameters about the previous session if reconnecting.\n  if (opt_oldSessionId && opt_oldArrayId !== undefined) {\n    this.extraParams_['OSID'] = opt_oldSessionId;\n    this.extraParams_['OAID'] = opt_oldArrayId;\n  }\n\n  this.enableStreaming_ = this.allowStreamingMode_;\n  this.connectChannel_();\n};\n\n/**\n * Disconnects and closes the channel.\n */\nWebChannelBase.prototype.disconnect = function() {\n  this.channelDebug_.debug('disconnect()');\n\n  this.cancelRequests_();\n\n  if (this.state_ == WebChannelBase.State.OPENED) {\n    const rid = this.nextRid_++;\n    const uri = this.forwardChannelUri_.clone();\n    uri.setParameterValue('SID', this.sid_);\n    uri.setParameterValue('RID', rid);\n    uri.setParameterValue('TYPE', 'terminate');\n\n    this.addAdditionalParams_(uri);\n\n    const request = ChannelRequest.createChannelRequest(\n        this, this.channelDebug_, this.sid_, rid);\n    request.sendCloseRequest(uri);\n  }\n\n  this.onClose_();\n};\n\n/**\n * Returns the session id of the channel. Only available after the\n * channel has been opened.\n * @return {string} Session ID.\n */\nWebChannelBase.prototype.getSessionId = function() {\n  return this.sid_;\n};\n\n/**\n * Starts the connection.\n * @private\n */\nWebChannelBase.prototype.connectChannel_ = function() {\n  this.channelDebug_.debug('connectChannel_()');\n  this.ensureInState_(WebChannelBase.State.INIT, WebChannelBase.State.CLOSED);\n  this.forwardChannelUri_ =\n      this.getForwardChannelUri(/** @type {string} */ (this.path_));\n  this.ensureForwardChannel_();\n};\n\n/**\n * Starts the Origin Trials.\n * @param {string} channelPath  The path for the channel connection.\n * @private\n */\nWebChannelBase.prototype.startOriginTrials_ = function(channelPath) {\n  if (!this.enableOriginTrials_) {\n    return;\n  }\n\n  this.channelDebug_.info('Origin Trials enabled.');\n  run(goog.bind(this.runOriginTrials_, this, channelPath));\n};\n\n/**\n * Runs the Origin Trials.\n * @param {string} channelPath  The path for the channel connection.\n * @private\n */\nWebChannelBase.prototype.runOriginTrials_ = function(channelPath) {\n  try {\n    // Since startOriginTrials might throw exceptions asynchronously, we should\n    // capture it in promise-catch.\n    environment.startOriginTrials(channelPath, e => {\n      this.channelDebug_.dumpException(\n          /** @type {?Error} */ (e), 'Error in running origin trials');\n    });\n    this.channelDebug_.info('Origin Trials invoked: ' + channelPath);\n  } catch (e) {\n    this.channelDebug_.dumpException(e, 'Error in running origin trials');\n  }\n};\n\n/**\n * Cancels backchannel request.\n * @private\n */\nWebChannelBase.prototype.cancelBackChannelRequest_ = function() {\n  if (this.backChannelRequest_) {\n    this.clearBpDetectionTimer_();\n    this.backChannelRequest_.cancel();\n    this.backChannelRequest_ = null;\n  }\n};\n\n/**\n * Cancels all outstanding requests.\n * @private\n */\nWebChannelBase.prototype.cancelRequests_ = function() {\n  this.cancelBackChannelRequest_();\n\n  if (this.backChannelTimerId_) {\n    goog.global.clearTimeout(this.backChannelTimerId_);\n    this.backChannelTimerId_ = null;\n  }\n\n  this.clearDeadBackchannelTimer_();\n\n  this.forwardChannelRequestPool_.cancel();\n\n  if (this.forwardChannelTimerId_) {\n    this.clearForwardChannelTimer_();\n  }\n};\n\n/**\n * Clears the forward channel timer.\n * @private\n */\nWebChannelBase.prototype.clearForwardChannelTimer_ = function() {\n  if (typeof this.forwardChannelTimerId_ === 'number') {\n    goog.global.clearTimeout(this.forwardChannelTimerId_);\n  }\n\n  this.forwardChannelTimerId_ = null;\n};\n\n/**\n * Returns the extra HTTP headers to add to all the requests sent to the server.\n *\n * @return {Object} The HTTP headers, or null.\n */\nWebChannelBase.prototype.getExtraHeaders = function() {\n  return this.extraHeaders_;\n};\n\n/**\n * Sets extra HTTP headers to add to all the requests sent to the server.\n *\n * @param {Object} extraHeaders The HTTP headers, or null.\n */\nWebChannelBase.prototype.setExtraHeaders = function(extraHeaders) {\n  this.extraHeaders_ = extraHeaders;\n};\n\n/**\n * Returns the extra HTTP headers to add to the init requests\n * sent to the server.\n *\n * @return {Object} The HTTP headers, or null.\n */\nWebChannelBase.prototype.getInitHeaders = function() {\n  return this.initHeaders_;\n};\n\n/**\n * Sets extra HTTP headers to add to the init requests sent to the server.\n *\n * @param {Object} initHeaders The HTTP headers, or null.\n */\nWebChannelBase.prototype.setInitHeaders = function(initHeaders) {\n  this.initHeaders_ = initHeaders;\n};\n\n/**\n * Sets the URL param name to overwrite custom HTTP headers.\n *\n * @param {string} httpHeadersOverwriteParam The URL param name.\n */\nWebChannelBase.prototype.setHttpHeadersOverwriteParam = function(\n    httpHeadersOverwriteParam) {\n  this.httpHeadersOverwriteParam_ = httpHeadersOverwriteParam;\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.setHttpSessionIdParam = function(httpSessionIdParam) {\n  this.httpSessionIdParam_ = httpSessionIdParam;\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.getHttpSessionIdParam = function() {\n  return this.httpSessionIdParam_;\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.setHttpSessionId = function(httpSessionId) {\n  this.httpSessionId_ = httpSessionId;\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.getHttpSessionId = function() {\n  return this.httpSessionId_;\n};\n\n/**\n * Sets the throttle for handling onreadystatechange events for the request.\n *\n * @param {number} throttle The throttle in ms.  A value of zero indicates\n *     no throttle.\n */\nWebChannelBase.prototype.setReadyStateChangeThrottle = function(throttle) {\n  this.readyStateChangeThrottleMs_ = throttle;\n};\n\n/**\n * Sets whether cross origin requests are supported for the channel.\n *\n * Setting this allows the creation of requests to secondary domains and\n * sends XHRs with the CORS withCredentials bit set to true.\n *\n * In order for cross-origin requests to work, the server will also need to set\n * CORS response headers as per:\n * https://developer.mozilla.org/en-US/docs/HTTP_access_control\n *\n * See {@link XhrIo#setWithCredentials}.\n * @param {boolean} supportCrossDomain Whether cross domain XHRs are supported.\n */\nWebChannelBase.prototype.setSupportsCrossDomainXhrs = function(\n    supportCrossDomain) {\n  this.supportsCrossDomainXhrs_ = supportCrossDomain;\n};\n\n/**\n * Returns the handler used for channel callback events.\n *\n * @return {WebChannelBase.Handler} The handler.\n */\nWebChannelBase.prototype.getHandler = function() {\n  return this.handler_;\n};\n\n/**\n * Sets the handler used for channel callback events.\n * @param {WebChannelBase.Handler} handler The handler to set.\n */\nWebChannelBase.prototype.setHandler = function(handler) {\n  this.handler_ = handler;\n};\n\n/**\n * Returns whether the channel allows the use of a subdomain. There may be\n * cases where this isn't allowed.\n * @return {boolean} Whether a host prefix is allowed.\n */\nWebChannelBase.prototype.getAllowHostPrefix = function() {\n  return this.allowHostPrefix_;\n};\n\n/**\n * Sets whether the channel allows the use of a subdomain. There may be cases\n * where this isn't allowed, for example, logging in with troutboard where\n * using a subdomain causes Apache to force the user to authenticate twice.\n * @param {boolean} allowHostPrefix Whether a host prefix is allowed.\n */\nWebChannelBase.prototype.setAllowHostPrefix = function(allowHostPrefix) {\n  this.allowHostPrefix_ = allowHostPrefix;\n};\n\n/**\n * Returns whether the channel is buffered or not.  This may be\n * queried in the WebChannelBase.okToMakeRequest() callback.\n *\n * @return {boolean} Whether the channel is buffered.\n */\nWebChannelBase.prototype.isBuffered = function() {\n  return !this.enableStreaming_;\n};\n\n/**\n * Returns whether streaming mode is allowed. In certain debugging situations,\n * it's useful for the application to have a way to disable streaming mode for a\n * user.\n\n * @return {boolean} Whether streaming mode is allowed.\n */\nWebChannelBase.prototype.getAllowStreamingMode = function() {\n  return this.allowStreamingMode_;\n};\n\n/**\n * Sets whether streaming mode is allowed. In certain debugging situations, it's\n * useful for the application to have a way to disable streaming mode for a\n * user.\n * @param {boolean} allowStreamingMode  Whether streaming mode is allowed.\n */\nWebChannelBase.prototype.setAllowStreamingMode = function(allowStreamingMode) {\n  this.allowStreamingMode_ = allowStreamingMode;\n};\n\n/**\n * Sends a request to the server. The format of the request is a Map data\n * structure of key/value pairs. These maps are then encoded in a format\n * suitable for the wire and then reconstituted as a Map data structure that\n * the server can process.\n * @param {!Object|!maps.MapLike} map The map to send.\n * @param {!Object=} opt_context The context associated with the map.\n */\nWebChannelBase.prototype.sendMap = function(map, opt_context) {\n  asserts.assert(\n      this.state_ != WebChannelBase.State.CLOSED,\n      'Invalid operation: sending map when state is closed');\n\n  // We can only send 1000 maps per POST, but typically we should never have\n  // that much to send, so warn if we exceed that (we still send all the maps).\n  if (this.outgoingMaps_.length == this.maxMapsPerRequest_) {\n    // severe() is temporary so that we get these uploaded and can figure out\n    // what's causing them. Afterwards can change to warning().\n    this.channelDebug_.severe(() => {\n      return 'Already have ' + this.maxMapsPerRequest_ +\n          ' queued maps upon queueing ' + googJson.serialize(map);\n    });\n  }\n\n  this.outgoingMaps_.push(\n      new Wire.QueuedMap(this.nextMapId_++, map, opt_context));\n\n  // Messages need be buffered during OPENING to avoid server-side race\n  if (this.state_ == WebChannelBase.State.OPENED) {\n    this.ensureForwardChannel_();\n  }\n};\n\n/**\n * When set to true, this changes the behavior of the forward channel so it\n * will not retry requests; it will fail after one network failure, and if\n * there was already one network failure, the request will fail immediately.\n * @param {boolean} failFast  Whether or not to fail fast.\n */\nWebChannelBase.prototype.setFailFast = function(failFast) {\n  this.failFast_ = failFast;\n  this.channelDebug_.info('setFailFast: ' + failFast);\n  if ((this.forwardChannelRequestPool_.hasPendingRequest() ||\n       this.forwardChannelTimerId_) &&\n      this.forwardChannelRetryCount_ > this.getForwardChannelMaxRetries()) {\n    const self = this;\n    this.channelDebug_.info(function() {\n      return 'Retry count ' + self.forwardChannelRetryCount_ +\n          ' > new maxRetries ' + self.getForwardChannelMaxRetries() +\n          '. Fail immediately!';\n    });\n\n    if (!this.forwardChannelRequestPool_.forceComplete(\n            goog.bind(this.onRequestComplete, this))) {\n      // i.e., this.forwardChannelTimerId_\n      this.clearForwardChannelTimer_();\n      // The error code from the last failed request is gone, so just use a\n      // generic one.\n      this.signalError_(WebChannelBase.Error.REQUEST_FAILED);\n    }\n  }\n};\n\n/**\n * @return {number} The max number of forward-channel retries, which will be 0\n * in fail-fast mode.\n */\nWebChannelBase.prototype.getForwardChannelMaxRetries = function() {\n  return this.failFast_ ? 0 : this.forwardChannelMaxRetries_;\n};\n\n/**\n * Sets the maximum number of attempts to connect to the server for forward\n * channel requests.\n * @param {number} retries The maximum number of attempts.\n */\nWebChannelBase.prototype.setForwardChannelMaxRetries = function(retries) {\n  this.forwardChannelMaxRetries_ = retries;\n};\n\n/**\n * Sets the timeout for a forward channel request.\n * @param {number} timeoutMs The timeout in milliseconds.\n */\nWebChannelBase.prototype.setForwardChannelRequestTimeout = function(timeoutMs) {\n  this.forwardChannelRequestTimeoutMs_ = timeoutMs;\n};\n\n/**\n * @return {number} The max number of back-channel retries, which is a constant.\n */\nWebChannelBase.prototype.getBackChannelMaxRetries = function() {\n  // Back-channel retries is a constant.\n  return WebChannelBase.BACK_CHANNEL_MAX_RETRIES;\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.isClosed = function() {\n  return this.state_ == WebChannelBase.State.CLOSED;\n};\n\n/**\n * Returns the channel state.\n * @return {WebChannelBase.State} The current state of the channel.\n */\nWebChannelBase.prototype.getState = function() {\n  return this.state_;\n};\n\n/**\n * @return {!Object<string, string>|undefined} The response headers received\n * along with the non-200 status.\n */\nWebChannelBase.prototype.getLastResponseHeaders = function() {\n  return this.errorResponseHeaders_;\n};\n\n/**\n * @return {number} The non-200 status code received that causes the channel to\n * be aborted.\n */\nWebChannelBase.prototype.getLastStatusCode = function() {\n  return this.errorResponseStatusCode_;\n};\n\n/**\n * @return {number} The last array id received.\n */\nWebChannelBase.prototype.getLastArrayId = function() {\n  return this.lastArrayId_;\n};\n\n/**\n * Returns whether there are outstanding requests servicing the channel.\n * @return {boolean} true if there are outstanding requests.\n */\nWebChannelBase.prototype.hasOutstandingRequests = function() {\n  return this.getOutstandingRequests_() != 0;\n};\n\n/**\n * Returns the number of outstanding requests.\n * @return {number} The number of outstanding requests to the server.\n * @private\n */\nWebChannelBase.prototype.getOutstandingRequests_ = function() {\n  let count = 0;\n  if (this.backChannelRequest_) {\n    count++;\n  }\n  count += this.forwardChannelRequestPool_.getRequestCount();\n  return count;\n};\n\n/**\n * Ensures that a forward channel request is scheduled.\n * @private\n */\nWebChannelBase.prototype.ensureForwardChannel_ = function() {\n  if (this.forwardChannelRequestPool_.isFull()) {\n    // enough connection in process - no need to start a new request\n    return;\n  }\n\n  if (this.forwardChannelTimerId_) {\n    // no need to start a new request - one is already scheduled\n    return;\n  }\n\n  // Use async.run instead of setTimeout(0) to avoid the 1s message delay\n  // from chrome/firefox background tabs\n  this.forwardChannelTimerId_ = true;\n  run(this.onStartForwardChannelTimer_, this);\n\n  this.forwardChannelRetryCount_ = 0;\n};\n\n/**\n * Schedules a forward-channel retry for the specified request, unless the max\n * retries has been reached.\n * @param {!ChannelRequest} request The failed request to retry.\n * @return {boolean} true iff a retry was scheduled.\n * @private\n */\nWebChannelBase.prototype.maybeRetryForwardChannel_ = function(request) {\n  if (this.forwardChannelRequestPool_.getRequestCount() >=\n      this.forwardChannelRequestPool_.getMaxSize() -\n          (this.forwardChannelTimerId_ ? 1 : 0)) {\n    // Should be impossible to be called in this state.\n    this.channelDebug_.severe('Unexpected retry request is scheduled.');\n    return false;\n  }\n\n  if (this.forwardChannelTimerId_) {\n    this.channelDebug_.debug(\n        'Use the retry request that is already scheduled.');\n    this.outgoingMaps_ =\n        request.getPendingMessages().concat(this.outgoingMaps_);\n    return true;\n  }\n\n  // No retry for open_() and fail-fast\n  if (this.state_ == WebChannelBase.State.INIT ||\n      this.state_ == WebChannelBase.State.OPENING ||\n      (this.forwardChannelRetryCount_ >= this.getForwardChannelMaxRetries())) {\n    return false;\n  }\n\n  this.channelDebug_.debug('Going to retry POST');\n\n  this.forwardChannelTimerId_ = requestStats.setTimeout(\n      goog.bind(this.onStartForwardChannelTimer_, this, request),\n      this.getRetryTime_(this.forwardChannelRetryCount_));\n  this.forwardChannelRetryCount_++;\n  return true;\n};\n\n/**\n * Timer callback for ensureForwardChannel\n * @param {ChannelRequest=} opt_retryRequest A failed request\n * to retry.\n * @private\n */\nWebChannelBase.prototype.onStartForwardChannelTimer_ = function(\n    opt_retryRequest) {\n  // null is possible if scheduled with async.run\n  if (this.forwardChannelTimerId_) {\n    this.forwardChannelTimerId_ = null;\n    this.startForwardChannel_(opt_retryRequest);\n  }\n};\n\n/**\n * Begins a new forward channel operation to the server.\n * @param {ChannelRequest=} opt_retryRequest A failed request to retry.\n * @private\n */\nWebChannelBase.prototype.startForwardChannel_ = function(opt_retryRequest) {\n  this.channelDebug_.debug('startForwardChannel_');\n  if (!this.okToMakeRequest_()) {\n    return;  // channel is cancelled\n  } else if (this.state_ == WebChannelBase.State.INIT) {\n    if (opt_retryRequest) {\n      this.channelDebug_.severe('Not supposed to retry the open');\n      return;\n    }\n    this.open_();\n    this.state_ = WebChannelBase.State.OPENING;\n  } else if (this.state_ == WebChannelBase.State.OPENED) {\n    if (opt_retryRequest) {\n      this.makeForwardChannelRequest_(opt_retryRequest);\n      return;\n    }\n\n    if (this.outgoingMaps_.length == 0) {\n      this.channelDebug_.debug(\n          'startForwardChannel_ returned: ' +\n          'nothing to send');\n      // no need to start a new forward channel request\n      return;\n    }\n\n    if (this.forwardChannelRequestPool_.isFull()) {\n      // Should be impossible to be called in this state.\n      this.channelDebug_.severe(\n          'startForwardChannel_ returned: ' +\n          'connection already in progress');\n      return;\n    }\n\n    this.makeForwardChannelRequest_();\n    this.channelDebug_.debug('startForwardChannel_ finished, sent request');\n  }\n};\n\n/**\n * Establishes a new channel session with the server.\n * @private\n */\nWebChannelBase.prototype.open_ = function() {\n  this.channelDebug_.debug('open_()');\n  this.nextRid_ = Math.floor(Math.random() * 100000);\n\n  const rid = this.nextRid_++;\n  const request =\n      ChannelRequest.createChannelRequest(this, this.channelDebug_, '', rid);\n\n  // mix the init headers\n  let extraHeaders = this.extraHeaders_;\n  if (this.initHeaders_) {\n    if (extraHeaders) {\n      extraHeaders = googObject.clone(extraHeaders);\n      googObject.extend(extraHeaders, this.initHeaders_);\n    } else {\n      extraHeaders = this.initHeaders_;\n    }\n  }\n\n  if (this.httpHeadersOverwriteParam_ === null &&\n      !this.encodeInitMessageHeaders_) {\n    request.setExtraHeaders(extraHeaders);\n    extraHeaders = null;\n  }\n\n  let requestText = this.dequeueOutgoingMaps_(\n      request,\n      this.fastHandshake_ ? this.getMaxNumMessagesForFastHandshake_() :\n                            this.maxMapsPerRequest_);\n\n  const uri = this.forwardChannelUri_.clone();\n  uri.setParameterValue('RID', rid);\n\n  if (this.clientVersion_ > 0) {\n    uri.setParameterValue('CVER', this.clientVersion_);\n  }\n\n  // http-session-id to be generated as the response\n  if (this.getHttpSessionIdParam()) {\n    uri.setParameterValue(\n        WebChannel.X_HTTP_SESSION_ID, this.getHttpSessionIdParam());\n  }\n\n  this.addAdditionalParams_(uri);\n\n  if (extraHeaders) {\n    if (this.encodeInitMessageHeaders_) {\n      let encodedHeaders =\n          httpCors.generateEncodedHttpHeadersOverwriteParam(extraHeaders);\n      requestText = 'headers=' + encodedHeaders + '&' + requestText;\n    } else if (this.httpHeadersOverwriteParam_) {\n      httpCors.setHttpHeadersWithOverwriteParam(\n          uri, this.httpHeadersOverwriteParam_, extraHeaders);\n    }  // else - should not happen\n  }\n\n  this.forwardChannelRequestPool_.addRequest(request);\n\n  if (this.blockingHandshake_) {\n    uri.setParameterValue('TYPE', 'init');  // default to blocking in future\n  }\n\n  // Check the option and use GET to enable QUIC 0-RTT\n  if (this.fastHandshake_) {\n    uri.setParameterValue('$req', requestText);\n\n    // enable handshake upgrade\n    uri.setParameterValue('SID', 'null');\n    request.setDecodeInitialResponse();\n\n    request.xmlHttpPost(uri, null, true);  // Send as a GET\n  } else {\n    request.xmlHttpPost(uri, requestText, true);\n  }\n};\n\n/**\n * @return {number} The number of raw JSON messages to be encoded\n * with the fast-handshake (GET) request, including zero. If messages are not\n * encoded as raw JSON data, return this.maxMapsPerRequest_\n * @private\n */\nWebChannelBase.prototype.getMaxNumMessagesForFastHandshake_ = function() {\n  let total = 0;\n  for (let i = 0; i < this.outgoingMaps_.length; i++) {\n    const map = this.outgoingMaps_[i];\n    const size = map.getRawDataSize();\n    if (size === undefined) {\n      break;\n    }\n    total += size;\n\n    if (total > WebChannelBase.MAX_CHARS_PER_GET_) {\n      return i;\n    }\n\n    if (total === WebChannelBase.MAX_CHARS_PER_GET_ ||\n        i === this.outgoingMaps_.length - 1) {\n      return i + 1;\n    }\n  }\n\n  return this.maxMapsPerRequest_;\n};\n\n/**\n * Makes a forward channel request using XMLHTTP.\n * @param {!ChannelRequest=} opt_retryRequest A failed request to retry.\n * @private\n */\nWebChannelBase.prototype.makeForwardChannelRequest_ = function(\n    opt_retryRequest) {\n  let rid;\n  if (opt_retryRequest) {\n    rid = opt_retryRequest.getRequestId();  // Reuse the same RID for a retry\n  } else {\n    rid = this.nextRid_++;\n  }\n\n  const uri = this.forwardChannelUri_.clone();\n  uri.setParameterValue('SID', this.sid_);\n  uri.setParameterValue('RID', rid);\n  uri.setParameterValue('AID', this.lastArrayId_);\n\n  this.addAdditionalParams_(uri);\n\n  if (this.httpHeadersOverwriteParam_ && this.extraHeaders_) {\n    httpCors.setHttpHeadersWithOverwriteParam(\n        uri, this.httpHeadersOverwriteParam_, this.extraHeaders_);\n  }\n\n  const request = ChannelRequest.createChannelRequest(\n      this, this.channelDebug_, this.sid_, rid,\n      this.forwardChannelRetryCount_ + 1);\n\n  if (this.httpHeadersOverwriteParam_ === null) {\n    request.setExtraHeaders(this.extraHeaders_);\n  }\n\n  let requestText;\n  if (opt_retryRequest) {\n    this.requeuePendingMaps_(opt_retryRequest);\n  }\n  requestText = this.dequeueOutgoingMaps_(request, this.maxMapsPerRequest_);\n\n  // Randomize from 50%-100% of the forward channel timeout to avoid\n  // a big hit if servers happen to die at once.\n  request.setTimeout(\n      Math.round(this.forwardChannelRequestTimeoutMs_ * 0.50) +\n      Math.round(this.forwardChannelRequestTimeoutMs_ * 0.50 * Math.random()));\n  this.forwardChannelRequestPool_.addRequest(request);\n  request.xmlHttpPost(uri, requestText, true);\n};\n\n/**\n * Adds additional query parameters from `extraParams_` and `handler_` to the\n * given URI.\n * @param {!Uri} uri The URI to add the parameters to.\n * @private\n */\nWebChannelBase.prototype.addAdditionalParams_ = function(uri) {\n  if (this.extraParams_) {\n    googObject.forEach(this.extraParams_, function(value, key) {\n      uri.setParameterValue(key, value);\n    });\n  }\n\n  if (this.handler_) {\n    const params = this.handler_.getAdditionalParams(this);\n    if (params) {\n      googObject.forEach(params, function(value, key) {\n        uri.setParameterValue(key, value);\n      });\n    }\n  }\n};\n\n/**\n * Returns the request text from the outgoing maps and resets it.\n * @param {!ChannelRequest} request The new request for sending the messages.\n * @param {number} maxNum The maximum number of messages to be encoded\n * @return {string} The encoded request text created from all the currently\n *                  queued outgoing maps.\n * @private\n */\nWebChannelBase.prototype.dequeueOutgoingMaps_ = function(request, maxNum) {\n  const count = Math.min(this.outgoingMaps_.length, maxNum);\n\n  const badMapHandler = this.handler_ ?\n      goog.bind(this.handler_.badMapError, this.handler_, this) :\n      null;\n  const result = this.wireCodec_.encodeMessageQueue(\n      this.outgoingMaps_, count, badMapHandler);\n\n  request.setPendingMessages(this.outgoingMaps_.splice(0, count));\n\n  return result;\n};\n\n/**\n * Requeues unacknowledged sent arrays for retransmission in the next forward\n * channel request.\n * @param {!ChannelRequest} retryRequest A failed request to retry.\n * @private\n */\nWebChannelBase.prototype.requeuePendingMaps_ = function(retryRequest) {\n  this.outgoingMaps_ =\n      retryRequest.getPendingMessages().concat(this.outgoingMaps_);\n};\n\n/**\n * Ensures there is a backchannel request for receiving data from the server.\n * @private\n */\nWebChannelBase.prototype.ensureBackChannel_ = function() {\n  if (this.backChannelRequest_) {\n    // already have one\n    return;\n  }\n\n  if (this.backChannelTimerId_) {\n    // no need to start a new request - one is already scheduled\n    return;\n  }\n\n  this.backChannelAttemptId_ = 1;\n\n  // Use async.run instead of setTimeout(0) to avoid the 1s message delay\n  // from chrome/firefox background tabs\n  // backChannelTimerId_ stays unset, as with setTimeout(0)\n  run(this.onStartBackChannelTimer_, this);\n\n  this.backChannelRetryCount_ = 0;\n};\n\n/**\n * Schedules a back-channel retry, unless the max retries has been reached.\n * @return {boolean} true iff a retry was scheduled.\n * @private\n */\nWebChannelBase.prototype.maybeRetryBackChannel_ = function() {\n  if (this.backChannelRequest_ || this.backChannelTimerId_) {\n    // Should be impossible to be called in this state.\n    this.channelDebug_.severe('Request already in progress');\n    return false;\n  }\n\n  if (this.backChannelRetryCount_ >= this.getBackChannelMaxRetries()) {\n    return false;\n  }\n\n  this.channelDebug_.debug('Going to retry GET');\n\n  this.backChannelAttemptId_++;\n  this.backChannelTimerId_ = requestStats.setTimeout(\n      goog.bind(this.onStartBackChannelTimer_, this),\n      this.getRetryTime_(this.backChannelRetryCount_));\n  this.backChannelRetryCount_++;\n  return true;\n};\n\n/**\n * Timer callback for ensureBackChannel_.\n * @private\n */\nWebChannelBase.prototype.onStartBackChannelTimer_ = function() {\n  this.backChannelTimerId_ = null;\n  this.startBackChannel_();\n\n  if (!this.detectBufferingProxy_) {\n    return;\n  }\n\n  if (this.bpDetectionDone_) {\n    return;\n  }\n\n  if (this.backChannelRequest_ == null || this.handshakeRttMs_ <= 0) {\n    this.channelDebug_.warning(\n        'Skip bpDetectionTimerId_ ' + this.backChannelRequest_ + ' ' +\n        this.handshakeRttMs_);\n    return;\n  }\n\n  // This goes with each new request until bpDetectionDone_\n  // Note that the timeout factor only affects the false-positive rate.\n  const bpDetectionTimeout = 4 * this.handshakeRttMs_;\n  this.channelDebug_.info('BP detection timer enabled: ' + bpDetectionTimeout);\n\n  this.bpDetectionTimerId_ = requestStats.setTimeout(\n      goog.bind(this.onBpDetectionTimer_, this), bpDetectionTimeout);\n};\n\n/**\n * Timer callback for bpDetection.\n * @private\n */\nWebChannelBase.prototype.onBpDetectionTimer_ = function() {\n  if (!this.bpDetectionTimerId_) {\n    this.channelDebug_.warning('Invalid operation.');\n    return;\n  }\n\n  this.bpDetectionTimerId_ = null;\n  this.channelDebug_.info('BP detection timeout reached.');\n\n  asserts.assert(\n      this.backChannelRequest_ != null,\n      'Invalid state: no backchannel request');\n\n  // We wait for extra response payload in addition to just headers to\n  // cancel the timer.\n  if (this.backChannelRequest_.getXhr() != null) {\n    const responseData = this.backChannelRequest_.getXhr().getResponseText();\n    if (responseData) {\n      this.channelDebug_.warning(\n          'Timer should have been cancelled : ' + responseData);\n    }\n  }\n\n  // Enable long-polling\n  this.channelDebug_.info(\n      'Buffering proxy detected and switch to long-polling!');\n  this.enableStreaming_ = false;\n\n  this.bpDetectionDone_ = true;\n  requestStats.notifyStatEvent(requestStats.Stat.PROXY);\n\n  // Cancel the request and start a new one immediately\n  this.cancelBackChannelRequest_();\n  this.startBackChannel_();\n};\n\n/**\n * Clears the timer for BP detection.\n * @private\n */\nWebChannelBase.prototype.clearBpDetectionTimer_ = function() {\n  if (this.bpDetectionTimerId_ != null) {\n    this.channelDebug_.debug('Cancel the BP detection timer.');\n    goog.global.clearTimeout(this.bpDetectionTimerId_);\n    this.bpDetectionTimerId_ = null;\n  }\n};\n\n/**\n * Begins a new back channel operation to the server.\n * @private\n */\nWebChannelBase.prototype.startBackChannel_ = function() {\n  if (!this.okToMakeRequest_()) {\n    // channel is cancelled\n    return;\n  }\n\n  this.channelDebug_.debug('Creating new HttpRequest');\n  this.backChannelRequest_ = ChannelRequest.createChannelRequest(\n      this, this.channelDebug_, this.sid_, 'rpc', this.backChannelAttemptId_);\n\n  if (this.httpHeadersOverwriteParam_ === null) {\n    this.backChannelRequest_.setExtraHeaders(this.extraHeaders_);\n  }\n\n  this.backChannelRequest_.setReadyStateChangeThrottle(\n      this.readyStateChangeThrottleMs_);\n  const uri = this.backChannelUri_.clone();\n  uri.setParameterValue('RID', 'rpc');\n  uri.setParameterValue('SID', this.sid_);\n  uri.setParameterValue('AID', this.lastArrayId_);\n\n  uri.setParameterValue('CI', this.enableStreaming_ ? '0' : '1');\n  if (!this.enableStreaming_ && this.longPollingTimeout_) {\n    uri.setParameterValue('TO', this.longPollingTimeout_);\n  }\n\n  uri.setParameterValue('TYPE', 'xmlhttp');\n\n  this.addAdditionalParams_(uri);\n\n  if (this.httpHeadersOverwriteParam_ && this.extraHeaders_) {\n    httpCors.setHttpHeadersWithOverwriteParam(\n        uri, this.httpHeadersOverwriteParam_, this.extraHeaders_);\n  }\n\n  if (this.backChannelRequestTimeoutMs_) {\n    this.backChannelRequest_.setTimeout(this.backChannelRequestTimeoutMs_);\n  }\n\n  this.backChannelRequest_.xmlHttpGet(\n      uri, true /* decodeChunks */, this.hostPrefix_);\n\n  this.channelDebug_.debug('New Request created');\n};\n\n/**\n * Gives the handler a chance to return an error code and stop channel\n * execution. A handler might want to do this to check that the user is still\n * logged in, for example.\n * @private\n * @return {boolean} If it's OK to make a request.\n */\nWebChannelBase.prototype.okToMakeRequest_ = function() {\n  if (this.handler_) {\n    const result = this.handler_.okToMakeRequest(this);\n    if (result != WebChannelBase.Error.OK) {\n      this.channelDebug_.debug(\n          'Handler returned error code from okToMakeRequest');\n      this.signalError_(result);\n      return false;\n    }\n  }\n  return true;\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.onFirstByteReceived = function(request, responseText) {\n  if (this.backChannelRequest_ == request && this.detectBufferingProxy_) {\n    if (!this.bpDetectionDone_) {\n      this.channelDebug_.info(\n          'Great, no buffering proxy detected. Bytes received: ' +\n          responseText.length);\n      asserts.assert(\n          this.bpDetectionTimerId_, 'Timer should not have been cancelled.');\n      this.clearBpDetectionTimer_();\n      this.bpDetectionDone_ = true;\n      requestStats.notifyStatEvent(requestStats.Stat.NOPROXY);\n    }\n  }\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.onRequestData = function(request, responseText) {\n  if (this.state_ == WebChannelBase.State.CLOSED ||\n      (this.backChannelRequest_ != request &&\n       !this.forwardChannelRequestPool_.hasRequest(request))) {\n    // either CLOSED or a request we don't know about (perhaps an old request)\n    return;\n  }\n\n  // first to check if request has been upgraded to backchannel\n  if (!request.isInitialResponseDecoded() &&\n      this.forwardChannelRequestPool_.hasRequest(request) &&\n      this.state_ == WebChannelBase.State.OPENED) {\n    let response;\n    try {\n      response = this.wireCodec_.decodeMessage(responseText);\n    } catch (ex) {\n      response = null;\n    }\n    if (Array.isArray(response) && response.length == 3) {\n      this.handlePostResponse_(/** @type {!Array<?>} */ (response), request);\n      this.onForwardChannelFlushed_();\n    } else {\n      this.channelDebug_.debug('Bad POST response data returned');\n      this.signalError_(WebChannelBase.Error.BAD_RESPONSE);\n    }\n  } else {\n    if (request.isInitialResponseDecoded() ||\n        this.backChannelRequest_ == request) {\n      this.clearDeadBackchannelTimer_();\n    }\n\n    if (!googString.isEmptyOrWhitespace(responseText)) {\n      let response = this.wireCodec_.decodeMessage(responseText);\n      this.onInput_(/** @type {!Array<?>} */ (response), request);\n    }\n  }\n};\n\n/**\n * Checks if we need call the flush callback.\n *\n * @private\n */\nWebChannelBase.prototype.onForwardChannelFlushed_ = function() {\n  if (this.forwardChannelRequestPool_.getRequestCount() <= 1) {\n    if (this.forwardChannelFlushedCallback_) {\n      try {\n        this.forwardChannelFlushedCallback_();\n      } catch (ex) {\n        this.channelDebug_.dumpException(\n            ex, 'Exception from forwardChannelFlushedCallback_ ');\n      }\n      // reset\n      this.forwardChannelFlushedCallback_ = undefined;\n    }\n  }\n};\n\n/**\n * Handles a POST response from the server.\n * @param {Array<number>} responseValues The key value pairs in\n *     the POST response.\n * @param {!ChannelRequest} forwardReq The forward channel request that\n * triggers this function call.\n * @private\n */\nWebChannelBase.prototype.handlePostResponse_ = function(\n    responseValues, forwardReq) {\n  // The first response value is set to 0 if server is missing backchannel.\n  if (responseValues[0] == 0) {\n    this.handleBackchannelMissing_(forwardReq);\n    return;\n  }\n  this.lastPostResponseArrayId_ = responseValues[1];\n  const outstandingArrays = this.lastPostResponseArrayId_ - this.lastArrayId_;\n  if (0 < outstandingArrays) {\n    const numOutstandingBackchannelBytes = responseValues[2];\n    this.channelDebug_.debug(\n        numOutstandingBackchannelBytes + ' bytes (in ' + outstandingArrays +\n        ' arrays) are outstanding on the BackChannel');\n    if (!this.shouldRetryBackChannel_(numOutstandingBackchannelBytes)) {\n      return;\n    }\n    if (!this.deadBackChannelTimerId_) {\n      // We expect to receive data within 2 RTTs or we retry the backchannel.\n      this.deadBackChannelTimerId_ = requestStats.setTimeout(\n          goog.bind(this.onBackChannelDead_, this),\n          2 * WebChannelBase.RTT_ESTIMATE);\n    }\n  }\n};\n\n/**\n * Handles a POST response from the server telling us that it has detected that\n * we have no hanging GET connection.\n * @param {!ChannelRequest} forwardReq The forward channel request that\n * triggers this function call.\n * @private\n * @suppress {strictPrimitiveOperators}\n */\nWebChannelBase.prototype.handleBackchannelMissing_ = function(forwardReq) {\n  // As long as the back channel was started before the POST was sent,\n  // we should retry the backchannel. We give a slight buffer of RTT_ESTIMATE\n  // so as not to excessively retry the backchannel\n  this.channelDebug_.debug('Server claims our backchannel is missing.');\n  if (this.backChannelTimerId_) {\n    this.channelDebug_.debug('But we are currently starting the request.');\n    return;\n  } else if (!this.backChannelRequest_) {\n    this.channelDebug_.warning('We do not have a BackChannel established');\n  } else if (\n      this.backChannelRequest_.getRequestStartTime() +\n          WebChannelBase.RTT_ESTIMATE <\n      forwardReq.getRequestStartTime()) {\n    this.clearDeadBackchannelTimer_();\n    this.cancelBackChannelRequest_();\n  } else {\n    return;\n  }\n  this.maybeRetryBackChannel_();\n  requestStats.notifyStatEvent(requestStats.Stat.BACKCHANNEL_MISSING);\n};\n\n/**\n * Determines whether we should start the process of retrying a possibly\n * dead backchannel.\n * @param {number} outstandingBytes The number of bytes for which the server has\n *     not yet received acknowledgement.\n * @return {boolean} Whether to start the backchannel retry timer.\n * @private\n */\nWebChannelBase.prototype.shouldRetryBackChannel_ = function(outstandingBytes) {\n  // Not too many outstanding bytes, not buffered and not after a retry.\n  return outstandingBytes <\n      WebChannelBase.OUTSTANDING_DATA_BACKCHANNEL_RETRY_CUTOFF &&\n      !this.isBuffered() && this.backChannelRetryCount_ == 0;\n};\n\n/**\n * Decides which host prefix should be used, if any.  If there is a handler,\n * allows the handler to validate a host prefix provided by the server, and\n * optionally override it.\n * @param {?string} serverHostPrefix The host prefix provided by the server.\n * @return {?string} The host prefix to actually use, if any. Will return null\n *     if the use of host prefixes was disabled via setAllowHostPrefix().\n * @override\n */\nWebChannelBase.prototype.correctHostPrefix = function(serverHostPrefix) {\n  if (this.allowHostPrefix_) {\n    if (this.handler_) {\n      return this.handler_.correctHostPrefix(serverHostPrefix);\n    }\n    return serverHostPrefix;\n  }\n  return null;\n};\n\n/**\n * Handles the timer that indicates that our backchannel is no longer able to\n * successfully receive data from the server.\n * @private\n */\nWebChannelBase.prototype.onBackChannelDead_ = function() {\n  if (this.deadBackChannelTimerId_ != null) {\n    this.deadBackChannelTimerId_ = null;\n    this.cancelBackChannelRequest_();\n    this.maybeRetryBackChannel_();\n    requestStats.notifyStatEvent(requestStats.Stat.BACKCHANNEL_DEAD);\n  }\n};\n\n/**\n * Clears the timer that indicates that our backchannel is no longer able to\n * successfully receive data from the server.\n * @private\n */\nWebChannelBase.prototype.clearDeadBackchannelTimer_ = function() {\n  if (this.deadBackChannelTimerId_ != null) {\n    goog.global.clearTimeout(this.deadBackChannelTimerId_);\n    this.deadBackChannelTimerId_ = null;\n  }\n};\n\n/**\n * Returns whether or not the given error/status combination is fatal or not.\n * On fatal errors we immediately close the session rather than retrying the\n * failed request.\n * @param {?ChannelRequest.Error} error The error code for the\n * failed request.\n * @param {number} statusCode The last HTTP status code.\n * @return {boolean} Whether or not the error is fatal.\n * @private\n */\nWebChannelBase.isFatalError_ = function(error, statusCode) {\n  return error == ChannelRequest.Error.UNKNOWN_SESSION_ID ||\n      (error == ChannelRequest.Error.STATUS && statusCode > 0);\n};\n\n/**\n * @override\n * @suppress {strictPrimitiveOperators}\n */\nWebChannelBase.prototype.onRequestComplete = function(request) {\n  this.channelDebug_.debug('Request complete');\n  let type;\n  let pendingMessages = null;\n  if (this.backChannelRequest_ == request) {\n    this.clearDeadBackchannelTimer_();\n    this.clearBpDetectionTimer_();\n    this.backChannelRequest_ = null;\n    type = WebChannelBase.ChannelType_.BACK_CHANNEL;\n  } else if (this.forwardChannelRequestPool_.hasRequest(request)) {\n    pendingMessages = request.getPendingMessages();\n    this.forwardChannelRequestPool_.removeRequest(request);\n    type = WebChannelBase.ChannelType_.FORWARD_CHANNEL;\n  } else {\n    // return if it was an old request from a previous session\n    return;\n  }\n\n  if (this.state_ == WebChannelBase.State.CLOSED) {\n    return;\n  }\n\n  if (request.getSuccess()) {\n    if (type == WebChannelBase.ChannelType_.FORWARD_CHANNEL) {\n      const size = request.getPostData() ? request.getPostData().length : 0;\n      requestStats.notifyTimingEvent(\n          size, Date.now() - request.getRequestStartTime(),\n          this.forwardChannelRetryCount_);\n      this.ensureForwardChannel_();\n      this.onSuccess_(request);\n    } else {  // i.e., back-channel\n      this.ensureBackChannel_();\n    }\n    return;\n  }\n  // Else unsuccessful. Fall through.\n\n  const lastStatusCode = request.getLastStatusCode();\n  const lastError = request.getLastError();\n  if (!WebChannelBase.isFatalError_(lastError, lastStatusCode)) {\n    // Maybe retry.\n    const self = this;\n    this.channelDebug_.debug(function() {\n      return 'Maybe retrying, last error: ' +\n          ChannelRequest.errorStringFromCode(\n              lastError, self.errorResponseStatusCode_);\n    });\n    if (type == WebChannelBase.ChannelType_.FORWARD_CHANNEL) {\n      if (this.maybeRetryForwardChannel_(request)) {\n        return;\n      }\n    }\n    if (type == WebChannelBase.ChannelType_.BACK_CHANNEL) {\n      if (this.maybeRetryBackChannel_()) {\n        return;\n      }\n    }\n    // Else exceeded max retries. Fall through.\n    this.channelDebug_.debug('Exceeded max number of retries');\n  } else {\n    // Else fatal error. Fall through and mark the pending maps as failed.\n    this.channelDebug_.debug('Not retrying due to error type');\n\n    if (lastStatusCode > 200) {\n      this.errorResponseStatusCode_ = request.getLastStatusCode();\n      this.errorResponseHeaders_ = request.getErrorResponseHeaders();\n    }\n  }\n\n  // Abort the channel now\n\n  // Record pending messages from the failed request\n  if (pendingMessages && pendingMessages.length > 0) {\n    this.forwardChannelRequestPool_.addPendingMessages(pendingMessages);\n  }\n\n  this.channelDebug_.debug('Error: HTTP request failed');\n  switch (lastError) {\n    case ChannelRequest.Error.NO_DATA:\n      this.signalError_(WebChannelBase.Error.NO_DATA);\n      break;\n    case ChannelRequest.Error.BAD_DATA:\n      this.signalError_(WebChannelBase.Error.BAD_DATA);\n      break;\n    case ChannelRequest.Error.UNKNOWN_SESSION_ID:\n      this.signalError_(WebChannelBase.Error.UNKNOWN_SESSION_ID);\n      break;\n    default:\n      this.signalError_(WebChannelBase.Error.REQUEST_FAILED);\n      break;\n  }\n};\n\n/**\n * @param {number} retryCount Number of retries so far.\n * @return {number} Time in ms before firing next retry request.\n * @private\n */\nWebChannelBase.prototype.getRetryTime_ = function(retryCount) {\n  let retryTime = this.baseRetryDelayMs_ +\n      Math.floor(Math.random() * this.retryDelaySeedMs_);\n  if (!this.isActive()) {\n    this.channelDebug_.debug('Inactive channel');\n    retryTime = retryTime * WebChannelBase.INACTIVE_CHANNEL_RETRY_FACTOR;\n  }\n  // Backoff for subsequent retries\n  retryTime *= retryCount;\n  return retryTime;\n};\n\n/**\n * @param {number} baseDelayMs The base part of the retry delay, in ms.\n * @param {number} delaySeedMs A random delay between 0 and this is added to\n *     the base part.\n */\nWebChannelBase.prototype.setRetryDelay = function(baseDelayMs, delaySeedMs) {\n  this.baseRetryDelayMs_ = baseDelayMs;\n  this.retryDelaySeedMs_ = delaySeedMs;\n};\n\n/**\n * Apply any handshake control headers.\n * @param {!ChannelRequest} request The underlying request object\n * @private\n */\nWebChannelBase.prototype.applyControlHeaders_ = function(request) {\n  const xhr = request.getXhr();\n  if (xhr) {\n    const clientProtocol =\n        xhr.getStreamingResponseHeader(WebChannel.X_CLIENT_WIRE_PROTOCOL);\n    if (clientProtocol) {\n      this.forwardChannelRequestPool_.applyClientProtocol(clientProtocol);\n    }\n\n    if (this.getHttpSessionIdParam()) {\n      const httpSessionIdHeader =\n          xhr.getStreamingResponseHeader(WebChannel.X_HTTP_SESSION_ID);\n      if (httpSessionIdHeader) {\n        this.setHttpSessionId(httpSessionIdHeader);\n        // update the cached uri\n        const httpSessionIdParam = this.getHttpSessionIdParam();\n\n        this.forwardChannelUri_.setParameterValue(\n            /** @type {string} */ (httpSessionIdParam),  // never null\n            httpSessionIdHeader);\n      } else {\n        this.channelDebug_.warning(\n            'Missing X_HTTP_SESSION_ID in the handshake response');\n      }\n    }\n  }\n};\n\n/**\n * Processes the data returned by the server.\n * @param {!Array<!Array<?>>} respArray The response array returned\n *     by the server.\n * @param {!ChannelRequest} request The underlying request object\n * @private\n * @suppress {strictPrimitiveOperators}\n */\nWebChannelBase.prototype.onInput_ = function(respArray, request) {\n  const batch =\n      this.handler_ && this.handler_.channelHandleMultipleArrays ? [] : null;\n  for (let i = 0; i < respArray.length; i++) {\n    let nextArray = respArray[i];\n    const incomingArrayId = nextArray[0];\n    // Skip the array if it is older than the last array received. This can\n    // happen if the backend ignores the AID parameter in the request and sends\n    // messages that have been previously sent. See b/419105705\n    if (incomingArrayId <= this.lastArrayId_) {\n      this.channelDebug_.warning(\n          'Ignoring out-of-order or duplicate message with arrayId: ' +\n          incomingArrayId + ', lastArrayId: ' + this.lastArrayId_);\n      continue;\n    } else if (\n        incomingArrayId > this.lastArrayId_ + 1 && this.lastArrayId_ > -1) {\n      this.channelDebug_.warning(\n          'Received non-consecutive message with arrayId: ' + incomingArrayId +\n          ', lastArrayId: ' + this.lastArrayId_);\n      // TODO: The loss of messages is not recoverable by the client, we may\n      // consider closing the channel immediately.\n    }\n    this.lastArrayId_ = incomingArrayId;\n    nextArray = nextArray[1];\n    if (this.state_ == WebChannelBase.State.OPENING) {\n      if (nextArray[0] == 'c') {\n        this.sid_ = nextArray[1];\n        this.hostPrefix_ = this.correctHostPrefix(nextArray[2]);\n\n        const negotiatedVersion = nextArray[3];\n        if (negotiatedVersion != null) {\n          this.channelVersion_ = negotiatedVersion;\n          this.channelDebug_.info('VER=' + this.channelVersion_);\n        }\n\n        const negotiatedServerVersion = nextArray[4];\n        if (negotiatedServerVersion != null) {\n          this.serverVersion_ = negotiatedServerVersion;\n          this.channelDebug_.info('SVER=' + this.serverVersion_);\n        }\n\n        // CVER=22\n        const serverKeepaliveMs = nextArray[5];\n        if (serverKeepaliveMs != null &&\n            typeof serverKeepaliveMs === 'number' && serverKeepaliveMs > 0) {\n          const timeout = 1.5 * serverKeepaliveMs;\n          this.backChannelRequestTimeoutMs_ = timeout;\n          this.channelDebug_.info('backChannelRequestTimeoutMs_=' + timeout);\n        }\n\n        this.applyControlHeaders_(request);\n\n        this.state_ = WebChannelBase.State.OPENED;\n        if (this.handler_) {\n          this.handler_.channelOpened(this);\n        }\n\n        if (this.detectBufferingProxy_) {\n          this.handshakeRttMs_ = Date.now() - request.getRequestStartTime();\n          this.channelDebug_.info(\n              'Handshake RTT: ' + this.handshakeRttMs_ + 'ms');\n        }\n\n        this.startBackchannelAfterHandshake_(request);\n\n        if (this.outgoingMaps_.length > 0) {\n          this.ensureForwardChannel_();\n        }\n      } else if (nextArray[0] == 'stop' || nextArray[0] == 'close') {\n        // treat close also as an abort\n        this.signalError_(WebChannelBase.Error.STOP);\n      }\n    } else if (this.state_ == WebChannelBase.State.OPENED) {\n      if (nextArray[0] == 'stop' || nextArray[0] == 'close') {\n        if (batch && !(batch.length === 0)) {\n          this.handler_.channelHandleMultipleArrays(this, batch);\n          batch.length = 0;\n        }\n        if (nextArray[0] == 'stop') {\n          this.signalError_(WebChannelBase.Error.STOP);\n        } else {\n          this.disconnect();\n        }\n      } else if (nextArray[0] == 'noop') {\n        // ignore - noop to keep connection happy\n      } else {\n        if (batch) {\n          batch.push(nextArray);\n        } else if (this.handler_) {\n          this.handler_.channelHandleArray(this, nextArray);\n        }\n      }\n      // We have received useful data on the back-channel, so clear its retry\n      // count. We do this because back-channels by design do not complete\n      // quickly, so on a flaky connection we could have many fail to complete\n      // fully but still deliver a lot of data before they fail. We don't want\n      // to count such failures towards the retry limit, because we don't want\n      // to give up on a session if we can still receive data.\n      this.backChannelRetryCount_ = 0;\n    }\n  }\n  if (batch && !(batch.length === 0)) {\n    this.handler_.channelHandleMultipleArrays(this, batch);\n  }\n};\n\n/**\n * Starts the backchannel after the handshake.\n *\n * @param {!ChannelRequest} request The underlying request object\n * @private\n */\nWebChannelBase.prototype.startBackchannelAfterHandshake_ = function(request) {\n  this.backChannelUri_ = this.getBackChannelUri(\n      this.hostPrefix_, /** @type {string} */ (this.path_));\n\n  if (request.isInitialResponseDecoded()) {\n    this.channelDebug_.debug('Upgrade the handshake request to a backchannel.');\n    this.forwardChannelRequestPool_.removeRequest(request);\n    request.resetTimeout(this.backChannelRequestTimeoutMs_);\n    this.backChannelRequest_ = request;\n  } else {\n    this.ensureBackChannel_();\n  }\n};\n\n/**\n * Helper to ensure the channel is in the expected state.\n * @param {...number} var_args The channel must be in one of the indicated\n *     states.\n * @private\n */\nWebChannelBase.prototype.ensureInState_ = function(var_args) {\n  asserts.assert(\n      googArray.contains(arguments, this.state_),\n      'Unexpected channel state: %s', this.state_);\n};\n\n/**\n * Signals an error has occurred.\n * @param {WebChannelBase.Error} error The error code for the failure.\n * @private\n */\nWebChannelBase.prototype.signalError_ = function(error) {\n  this.channelDebug_.info('Error code ' + error);\n  if (error == WebChannelBase.Error.REQUEST_FAILED) {\n    // Create a separate Internet connection to check\n    // if it's a server error or user's network error.\n    netUtils.testNetwork(\n        goog.bind(this.testNetworkCallback_, this), this.networkTestUrl_);\n  } else {\n    requestStats.notifyStatEvent(requestStats.Stat.ERROR_OTHER);\n  }\n  this.onError_(error);\n};\n\n/**\n * Callback for netUtils.testNetwork during error handling.\n * @param {boolean} networkUp Whether the network is up.\n * @private\n */\nWebChannelBase.prototype.testNetworkCallback_ = function(networkUp) {\n  if (networkUp) {\n    this.channelDebug_.info('Successfully pinged google.com');\n    requestStats.notifyStatEvent(requestStats.Stat.ERROR_OTHER);\n  } else {\n    this.channelDebug_.info('Failed to ping google.com');\n    requestStats.notifyStatEvent(requestStats.Stat.ERROR_NETWORK);\n    // Do not call onError_ again to eliminate duplicated Error events.\n  }\n};\n\n/**\n * Called when messages have been successfully sent from the queue.\n * @param {!ChannelRequest} request The request object\n * @private\n */\nWebChannelBase.prototype.onSuccess_ = function(request) {\n  if (this.handler_) {\n    this.handler_.channelSuccess(this, request);\n  }\n};\n\n/**\n * Called when we've determined the final error for a channel. It closes the\n * notifiers the handler of the error and closes the channel.\n * @param {WebChannelBase.Error} error  The error code for the failure.\n * @private\n */\nWebChannelBase.prototype.onError_ = function(error) {\n  this.channelDebug_.debug('HttpChannel: error - ' + error);\n  this.state_ = WebChannelBase.State.CLOSED;\n  if (this.handler_) {\n    this.handler_.channelError(this, error);\n  }\n  this.onClose_();\n  this.cancelRequests_();\n};\n\n/**\n * Called when the channel has been closed. It notifiers the handler of the\n * event, and reports any pending or undelivered maps.\n * @private\n */\nWebChannelBase.prototype.onClose_ = function() {\n  this.state_ = WebChannelBase.State.CLOSED;\n  this.nonAckedMapsAtChannelClose_ = [];\n  if (this.handler_) {\n    const pendingMessages =\n        this.forwardChannelRequestPool_.getPendingMessages();\n\n    if (pendingMessages.length == 0 && this.outgoingMaps_.length == 0) {\n      this.handler_.channelClosed(this);\n    } else {\n      this.channelDebug_.debug(\n          () => 'Number of undelivered maps' +\n              ', pending: ' + pendingMessages.length +\n              ', outgoing: ' + this.outgoingMaps_.length);\n\n      googArray.extend(this.nonAckedMapsAtChannelClose_, pendingMessages);\n      googArray.extend(this.nonAckedMapsAtChannelClose_, this.outgoingMaps_);\n\n      this.forwardChannelRequestPool_.clearPendingMessages();\n\n      const copyOfUndeliveredMaps = googArray.clone(this.outgoingMaps_);\n      this.outgoingMaps_.length = 0;\n\n      this.handler_.channelClosed(this, pendingMessages, copyOfUndeliveredMaps);\n    }\n  }\n};\n\n/**\n * @return {!Array<!Wire.QueuedMap>} Returns the list of non-acked maps, both\n * during an active channel or after the channel is closed. Refer to the\n * `getNonAckedMessages()` API for definitions of non-acked messages.\n */\nWebChannelBase.prototype.getNonAckedMaps = function() {\n  if (this.state_ == WebChannelBase.State.CLOSED) {\n    asserts.assert(\n        this.nonAckedMapsAtChannelClose_ != null,\n        'nonAckedMapsAtChannelClose_ is not set after channel close.');\n    return this.nonAckedMapsAtChannelClose_;\n  }\n\n  // The underlying message objects are not cloned and thus exposes a mutability\n  // risk, but is chosen to make strict equality (i.e. ===) checks possible for\n  // callers.\n  let unAckedMaps = [];\n  googArray.extend(\n      unAckedMaps, this.forwardChannelRequestPool_.getPendingMessages());\n  googArray.extend(unAckedMaps, this.outgoingMaps_);\n\n  return unAckedMaps;\n};\n\n/**\n * @return {number} The number of messages in flight, from the oldest message\n * not yet acknowledged by the server to the next message to be sent out.\n */\nWebChannelBase.prototype.getNonAckedMessageGap = function() {\n  const nonAckedMaps = this.getNonAckedMaps();\n  if (nonAckedMaps.length == 0) {\n    return 0;\n  }\n  let minMapId = nonAckedMaps[0].mapId;\n  for (let i = 1; i < nonAckedMaps.length; i++) {\n    minMapId = Math.min(minMapId, nonAckedMaps[i].mapId);\n  }\n  return this.nextMapId_ - minMapId;\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.getForwardChannelUri = function(path) {\n  const uri = this.createDataUri(null, path);\n  this.channelDebug_.debug('GetForwardChannelUri: ' + uri);\n  return uri;\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.getConnectionState = function() {\n  return this.connState_;\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.getBackChannelUri = function(hostPrefix, path) {\n  const uri = this.createDataUri(\n      this.shouldUseSecondaryDomains() ? hostPrefix : null, path);\n  this.channelDebug_.debug('GetBackChannelUri: ' + uri);\n  return uri;\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.createDataUri = function(\n    hostPrefix, path, opt_overridePort) {\n  let uri = Uri.parse(path);\n  const uriAbsolute = (uri.getDomain() != '');\n  if (uriAbsolute) {\n    if (hostPrefix) {\n      uri.setDomain(hostPrefix + '.' + uri.getDomain());\n    }\n\n    uri.setPort(opt_overridePort || uri.getPort());\n  } else {\n    const locationPage = goog.global.location;\n    let hostName;\n    if (hostPrefix) {\n      hostName = hostPrefix + '.' + locationPage.hostname;\n    } else {\n      hostName = locationPage.hostname;\n    }\n\n    const port = opt_overridePort || +locationPage.port;\n\n    uri = Uri.create(locationPage.protocol, null, hostName, port, path);\n  }\n\n  const param = this.getHttpSessionIdParam();\n  const value = this.getHttpSessionId();\n  if (param && value) {\n    uri.setParameterValue(param, value);\n  }\n\n  // Add the protocol version to the URI.\n  uri.setParameterValue('VER', this.channelVersion_);\n\n  this.addAdditionalParams_(uri);\n\n  return uri;\n};\n\n/**\n * @override\n * @param {?string} hostPrefix The host prefix, if we need an XhrIo object\n *     capable of calling a secondary domain.\n * @param {boolean=} isStreaming Whether or not fetch/streams are enabled for\n *     the underlying HTTP request.\n * @return {!XhrIo} A new XhrIo object.\n */\nWebChannelBase.prototype.createXhrIo = function(hostPrefix, isStreaming) {\n  if (hostPrefix && !this.supportsCrossDomainXhrs_) {\n    throw new Error('Can\\'t create secondary domain capable XhrIo object.');\n  }\n  let xhr;\n  if (this.usesFetchStreams_ && !this.xmlHttpFactory_) {\n    xhr = new XhrIo(new FetchXmlHttpFactory({streamBinaryChunks: isStreaming}));\n  } else {\n    xhr = new XhrIo(this.xmlHttpFactory_);\n  }\n  xhr.setWithCredentials(this.supportsCrossDomainXhrs_);\n  return xhr;\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.isActive = function() {\n  return !!this.handler_ && this.handler_.isActive(this);\n};\n\n/**\n * @override\n */\nWebChannelBase.prototype.shouldUseSecondaryDomains = function() {\n  return this.supportsCrossDomainXhrs_;\n};\n\n/**\n * Sets (overwrites) the forward channel flush callback.\n *\n * @param {function()} callback The callback to be invoked.\n */\nWebChannelBase.prototype.setForwardChannelFlushCallback = function(callback) {\n  this.forwardChannelFlushedCallback_ = callback;\n};\n\n/**\n * Abstract base class for the channel handler\n * @constructor\n * @struct\n */\nWebChannelBase.Handler = function() {};\n\n/**\n * Callback handler for when a batch of response arrays is received from the\n * server. When null, batched dispatching is disabled.\n * @type {?function(!WebChannelBase, !Array<!Array<?>>)}\n */\nWebChannelBase.Handler.prototype.channelHandleMultipleArrays = null;\n\n/**\n * Whether it's okay to make a request to the server. A handler can return\n * false if the channel should fail. For example, if the user has logged out,\n * the handler may want all requests to fail immediately.\n * @param {WebChannelBase} channel The channel.\n * @return {WebChannelBase.Error} An error code. The code should\n * return WebChannelBase.Error.OK to indicate it's okay. Any other\n * error code will cause a failure.\n */\nWebChannelBase.Handler.prototype.okToMakeRequest = function(channel) {\n  return WebChannelBase.Error.OK;\n};\n\n/**\n * Indicates the WebChannel has successfully negotiated with the server\n * and can now send and receive data.\n * @param {WebChannelBase} channel The channel.\n */\nWebChannelBase.Handler.prototype.channelOpened = function(channel) {};\n\n/**\n * New input is available for the application to process.\n *\n * @param {WebChannelBase} channel The channel.\n * @param {!Array<?>|!Object} array The data array.\n */\nWebChannelBase.Handler.prototype.channelHandleArray = function(\n    channel, array) {};\n\n/**\n * Indicates messages that have been successfully sent on the channel.\n *\n * @param {WebChannelBase} channel The channel.\n * @param {!ChannelRequest} request The request object that contains\n *     the pending messages that have been successfully delivered to the server.\n */\nWebChannelBase.Handler.prototype.channelSuccess = function(channel, request) {};\n\n/**\n * Indicates an error occurred on the WebChannel.\n *\n * @param {WebChannelBase} channel The channel.\n * @param {WebChannelBase.Error} error The error code.\n */\nWebChannelBase.Handler.prototype.channelError = function(channel, error) {};\n\n/**\n * Indicates the WebChannel is closed. Also notifies about which maps,\n * if any, that may not have been delivered to the server.\n * @param {WebChannelBase} channel The channel.\n * @param {Array<Wire.QueuedMap>=} opt_pendingMaps The\n *     array of pending maps, which may or may not have been delivered to the\n *     server.\n * @param {Array<Wire.QueuedMap>=} opt_undeliveredMaps\n *     The array of undelivered maps, which have definitely not been delivered\n *     to the server.\n */\nWebChannelBase.Handler.prototype.channelClosed = function(\n    channel, opt_pendingMaps, opt_undeliveredMaps) {};\n\n/**\n * Gets any parameters that should be added at the time another connection is\n * made to the server.\n * @param {WebChannelBase} channel The channel.\n * @return {!Object} Extra parameter keys and values to add to the requests.\n */\nWebChannelBase.Handler.prototype.getAdditionalParams = function(channel) {\n  return {};\n};\n\n/**\n * Gets whether this channel is currently active. This is used to determine the\n * length of time to wait before retrying.\n * @param {WebChannelBase} channel The channel.\n * @return {boolean} Whether the channel is currently active.\n */\nWebChannelBase.Handler.prototype.isActive = function(channel) {\n  return true;\n};\n\n/**\n * Whether or not this channel uses WHATWG Fetch/streams.\n * @override\n * @return {boolean}\n */\nWebChannelBase.prototype.usesFetchStreams = function() {\n  return this.usesFetchStreams_;\n};\n\n/**\n * Called by the channel if enumeration of the map throws an exception.\n * @param {WebChannelBase} channel The channel.\n * @param {Object} map The map that can't be enumerated.\n */\nWebChannelBase.Handler.prototype.badMapError = function(channel, map) {};\n\n/**\n * Allows the handler to override a host prefix provided by the server. Will\n * be called whenever the channel has received such a prefix and is considering\n * its use.\n * @param {?string} serverHostPrefix The host prefix provided by the server.\n * @return {?string} The host prefix the client should use.\n */\nWebChannelBase.Handler.prototype.correctHostPrefix = function(\n    serverHostPrefix) {\n  return serverHostPrefix;\n};\n\nexports = WebChannelBase;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview The dispose method is used to clean up references and\n * resources.\n */\n\ngoog.module('goog.dispose');\ngoog.module.declareLegacyNamespace();\n\n/**\n * Calls `dispose` on the argument if it supports it. If obj is not an\n *     object with a dispose() method, this is a no-op.\n * @param {*} obj The object to dispose of.\n */\nfunction dispose(obj) {\n  if (obj && typeof obj.dispose == 'function') {\n    obj.dispose();\n  }\n}\nexports = dispose;\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Codec functions of the v8 wire protocol. Eventually we'd want\n * to support pluggable wire-format to improve wire efficiency and to enable\n * binary encoding. Such support will require an interface class, which\n * will be added later.\n *\n */\n\ngoog.module('goog.labs.net.webChannel.WireV8');\ngoog.module.declareLegacyNamespace();\n\nconst NativeJsonProcessor = goog.require('goog.json.NativeJsonProcessor');\nconst Parser = goog.requireType('goog.string.Parser');\nconst Wire = goog.require('goog.labs.net.webChannel.Wire');\nconst asserts = goog.require('goog.asserts');\nconst googJson = goog.require('goog.json');\nconst maps = goog.require('goog.collections.maps');\n\n/**\n * The v8 codec class.\n *\n * @constructor\n * @struct\n */\nfunction WireV8() {\n  /**\n   * Parser for a response payload. The parser should return an array.\n   * @private {!Parser}\n   */\n  this.parser_ = new NativeJsonProcessor();\n}\n\n/**\n * Encodes a standalone message into the wire format.\n *\n * May throw exception if the message object contains any invalid elements.\n *\n * @param {!Object|!maps.MapLike} message The message data.\n *     V8 only support JS objects (or Map).\n * @param {!Array<string>} buffer The text buffer to write the message to.\n * @param {string=} opt_prefix The prefix for each field of the object.\n */\nWireV8.prototype.encodeMessage = function(message, buffer, opt_prefix) {\n  const prefix = opt_prefix || '';\n  try {\n    const collection =\n        message instanceof Map ? message : Object.entries(message);\n    for (const [key, value] of collection) {\n      let encodedValue = value;\n      if (goog.isObject(value)) {\n        encodedValue = googJson.serialize(value);\n      }  // keep the fast-path for primitive types\n      buffer.push(prefix + key + '=' + encodeURIComponent(encodedValue));\n    }\n  } catch (ex) {\n    // We send a map here because lots of the retry logic relies on map IDs,\n    // so we have to send something (possibly redundant).\n    buffer.push(\n        prefix + 'type' +\n        '=' + encodeURIComponent('_badmap'));\n    throw ex;\n  }\n};\n\n/**\n * Encodes all the buffered messages of the forward channel.\n *\n * @param {!Array<Wire.QueuedMap>} messageQueue The message data.\n *     V8 only support JS objects.\n * @param {number} count The number of messages to be encoded.\n * @param {?function(!Object)} badMapHandler Callback for bad messages.\n * @return {string} the encoded messages\n */\nWireV8.prototype.encodeMessageQueue = function(\n    messageQueue, count, badMapHandler) {\n  let offset = -1;\n  while (true) {\n    const sb = ['count=' + count];\n    // To save a bit of bandwidth, specify the base mapId and the rest as\n    // offsets from it.\n    if (offset == -1) {\n      if (count > 0) {\n        offset = messageQueue[0].mapId;\n        sb.push('ofs=' + offset);\n      } else {\n        offset = 0;\n      }\n    } else {\n      sb.push('ofs=' + offset);\n    }\n    let done = true;\n    for (let i = 0; i < count; i++) {\n      let mapId = messageQueue[i].mapId;\n      const map = messageQueue[i].map;\n      mapId -= offset;\n      if (mapId < 0) {\n        // redo the encoding in case of retry/reordering, plus extra space\n        offset = Math.max(0, messageQueue[i].mapId - 100);\n        done = false;\n        continue;\n      }\n      try {\n        this.encodeMessage(map, sb, 'req' + mapId + '_');\n      } catch (ex) {\n        if (badMapHandler) {\n          badMapHandler(map);\n        }\n      }\n    }\n    if (done) {\n      return sb.join('&');\n    }\n  }\n};\n\n/**\n * Decodes a standalone message received from the wire. May throw exception\n * if text is ill-formatted.\n *\n * Must be valid JSON as it is insecure to use eval() to decode JS literals;\n * and eval() is disallowed in Chrome apps too.\n *\n * Invalid JS literals include null array elements, quotas etc.\n *\n * @param {string} messageText The string content as received from the wire.\n * @return {*} The decoded message object.\n */\nWireV8.prototype.decodeMessage = function(messageText) {\n  const response = this.parser_.parse(messageText);\n  asserts.assert(Array.isArray(response));  // throw exception\n  return response;\n};\n\nexports = WireV8;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview A pool of forward channel requests to enable real-time\n * messaging from the client to server.\n *\n */\n\ngoog.module('goog.labs.net.webChannel.ForwardChannelRequestPool');\n\ngoog.module.declareLegacyNamespace();\n\nconst ChannelRequest = goog.require('goog.labs.net.webChannel.ChannelRequest');\nconst Wire = goog.require('goog.labs.net.webChannel.Wire');\nconst array = goog.require('goog.array');\nconst googString = goog.require('goog.string');\n\n\n/**\n * This class represents the state of all forward channel requests.\n *\n * @param {number=} opt_maxPoolSize The maximum pool size.\n *\n * @struct @constructor @final\n */\nconst ForwardChannelRequestPool = function(opt_maxPoolSize) {\n  /**\n   * The max pool size as configured.\n   *\n   * @private {number}\n   */\n  this.maxPoolSizeConfigured_ =\n      opt_maxPoolSize || ForwardChannelRequestPool.MAX_POOL_SIZE_;\n\n  /**\n   * The current size limit of the request pool. This limit is meant to be\n   * read-only after the channel is fully opened.\n   *\n   * If SPDY or HTTP2 is enabled, set it to the max pool size, which is also\n   * configurable.\n   *\n   * @private {number}\n   */\n  this.maxSize_ = ForwardChannelRequestPool.isSpdyOrHttp2Enabled_() ?\n      this.maxPoolSizeConfigured_ :\n      1;\n\n  /**\n   * The container for all the pending request objects.\n   *\n   * @private {?Set<?ChannelRequest>}\n   */\n  this.requestPool_ = null;\n\n  if (this.maxSize_ > 1) {\n    this.requestPool_ = new Set();\n  }\n\n  /**\n   * The single request object when the pool size is limited to one.\n   *\n   * @private {?ChannelRequest}\n   */\n  this.request_ = null;\n\n  /**\n   * Saved pending messages when the pool is cancelled.\n   *\n   * @private {!Array<Wire.QueuedMap>}\n   */\n  this.pendingMessages_ = [];\n};\n\n\n/**\n * The default size limit of the request pool.\n *\n * @private {number}\n */\nForwardChannelRequestPool.MAX_POOL_SIZE_ = 10;\n\n\n/**\n * @return {boolean} True if SPDY or HTTP2 is enabled. Uses chrome-specific APIs\n *     as a fallback and will always return false for other browsers where\n *     PerformanceNavigationTiming is not available.\n * @private\n */\nForwardChannelRequestPool.isSpdyOrHttp2Enabled_ = function() {\n  if (goog.global.PerformanceNavigationTiming) {\n    const entrys = /** @type {!Array<!PerformanceNavigationTiming>} */ (\n        goog.global.performance.getEntriesByType('navigation'));\n    return entrys.length > 0 &&\n        (entrys[0].nextHopProtocol == 'hq' ||\n         entrys[0].nextHopProtocol == 'h2');\n  }\n  return !!(\n      goog.global.chrome && goog.global.chrome.loadTimes &&\n      goog.global.chrome.loadTimes() &&\n      goog.global.chrome.loadTimes().wasFetchedViaSpdy);\n};\n\n\n/**\n * Once we know the client protocol (from the handshake), check if we need\n * enable the request pool accordingly. This is more robust than using\n * browser-internal APIs (specific to Chrome).\n *\n * @param {string} clientProtocol The client protocol\n */\nForwardChannelRequestPool.prototype.applyClientProtocol = function(\n    clientProtocol) {\n  if (this.requestPool_) {\n    return;\n  }\n\n  if (googString.contains(clientProtocol, 'spdy') ||\n      googString.contains(clientProtocol, 'quic') ||\n      googString.contains(clientProtocol, 'h2')) {\n    this.maxSize_ = this.maxPoolSizeConfigured_;\n    this.requestPool_ = new Set();\n    if (this.request_) {\n      this.addRequest(this.request_);\n      this.request_ = null;\n    }\n  }\n};\n\n\n/**\n * @return {boolean} True if the pool is full.\n */\nForwardChannelRequestPool.prototype.isFull = function() {\n  if (this.request_) {\n    return true;\n  }\n\n  if (this.requestPool_) {\n    return this.requestPool_.size >= this.maxSize_;\n  }\n\n  return false;\n};\n\n\n/**\n * @return {number} The current size limit.\n */\nForwardChannelRequestPool.prototype.getMaxSize = function() {\n  return this.maxSize_;\n};\n\n\n/**\n * @return {number} The number of pending requests in the pool.\n */\nForwardChannelRequestPool.prototype.getRequestCount = function() {\n  if (this.request_) {\n    return 1;\n  }\n\n  if (this.requestPool_) {\n    return this.requestPool_.size;\n  }\n\n  return 0;\n};\n\n\n/**\n * @param {ChannelRequest} req The channel request.\n * @return {boolean} True if the request is a included inside the pool.\n */\nForwardChannelRequestPool.prototype.hasRequest = function(req) {\n  if (this.request_) {\n    return this.request_ == req;\n  }\n\n  if (this.requestPool_) {\n    return this.requestPool_.has(req);\n  }\n\n  return false;\n};\n\n\n/**\n * Adds a new request to the pool.\n *\n * @param {!ChannelRequest} req The new channel request.\n */\nForwardChannelRequestPool.prototype.addRequest = function(req) {\n  if (this.requestPool_) {\n    this.requestPool_.add(req);\n  } else {\n    this.request_ = req;\n  }\n};\n\n\n/**\n * Removes the given request from the pool.\n *\n * @param {ChannelRequest} req The channel request.\n * @return {boolean} Whether the request has been removed from the pool.\n */\nForwardChannelRequestPool.prototype.removeRequest = function(req) {\n  if (this.request_ && this.request_ == req) {\n    this.request_ = null;\n    return true;\n  }\n\n  if (this.requestPool_ && this.requestPool_.has(req)) {\n    this.requestPool_.delete(req);\n    return true;\n  }\n\n  return false;\n};\n\n\n/**\n * Clears the pool and cancel all the pending requests.\n */\nForwardChannelRequestPool.prototype.cancel = function() {\n  // save any pending messages\n  this.pendingMessages_ = this.getPendingMessages();\n\n  if (this.request_) {\n    this.request_.cancel();\n    this.request_ = null;\n    return;\n  }\n\n  if (this.requestPool_ && this.requestPool_.size !== 0) {\n    for (const val of this.requestPool_.values()) {\n      val.cancel();\n    }\n    this.requestPool_.clear();\n  }\n};\n\n\n/**\n * @return {boolean} Whether there are any pending requests.\n */\nForwardChannelRequestPool.prototype.hasPendingRequest = function() {\n  return (this.request_ != null) ||\n      (this.requestPool_ != null && this.requestPool_.size !== 0);\n};\n\n\n/**\n * @return {!Array<Wire.QueuedMap>} All the pending messages from the pool,\n *     as a new array.\n */\nForwardChannelRequestPool.prototype.getPendingMessages = function() {\n  if (this.request_ != null) {\n    return this.pendingMessages_.concat(this.request_.getPendingMessages());\n  }\n\n  if (this.requestPool_ != null && this.requestPool_.size !== 0) {\n    let result = this.pendingMessages_;\n    for (const val of this.requestPool_.values()) {\n      result = result.concat(val.getPendingMessages());\n    }\n    return result;\n  }\n\n  return array.clone(this.pendingMessages_);\n};\n\n\n/**\n * Records pending messages, e.g. when a request receives a failed response.\n *\n * @param {!Array<Wire.QueuedMap>} messages Pending messages.\n */\nForwardChannelRequestPool.prototype.addPendingMessages = function(messages) {\n  this.pendingMessages_ = this.pendingMessages_.concat(messages);\n};\n\n\n/**\n * Clears any recorded pending messages.\n */\nForwardChannelRequestPool.prototype.clearPendingMessages = function() {\n  this.pendingMessages_.length = 0;\n};\n\n\n/**\n * Cancels all pending requests and force the completion of channel requests.\n *\n * Need go through the standard onRequestComplete logic to expose the max-retry\n * failure in the standard way.\n *\n * @param {function(!ChannelRequest)} onComplete The completion callback.\n * @return {boolean} true if any request has been forced to complete.\n */\nForwardChannelRequestPool.prototype.forceComplete = function(onComplete) {\n  if (this.request_ != null) {\n    this.request_.cancel();\n    onComplete(this.request_);\n    return true;\n  }\n\n  if (this.requestPool_ && this.requestPool_.size !== 0) {\n    for (const val of this.requestPool_.values()) {\n      val.cancel();\n      onComplete(val);\n    }\n    return true;\n  }\n\n  return false;\n};\n\nexports = ForwardChannelRequestPool;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Interface and shared data structures for implementing\n * different wire protocol versions.\n */\ngoog.module('goog.labs.net.webChannel.Wire');\n\ngoog.module.declareLegacyNamespace();\n\nconst maps = goog.require('goog.collections.maps');\n\n/**\n * The interface class.\n * @interface\n */\nclass Wire {\n  constructor() {}\n}\n\n\n/**\n * The latest protocol version that this class supports. We request this version\n * from the server when opening the connection. Should match\n * LATEST_CHANNEL_VERSION on the server code.\n * @type {number}\n */\nWire.LATEST_CHANNEL_VERSION = 8;\n\n\n/**\n * The JSON field key for the raw data wrapper object.\n * @type {string}\n */\nWire.RAW_DATA_KEY = '__data__';\n\n\n\n/**\n * Simple container class for a (mapId, map) pair.\n */\nWire.QueuedMap = class {\n  /**\n   * @param {number} mapId The id for this map.\n   * @param {!Object|!maps.MapLike} map The map itself.\n   * @param {!Object=} opt_context The context associated with the map.\n   */\n  constructor(mapId, map, opt_context) {\n    /**\n     * The id for this map.\n     * @type {number}\n     */\n    this.mapId = mapId;\n\n    /**\n     * The map itself.\n     * @type {!Object|!maps.MapLike}\n     */\n    this.map = map;\n\n    /**\n     * The context for the map.\n     * @type {Object}\n     */\n    this.context = opt_context || null;\n  }\n\n  /**\n   * @return {number|undefined} the size of the raw JSON message or\n   * undefined if the message is not encoded as a raw JSON message\n   */\n  getRawDataSize() {\n    if (Wire.RAW_DATA_KEY in this.map) {\n      const data = this.map[Wire.RAW_DATA_KEY];\n      if (typeof data === 'string') {\n        return data.length;\n      }\n    }\n\n    return undefined;\n  }\n};\n\nexports = Wire;\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Utility functions for managing networking, such as\n * testing network connectivity.\n *\n */\n\ngoog.module('goog.labs.net.webChannel.netUtils');\ngoog.module.declareLegacyNamespace();\n\nconst Uri = goog.require('goog.Uri');\nconst WebChannelDebug = goog.require('goog.labs.net.webChannel.WebChannelDebug');\n\n/**\n * Default timeout to allow for URI pings.\n * @type {number}\n */\nconst NETWORK_TIMEOUT = 10000;\n\n/**\n * Pings the network to check if an error is a server error or user's network\n * error.\n *\n * @param {function(boolean)} callback The function to call back with results.\n * @param {string=} opt_baseUrl The base URI to use for the network test.\n */\nfunction testNetwork(callback, opt_baseUrl) {\n  // default google.com image\n  let baseUrl = opt_baseUrl || '//www.google.com/images/cleardot.gif';\n  const useImageLoader = !opt_baseUrl;\n\n  let uri = new Uri(baseUrl);\n\n  if (!(goog.global.location && goog.global.location.protocol == 'http')) {\n    uri.setScheme('https');  // e.g. chrome-extension\n  }\n  uri.makeUnique();\n\n  if (useImageLoader) {\n    testLoadImage(uri.toString(), NETWORK_TIMEOUT, callback);\n  } else {\n    testPingServer(uri.toString(), NETWORK_TIMEOUT, callback);\n  }\n}\n\n/**\n * Test loading the given image.\n * @param {string} url URL to the image.\n * @param {number} timeout Milliseconds before giving up.\n * @param {function(boolean)} callback Function to call with results.\n * @suppress {strictMissingProperties} Part of the go/strict_warnings_migration\n */\nfunction testLoadImage(url, timeout, callback) {\n  const channelDebug = new WebChannelDebug();\n  channelDebug.debug('TestLoadImage: loading ' + url);\n  if (goog.global.Image) {\n    const img = new Image();\n    img.onload = goog.partial(\n        networkTestCallback, channelDebug, 'TestLoadImage: loaded', true,\n        callback, img);\n    img.onerror = goog.partial(\n        networkTestCallback, channelDebug, 'TestLoadImage: error', false,\n        callback, img);\n    img.onabort = goog.partial(\n        networkTestCallback, channelDebug, 'TestLoadImage: abort', false,\n        callback, img);\n    img.ontimeout = goog.partial(\n        networkTestCallback, channelDebug, 'TestLoadImage: timeout', false,\n        callback, img);\n\n    goog.global.setTimeout(function() {\n      if (img.ontimeout) {\n        img.ontimeout();\n      }\n    }, timeout);\n    img.src = url;\n  } else {\n    // log ERROR_OTHER from environements where Image is not supported\n    callback(false);\n  }\n}\n\n/**\n * Pings the given server URL to test network availability.\n * @param {string} url URL to the server endpoint.\n * @param {number} timeout Milliseconds before giving up.\n * @param {function(boolean)} callback Function to call with results.\n */\nfunction testPingServer(url, timeout, callback) {\n  const channelDebug = new WebChannelDebug();\n  const controller = new AbortController();\n  const timeoutId = setTimeout(() => {\n    controller.abort();\n    networkTestCallback(\n        channelDebug, 'TestPingServer: timeout', false, callback);\n  }, timeout);\n\n  fetch(url, {signal: controller.signal})\n      .then((response) => {\n        clearTimeout(timeoutId);\n        if (response.ok) {\n          networkTestCallback(\n              channelDebug, 'TestPingServer: ok', true, callback);\n        } else {\n          networkTestCallback(\n              channelDebug, 'TestPingServer: server error', false, callback);\n        }\n      })\n      .catch((error) => {\n        clearTimeout(timeoutId);\n        networkTestCallback(\n            channelDebug, 'TestPingServer: error', false, callback);\n      });\n}\n\n/**\n * Wraps the network test callback with debug and cleanup logic.\n * @param {!WebChannelDebug} channelDebug The WebChannelDebug object.\n * @param {string} debugText The debug text.\n * @param {boolean} result The result of image loading.\n * @param {function(boolean)} callback Function to call with results.\n * @param {!Image=} opt_img The image element.\n */\nfunction networkTestCallback(\n    channelDebug, debugText, result, callback, opt_img) {\n  try {\n    channelDebug.debug(debugText);\n    if (opt_img) {\n      clearImageCallbacks(opt_img);\n    }\n    callback(result);\n  } catch (e) {\n    channelDebug.dumpException(e);\n  }\n}\n\n/**\n * Clears handlers to avoid memory leaks.\n * @param {Image} img The image to clear handlers from.\n * @suppress {strictMissingProperties} Part of the go/strict_warnings_migration\n */\nfunction clearImageCallbacks(img) {\n  img.onload = null;\n  img.onerror = null;\n  img.onabort = null;\n  img.ontimeout = null;\n}\n\nexports = {\n  NETWORK_TIMEOUT,\n  testLoadImage,\n  testNetwork,\n  testPingServer,\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n\n/**\n * @fileoverview Defines a class for parsing JSON using the browser's built in\n * JSON library.\n */\n\ngoog.module('goog.json.NativeJsonProcessor');\ngoog.module.declareLegacyNamespace();\n\nconst Parser = goog.require('goog.string.Parser');\nconst Stringifier = goog.require('goog.string.Stringifier');\nconst asserts = goog.require('goog.asserts');\nconst {Replacer, Reviver} = goog.require('goog.json.types');\n\n\n\n/**\n * A class that parses and stringifies JSON using the browser's built-in JSON\n * library.\n *\n\n * @implements {Parser}\n * @implements {Stringifier}\n * @final\n */\nexports = class {\n  /**\n   * @param {?Replacer=} opt_replacer An optional replacer to use during\n   *     serialization.\n   * @param {?=} opt_reviver An optional reviver to use during\n   *     parsing.\n   */\n  constructor(opt_replacer, opt_reviver) {\n    asserts.assert(goog.global['JSON'] !== undefined, 'JSON not defined');\n\n    /**\n     * @type {!Replacer|null|undefined}\n     * @private\n     */\n    this.replacer_ = opt_replacer;\n\n    /**\n     * @type {!Reviver|null|undefined}\n     * @private\n     */\n    this.reviver_ = opt_reviver;\n  };\n\n  /**\n   * Serializes an object or a value to a string.\n   * Agnostic to the particular format of object and string.\n   *\n   * @param {*} object The object to stringify.\n   * @return {string} A string representation of the input.\n   * @override\n   */\n  stringify(object) {\n    return goog.global['JSON'].stringify(object, this.replacer_);\n  }\n\n  /**\n   * Parses a string into an object and returns the result.\n   * Agnostic to the format of string and object.\n   *\n   * @param {string} s The string to parse.\n   * @return {*} The object generated from the string.\n   * @override\n   */\n  parse(s) {\n    return goog.global['JSON'].parse(s, this.reviver_);\n  }\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\ngoog.provide('goog.net.FetchXmlHttp');\ngoog.provide('goog.net.FetchXmlHttpFactory');\n\ngoog.require('goog.asserts');\ngoog.require('goog.events.EventTarget');\ngoog.require('goog.functions');\ngoog.require('goog.log');\ngoog.require('goog.net.XhrLike');\ngoog.require('goog.net.XmlHttpFactory');\n\n\n\n/**\n * @record\n */\ngoog.net.FetchXmlHttpFactoryOptions = function() {\n  /**\n   * @type {!WorkerGlobalScope|undefined} The Service Worker global scope.\n   */\n  this.worker;\n\n  /**\n   * @type {boolean|undefined} Whether to store the FetchXmlHttp response as an\n   * array of Uint8Arrays.  If this is true then the 'responseType' attribute\n   * must be empty.\n   */\n  this.streamBinaryChunks;\n};\n\n\n\n/**\n * Factory for creating Xhr objects that uses the native fetch() method.\n * https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\n * @param {!goog.net.FetchXmlHttpFactoryOptions} opts\n * @extends {goog.net.XmlHttpFactory}\n * @struct\n * @constructor\n */\ngoog.net.FetchXmlHttpFactory = function(opts) {\n  'use strict';\n  goog.net.FetchXmlHttpFactory.base(this, 'constructor');\n\n  /** @private @final {?WorkerGlobalScope} */\n  this.worker_ = opts.worker || null;\n\n  /** @private @final {boolean} */\n  this.streamBinaryChunks_ = opts.streamBinaryChunks || false;\n\n  /** @private {!RequestCredentials|undefined} */\n  this.credentialsMode_ = undefined;\n\n  /** @private {!RequestCache|undefined} */\n  this.cacheMode_ = undefined;\n};\ngoog.inherits(goog.net.FetchXmlHttpFactory, goog.net.XmlHttpFactory);\n\n\n/** @override */\ngoog.net.FetchXmlHttpFactory.prototype.createInstance = function() {\n  'use strict';\n  const instance =\n      new goog.net.FetchXmlHttp(this.worker_, this.streamBinaryChunks_);\n  if (this.credentialsMode_) {\n    instance.setCredentialsMode(this.credentialsMode_);\n  }\n  if (this.cacheMode_) {\n    instance.setCacheMode(this.cacheMode_);\n  }\n  return instance;\n};\n\n\n/**\n * @param {!RequestCredentials} credentialsMode The credentials mode of the\n *     Service Worker fetch.\n */\ngoog.net.FetchXmlHttpFactory.prototype.setCredentialsMode = function(\n    credentialsMode) {\n  'use strict';\n  this.credentialsMode_ = credentialsMode;\n};\n\n\n/**\n * @param {!RequestCache} cacheMode The cache mode of the Service Worker fetch.\n */\ngoog.net.FetchXmlHttpFactory.prototype.setCacheMode = function(cacheMode) {\n  'use strict';\n  this.cacheMode_ = cacheMode;\n};\n\n\n\n/**\n * FetchXmlHttp object constructor.\n * @param {?WorkerGlobalScope} worker\n * @param {boolean} streamBinaryChunks\n * @extends {goog.events.EventTarget}\n * @implements {goog.net.XhrLike}\n * @constructor\n * @struct\n */\ngoog.net.FetchXmlHttp = function(worker, streamBinaryChunks) {\n  'use strict';\n  goog.net.FetchXmlHttp.base(this, 'constructor');\n\n  /** @private @final {?WorkerGlobalScope} */\n  this.worker_ = worker;\n\n  /** @private @final {boolean} */\n  this.streamBinaryChunks_ = streamBinaryChunks;\n\n  /** @private {RequestCredentials|undefined} */\n  this.credentialsMode_ = undefined;\n\n  /** @private {RequestCache|undefined} */\n  this.cacheMode_ = undefined;\n\n  /**\n   * Request state.\n   * @type {goog.net.FetchXmlHttp.RequestState}\n   */\n  this.readyState = goog.net.FetchXmlHttp.RequestState.UNSENT;\n\n  /**\n   * HTTP status.\n   * @type {number}\n   */\n  this.status = 0;\n\n  /**\n   * HTTP status string.\n   * @type {string}\n   */\n  this.statusText = '';\n\n  /**\n   * Content of the response.\n   * @type {string|!ArrayBuffer|!Array<!Uint8Array>}\n   */\n  this.response = '';\n\n  /**\n   * Content of the response.\n   * @type {string}\n   */\n  this.responseText = '';\n\n  /**\n   * The type of the response.  If this is set to 'arraybuffer' the request will\n   * be discrete, streaming is only supported for text encoded requests.\n   * @type {string}\n   */\n  this.responseType = '';\n\n  /**\n   * The last response URL used including redirections.\n   * @type {string}\n   */\n  this.responseURL = '';\n\n\n  /**\n   * Document response entity body.\n   * NOTE: This is always null and not supported by this class.\n   * @final {null}\n   */\n  this.responseXML = null;\n\n  /**\n   * Method to call when the state changes.\n   * @type {?function()}\n   */\n  this.onreadystatechange = null;\n\n  /** @private {!Headers} */\n  this.requestHeaders_ = new Headers();\n\n  /** @private {?Headers} */\n  this.responseHeaders_ = null;\n\n  /**\n   * Request method (GET or POST).\n   * @private {string}\n   */\n  this.method_ = 'GET';\n\n  /**\n   * Request URL.\n   * @private {string}\n   */\n  this.url_ = '';\n\n  /**\n   * Whether the request is in progress.\n   * @private {boolean}\n   */\n  this.inProgress_ = false;\n\n  /** @private @final {?goog.log.Logger} */\n  this.logger_ = goog.log.getLogger('goog.net.FetchXmlHttp');\n\n  /** @private {?Response} */\n  this.fetchResponse_ = null;\n\n  /** @private {!ReadableStreamDefaultReader|null} */\n  this.currentReader_ = null;\n\n  /** @private {?TextDecoder} */\n  this.textDecoder_ = null;\n\n  /** @private @const {!AbortController} */\n  this.abortController_ = new AbortController();\n};\ngoog.inherits(goog.net.FetchXmlHttp, goog.events.EventTarget);\n\n\n/**\n * State of the requests.\n * @enum {number}\n */\ngoog.net.FetchXmlHttp.RequestState = {\n  UNSENT: 0,\n  OPENED: 1,\n  HEADER_RECEIVED: 2,\n  LOADING: 3,\n  DONE: 4,\n};\n\n\n/** @override */\ngoog.net.FetchXmlHttp.prototype.open = function(method, url, opt_async) {\n  'use strict';\n  goog.asserts.assert(!!opt_async, 'Only async requests are supported.');\n  if (this.readyState != goog.net.FetchXmlHttp.RequestState.UNSENT) {\n    this.abort();\n    throw new Error('Error reopening a connection');\n  }\n\n  this.method_ = method;\n  this.url_ = url;\n\n  this.readyState = goog.net.FetchXmlHttp.RequestState.OPENED;\n  this.dispatchCallback_();\n};\n\n\n/** @override */\ngoog.net.FetchXmlHttp.prototype.send = function(opt_data) {\n  'use strict';\n  if (this.readyState != goog.net.FetchXmlHttp.RequestState.OPENED) {\n    this.abort();\n    throw new Error('need to call open() first. ');\n  }\n\n  // If the request was aborted before send() was called, error out.\n  if (this.abortController_.signal.aborted) {\n    this.abort();\n    throw new Error('Request was aborted.');\n  }\n\n  this.inProgress_ = true;\n  const requestInit = {\n    headers: this.requestHeaders_,\n    method: this.method_,\n    credentials: this.credentialsMode_,\n    cache: this.cacheMode_,\n    signal: this.abortController_.signal,\n  };\n  if (opt_data) {\n    requestInit['body'] = opt_data;\n  }\n\n  (this.worker_ || goog.global)\n      .fetch(new Request(this.url_, /** @type {!RequestInit} */ (requestInit)))\n      .then(\n          this.handleResponse_.bind(this), this.handleSendFailure_.bind(this));\n};\n\n\n/** @override */\ngoog.net.FetchXmlHttp.prototype.abort = function() {\n  'use strict';\n  this.response = this.responseText = '';\n  this.requestHeaders_ = new Headers();\n  this.status = 0;\n\n  this.abortController_.abort('Request was aborted.');\n\n  if (!!this.currentReader_) {\n    this.currentReader_.cancel('Request was aborted.')\n        .catch(\n            e => goog.log.warning(\n                this.logger_, 'Fetch reader cancellation error.', e));\n  }\n\n  if (((this.readyState >= goog.net.FetchXmlHttp.RequestState.OPENED) &&\n       this.inProgress_) &&\n      (this.readyState != goog.net.FetchXmlHttp.RequestState.DONE)) {\n    this.inProgress_ = false;\n    this.requestDone_();\n  }\n\n  this.readyState = goog.net.FetchXmlHttp.RequestState.UNSENT;\n};\n\n\n/**\n * Handles the fetch response.\n * @param {!Response} response\n * @private\n */\ngoog.net.FetchXmlHttp.prototype.handleResponse_ = function(response) {\n  'use strict';\n  if (!this.inProgress_) {\n    // The request was aborted, ignore.\n    return;\n  }\n\n  this.fetchResponse_ = response;\n\n  if (!this.responseHeaders_) {\n    this.status = this.fetchResponse_.status;\n    this.statusText = this.fetchResponse_.statusText;\n    this.responseHeaders_ = response.headers;\n    this.readyState = goog.net.FetchXmlHttp.RequestState.HEADER_RECEIVED;\n    this.dispatchCallback_();\n  }\n  // A callback may abort the request.\n  if (!this.inProgress_) {\n    // The request was aborted, ignore.\n    return;\n  }\n\n  this.readyState = goog.net.FetchXmlHttp.RequestState.LOADING;\n  this.dispatchCallback_();\n  // A callback may abort the request.\n  if (!this.inProgress_) {\n    // The request was aborted, ignore.\n    return;\n  }\n\n  if (this.responseType === 'arraybuffer') {\n    response.arrayBuffer().then(\n        this.handleResponseArrayBuffer_.bind(this),\n        this.handleSendFailure_.bind(this));\n  } else if (\n      typeof (goog.global.ReadableStream) !== 'undefined' &&\n      'body' in response) {\n    this.currentReader_ =\n        /** @type {!ReadableStreamDefaultReader} */ (response.body.getReader());\n    if (this.streamBinaryChunks_) {\n      if (this.responseType) {\n        throw new Error(\n            'responseType must be empty for \"streamBinaryChunks\" mode responses.');\n      }\n      this.response = [];\n    } else {\n      this.response = this.responseText = '';\n      this.textDecoder_ = new TextDecoder();\n    }\n    this.readInputFromFetch_();\n  } else {\n    response.text().then(\n        this.handleResponseText_.bind(this),\n        this.handleSendFailure_.bind(this));\n  }\n};\n\n\n/**\n * Reads the next chunk of data from the fetch response.\n * @private\n */\ngoog.net.FetchXmlHttp.prototype.readInputFromFetch_ = function() {\n  'use strict';\n  this.currentReader_.read()\n      .then(this.handleDataFromStream_.bind(this))\n      .catch(this.handleSendFailure_.bind(this));\n};\n\n\n/**\n * Handles a chunk of data from the fetch response stream reader.\n * @param {!IIterableResult} result\n * @private\n */\ngoog.net.FetchXmlHttp.prototype.handleDataFromStream_ = function(result) {\n  'use strict';\n  if (!this.inProgress_) {\n    // The request was aborted, ignore.\n    return;\n  }\n\n  if (this.streamBinaryChunks_ && result.value) {\n    // When streamBinaryChunks_ is enabled, \"response\" is an array\n    /** @type {!Array} */ (this.response)\n        .push(/** @type {!Uint8Array} */ (result.value));\n  } else if (!this.streamBinaryChunks_) {\n    const dataPacket = result.value ?\n        /** @type {!Uint8Array} */ (result.value) :\n        new Uint8Array(0);\n    const newText =\n        this.textDecoder_.decode(dataPacket, {stream: !result.done});\n    if (newText) {\n      this.responseText += newText;\n      this.response = this.responseText;\n    }\n  }\n  if (result.done) {\n    this.requestDone_();\n  } else {\n    this.dispatchCallback_();\n  }\n\n  if (this.readyState == goog.net.FetchXmlHttp.RequestState.LOADING) {\n    this.readInputFromFetch_();\n  }\n};\n\n/**\n * Handles the response text.\n * @param {string} responseText\n * @private\n */\ngoog.net.FetchXmlHttp.prototype.handleResponseText_ = function(responseText) {\n  'use strict';\n  if (!this.inProgress_) {\n    // The request was aborted, ignore.\n    return;\n  }\n  this.response = this.responseText = responseText;\n  this.requestDone_();\n};\n\n\n/**\n * Handles the response text.\n * @param {!ArrayBuffer} responseArrayBuffer\n * @private\n */\ngoog.net.FetchXmlHttp.prototype.handleResponseArrayBuffer_ = function(\n    responseArrayBuffer) {\n  'use strict';\n  if (!this.inProgress_) {\n    // The request was aborted, ignore.\n    return;\n  }\n  this.response = responseArrayBuffer;\n  this.requestDone_();\n};\n\n\n/**\n * Handles the send failure.\n * @param {*} error\n * @private\n */\ngoog.net.FetchXmlHttp.prototype.handleSendFailure_ = function(error) {\n  'use strict';\n  const e = error instanceof Error ? error : Error(error);\n  goog.log.warning(this.logger_, 'Failed to fetch url ' + this.url_, e);\n  if (!this.inProgress_) {\n    // The request was aborted, ignore.\n    return;\n  }\n  this.requestDone_();\n};\n\n\n/**\n * Sets the request state to DONE and performs cleanup.\n * @private\n */\ngoog.net.FetchXmlHttp.prototype.requestDone_ = function() {\n  'use strict';\n  this.readyState = goog.net.FetchXmlHttp.RequestState.DONE;\n\n  this.fetchResponse_ = null;\n  this.currentReader_ = null;\n  this.textDecoder_ = null;\n\n  this.dispatchCallback_();\n};\n\n\n/** @override */\ngoog.net.FetchXmlHttp.prototype.setRequestHeader = function(header, value) {\n  'use strict';\n  this.requestHeaders_.append(header, value);\n};\n\n\n/** @override */\ngoog.net.FetchXmlHttp.prototype.getResponseHeader = function(header) {\n  'use strict';\n  // TODO(b/70808323): This method should return null when the headers are not\n  // present or the specified header is missing. The externs need to be fixed.\n  if (!this.responseHeaders_) {\n    goog.log.warning(\n        this.logger_,\n        'Attempting to get response header but no headers have been received ' +\n            'for url: ' + this.url_);\n    return '';\n  }\n  return this.responseHeaders_.get(header.toLowerCase()) || '';\n};\n\n\n/** @override */\ngoog.net.FetchXmlHttp.prototype.getAllResponseHeaders = function() {\n  'use strict';\n  if (!this.responseHeaders_) {\n    goog.log.warning(\n        this.logger_,\n        'Attempting to get all response headers but no headers have been ' +\n            'received for url: ' + this.url_);\n    return '';\n  }\n  const lines = [];\n  const iter = this.responseHeaders_.entries();\n  let entry = iter.next();\n  while (!entry.done) {\n    const pair = entry.value;\n    lines.push(pair[0] + ': ' + pair[1]);\n    entry = iter.next();\n  }\n  return lines.join('\\r\\n');\n};\n\n\n/**\n * @param {!RequestCredentials} credentialsMode The credentials mode of the\n *     Service Worker fetch.\n */\ngoog.net.FetchXmlHttp.prototype.setCredentialsMode = function(credentialsMode) {\n  'use strict';\n  this.credentialsMode_ = credentialsMode;\n};\n\n/**\n * @return {!RequestCredentials|undefined} The credentials mode of the\n *     Service Worker fetch.\n */\ngoog.net.FetchXmlHttp.prototype.getCredentialsMode = function() {\n  'use strict';\n  return this.credentialsMode_;\n};\n\n/**\n * @param {!RequestCache} cacheMode The cache mode of the Service Worker fetch.\n */\ngoog.net.FetchXmlHttp.prototype.setCacheMode = function(cacheMode) {\n  'use strict';\n  this.cacheMode_ = cacheMode;\n};\n\n\n/**\n * Dispatches the callback, if the callback attribute is defined.\n * @private\n */\ngoog.net.FetchXmlHttp.prototype.dispatchCallback_ = function() {\n  'use strict';\n  if (this.onreadystatechange) {\n    this.onreadystatechange.call(this);\n  }\n};\n\n// Polyfill XmlHttpRequest's withCredentials property for specifying whether to\n// include credentials on cross domain requests.\nObject.defineProperty(goog.net.FetchXmlHttp.prototype, 'withCredentials', {\n  get:\n      /**\n       * @this {goog.net.FetchXmlHttp}\n       * @return {boolean} Whether to include credentials in cross domain\n       *     requests.\n       */\n      function() {\n        'use strict';\n        return this.getCredentialsMode() === 'include';\n      },\n\n  set:\n      /**\n       * @param {boolean} value Whether to include credentials in cross domain\n       *     requests.\n       * @this {goog.net.FetchXmlHttp}\n       **/\n      function(value) {\n        'use strict';\n        this.setCredentialsMode(value ? 'include' : 'same-origin');\n      }\n});\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Provides CORS support for HTTP based RPC requests.\n *\n * As part of net.rpc package, CORS features provided by this class\n * depend on the server support. Please check related specs to decide how\n * to enable any of the features provided by this class.\n */\n\ngoog.module('goog.net.rpc.HttpCors');\n\nconst GoogUri = goog.require('goog.Uri');\nconst googObject = goog.require('goog.object');\nconst googString = goog.require('goog.string');\nconst googUriUtils = goog.require('goog.uri.utils');\n\n\n/**\n * The default URL parameter name to overwrite http headers with a URL param\n * to avoid CORS preflight.\n *\n * See https://github.com/whatwg/fetch/issues/210#issue-129531743 for the spec.\n *\n * @type {string}\n */\nexports.HTTP_HEADERS_PARAM_NAME = '$httpHeaders';\n\n\n/**\n * The default URL parameter name to overwrite http method with a URL param\n * to avoid CORS preflight.\n *\n * See https://github.com/whatwg/fetch/issues/210#issue-129531743 for the spec.\n *\n * @type {string}\n */\nexports.HTTP_METHOD_PARAM_NAME = '$httpMethod';\n\n\n/**\n * Generates the URL parameter value with custom headers encoded as\n * HTTP/1.1 headers block.\n *\n * @param {!Object<string, string>} headers The custom headers.\n * @return {string} The URL param to overwrite custom HTTP headers.\n */\nexports.generateHttpHeadersOverwriteParam = function(headers) {\n  let result = '';\n  googObject.forEach(headers, function(value, key) {\n    result += key;\n    result += ':';\n    result += value;\n    result += '\\r\\n';\n  });\n  return result;\n};\n\n\n/**\n * Generates the URL-encoded URL parameter value with custom headers encoded as\n * HTTP/1.1 headers block.\n *\n * @param {!Object<string, string>} headers The custom headers.\n * @return {string} The URL param to overwrite custom HTTP headers.\n */\nexports.generateEncodedHttpHeadersOverwriteParam = function(headers) {\n  return googString.urlEncode(\n      exports.generateHttpHeadersOverwriteParam(headers));\n};\n\n\n/**\n * Sets custom HTTP headers via an overwrite URL param.\n *\n * @param {!GoogUri|string} url The URI object or a string path.\n * @param {string} urlParam The URL param name.\n * @param {!Object<string, string>} extraHeaders The HTTP headers.\n * @return {!GoogUri|string} The URI object or a string path with headers\n * encoded as a url param.\n */\nexports.setHttpHeadersWithOverwriteParam = function(\n    url, urlParam, extraHeaders) {\n  if (googObject.isEmpty(extraHeaders)) {\n    return url;\n  }\n  const httpHeaders = exports.generateHttpHeadersOverwriteParam(extraHeaders);\n  if (typeof url === 'string') {\n    return googUriUtils.appendParam(\n        url, googString.urlEncode(urlParam), httpHeaders);\n  } else {\n    url.setParameterValue(urlParam, httpHeaders);  // duplicate removed!\n    return url;\n  }\n};\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Transport support for WebChannel.\n *\n * The <code>WebChannelTransport</code> implementation serves as the factory\n * for <code>WebChannel</code>, which offers an abstraction for\n * point-to-point socket-like communication similar to what BrowserChannel\n * or HTML5 WebSocket offers.\n */\n\ngoog.module('goog.net.WebChannelTransport');\n\ngoog.module.declareLegacyNamespace();\n\nconst WebChannel = goog.requireType('goog.net.WebChannel');\n\n/**\n * A WebChannelTransport instance represents a shared context of logical\n * connectivity between a browser client and a remote origin.\n *\n * Over a single WebChannelTransport instance, multiple WebChannels may be\n * created against different URLs, which may all share the same\n * underlying connectivity (i.e. TCP connection) whenever possible.\n *\n * When multi-domains are supported, such as CORS, multiple origins may be\n * supported over a single WebChannelTransport instance at the same time.\n *\n * Sharing between different window contexts such as tabs is not addressed\n * by WebChannelTransport. Applications may choose HTML5 shared workers\n * or other techniques to access the same transport instance\n * across different window contexts.\n *\n * @interface\n */\nfunction WebChannelTransport() {}\n\n\n/**\n * The client version. This integer value will be passed to the server\n * when a channel is opened to inform the server the client \"capabilities\".\n *\n * Wire protocol version is a different concept and is internal to the\n * transport implementation.\n *\n * @const\n * @type {number}\n */\nWebChannelTransport.CLIENT_VERSION = 22;\n\n\n/**\n * Create a new WebChannel instance.\n *\n * The new WebChannel is to be opened against the server-side resource\n * as specified by the given URL. See {@link goog.net.WebChannel} for detailed\n * semantics.\n *\n * @param {string} url The URL path for the new WebChannel instance.\n * @param {!WebChannel.Options=} opt_options Configuration for the\n *     new WebChannel instance. The configuration object is reusable after\n *     the new channel instance is created.\n * @return {!WebChannel} the newly created WebChannel instance.\n */\nWebChannelTransport.prototype.createWebChannel = goog.abstractMethod;\n\n// MOE:begin_strip\n// Ensure ES2021 inputs. go/transpile-js\nnull?.(6_6);\n// MOE:end_strip\n\nexports = WebChannelTransport;\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { Observable } from '../Observable';\n\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\nimport { Subscription } from '../Subscription';\nimport { innerFrom } from '../observable/from';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\n\n/* tslint:disable:max-line-length */\nexport function catchError<T, O extends ObservableInput<any>>(\n  selector: (err: any, caught: Observable<T>) => O\n): OperatorFunction<T, T | ObservedValueOf<O>>;\n/* tslint:enable:max-line-length */\n\n/**\n * Catches errors on the observable to be handled by returning a new observable or throwing an error.\n *\n * <span class=\"informal\">\n * It only listens to the error channel and ignores notifications.\n * Handles errors from the source observable, and maps them to a new observable.\n * The error may also be rethrown, or a new error can be thrown to emit an error from the result.\n * </span>\n *\n * ![](catch.png)\n *\n * This operator handles errors, but forwards along all other events to the resulting observable.\n * If the source observable terminates with an error, it will map that error to a new observable,\n * subscribe to it, and forward all of its events to the resulting observable.\n *\n * ## Examples\n * Continues with a different Observable when there's an error\n *\n * ```ts\n * import { of } from 'rxjs';\n * import { map, catchError } from 'rxjs/operators';\n *\n * of(1, 2, 3, 4, 5).pipe(\n *     map(n => {\n *   \t   if (n === 4) {\n * \t       throw 'four!';\n *       }\n *\t     return n;\n *     }),\n *     catchError(err => of('I', 'II', 'III', 'IV', 'V')),\n *   )\n *   .subscribe(x => console.log(x));\n *   // 1, 2, 3, I, II, III, IV, V\n * ```\n *\n * Retries the caught source Observable again in case of error, similar to retry() operator\n *\n * ```ts\n * import { of } from 'rxjs';\n * import { map, catchError, take } from 'rxjs/operators';\n *\n * of(1, 2, 3, 4, 5).pipe(\n *     map(n => {\n *   \t   if (n === 4) {\n *   \t     throw 'four!';\n *       }\n * \t     return n;\n *     }),\n *     catchError((err, caught) => caught),\n *     take(30),\n *   )\n *   .subscribe(x => console.log(x));\n *   // 1, 2, 3, 1, 2, 3, ...\n * ```\n *\n * Throws a new error when the source Observable throws an error\n *\n * ```ts\n * import { of } from 'rxjs';\n * import { map, catchError } from 'rxjs/operators';\n *\n * of(1, 2, 3, 4, 5).pipe(\n *     map(n => {\n *       if (n === 4) {\n *         throw 'four!';\n *       }\n *       return n;\n *     }),\n *     catchError(err => {\n *       throw 'error in source. Details: ' + err;\n *     }),\n *   )\n *   .subscribe(\n *     x => console.log(x),\n *     err => console.log(err)\n *   );\n *   // 1, 2, 3, error in source. Details: four!\n * ```\n *\n * @see {@link onErrorResumeNext}\n * @see {@link repeat}\n * @see {@link repeatWhen}\n * @see {@link retry }\n * @see {@link retryWhen}\n *\n *  @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which\n *  is the source observable, in case you'd like to \"retry\" that observable by returning it again. Whatever observable\n *  is returned by the `selector` will be used to continue the observable chain.\n * @return {Observable} An observable that originates from either the source or the observable returned by the\n *  catch `selector` function.\n */\nexport function catchError<T, O extends ObservableInput<any>>(\n  selector: (err: any, caught: Observable<T>) => O\n): OperatorFunction<T, T | ObservedValueOf<O>> {\n  return operate((source, subscriber) => {\n    let innerSub: Subscription | null = null;\n    let syncUnsub = false;\n    let handledResult: Observable<ObservedValueOf<O>>;\n\n    innerSub = source.subscribe(\n      new OperatorSubscriber(subscriber, undefined, (err) => {\n        handledResult = innerFrom(selector(err, catchError(selector)(source)));\n        if (innerSub) {\n          innerSub.unsubscribe();\n          innerSub = null;\n          handledResult.subscribe(subscriber);\n        } else {\n          // We don't have an innerSub yet, that means the error was synchronous\n          // because the subscribe call hasn't returned yet.\n          syncUnsub = true;\n        }\n      })\n    );\n\n    if (syncUnsub) {\n      // We have a synchronous error, we need to make sure to\n      // teardown right away. This ensures that `finalize` is called\n      // at the right time, and that teardown occurs at the expected\n      // time between the source error and the subscription to the\n      // next observable.\n      innerSub.unsubscribe();\n      innerSub = null;\n      handledResult!.subscribe(subscriber);\n    }\n  });\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { ObservableInput, ObservableInputTuple, OperatorFunction, MonoTypeOperatorFunction, SchedulerLike } from '../types';\nimport { operate } from '../util/lift';\nimport { concatAll } from './concatAll';\nimport { internalFromArray } from '../observable/fromArray';\nimport { popScheduler } from '../util/args';\n\n/**\n * Emits all of the values from the source observable, then, once it completes, subscribes\n * to each observable source provided, one at a time, emitting all of their values, and not subscribing\n * to the next one until it completes.\n *\n * `concat(a$, b$, c$)` is the same as `a$.pipe(concatWith(b$, c$))`.\n *\n * ## Example\n *\n * Listen for one mouse click, then listen for all mouse moves.\n *\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { concatWith } from 'rxjs/operators';\n *\n * const clicks$ = fromEvent(document, 'click');\n * const moves$ = fromEvent(document, 'mousemove');\n *\n * clicks$.pipe(\n *   map(() => 'click'),\n *   take(1),\n *   concatWith(\n *     moves$.pipe(\n *       map(() => 'move')\n *     )\n *   )\n * )\n * .subscribe(x => console.log(x));\n *\n * // 'click'\n * // 'move'\n * // 'move'\n * // 'move'\n * // ...\n * ```\n *\n * @param otherSources Other observable sources to subscribe to, in sequence, after the original source is complete.\n */\nexport function concatWith<T, A extends readonly unknown[]>(\n  ...otherSources: [...ObservableInputTuple<A>]\n): OperatorFunction<T, T | A[number]> {\n  return concat(...otherSources);\n}\n\n/** @deprecated remove in v8. Use {@link concatWith} */\nexport function concat<T>(scheduler?: SchedulerLike): MonoTypeOperatorFunction<T>;\n/** @deprecated remove in v8. Use {@link concatWith} */\nexport function concat<T, T2>(v2: ObservableInput<T2>, scheduler?: SchedulerLike): OperatorFunction<T, T | T2>;\n/** @deprecated remove in v8. Use {@link concatWith} */\nexport function concat<T, T2, T3>(\n  v2: ObservableInput<T2>,\n  v3: ObservableInput<T3>,\n  scheduler?: SchedulerLike\n): OperatorFunction<T, T | T2 | T3>;\n/** @deprecated remove in v8. Use {@link concatWith} */\nexport function concat<T, T2, T3, T4>(\n  v2: ObservableInput<T2>,\n  v3: ObservableInput<T3>,\n  v4: ObservableInput<T4>,\n  scheduler?: SchedulerLike\n): OperatorFunction<T, T | T2 | T3 | T4>;\n/** @deprecated remove in v8. Use {@link concatWith} */\nexport function concat<T, T2, T3, T4, T5>(\n  v2: ObservableInput<T2>,\n  v3: ObservableInput<T3>,\n  v4: ObservableInput<T4>,\n  v5: ObservableInput<T5>,\n  scheduler?: SchedulerLike\n): OperatorFunction<T, T | T2 | T3 | T4 | T5>;\n/** @deprecated remove in v8. Use {@link concatWith} */\nexport function concat<T, T2, T3, T4, T5, T6>(\n  v2: ObservableInput<T2>,\n  v3: ObservableInput<T3>,\n  v4: ObservableInput<T4>,\n  v5: ObservableInput<T5>,\n  v6: ObservableInput<T6>,\n  scheduler?: SchedulerLike\n): OperatorFunction<T, T | T2 | T3 | T4 | T5 | T6>;\n/** @deprecated remove in v8. Use {@link concatWith} */\nexport function concat<T>(...observables: Array<ObservableInput<T> | SchedulerLike>): MonoTypeOperatorFunction<T>;\n/** @deprecated remove in v8. Use {@link concatWith} */\nexport function concat<T, R>(...observables: Array<ObservableInput<any> | SchedulerLike>): OperatorFunction<T, R>;\n\n/**\n * @deprecated remove in v8. Use {@link concatWith}\n */\nexport function concat<T, R>(...args: any[]): OperatorFunction<T, R> {\n  const scheduler = popScheduler(args);\n  return operate((source, subscriber) => {\n    concatAll()(internalFromArray([source, ...args], scheduler)).subscribe(subscriber as any);\n  });\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\n\nfunction last<T>(arr: T[]): T | undefined {\n  return arr[arr.length - 1];\n}\n\nexport function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined {\n  return isFunction(last(args)) ? args.pop() : undefined;\n}\n\nexport function popScheduler(args: any[]): SchedulerLike | undefined {\n  return isScheduler(last(args)) ? args.pop() : undefined;\n}\n\nexport function popNumber(args: any[], defaultValue: number): number {\n  return typeof last(args) === 'number' ? args.pop()! : defaultValue;\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nimport { OperatorFunction, ObservableInput, ObservedValueOf } from '../types';\n\n/**\n * Converts a higher-order Observable into a first-order Observable which\n * concurrently delivers all values that are emitted on the inner Observables.\n *\n * <span class=\"informal\">Flattens an Observable-of-Observables.</span>\n *\n * ![](mergeAll.png)\n *\n * `mergeAll` subscribes to an Observable that emits Observables, also known as\n * a higher-order Observable. Each time it observes one of these emitted inner\n * Observables, it subscribes to that and delivers all the values from the\n * inner Observable on the output Observable. The output Observable only\n * completes once all inner Observables have completed. Any error delivered by\n * a inner Observable will be immediately emitted on the output Observable.\n *\n * ## Examples\n * Spawn a new interval Observable for each click event, and blend their outputs as one Observable\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { map, mergeAll } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const higherOrder = clicks.pipe(map((ev) => interval(1000)));\n * const firstOrder = higherOrder.pipe(mergeAll());\n * firstOrder.subscribe(x => console.log(x));\n * ```\n *\n * Count from 0 to 9 every second for each click, but only allow 2 concurrent timers\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { take, map, mergeAll } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const higherOrder = clicks.pipe(\n *   map((ev) => interval(1000).pipe(take(10))),\n * );\n * const firstOrder = higherOrder.pipe(mergeAll(2));\n * firstOrder.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link combineAll}\n * @see {@link concatAll}\n * @see {@link exhaust}\n * @see {@link merge}\n * @see {@link mergeMap}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\n * @see {@link switchAll}\n * @see {@link switchMap}\n * @see {@link zipAll}\n *\n * @param {number} [concurrent=Infinity] Maximum number of inner\n * Observables being subscribed to concurrently.\n * @return {Observable} An Observable that emits values coming from all the\n * inner Observables emitted by the source Observable.\n */\nexport function mergeAll<O extends ObservableInput<any>>(concurrent: number = Infinity): OperatorFunction<O, ObservedValueOf<O>> {\n  return mergeMap(identity, concurrent);\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { mergeAll } from './mergeAll';\nimport { OperatorFunction, ObservableInput, ObservedValueOf } from '../types';\n\n/**\n * Converts a higher-order Observable into a first-order Observable by\n * concatenating the inner Observables in order.\n *\n * <span class=\"informal\">Flattens an Observable-of-Observables by putting one\n * inner Observable after the other.</span>\n *\n * ![](concatAll.svg)\n *\n * Joins every Observable emitted by the source (a higher-order Observable), in\n * a serial fashion. It subscribes to each inner Observable only after the\n * previous inner Observable has completed, and merges all of their values into\n * the returned observable.\n *\n * __Warning:__ If the source Observable emits Observables quickly and\n * endlessly, and the inner Observables it emits generally complete slower than\n * the source emits, you can run into memory issues as the incoming Observables\n * collect in an unbounded buffer.\n *\n * Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set\n * to `1`.\n *\n * ## Example\n *\n * For each click event, tick every second from 0 to 3, with no concurrency\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { map, take, concatAll } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const higherOrder = clicks.pipe(\n *   map(ev => interval(1000).pipe(take(4))),\n * );\n * const firstOrder = higherOrder.pipe(concatAll());\n * firstOrder.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // (results are not concurrent)\n * // For every click on the \"document\" it will emit values 0 to 3 spaced\n * // on a 1000ms interval\n * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3\n * ```\n *\n * @see {@link combineAll}\n * @see {@link concat}\n * @see {@link concatMap}\n * @see {@link concatMapTo}\n * @see {@link exhaust}\n * @see {@link mergeAll}\n * @see {@link switchAll}\n * @see {@link switchMap}\n * @see {@link zipAll}\n *\n * @return {Observable} An Observable emitting values from all the inner\n * Observables concatenated.\n */\nexport function concatAll<O extends ObservableInput<any>>(): OperatorFunction<O, ObservedValueOf<O>> {\n  return mergeAll(1);\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { SchedulerLike } from '../types';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nimport { fromArrayLike } from './from';\n\nexport function internalFromArray<T>(input: ArrayLike<T>, scheduler?: SchedulerLike) {\n  return scheduler ? scheduleArray(input, scheduler) : fromArrayLike(input);\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { Subscriber } from '../Subscriber';\nimport { MonoTypeOperatorFunction, ObservableInput } from '../types';\nimport { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { OperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/from';\n\n/**\n * Emits a notification from the source Observable only after a particular time span\n * determined by another Observable has passed without another source emission.\n *\n * <span class=\"informal\">It's like {@link debounceTime}, but the time span of\n * emission silence is determined by a second Observable.</span>\n *\n * ![](debounce.png)\n *\n * `debounce` delays notifications emitted by the source Observable, but drops previous\n * pending delayed emissions if a new notification arrives on the source Observable.\n * This operator keeps track of the most recent notification from the source\n * Observable, and spawns a duration Observable by calling the\n * `durationSelector` function. The notification is emitted only when the duration\n * Observable emits a next notification, and if no other notification was emitted on\n * the source Observable since the duration Observable was spawned. If a new\n * notification appears before the duration Observable emits, the previous notification will\n * not be emitted and a new duration is scheduled from `durationSelector` is scheduled.\n * If the completing event happens during the scheduled duration the last cached notification\n * is emitted before the completion event is forwarded to the output observable.\n * If the error event happens during the scheduled duration or after it only the error event is\n * forwarded to the output observable. The cache notification is not emitted in this case.\n *\n * Like {@link debounceTime}, this is a rate-limiting operator, and also a\n * delay-like operator since output emissions do not necessarily occur at the\n * same time as they did on the source Observable.\n *\n * ## Example\n * Emit the most recent click after a burst of clicks\n * ```ts\n * import { fromEvent, interval } from 'rxjs';\n * import { scan, debounce } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(\n *   scan((i) => ++i, 1),\n *   debounce((i) => interval(200 * i))\n * );\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link audit}\n * @see {@link auditTime}\n * @see {@link debounce}\n * @see {@link delay}\n * @see {@link sample}\n * @see {@link sampleTime}\n * @see {@link throttle}\n * @see {@link throttleTime}\n *\n * @param durationSelector A function\n * that receives a value from the source Observable, for computing the timeout\n * duration for each source value, returned as an Observable or a Promise.\n * @return An Observable that delays the emissions of the source\n * Observable by the specified duration Observable returned by\n * `durationSelector`, and may drop some values if they occur too frequently.\n */\nexport function debounce<T>(durationSelector: (value: T) => ObservableInput<any>): MonoTypeOperatorFunction<T> {\n  return operate((source, subscriber) => {\n    let hasValue = false;\n    let lastValue: T | null = null;\n    // The subscriber/subscription for the current debounce, if there is one.\n    let durationSubscriber: Subscriber<any> | null = null;\n\n    const emit = () => {\n      // Unsubscribe any current debounce subscription we have,\n      // we only cared about the first notification from it, and we\n      // want to clean that subscription up as soon as possible.\n      durationSubscriber?.unsubscribe();\n      durationSubscriber = null;\n      if (hasValue) {\n        // We have a value! Free up memory first, then emit the value.\n        hasValue = false;\n        const value = lastValue!;\n        lastValue = null;\n        subscriber.next(value);\n      }\n    };\n\n    source.subscribe(\n      new OperatorSubscriber(\n        subscriber,\n        (value: T) => {\n          // Cancel any pending debounce duration. We don't\n          // need to null it out here yet tho, because we're just going\n          // to create another one in a few lines.\n          durationSubscriber?.unsubscribe();\n          hasValue = true;\n          lastValue = value;\n          // Capture our duration subscriber, so we can unsubscribe it when we're notified\n          // and we're going to emit the value.\n          durationSubscriber = new OperatorSubscriber(subscriber, emit, undefined, noop);\n          // Subscribe to the duration.\n          innerFrom(durationSelector(value)).subscribe(durationSubscriber);\n        },\n        undefined,\n        () => {\n          // Source completed.\n          // Emit any pending debounced values then complete\n          emit();\n          subscriber.complete();\n        },\n        () => {\n          // Teardown.\n          lastValue = durationSubscriber = null;\n        }\n      )\n    );\n  });\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { OperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\n\n/* tslint:disable:max-line-length */\nexport function defaultIfEmpty<T, R = T>(defaultValue?: R): OperatorFunction<T, T | R>;\n/* tslint:enable:max-line-length */\n\n/**\n * Emits a given value if the source Observable completes without emitting any\n * `next` value, otherwise mirrors the source Observable.\n *\n * <span class=\"informal\">If the source Observable turns out to be empty, then\n * this operator will emit a default value.</span>\n *\n * ![](defaultIfEmpty.png)\n *\n * `defaultIfEmpty` emits the values emitted by the source Observable or a\n * specified default value if the source Observable is empty (completes without\n * having emitted any `next` value).\n *\n * ## Example\n * If no clicks happen in 5 seconds, then emit \"no clicks\"\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { defaultIfEmpty, takeUntil } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const clicksBeforeFive = clicks.pipe(takeUntil(interval(5000)));\n * const result = clicksBeforeFive.pipe(defaultIfEmpty('no clicks'));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link empty}\n * @see {@link last}\n *\n * @param {any} [defaultValue=null] The default value used if the source\n * Observable is empty.\n * @return {Observable} An Observable that emits either the specified\n * `defaultValue` if the source Observable emits no items, or the values emitted\n * by the source Observable.\n */\nexport function defaultIfEmpty<T, R>(defaultValue: R | null = null): OperatorFunction<T, T | R> {\n  return operate((source, subscriber) => {\n    let hasValue = false;\n    source.subscribe(\n      new OperatorSubscriber(\n        subscriber,\n        (value) => {\n          hasValue = true;\n          subscriber.next(value);\n        },\n        undefined,\n        () => {\n          if (!hasValue) {\n            subscriber.next(defaultValue!);\n          }\n          subscriber.complete();\n        }\n      )\n    );\n  });\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { MonoTypeOperatorFunction } from '../types';\nimport { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Emits only the first `count` values emitted by the source Observable.\n *\n * <span class=\"informal\">Takes the first `count` values from the source, then\n * completes.</span>\n *\n * ![](take.png)\n *\n * `take` returns an Observable that emits only the first `count` values emitted\n * by the source Observable. If the source emits fewer than `count` values then\n * all of its values are emitted. After that, it completes, regardless if the\n * source completes.\n *\n * ## Example\n * Take the first 5 seconds of an infinite 1-second interval Observable\n * ```ts\n * import { interval } from 'rxjs';\n * import { take } from 'rxjs/operators';\n *\n * const intervalCount = interval(1000);\n * const takeFive = intervalCount.pipe(take(5));\n * takeFive.subscribe(x => console.log(x));\n *\n * // Logs:\n * // 0\n * // 1\n * // 2\n * // 3\n * // 4\n * ```\n *\n * @see {@link takeLast}\n * @see {@link takeUntil}\n * @see {@link takeWhile}\n * @see {@link skip}\n *\n * @param count The maximum number of `next` values to emit.\n * @return An Observable that emits only the first `count`\n * values emitted by the source Observable, or all of the values from the source\n * if the source emits fewer than `count` values.\n */\nexport function take<T>(count: number): MonoTypeOperatorFunction<T> {\n  return count <= 0\n    ? // If we are taking no values, that's empty.\n      () => EMPTY\n    : operate((source, subscriber) => {\n        let seen = 0;\n        source.subscribe(\n          new OperatorSubscriber(subscriber, (value) => {\n            // Increment the number of values we have seen,\n            // then check it against the allowed count to see\n            // if we are still letting values through.\n            if (++seen <= count) {\n              subscriber.next(value);\n              // If we have met or passed our allowed count,\n              // we need to complete. We have to do <= here,\n              // because re-entrant code will increment `seen` twice.\n              if (count <= seen) {\n                subscriber.complete();\n              }\n            }\n          })\n        );\n      });\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { Observable } from '../Observable';\nimport { EmptyError } from '../util/EmptyError';\nimport { OperatorFunction, TruthyTypesOf } from '../types';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\n\nexport function first<T, D = T>(predicate?: null, defaultValue?: D): OperatorFunction<T, T | D>;\nexport function first<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;\nexport function first<T, D>(predicate: BooleanConstructor, defaultValue: D): OperatorFunction<T, TruthyTypesOf<T> | D>;\nexport function first<T, S extends T>(\n  predicate: (value: T, index: number, source: Observable<T>) => value is S,\n  defaultValue?: S\n): OperatorFunction<T, S>;\nexport function first<T, S extends T, D>(\n  predicate: (value: T, index: number, source: Observable<T>) => value is S,\n  defaultValue: D\n): OperatorFunction<T, S | D>;\nexport function first<T, D = T>(\n  predicate: (value: T, index: number, source: Observable<T>) => boolean,\n  defaultValue?: D\n): OperatorFunction<T, T | D>;\n\n/**\n * Emits only the first value (or the first value that meets some condition)\n * emitted by the source Observable.\n *\n * <span class=\"informal\">Emits only the first value. Or emits only the first\n * value that passes some test.</span>\n *\n * ![](first.png)\n *\n * If called with no arguments, `first` emits the first value of the source\n * Observable, then completes. If called with a `predicate` function, `first`\n * emits the first value of the source that matches the specified condition. It\n * may also take a deprecated `resultSelector` function to produce the output\n * value from the input value, and a `defaultValue` to emit in case the source\n * completes before it is able to emit a valid value. Throws an error if\n * `defaultValue` was not provided and a matching element is not found.\n *\n * ## Examples\n * Emit only the first click that happens on the DOM\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { first } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(first());\n * result.subscribe(x => console.log(x));\n * ```\n *\n * Emits the first click that happens on a DIV\n * ```ts\n * import { fromEvent } from 'rxjs';\n * import { first } from 'rxjs/operators';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(first(ev => ev.target.tagName === 'DIV'));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link filter}\n * @see {@link find}\n * @see {@link take}\n *\n * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`\n * callback if the Observable completes before any `next` notification was sent.\n * This is how `first()` is different from {@link take}(1) which completes instead.\n *\n * @param {function(value: T, index: number, source: Observable<T>): boolean} [predicate]\n * An optional function called with each item to test for condition matching.\n * @param {R} [defaultValue] The default value emitted in case no valid value\n * was found on the source.\n * @return {Observable<T|R>} An Observable of the first item that matches the\n * condition.\n */\nexport function first<T, D>(\n  predicate?: ((value: T, index: number, source: Observable<T>) => boolean) | null,\n  defaultValue?: D\n): OperatorFunction<T, T | D> {\n  const hasDefaultValue = arguments.length >= 2;\n  return (source: Observable<T>) =>\n    source.pipe(\n      predicate ? filter((v, i) => predicate(v, i, source)) : identity,\n      take(1),\n      hasDefaultValue ? defaultIfEmpty<T, D>(defaultValue) : throwIfEmpty(() => new EmptyError())\n    );\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**  */\nimport { EmptyError } from '../util/EmptyError';\nimport { MonoTypeOperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { OperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * If the source observable completes without emitting a value, it will emit\n * an error. The error will be created at that time by the optional\n * `errorFactory` argument, otherwise, the error will be {@link EmptyError}.\n *\n * ![](throwIfEmpty.png)\n *\n * ## Example\n * ```ts\n * import { fromEvent, timer } from 'rxjs';\n * import { throwIfEmpty, takeUntil } from 'rxjs/operators';\n *\n * const click$ = fromEvent(document, 'click');\n *\n * click$.pipe(\n *   takeUntil(timer(1000)),\n *   throwIfEmpty(\n *     () => new Error('the document was not clicked within 1 second')\n *   ),\n * )\n * .subscribe({\n *   next() { console.log('The button was clicked'); },\n *   error(err) { console.error(err); }\n * });\n * ```\n *\n * @param errorFactory A factory function called to produce the\n * error to be thrown when the source observable completes without emitting a\n * value.\n */\nexport function throwIfEmpty<T>(errorFactory: () => any = defaultErrorFactory): MonoTypeOperatorFunction<T> {\n  return operate((source, subscriber) => {\n    let hasValue = false;\n    source.subscribe(\n      new OperatorSubscriber(\n        subscriber,\n        (value) => {\n          hasValue = true;\n          subscriber.next(value);\n        },\n        undefined,\n        () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory()))\n      )\n    );\n  });\n}\n\nfunction defaultErrorFactory() {\n  return new EmptyError();\n}\n","/**\n * @license\n *\n * Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors\n\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n\n *     http://www.apache.org/licenses/LICENSE-2.0\n\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Observable } from '../Observable';\nimport { MonoTypeOperatorFunction, OperatorFunction, ObservableInputTuple } from '../types';\nimport { raceInit } from '../observable/race';\nimport { operate } from '../util/lift';\nimport { argsOrArgArray } from \"../util/argsOrArgArray\";\nimport { identity } from '../util/identity';\n\n/* tslint:disable:max-line-length */\n/** @deprecated Deprecated use {@link raceWith} */\nexport function race<T>(observables: Array<Observable<T>>): MonoTypeOperatorFunction<T>;\n/** @deprecated Deprecated use {@link raceWith} */\nexport function race<T, R>(observables: Array<Observable<T>>): OperatorFunction<T, R>;\n/** @deprecated Deprecated use {@link raceWith} */\nexport function race<T>(...observables: Array<Observable<T> | Array<Observable<T>>>): MonoTypeOperatorFunction<T>;\n/** @deprecated Deprecated use {@link raceWith} */\nexport function race<T, R>(...observables: Array<Observable<any> | Array<Observable<any>>>): OperatorFunction<T, R>;\n/* tslint:enable:max-line-length */\n\n/**\n * Returns an Observable that mirrors the first source Observable to emit a next,\n * error or complete notification from the combination of this Observable and supplied Observables.\n * @param {...Observables} ...observables Sources used to race for which Observable emits first.\n * @return {Observable} An Observable that mirrors the output of the first Observable to emit an item.\n * @deprecated Deprecated use {@link raceWith}\n */\nexport function race<T>(...args: any[]): OperatorFunction<T, unknown> {\n  return raceWith(...argsOrArgArray(args));\n}\n\n/**\n * Creates an Observable that mirrors the first source Observable to emit a next,\n * error or complete notification from the combination of the Observable to which\n * the operator is applied and supplied Observables.\n *\n * ## Example\n *\n * ```ts\n * import { interval } from 'rxjs';\n * import { mapTo, raceWith } from 'rxjs/operators';\n *\n * const obs1 = interval(1000).pipe(mapTo('fast one'));\n * const obs2 = interval(3000).pipe(mapTo('medium one'));\n * const obs3 = interval(5000).pipe(mapTo('slow one'));\n *\n * obs2.pipe(\n *   raceWith(obs3, obs1)\n * ).subscribe(\n *   winner => console.log(winner)\n * );\n *\n * // Outputs\n * // a series of 'fast one'\n * ```\n *\n * @param otherSources Sources used to race for which Observable emits first.\n */\n\nexport function raceWith<T, A extends readonly unknown[]>(\n  ...otherSources: [...ObservableInputTuple<A>]\n): OperatorFunction<T, T | A[number]> {\n  return !otherSources.length ? identity : operate((source, subscriber) => {\n    raceInit<T | A[number]>([source, ...otherSources])(subscriber);\n  });\n}\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$e.punctual$proto$Affinitization');\n\n/**\n * @enum {number}\n */\njspb$e.punctual$proto$Affinitization = {\n  UNKNOWN: 0,\n  BY_PARTITION: 1,\n  BY_PANTHEON_PROJECT: 3\n};\n\n","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Default factory for <code>WebChannelTransport</code> to\n * avoid exposing concrete classes to clients.\n */\n\ngoog.module('goog.net.createWebChannelTransport');\n\ngoog.module.declareLegacyNamespace();\n\nconst WebChannelBaseTransport = goog.require('goog.labs.net.webChannel.WebChannelBaseTransport');\nconst WebChannelTransport = goog.requireType('goog.net.WebChannelTransport');\n\n/**\n * Create a new WebChannelTransport instance using the default implementation.\n * Throws an error message if no default transport available in the current\n * environment.\n *\n * @return {!WebChannelTransport} the newly created transport instance.\n */\nfunction createWebChannelTransport() {\n  return new WebChannelBaseTransport();\n}\n\nexports = createWebChannelTransport;\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$e.punctual$proto$WatchRequest$StreamInitiationReason');\n\n/**\n * @enum {number}\n */\njspb$e.punctual$proto$WatchRequest$StreamInitiationReason = {\n  REASON_UNSPECIFIED: 0,\n  REASON_WATCH_SESSION_START: 1,\n  REASON_TRANSIENT_ERROR: 2,\n  REASON_FORCED_RECONNECT: 3\n};\n\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$e.punctual$proto$WatchResponse$SignalCase');\n\n/**\n * @enum {number}\n */\njspb$e.punctual$proto$WatchResponse$SignalCase = {\n  SIGNAL_NOT_SET: 0,\n  START: 1,\n  CHANGES: 2,\n  ADVANCE: 3,\n  RESYNC: 5\n};\n\n","// source: ipc/invalidation/punctual/client/proto/punctual.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$e.punctual$proto$StreamStatus$Code');\n\n/**\n * @enum {number}\n */\njspb$e.punctual$proto$StreamStatus$Code = {\n  INVALID: 0,\n  RECONNECT: 1,\n  RECONNECT_HINTS: 2\n};\n\n","// source: ipc/invalidation/punctual/client/proto/common.proto\n/**\n * @fileoverview\n * @suppress {useOfGoogProvide}\n */\n// NO CHECKED-IN PROTOBUF GENCODE\n// GENERATED CODE -- DO NOT EDIT!\n\ngoog.provide('jspb$e.punctual$proto$ObjectPath$Part$PartCase');\n\n/**\n * @enum {number}\n */\njspb$e.punctual$proto$ObjectPath$Part$PartCase = {\n  PART_NOT_SET: 0,\n  BYTES_DECREASING: 5,\n  SIGNED_NUM_DECREASING: 4,\n  STRING_DECREASING: 3,\n  NUM_DECREASING: 6,\n  BYTES: 7,\n  SIGNED_NUM_INCREASING: 2,\n  STRING: 1,\n  NUM_INCREASING: 8,\n  DOUBLE_DECREASING: 9,\n  DOUBLE_INCREASING: 10,\n  TIMESTAMP_DECREASING: 11,\n  TIMESTAMP_INCREASING: 12,\n  NULL_PART: 13\n};\n\n","import {Uri} from 'google3/third_party/javascript/closure/uri/uri';\n\n/** The prefix with which all Punctual project paths begin. */\nconst PATH_PREFIX = '/punctual/';\n\n/**\n * The prefix for environment specs where a custom Punctual server spec is\n * specified.\n *\n * For example, the PunctualTestEnv might provide a project path such as\n * \"/punctual/custom:https%3A%2F%2Flocalhost%3A1234/test_project\".\n *\n * Custom environments are URI-encoded because they may include slashes after\n * the scheme.\n */\nconst CUSTOM_ENV_PREFIX = 'custom:';\n\n/** The production environment. */\nexport const PROD_ENV: Environment = {\n  firstPartyUri: new Uri('https://signaler-pa.clients6.google.com/punctual'),\n  thirdPartyUri: new Uri('https://signaler-pa.googleapis.com/punctual'),\n  addDomainPrefix: false,\n};\n\n/** A prod environment that is behind \u00dcberproxy. */\nexport const PROD_UP_ENV: Environment = {\n  firstPartyUri: new Uri('https://punctual.corp.google.com/punctual'),\n  thirdPartyUri: new Uri(),\n  addDomainPrefix: false,\n};\n\n/** The dev environment. */\nexport const DEV_ENV: Environment = {\n  firstPartyUri: new Uri('https://punctual-dev.corp.google.com/punctual'),\n  // Requires a debug IP, and is included for completeness.\n  thirdPartyUri: new Uri(\n    'https://signaler-staging.sandbox.google.com/punctual',\n  ),\n  addDomainPrefix: false,\n};\n\n/** The standard Punctual environment names and their URIs. */\nconst STANDARD_ENVS = new Map<string, Environment>([\n  ['corp', PROD_UP_ENV],\n  ['prod', PROD_ENV],\n  ['prod-up', PROD_UP_ENV],\n\n  // Old preprod Chat domain shards.\n  ['preprod-dynamite-alpha-us', getEnvironmentFor('preprod-dynamite-alpha-us')],\n  ['preprod-dynamite-alpha-eu', getEnvironmentFor('preprod-dynamite-alpha-eu')],\n  ['preprod-dynamite-beta-us', getEnvironmentFor('preprod-dynamite-beta-us')],\n  ['preprod-dynamite-beta-eu', getEnvironmentFor('preprod-dynamite-beta-eu')],\n  ['preprod-dynamite-gamma-us', getEnvironmentFor('preprod-dynamite-gamma-us')],\n  ['preprod-dynamite-gamma-eu', getEnvironmentFor('preprod-dynamite-gamma-eu')],\n  [\n    'preprod-qual-dynamite-perftest',\n    getEnvironmentFor('preprod-qual-dynamite-perftest'),\n  ],\n\n  // Old prod Chat domain shards.\n  ['prod-dynamite-prod-00-eu', getEnvironmentFor('prod-dynamite-prod-00-eu')],\n  ['prod-dynamite-prod-01-eu', getEnvironmentFor('prod-dynamite-prod-01-eu')],\n  ['prod-dynamite-prod-00-us', getEnvironmentFor('prod-dynamite-prod-00-us')],\n  ['prod-dynamite-prod-01-us', getEnvironmentFor('prod-dynamite-prod-01-us')],\n  ['prod-dynamite-prod-02-us', getEnvironmentFor('prod-dynamite-prod-02-us')],\n  ['prod-dynamite-prod-03-us', getEnvironmentFor('prod-dynamite-prod-03-us')],\n  ['prod-dynamite-prod-04-us', getEnvironmentFor('prod-dynamite-prod-04-us')],\n  ['prod-dynamite-prod-05-us', getEnvironmentFor('prod-dynamite-prod-05-us')],\n  ['prod-dynamite-prod-06-us', getEnvironmentFor('prod-dynamite-prod-06-us')],\n  ['prod-dynamite-prod-07-us', getEnvironmentFor('prod-dynamite-prod-07-us')],\n  ['prod-dynamite-prod-08-us', getEnvironmentFor('prod-dynamite-prod-08-us')],\n  ['prod-dynamite-prod-09-us', getEnvironmentFor('prod-dynamite-prod-09-us')],\n\n  // New Chat domain shards.\n  ['dynamite-alpha-us', getChatDomainShardEnv('preprod', 'alpha-us')],\n  ['dynamite-alpha-eu', getChatDomainShardEnv('preprod', 'alpha-eu')],\n  ['dynamite-beta-us', getChatDomainShardEnv('preprod', 'beta-us')],\n  ['dynamite-beta-eu', getChatDomainShardEnv('preprod', 'beta-eu')],\n  ['dynamite-gamma-us', getChatDomainShardEnv('preprod', 'gamma-us')],\n  ['dynamite-gamma-eu', getChatDomainShardEnv('preprod', 'gamma-eu')],\n  ['dynamite-prod-00-us', getChatDomainShardEnv('prod', 'prod-00-us')],\n  ['dynamite-prod-00-eu', getChatDomainShardEnv('prod', 'prod-00-eu')],\n  ['dynamite-prod-01-us', getChatDomainShardEnv('prod', 'prod-01-us')],\n  ['dynamite-prod-01-eu', getChatDomainShardEnv('prod', 'prod-01-eu')],\n  ['dynamite-prod-02-us', getChatDomainShardEnv('prod', 'prod-02-us')],\n  ['dynamite-prod-03-us', getChatDomainShardEnv('prod', 'prod-03-us')],\n  ['dynamite-prod-04-us', getChatDomainShardEnv('prod', 'prod-04-us')],\n  ['dynamite-prod-05-us', getChatDomainShardEnv('prod', 'prod-05-us')],\n  ['dynamite-prod-06-us', getChatDomainShardEnv('prod', 'prod-06-us')],\n  ['dynamite-prod-07-us', getChatDomainShardEnv('prod', 'prod-07-us')],\n  ['dynamite-prod-08-us', getChatDomainShardEnv('prod', 'prod-08-us')],\n  ['dynamite-prod-09-us', getChatDomainShardEnv('prod', 'prod-09-us')],\n\n  // A special environment for YouTube clients, where the Web proxy is exposed\n  // on a *.youtube.com domain (see b/158754973).\n  [\n    'ytprod',\n    {\n      firstPartyUri: new Uri('https://signaler-pa.youtube.com/punctual'),\n      // We don't expect any \"third-party\" (OAuth) YouTube traffic, but we include\n      // the standard URI for completeness.\n      thirdPartyUri: new Uri('https://signaler-pa.googleapis.com/punctual'),\n      addDomainPrefix: false,\n    },\n  ],\n  // This environment is behind \u00dcberproxy and can be accessed by fully trusted\n  // devices.\n  ['dev', DEV_ENV],\n]);\n\n/** The parsed representation of a project path. */\nexport interface ProjectPath {\n  env: Environment;\n  projectName: string;\n}\n\n/** Specifies the configuration for a Punctual environment. */\nexport interface Environment {\n  /** The base URI to use with first-party auth. */\n  firstPartyUri: Uri;\n\n  /**\n   * The base URI to use with non-first-party auth (e.g. OAuth, anonymous auth).\n   */\n  thirdPartyUri: Uri;\n\n  /**\n   * Whether to add a domain prefix ([0-9]-, for the first-party URI only).\n   */\n  addDomainPrefix: boolean;\n}\n\n/**\n * Parses the given Punctual project path.\n * @throws {Error} if the path is invalid.\n */\nexport function parseProjectPath(projectPath: string): ProjectPath {\n  if (!projectPath.startsWith(PATH_PREFIX)) {\n    throw new Error(\n      `Invalid Punctual project path does not start with ${PATH_PREFIX}: ` +\n        projectPath,\n    );\n  }\n\n  const rest = projectPath.substring(PATH_PREFIX.length);\n  const restParts = rest.split('/');\n  if (restParts.length !== 2) {\n    throw new Error(\n      `Invalid Punctual path has an incorrect number of parts: ` + projectPath,\n    );\n  }\n\n  const [envSpec, projectName] = restParts;\n  return {\n    env: parseEnvSpec(envSpec),\n    projectName,\n  };\n}\n\n/**\n * Parses the given environment spec (e.g. \"prod\", \"dev\", \"custom:...\").\n * @throws {Error} if the environment spec is invalid.\n */\nexport function parseEnvSpec(envSpec: string): Environment {\n  if (envSpec.startsWith(CUSTOM_ENV_PREFIX)) {\n    const encodedUri = envSpec.substring(CUSTOM_ENV_PREFIX.length);\n    const uri = new Uri(decodeURIComponent(encodedUri));\n    uri.setPath('/punctual');\n    return {\n      firstPartyUri: uri,\n      thirdPartyUri: uri,\n      addDomainPrefix: false,\n    };\n  }\n\n  const env = STANDARD_ENVS.get(envSpec);\n  if (!env) {\n    throw new Error(`Invalid Punctual environment: '${envSpec}'`);\n  }\n  return env;\n}\n\n/**\n * Returns the Punctual environment for the given environment name.\n * It applies to the APIs which follows the naming convention:\n *   First Party: {env}-{apiname}.clients6.google.com\n *   Third Party: {env}-{apiname}.googleapis.com\n * Specifically it applies to all the APIs for the domain sharded Punctual proxy\n * server.\n */\nfunction getEnvironmentFor(env: string): Environment {\n  return {\n    firstPartyUri: new Uri(\n      `https://${env}-signaler-pa.clients6.google.com/punctual`,\n    ),\n    thirdPartyUri: new Uri(\n      `https://${env}-signaler-pa.googleapis.com/punctual`,\n    ),\n    addDomainPrefix: false,\n  };\n}\n\n/**\n * Returns a Punctual environment for the given abbreviated Chat domain shard\n * name. These environments point at URIs of the form:\n *   https://[0-9]-{releaseStage}-dynamite-{shortDomainShardName}-signaler-pa.clients6.google.com/punctual\n *   https://{releaseStage}-dynamite-{shortDomainShardName}-signaler-pa.googleapis.com/punctual\n */\nfunction getChatDomainShardEnv(\n  releaseStage: string,\n  shortDomainShardName: string,\n): Environment {\n  return {\n    firstPartyUri: new Uri(\n      `https://${releaseStage}-dynamite-${shortDomainShardName}-signaler-pa.clients6.google.com/punctual`,\n    ),\n    thirdPartyUri: new Uri(\n      `https://${releaseStage}-dynamite-${shortDomainShardName}-signaler-pa.googleapis.com/punctual`,\n    ),\n    addDomainPrefix: true,\n  };\n}\n","import FetchXmlHttpFactory from 'goog:goog.net.FetchXmlHttpFactory'; // from //third_party/javascript/closure/net:fetchxmlhttpfactory\nimport {ClientImpl} from 'google3/ipc/invalidation/punctual/typescript/impl/client_impl';\nimport {parseProjectPath} from 'google3/ipc/invalidation/punctual/typescript/impl/project_path';\nimport {\n  AuthParams,\n  toAuthMethodPromise,\n} from 'google3/ipc/invalidation/typescript/auth_method';\nimport {BehaviorSubject, Observable} from 'rxjs';\n\nimport {ChannelEvent} from './channel_internal';\nimport {Client} from './client';\n\n/** Builder for Punctual clients. */\nexport class ClientBuilder {\n  private readonly authParams = AuthParams.forPunctual();\n\n  /** Whether to infer the project from the API key. */\n  private inferProject = false;\n\n  /**\n   * An optional stream of signals indicating that the application or\n   * environment believes that the likelihood of a successful reconnection has\n   * recently increased. The client may or may not act on these signals.\n   */\n  private reconnectHint?: Observable<{}>;\n\n  /** Whether the client should to use the Fetch API. */\n  private fetchApi = false;\n\n  /**\n   * When using the Fetch API, an optional worker to associate with requests.\n   */\n  private worker?: WindowOrWorkerGlobalScope;\n\n  /**\n   * An optional callback to be invoked whenever anything interesting happens on\n   * the channel.\n   */\n  private channelEventCallback?: (event: ChannelEvent) => void;\n\n  /** Constructs a builder. */\n  constructor(\n    /**\n     * The path for the Punctual project to which the client's objects are\n     * scoped.\n     *\n     * Example project paths:\n     * \"/punctual/prod/my_project\"\n     * \"/punctual/dev/my_project\"\n     */\n    private readonly projectPath: string,\n  ) {}\n\n  /** Sets the project's API key. */\n  setApiKey(apiKey: string): this {\n    this.authParams.withApiKey(apiKey);\n    return this;\n  }\n\n  /** Sets a multi-login `authuser` cookie index. */\n  setAuthUser(authUser: number): this {\n    this.authParams.withAuthUser(authUser);\n    return this;\n  }\n\n  /**\n   * Authenticates via OAuth, using the given observable token stream. (Any API\n   * key or authuser provided will be ignored.)\n   * <p>\n   * Although this accepts an arbitrary Observable, we expect that the need for\n   * periodic token refresh means that in practice this will be \"hot\". To avoid\n   * the possibility of missing a token that's emitted before Punctual\n   * subscribes, callers are encouraged to pass some sort of Observable with\n   * memory/replay of the last emitted value, such as a BehaviorSubject or\n   * ReplaySubject.\n   */\n  setOAuthTokens(oauthTokens: Observable<string>): this {\n    this.authParams.withOAuthTokens(oauthTokens);\n    return this;\n  }\n\n  /**\n   * Authenticates via Bearer token, using the given observable token stream.\n   * Together with the API key, this is used to authenticate with the 1P domains\n   * when auth cookies are not available.\n   */\n  setBearerTokens(bearerTokens: BehaviorSubject<string>): this {\n    this.authParams.withBearerTokens(bearerTokens);\n    return this;\n  }\n\n  /**\n   * Forces the client to connect from an origin without Gaia login cookies.\n   * This prevents ESF from rejecting requests in cases where credentials have\n   * expired or otherwise been invalidated (e.g., by password changes).\n   */\n  forceAnonymous(): this {\n    this.authParams.withAppAuthTokens(new BehaviorSubject(''));\n    return this;\n  }\n\n  /**\n   * Overrides the default behavior for hinting that it's a good time to try to\n   * reconnect.\n   */\n  setReconnectHint(reconnectHint: Observable<{}>): this {\n    this.reconnectHint = reconnectHint;\n    return this;\n  }\n\n  /**\n   * Specifies that the client should use the Fetch API.\n   * @param worker An optional worker to associate with Fetch API requests.\n   */\n  useFetchApi(worker?: WindowOrWorkerGlobalScope): this {\n    this.fetchApi = true;\n    this.worker = worker;\n    return this;\n  }\n\n  /**\n   * Sets a callback to be invoked when the channel experiences a noteworthy\n   * event.\n   */\n  setChannelEventCallback(callback: (event: ChannelEvent) => void): this {\n    this.channelEventCallback = callback;\n    return this;\n  }\n\n  /**\n   * Enables project inference, which causes the Punctual project name to be\n   * inferred from the provided API key. If called, then the project name from\n   * the project path specified in the constructor is ignored.\n   * <p>\n   * This is only supported for existing Tango customers who are migrating to\n   * Punctual.\n   */\n  inferProjectForMigrationFromTango(): this {\n    this.inferProject = true;\n    return this;\n  }\n\n  build(): Client {\n    const authMethodPromise = toAuthMethodPromise(this.authParams);\n    const projectPath = parseProjectPath(this.projectPath);\n    const projectName = this.inferProject ? undefined : projectPath.projectName;\n    let xmlHttpFactory: FetchXmlHttpFactory | undefined;\n    if (this.fetchApi) {\n      xmlHttpFactory = new FetchXmlHttpFactory({\n        worker: this.worker,\n      });\n    }\n    return ClientImpl.create(projectPath.env, authMethodPromise, {\n      reconnectHint: this.reconnectHint,\n      defaultProject: projectName,\n      xmlHttpFactory,\n      channelEventCallback: this.channelEventCallback,\n    });\n  }\n}\n","import {\n  Advance,\n  Change,\n  Client as PunctualClient,\n  Start,\n} from 'google3/ipc/invalidation/punctual/typescript/public/client';\nimport {ClientBuilder as PunctualClientBuilder} from 'google3/ipc/invalidation/punctual/typescript/public/factory';\nimport {ObjectId} from 'google3/ipc/invalidation/punctual/typescript/public/object_id';\nimport {ChangeUpdatesPublisher} from 'google3/third_party/javascript/polygerrit/api/change-updates';\nimport 'google3/third_party/javascript/polygerrit/api/gerrit';\nimport {PluginApi} from 'google3/third_party/javascript/polygerrit/api/plugin';\nimport {RestPluginApi} from 'google3/third_party/javascript/polygerrit/api/rest';\nimport {Subscription} from 'rxjs';\n\n// https://console.cloud.google.com/apis/credentials/key/68188645-1e8e-49ac-98bc-08f737e30a21?inv=1&invt=AbzG3Q&project=api-project-164060093628\n// Punctual Prod API Key\nconst PUNCTUAL_API_KEY = 'AIzaSyD5LLE68XFgfBmmgNki-iMwOAOyW-aO2ZY';\nconst PUNCTUAL_PROJECT_PATH = '/punctual/prod/gerritcodereview';\n\nfunction createPunctualClient(): PunctualClient {\n  return new PunctualClientBuilder(PUNCTUAL_PROJECT_PATH)\n    .setApiKey(PUNCTUAL_API_KEY)\n    .build();\n}\n\nasync function getPunctualStreamIdForChangeUpdates(\n  repo: string,\n  changeNumber: number,\n  restApi: RestPluginApi,\n): Promise<string | undefined> {\n  const url = `/changes/${encodeURIComponent(\n    repo,\n  )}~${encodeURIComponent(changeNumber)}/punctual_stream_id_change_updates`;\n  try {\n    const response = await restApi.get(url);\n    return response as string | undefined;\n  } catch (err) {\n    console.error(`Error while fetching punctual stream id: ${err}`);\n    return;\n  }\n}\n\n/**\n * PunctualUpdatePublisher is responsible for subscribing to Punctual updates\n * and notifying the Gerrit UI when a change update has occurred.\n */\nexport class PunctualUpdatePublisher implements ChangeUpdatesPublisher {\n  private subscriptions: Subscription[] = [];\n\n  constructor(\n    private readonly restApi: RestPluginApi,\n    private readonly punctualClient: PunctualClient = createPunctualClient(),\n  ) {}\n\n  async subscribe(repo: string, changeNumber: number, callback: () => void) {\n    const streamId = await getPunctualStreamIdForChangeUpdates(\n      repo,\n      changeNumber,\n      this.restApi,\n    );\n    if (!streamId) {\n      return;\n    }\n    this.subscriptions.push(\n      this.punctualClient.watch(ObjectId.of(streamId)).subscribe({\n        // See go/punctual-codelab#the-punctual-client for what each type of\n        // signal means.\n        next: async (signal: Start | Change | Advance) => {\n          if (signal instanceof Start) {\n            // Punctual can only guarantee that the watch stream will cover all\n            // changes posted strictly after the client receives a start signal on\n            // the stream. See more in\n            // go/punctual-correctness#watch-without-timestamp.\n          } else if (signal instanceof Change) {\n            callback();\n          } else {\n            // Advance signal is ignored.\n          }\n        },\n        error: (err: unknown) => {\n          console.error('Gerrit Punctual: watch stream error: ', err);\n        },\n        complete: () => {\n          // The stream ended. Start a new watch stream.\n          this.subscribe(repo, changeNumber, callback);\n        },\n      }),\n    );\n  }\n\n  unsubscribe() {\n    for (const subscription of this.subscriptions) {\n      subscription.unsubscribe();\n    }\n    this.subscriptions = [];\n  }\n}\n\nwindow.Gerrit?.install(async (plugin: PluginApi) => {\n  plugin\n    .changeUpdates()\n    .register(new PunctualUpdatePublisher(plugin.restApi()));\n});\n"],
"names":["$jscomp.defineProperty","$jscomp.global","$jscomp.getGlobal","$jscomp.polyfill","goog","goog.global","self","goog.readFlagInternalDoNotUseOrElse","googFlagId","defaultValue","parts","goog.FLAGS_OBJECT_","cur","i","length","val","obj","goog.typeOf","value","s","Array","isArray","goog.isArrayLike","type","goog.isObject","goog.bindNative_","fn","selfObj","var_args","call","apply","bind","arguments","goog.bindJs_","Error","boundArgs","prototype","slice","newArgs","unshift","goog.bind","Function","toString","indexOf","goog.bindapply","goog.partial","args","push","goog.weakUsage","name","goog.inherits","childCtor","parentCtor","tempCtor","superClass_","constructor","base","childCtor.base","me","methodName","forEach","f","opt_obj","key","map","some","clone","res","PROTOTYPE_FIELDS","extend","target","source","j","Object","hasOwnProperty","isEmptyOrWhitespace","str","test","trim","String","exec","contains","subString","checkExhaustiveAllowing","msg","arr","opt_fromIndex","fromIndex","l","arr2","split","toArray","object","rv","arr1","len1","len2","addErrorContext","err","contextValue","goog.string.urlEncode","encodeURIComponent","goog.string.splitLimit","limit","separator","returnVal","shift","join","throwException","exception","goog.globalsetTimeout","setTimeout","goog.flags.USE_USER_AGENT_CLIENT_HINTS","goog.flags.JSPB_THROW_IN_ARRAY_CONSTRUCTOR_IF_ARRAY_IS_ALREADY_CONSTRUCTED","goog.flags.JSPB_WRITE_BACK_BIGINT","goog.DEBUG","getNativeUserAgentString","navigator","goog.globalnavigator","userAgent","userAgentData","goog.userAgent.WEBKIT","toLowerCase","byteToCharMaps","charToByteMap","decodeStringToUint8Array","input","len","approxByteLength","Math","floor","paddingChars","char","output","Uint8Array","outLen","decodeStringInternal","pushByte","b","subarray","getByte","default_val","nextCharIndex","ch","charAt","init","byte1","byte2","byte3","byte4","commonChars","specialChars","chars","concat","existingByte","undefined","module$exports$jspb$internal_bytes.SUPPORTS_UINT8ARRAY","module$exports$jspb$internal_bytes.USE_ATOB_BTOA","goog.userAgent.IE","userAgentDataInternal","brands","btoa","WEBSAFE_BASE64_CHARS","websafeReplacer","replaceWebsafe","module$exports$jspb$internal_bytes.I_AM_INTERNAL","internalBytesUnsafe","checkAllowedCaller","value_","b64","replace","binary","atob","encoded","u8","charCodeAt","module$exports$jspb$bytestring.ByteString","isEmpty","areYouInternal","emptyByteString","globalThrottles","makeTypeError","message","error","throttledAsyncThrowWarning","throttleKey","throttleHandle","count","asyncThrow","isBigIntAvailable","BigInt","module$exports$jspb$internal_symbols.HAS_NATIVE_SYMBOL","Symbol","createSymbolInternal","fallbackValue","useSymbolFor","symbol","for","module$exports$jspb$internal_symbols.ARRAY_STATE_SYMBOL","module$exports$jspb$internal_symbols.ONEOF_ARRAY_SYMBOL","module$exports$jspb$internal_symbols.UNKNOWN_BINARY_FIELDS_SYMBOL","module$exports$jspb$internal_symbols.UNKNOWN_BINARY_THROTTLE_KEY","module$exports$jspb$internal_symbols.UNKNOWN_BINARY_FIELD_IN_JSPB_SERIALIZE_THROTTLE_KEY","module$exports$jspb$internal_symbols.ALREADY_CONSTRUCTED_THROTTLE_KEY","module$exports$jspb$internal_symbols.MESSAGE_PROTOTYPE_MARKER","module$exports$jspb$internal_symbols.VALID_PIVOT_SELECTOR","module$exports$jspb$internal_symbols.LAZILY_PARSE_LATE_LOADED_EXTENSIONS_SYMBOL","ZERO_ARRAY_STATE_PROPERTY","internalArrayState","configurable","writable","enumerable","OBJECT_DEFINE_PROPERTIES","defineProperties","ARRAY_STATE_PROPERTY","array","setArrayState","EMPTY_LIST_SENTINEL_STATE","freeze","addFlags","flags","markMutableReferencesAreOwned","MUTABLE_REFERENCES_ARE_OWNED","module$exports$jspb$internal.MESSAGE_PROTOTYPE_MARKER_VALUE","isImmutableMessage","arrayState","copyOnWrite","PRIVATE_OPTION_TOKEN","IS_IMMUTABLE_ARRAY","internalArrayDoNotAccessOrElseMightBeUndefinedWhoKnows","bytesAsByteString","invalidIsMissing","module$exports$jspb$internal.DO_NOT_FREEZE__LEGACY_OPTION","defineStateGuard","stateGuardFn","isGuard_doNotManuallySetPrettyPlease","module$exports$google3$javascript$common$asserts$guards.isNumber","defineTypeGuard","arg","module$exports$google3$javascript$common$asserts$guards.isString","module$exports$google3$javascript$common$asserts$guards.isBoolean","module$exports$google3$javascript$common$bigint$platform.NATIVE_BIGINT_AVAILABLE","goog.globalBigInt","toGbigint","Number","isSafeInteger","module$exports$google3$javascript$common$bigint$index.isSafeInt52","MIN_SAFE_INT52_BIGINT","MAX_SAFE_INT52_BIGINT","isInRange","MIN_SAFE_INT52_STR","MAX_SAFE_INT52_STR","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER","boundary","valueChar","boundaryChar","split64Low","split64High","splitUint64","lowBits","module$exports$jspb$BinaryConstants.TWO_TO_32","splitInt64","negLow","negHigh","negate","joinUnsignedDecimalString","bitsLow","bitsHigh","mid","LOW_24_BITS","high","LOW_16_BITS","digitA","digitB","digitC","decimalFrom1e7WithLeadingZeros","digit1e7","partial","joinSignedDecimalString","highBits","bigintAsIntN","asIntN","numberIsFinite","isFinite","trunc","checkNullishFloatingPoint","checkBoolean","NUMBER_SHAPED_CHECK","isNumberShaped","checkNullishInt32","coerceToNullishInt32","checkInt64","requestedFormat","GBIGINT_FORMATTED","LEGACY","valueType","STRING_FORMATTED","convertStringToInt64String","convertNumberToInt64String","convertStringToInt64Gbigint","convertNumberToInt64Gbigint","convertNumberToInt64Number","checkNullishInt64","truncateStringToInt64RangeString","INT64_MIN_STR","INT64_MAX_STR","MAX_SAFE_INTEGER_DECIMAL_LENGTH","bigInt","ALL_32_BITS","firstDigitIndex","end","sliceStart","sliceEnd","digit1e6","sign","maybeUnsafeValue","result","coerced","decimalIdx","substring","coerceToNullishInt64String","forceTypeChecking","coerceToNullishInt64Gbigint","checkNullishString","coerceToNullishString","messageFromInlineStorage","ctor","parentArrayState","originalArrState","arrState","VALID_PIVOT_SELECTOR_VALUE","noChangePivotSelector","currentPivot","LAZY_REVIVAL_OPTIONS","reviveIntoImmutable","maybeReviveUnknownField","fieldNumber","lazyParse","messageArray","unknownBinaryFields","revive","reviveUnknownFields","e","recordUnknownFieldAccessOnArray","unknownBinaryFieldsSymbol","recordUnknownFieldDroppedInSerialize","unknownFields","cloneJspbArray","convertLeaf","isOwned","inClone","forEachUnknownField","clonedArray","sparseObject","pivotIndex","NO_PIVOT","movableSparseObject","isConstructed","CONSTRUCTED","arrayIndexOffset","HAS_MESSAGE_ID","IS_REPEATED_FIELD","currentPivotSelector","pivotSelector","maybeCtorInDebug","newSparseObject","item","n","isNaN","convertToJsonFormat","v","state","toJsonValueInternal","offset","UINT8ARRAY_MAX_SIZE_FOR_SPREAD","fromCharCode","alphabet","DEFAULT","byteToCharMap","paddingChar","inputIdx","outputIdx","outChar1","outChar2","outChar3","outChar4","toJsonValue","internalArr","constructMessageArray","data","suggestedPivot","messageId","arrayStateToAdd","PIVOT_MASK","PIVOT_OFFSET","HAS_WRAPPER","maybeThrowAlreadyConstructedError","FROZEN_ARRAY","msgLength","lastIndex","pivot","module$exports$jspb$internal_array_state.PIVOT_LIMIT","k","max","copyImmutableFieldValue","parentIsOwned","MUTABLE_SUBSTRUCTURES","UNFROZEN_SHARED","copyArrayWithImmutableFields","addArrayStateFlags","IS_API_FORMATTED","tryZeroCopyImmutable","wrapImmutableArray","template","mutable","noLegacyNull","markImmutable","flag","newArray","flagsToAdd","flagsToKeep","messageToMutable","immutable","maybeCopyOnWrite","ensureMutable","leakedMutableSubstructures","messageArrayState","GBIGINT_ZERO","LEGACY_NULLABLE","exports.getFieldNullable","hasMessageId","legacyNullable","coerceFn","jspb_internal_adapters.getFieldNullableInternal","exports.getFieldNullableInternal","NO_SUCH_FIELD","arrayIndex","last","lastValue","inSparseObject","is","exports.setField","setFieldIgnoringImmutabilityInternal","module$exports$jspb$internal_array_state.NO_PIVOT","exports.hasWrapperField","getReadonlyWrapperFieldOrUndefinedInternal","exports.hasOneofWrapperField","oneof","jspb_internal_adapters.isOneofCase","isFrozenByFlags","coerceToNullishBytes","setFieldIgnoringDefault","isDefault","exports.setOneofField","oneofsCaseMap","getOneofsCaseMap","computeOneofCaseInternal","oneofCase","set","exports.isOneofCase","jspb_internal_adapters.computeOneofCase","exports.computeOneofCase","internalArray","Map","oneofsSet","defineProperty","caseNumber","get","isNewlyConstructed","submsg","exports.getWrapperFieldOrUndefined","submessage","mutableSubmessage","getRepeatedWrapperFieldInternal","returnTypeForMutable","doesntReturnArray","forceMutableValuesIfParentIsMutable","immutableMessage","returnType","FROZEN","EITHER_FROZEN_OR_UNFROZEN","forceMutableValues","UNFROZEN","values","module$exports$jspb$internal_array_state.EMPTY_LIST_SENTINEL","existingState","valueState","needFormat","isImmutableArray","dataState","hasOnlyMutableValues","hasOnlyImmutableValues","readFrom","writeTo","datum","isImmutable","ONLY_MUTABLE_VALUES","FROZEN_UNLESS_SHARED","setFlagsForSlicedRepeatedArray","asMutable","valuesState","exports.getRepeatedWrapperField","freezeOptOut","checkWrapperForSetter","exports.setWrapperField","jspb_internal_adapters.setField","exports.setOneofWrapperField","jspb_internal_adapters.setOneofField","parentState","stateValue","spliceRepeatedWrapperField","msgs","oldState","immutableValue","exports.getInt64FieldNullable_asString","jspb_internal_adapters.getFieldNullable","exports.getEnumFieldNullable","exports.getInt32FieldWithDefault","exports.getStringFieldWithDefault","exports.getInt64FieldWithDefault_asString","jspb_internal_adapters.getInt64FieldNullable_asString","exports.getOneofInt64StringFieldOrUndefined_asString","jspb$punctual$proto$ObjectPath$MutablePart.oneofGroup_part_","exports.setEnumField","module$exports$jspb.Message","toJSON","serialize","JSON","stringify","getExtension","fieldInfo","fieldIndex","isRepeated","getExtensionFn","hasExtension","Message.prototype.toString","newMutableMessageFromTransferredArray","isFrozen","isSealed","isExtensible","newMessage","jspb$google$protobuf$MutableTimestamp","getSeconds","setSeconds","jspb$google$rpc$MutableStatus","getCode","jspb_internal_adapters.getInt32FieldWithDefault","setCode","setMessage","gapix.util.getOrigin","url","window","origin","location","protocol","href","host","slashPos","portStr","portPos","port","ExponentialBackoffDelayGenerator","random","initialMaxDelayMs_","INITIAL_MAX_DELAY_MS","maxDelayMs_","random_","reset","ExponentialBackoffDelayGenerator.prototype.reset","currentMaxDelayMs_","inRetryMode_","ExponentialBackoffDelayGenerator.prototype.getNextDelay","delay","jitter","module$exports$invalidation$ExponentialBackoffDelayGenerator.DEFAULT_MAX_RANDOM_JITTER_FRACTION","ceil","module$exports$invalidation$ExponentialBackoffDelayGenerator.DEFAULT_EXPONENTIAL_BACKOFF_BASE","sha1","chain","total","inbuf","compress","buf","W","WInternal","w","r","a","c","d","t","update","bytes","opt_length","unescape","byteArray","maxi","bufInternal","digest","totalBits","pad","digestString","hash","hex","gapix.auth_firstparty.tokencrafter.createAuthHeaderValueForFirstParty","apiSessionCookieValue","authScheme","opt_userIdentifiers","goog.globallocationhref","gapix.auth_firstparty.tokencrafter.getFirstPartyAuthToken_","sessionCookie","userIdentifiers","extraFields","sha1Parts","version","element","gapix.auth_firstparty.tokencrafter.computeSha1_","identifiers","suffix","timestamp","getTime","Date","tokenParts","toHash","Cookies","document_","document","cookie","Cookies.prototype","isEnabled","Cookies.prototype.isEnabled","goog.globalnavigatorcookieEnabled","cookieEnabled","module$contents$goog$net$Cookies_Cookies.TEST_COOKIE_NAME_","module$contents$goog$net$Cookies_Cookies.TEST_COOKIE_VALUE_","maxAge","module$contents$goog$net$Cookies_Cookies.TEST_COOKIE_MAX_AGE_","remove","Cookies.prototype.set","options","domain","secure","sameSite","path","domainStr","pathStr","secureStr","expiresStr","toUTCString","pastDate","futureDate","now","setCookie_","sameSiteStr","Cookies.prototype.get","opt_default","nameEq","getParts_","part","lastIndexOf","Cookies.prototype.remove","opt_path","opt_domain","containsKey","getKeys","Cookies.prototype.getKeys","getKeyValues_","keys","getValues","Cookies.prototype.getValues","Cookies.prototype.isEmpty","getCookie_","Cookies.prototype.containsKey","clear","Cookies.prototype.clear","Cookies.prototype.getKeyValues_","index","gapix.auth_firstparty.getNewAuthHeaderValue_","overrideVarName","sessionCookieName","authSchemeName","cookies","jspb$punctual$proto$MutableHeader","getVersion","setVersion","setIsPublic","ObjectOwner","jspb$punctual$proto$MutableObjectOwner.oneofGroup_owner_","jspb$punctual$proto$MutableObjectOwner","jspb$punctual$proto$ObjectPath$MutableNullPart","jspb$punctual$proto$ObjectPath$MutablePart","jspb$punctual$proto$MutableObjectPath","jspb$punctual$proto$MutableProject","getName","jspb$punctual$proto$MutableProject.oneofGroup_project_","jspb$punctual$proto$MutableObjectId","setProject","jspb_internal_adapters.setWrapperField","setOwner","getPath","jspb_internal_adapters.getWrapperFieldOrUndefined","setPath","hasPath","jspb_internal_adapters.hasWrapperField","jspb$punctual$proto$MutableObjectIdPrefix","setPrefix","jspb$punctual$proto$MutableObjectChange","checkNullishInt64String","jspb$punctual$proto$MutableWatchRequest","getStartTimeMicros_asString","setStartTimeMicros","jspb_internal_adapters.setOneofWrapperField","jspb$punctual$proto$MutableWatchRequest.oneofGroup_object_ids_","jspb$punctual$proto$MutableChooseServerRequest","jspb$punctual$proto$MutableChooseServerResponse","setAffinitization","jspb_internal_adapters.setEnumField","getAffinitizationOrUndefined","jspb_internal_adapters.getEnumFieldNullable","jspb_internal_adapters.getInt64FieldWithDefault_asString","jspb$punctual$proto$MultiWatchRequest$MutableClose","jspb$punctual$proto$MutableMultiWatchRequest","setStreamId","getStreamIdOrUndefined_asString","getClose","jspb$punctual$proto$MutableMultiWatchRequest.oneofGroup_request_","setClose","hasClose","jspb_internal_adapters.hasOneofWrapperField","jspb$punctual$proto$MutableMultiWatchRequestBatch","jspb$punctual$proto$MultiWatchResponseBatch$MutableHandshake","getChannelId","jspb_internal_adapters.getStringFieldWithDefault","setChannelId","jspb$util$MutableStatusProto","getCodeOrUndefined","jspb$punctual$proto$MultiWatchResponse$MutableClose","getStatus","setStatus","hasStatus","jspb$punctual$proto$WatchResponse$MutableAdvance","jspb$punctual$proto$WatchResponse$MutableChangeBatch","jspb$punctual$proto$MutableWatchResponse","setStart","jspb$punctual$proto$MutableWatchResponse.oneofGroup_signal_","jspb$punctual$proto$MutableMultiWatchResponse","jspb$punctual$proto$MutableMultiWatchResponse.oneofGroup_response_","jspb$punctual$proto$MutableStreamStatus","jspb$punctual$proto$MutableMultiWatchResponseBatch","jspb$punctual$proto$MutableRefreshCredentialsRequest","jspb$punctual$proto$MutableRefreshCredentialsResponse","goog.Disposable","disposed_","onDisposeCallbacks_","dispose","goog.Disposable.prototype.dispose","disposeInternal","goog.Disposable.prototype.disposeInternal","goog.events.Event","opt_target","currentTarget","defaultPrevented","propagationStopped_","stopPropagation","goog.events.Event.prototype.stopPropagation","preventDefault","goog.events.Event.prototype.preventDefault","PASSIVE_EVENTS","goog.globaladdEventListener","addEventListener","passive","nullFunction","goog.globalremoveEventListener","removeEventListener","goog.events.BrowserEvent","opt_e","opt_currentTarget","goog.events.Eventcall","goog.events.BrowserEvent.base","relatedTarget","button","screenY","screenX","clientY","clientX","offsetY","offsetX","charCode","keyCode","metaKey","shiftKey","altKey","ctrlKey","pointerId","pointerType","timeStamp","event_","goog.events.BrowserEvent.prototype.init","relevantTouch","changedTouches","srcElement","MOUSEOVER","fromElement","MOUSEOUT","toElement","pageX","pageY","layerX","layerY","goog.events.BrowserEventsuperClass_preventDefaultcall","goog.events.BrowserEvent.prototype.stopPropagation","goog.events.BrowserEventsuperClass_stopPropagationcall","cancelBubble","goog.events.BrowserEvent.prototype.preventDefault","be","returnValue","goog.events.Listenable.IMPLEMENTED_BY_PROP","goog.events.Listenable.isImplementedBy","module$contents$goog$events$ListenableKey_ListenableKey.counter_","Listener","listener","src","capture","opt_handler","proxy","handler","removed","callOnce","Listener.prototype.markAsRemoved","ListenerMap","listeners","typeCount_","ListenerMap.prototype","add","ListenerMap.prototype.add","opt_useCapture","opt_listenerScope","typeStr","listenerArray","module$contents$goog$events$ListenerMap_ListenerMap.findListenerIndex_","listenerObj","ListenerMap.prototype.remove","markAsRemoved","splice","ListenerMap.prototype.removeByKey","removeAll","ListenerMap.prototype.removeAll","getListener","ListenerMap.prototype.getListener","hasListener","ListenerMap.prototype.hasListener","opt_type","opt_capture","hasType","hasCapture","ListenerMap.findListenerIndex_","goog.events.LISTENER_MAP_PROP_","goog.events.onStringMap_","goog.events.listenerCountEstimate_","goog.events.listen","opt_options","once","goog.events.listenOnce","goog.events.wrapListener","listen","goog.events.listen_","listenerMap","goog.events.getListenerMap_","goog.events.getProxy","goog.events.BrowserFeature.PASSIVE_EVENTS","attachEvent","goog.events.getOnString_","addListener","removeListener","eventObject","proxyCallbackFunction","goog.events.handleBrowserEvent_","listenOnce","goog.events.unlisten","unlisten","goog.events.unlistenByKey","removeByKey","eventTargetListeners_","detachEvent","goog.events.onString_","opt_evt","listenerFn","listenerHandler","goog.events.LISTENER_WRAPPER_PROP_","handleEvent","EventHandler","opt_scope","goog.Disposablecall","handler_","keys_","module$contents$goog$events$EventHandler_EventHandler.typeArray_","EventHandler.prototype","EventHandler.prototype.listen","opt_fn","EventHandler.prototype.listenOnce","listenOnce_","EventHandler.prototype.listenOnce_","EventHandler.prototype.unlisten","opt_capt","EventHandler.prototype.removeAll","EventHandler.prototype.disposeInternal","EventHandler.prototype.handleEvent","XmlHttpFactory","WebChannel.MessageEvent","WebChannel.MessageEvent.base","MESSAGE","module$contents$goog$net$WebChannel_WebChannel.MessageEvent","WebChannel.ErrorEvent","WebChannel.ErrorEvent.base","ERROR","module$contents$goog$net$WebChannel_WebChannel.ErrorEvent","generateUri","uri","addDomainPrefix","setDomain","domain_","module$exports$google3$ipc$invalidation$punctual$typescript$impl$channel_impl.ChannelConfig","authMethod","useFetchApi","module$exports$google3$ipc$invalidation$punctual$typescript$impl$channel_impl.ChannelImpl","channelMessageHandler","channelStatusHandler","config","channelCreator","gsessionid","INIT","channelHandler","eventhandler_1","channel","createWebChannel","opts","sendRawJson","messageContentType","httpSessionIdParam","messageUrlParams","getQueryParameters","detectBufferingProxy","useFetchStreams","messageHeaders","getHeaders","supportsCrossDomainXhr","usesCredentialedRequests","OPEN","channelEventCallback","module$exports$google3$ipc$invalidation$punctual$typescript$public$channel_internal.ChannelOpen","status","Status","OK","rawStatus","next","CLOSE","handleCloseEvent","module$exports$google3$ipc$invalidation$punctual$typescript$public$channel_internal.ChannelClose","channelState","openChannelWhenSubscribed","CLOSED","metadataKey","handleMessageEvent","module$exports$google3$ipc$invalidation$punctual$typescript$public$channel_internal.ServerError","handleError","responseBatch","MultiWatchResponseBatch","handleErrorEvent","getLastStatusCode","module$contents$goog$labs$net$webChannel$WebChannelBaseTransport_WebChannelBaseTransport.ChannelProperties","channel_","module$exports$google3$ipc$invalidation$punctual$typescript$public$channel_internal.ChannelError","codeForHttpStatus","httpStatusCode","open","ACTIVE","close","send","request","setLibrary","Header","TYPE_SCRIPT","module$exports$google3$ipc$invalidation$punctual$typescript$impl$object_id_impl.OpaquePart","rep","equals","other","module$exports$google3$ipc$invalidation$punctual$typescript$impl$tokenbucket.TokenBucket","module$exports$google3$ipc$invalidation$punctual$typescript$impl$client_impl.SKIP_BACKOFF_MAX_TOKENS","lastAddedTimestampMs","tokens","newTokens","SKIP_BACKOFF_REFRESH_PERIOD_MS","min","module$exports$google3$ipc$invalidation$punctual$typescript$public$channel_internal.ChooseServerStart","module$exports$google3$ipc$invalidation$punctual$typescript$public$channel_internal.ChooseServerSuccess","module$exports$google3$ipc$invalidation$punctual$typescript$public$channel_internal.ChooseServerFailure","module$exports$google3$ipc$invalidation$punctual$typescript$public$channel_internal.ChannelTryOpen","module$exports$google3$ipc$invalidation$punctual$typescript$public$client.Change","objectId","payload","isReplay","module$exports$google3$ipc$invalidation$punctual$typescript$public$client.Start","module$exports$google3$ipc$invalidation$punctual$typescript$public$client.Advance","timestampMicros","fromTimestamp","ts","seconds","minSeconds","maxSeconds","nanos","minNanos","maxNanos","isInteger","module$exports$google3$ipc$invalidation$punctual$typescript$public$time.Time","asTimestamp","Timestamp","fromBits","Long","fromNumber","TWO_PWR_63_DBL_","MAX_VALUE_","TWO_PWR_32_DBL_","MIN_VALUE_","ZERO_","fromString","opt_radix","module$contents$goog$math$Long_Long.fromString","numberValue","parseInt","MAX_SAFE_INTEGER_","radix","radixToPower","module$contents$goog$math$Long_Long.fromNumber","pow","size","multiply","power","toNumber","high_","getLowBitsUnsigned","low_","subtract","isZero","low","top11Bits","asNumber","safeDigits","radixPowSafeDigits","module$contents$goog$math$Long_Long.fromBits","remDiv","div","abs","digits","compare","overflowFromLow","a48","a32","a16","b48","b32","b16","c00","c16","c32","a00","b00","c48","isNegative","ONE_","NEG_ONE_","shiftRight","numBits","approx","halfThis","shiftLeft","rem","log2","log","LN2","delta","approxRes","approxRem","and","or","xor","module$exports$google3$ipc$invalidation$punctual$typescript$public$object_id.ObjectIdPart","isDecreasing","x","y","increasing","decreasing","of","module$exports$google3$ipc$invalidation$punctual$typescript$public$object_id.ObjectId","module$exports$google3$third_party$javascript$rxjs$src$internal$util$UnsubscriptionError.UnsubscriptionError","errors","setPrototypeOf","arrRemove","isFunction","module$exports$google3$third_party$javascript$rxjs$src$internal$Subscription.Subscription","initialTeardown","closed","_teardowns","_parentage","unsubscribe","parent","teardown","_hasParent","_addParent","includes","_removeParent","module$exports$google3$third_party$javascript$rxjs$src$internal$Subscription.SubscriptionEMPTY","empty","EMPTY","isSubscription","noop","reportUnhandledError","module$exports$google3$third_party$javascript$rxjs$src$internal$Subscriber.Subscriber","create","complete","module$exports$google3$third_party$javascript$rxjs$src$internal$Subscriber.SafeSubscriber","destination","isStopped","ConsumerObserver","observerOrNext","_next","_error","_complete","partialObserver","module$exports$google3$third_party$javascript$rxjs$src$internal$symbol$observable.observable","observable","identity","pipeFromArray","fns","piped","reduce","prev","pipe","operations","module$exports$google3$third_party$javascript$rxjs$src$internal$Observable.Observable","subscribe","_subscribe","lift","operator","subscriber","_trySubscribe","sink","promiseCtor","getPromiseCtor","resolve","reject","subscription","module$exports$google3$third_party$javascript$rxjs$src$internal$Observable.Observablecreate","Observable.create","Promise","module$exports$google3$third_party$javascript$rxjs$src$internal$util$ObjectUnsubscribedError.ObjectUnsubscribedError","module$exports$google3$third_party$javascript$rxjs$src$internal$Subject.Subject","observers","hasError","thrownError","subject","module$exports$google3$third_party$javascript$rxjs$src$internal$Subject.AnonymousSubject","_throwIfClosed","copy","observer","_checkFinalizedStatuses","_innerSubscribe","EMPTY_SUBSCRIPTION","module$exports$google3$third_party$javascript$rxjs$src$internal$Subject.Subjectcreate","Subject.create","getValue","_value","module$exports$google3$third_party$javascript$rxjs$src$internal$BehaviorSubject.BehaviorSubject","scheduleArray","scheduler","schedule","module$exports$google3$third_party$javascript$rxjs$src$internal$symbol$iterator.iterator","iterator","innerFrom","fromInteropObservable","fromArrayLike","then","fromPromise","asyncIterator","fromAsyncIterable","fromIterable","TypeError","obs","promise","iterable","done","return","asyncIterable","process","catch","isScheduler","module$exports$google3$third_party$javascript$rxjs$src$internal$util$EmptyError.EmptyError","firstValueFrom","module$exports$google3$third_party$javascript$rxjs$src$internal$operators$OperatorSubscriber.OperatorSubscriber","onNext","onError","onComplete","onUnsubscribe","this._next","this._error","this._complete","operate","liftedSource","project","thisArg","mergeInternals","concurrent","buffer","active","isComplete","doInnerSub","innerValue","bufferedValue","outerNext","mergeMap","resultSelector","Infinity","ii","module$exports$google3$third_party$javascript$rxjs$src$internal$observable$never.NEVER","filter","predicate","raceInit","sources","subscriptions","buildRequestOpts","queryParams","extraHeaders","withCredentials","module$exports$google3$ipc$invalidation$typescript$auth_method.AuthParams","toAuthMethodPromise","params","oauthTokens","firstToken","cachedTokens","module$exports$google3$ipc$invalidation$typescript$auth_method.AuthMethodOAuth","apiKey","bearerTokens","module$exports$google3$ipc$invalidation$typescript$auth_method.AuthMethodBearerToken","appAuthTokens","module$exports$google3$ipc$invalidation$typescript$auth_method.AuthMethodAnonymous","module$exports$google3$ipc$invalidation$typescript$auth_method.AuthMethodFirstParty","authUser","hashes","gapix.auth_firstparty.PRE_K_SAPISID_NAME_","gapix.auth_firstparty.PRE_K_APISID_NAME_","gapix.auth_firstparty.SAPISID_3P_NAME_","gapix.auth_firstparty.SAPISID_1P_NAME_","isSecure","gapix.auth_firstparty.SECURE_FIRST_PARTY_AUTH_SCHEME_","gapix.auth_firstparty.UNSECURED_FIRST_PARTY_AUTH_SCHEME_","legacyHashValue","new1PHashValue","gapix.auth_firstparty.OVERRIDE_SECURE_API_SESSION_COOKIE_1P_VAR","gapix.auth_firstparty.SECURE_FIRST_PARTY_AUTH_1P_SCHEME_","new3PHashValue","gapix.auth_firstparty.OVERRIDE_SECURE_API_SESSION_COOKIE_3P_VAR","gapix.auth_firstparty.SECURE_FIRST_PARTY_AUTH_3P_SCHEME_","header","scheme","authSchemeAndHash","module$exports$google3$buzz$channel$javascript$internal$sharedconstants.X_GOOG_AUTHUSER_HEADER","domainType","FIRST_PARTY","THIRD_PARTY","token","httpStatus","BAD_REQUEST","INVALID_ARGUMENT","UNAUTHORIZED","UNAUTHENTICATED","FORBIDDEN","PERMISSION_DENIED","NOT_FOUND","CONFLICT","ABORTED","PRECONDITION_FAILED","FAILED_PRECONDITION","TOO_MANY_REQUESTS","RESOURCE_EXHAUSTED","NOT_IMPLEMENTED","UNIMPLEMENTED","SERVICE_UNAVAILABLE","UNAVAILABLE","GATEWAY_TIMEOUT","DEADLINE_EXCEEDED","UNKNOWN","module$exports$google3$javascript$common$async$context$propagate.propagateAsyncContext","AsyncContext","Snapshot","wrap","goog.events.EventTarget","actualEventTarget_","parentEventTarget_","goog.events.EventTarget.prototype","goog.events.EventTarget.prototype.addEventListener","opt_handlerScope","goog.events.EventTarget.prototype.removeEventListener","dispatchEvent","goog.events.EventTarget.prototype.dispatchEvent","ancestorsTree","ancestor","getParentEventTarget","oldEvent","opt_ancestorsTree","fireListeners","goog.events.EventTarget.prototype.disposeInternal","goog.events.EventTargetsuperClass_disposeInternalcall","removeAllListeners","goog.events.EventTarget.prototype.listen","goog.events.EventTarget.prototype.listenOnce","goog.events.EventTarget.prototype.unlisten","goog.events.EventTarget.prototype.fireListeners","unlistenByKey","goog.events.EventTarget.prototype.getListener","goog.events.EventTarget.prototype.hasListener","id","Serializer","replacer_","opt_replacer","Serializer.prototype.serialize","sb","serializeInternal","Serializer.prototype.serializeInternal","sep","serializeArray","Boolean","valueOf","serializeString_","serializeObject_","module$contents$goog$json_Serializer.charToJsonCharCache_","module$contents$goog$json_Serializer.charsToReplace_","Serializer.prototype.serializeString_","goog.net.DefaultXmlHttpFactory","createInstance","goog.net.DefaultXmlHttpFactory.prototype.createInstance","XMLHttpRequest","goog.net.XmlHttp.factory_","factory","splitRe","RegExp","parseQueryData","encodedQuery","callback","pairs","indexOfEquals","decodeURIComponent","goog.net.XhrIo","opt_xmlHttpFactory","goog.events.EventTargetcall","goog.net.XhrIo.base","headers","xmlHttpFactory_","active_","xhr_","lastUri_","lastErrorCode_","NO_ERROR","lastError_","inAbort_","inOpen_","inSend_","errorDispatched_","timeoutInterval_","timeoutId_","responseType_","withCredentials_","attributionReportingOptions_","trustToken_","goog.net.XhrIo.HTTP_SCHEME_PATTERN","goog.net.XhrIo.METHODS_WITH_FORM_DATA","goog.net.XhrIo.prototype","setTrustToken","goog.net.XhrIo.prototype.setTrustToken","trustToken","setAttributionReporting","goog.net.XhrIo.prototype.setAttributionReporting","attributionReportingOptions","goog.net.XhrIo.prototype.send","opt_method","opt_content","opt_headers","method","toUpperCase","createXhr","goog.net.XmlHttp.factory_createInstance","onreadystatechange","onReadyStateChange_","formatMsg_","error_","content","getPrototypeOf","contentTypeKey","from","find","contentIsFormData","goog.net.XhrIo.CONTENT_TYPE_HEADER","goog.net.XhrIo.FORM_CONTENT_TYPE","setRequestHeader","responseType","cleanUpTimeoutTimer_","clearTimeout","timeout_","goog.net.XhrIo.prototype.timeout_","TIMEOUT","abort","goog.net.XhrIo.prototype.error_","EXCEPTION","dispatchErrors_","cleanUpXhr_","goog.net.XhrIo.prototype.dispatchErrors_","COMPLETE","goog.net.XhrIo.prototype.abort","opt_failureCode","ABORT","goog.net.XhrIo.prototype.disposeInternal","goog.net.XhrIosuperClass_disposeInternalcall","goog.net.XhrIo.prototype.disposeInternal.base","goog.net.XhrIo.prototype.onReadyStateChange_","isDisposed","onReadyStateChangeHelper_","onReadyStateChangeEntryPoint_","goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_","goog.net.XhrIo.prototype.onReadyStateChangeHelper_","getReadyState","READY_STATE_CHANGE","isSuccess","SUCCESS","HTTP_ERROR","getStatusText","LOADED","statusText","goog.net.XhrIo.prototype.cleanUpXhr_","opt_fromDispose","xhr","READY","clearedOnReadyStateChange","isActive","goog.net.XhrIo.prototype.isActive","goog.net.XhrIo.prototype.isSuccess","CREATED","ACCEPTED","NO_CONTENT","PARTIAL_CONTENT","NOT_MODIFIED","QUIRK_IE_NO_CONTENT","match","SCHEME","goog.globalself","goog.globalselflocation","goog.globalselflocationprotocol","goog.net.XhrIo.HTTP_SCHEME_PATTERNtest","goog.net.XhrIo.prototype.getReadyState","readyState","UNINITIALIZED","goog.net.XhrIo.prototype.getStatus","goog.net.XhrIo.prototype.getResponseText","responseText","goog.net.XhrIo.prototype.getResponse","response","TEXT","ARRAY_BUFFER","mozResponseArrayBuffer","getResponseHeader","goog.net.XhrIo.prototype.getResponseHeader","getAllResponseHeaders","goog.net.XhrIo.prototype.getAllResponseHeaders","goog.net.XhrIo.prototype.getResponseHeaders","headersObject","headersArray","keyValue","getLastError","goog.net.XhrIo.prototype.getLastError","makeRealXhrIo","timeoutInterval","xhrIo","goog.structs.getValues","col","Set","goog.structs.getKeys","goog.structs.forEach","goog.Uri","opt_uri","userInfo_","scheme_","port_","fragment_","path_","ignoreCase_","m","setScheme","setUserInfo","setPort","setQueryData","queryData_","setFragment","goog.Uri.decodeOrEmpty_","USER_INFO","DOMAIN","PORT","PATH","QUERY_DATA","FRAGMENT","goog.Uri.QueryData","goog.Uri.prototype","goog.Uri.prototype.toString","out","getScheme","goog.Uri.encodeSpecialChars_","goog.Uri.reDisallowedInSchemeOrUserInfo_","getDomain","userInfo","getUserInfo","doubleEncodedString","getPort","hasDomain","goog.Uri.reDisallowedInAbsolutePath_","goog.Uri.reDisallowedInRelativePath_","query","getEncodedQuery","fragment","getFragment","goog.Uri.reDisallowedInFragment_","goog.Uri.prototype.resolve","relativeUri","absoluteUri","overridden","lastSlashIndex","leadingSlash","prefix","segments","pos","segment","pop","goog.Uri.prototype.clone","goog.Uri.prototype.setScheme","newScheme","opt_decode","goog.Uri.prototype.setDomain","newDomain","goog.Uri.prototype.setPort","newPort","goog.Uri.prototype.getPath","goog.Uri.prototype.setPath","newPath","goog.Uri.prototype.hasPath","goog.Uri.prototype.setQueryData","queryData","setIgnoreCase","goog.Uri.reDisallowedInQuery_","getQuery","goog.Uri.prototype.getQuery","goog.Uri.prototype.setParameterValue","goog.Uri.prototype.makeUnique","setParameterValue","RANDOM","removeParameter","goog.Uri.prototype.removeParameter","goog.Uri.prototype.setIgnoreCase","ignoreCase","opt_preserveReserved","decodeURI","unescapedPart","extra","opt_removeDoubleEncoding","encodeURI","goog.Uri.encodeChar_","opt_query","opt_ignoreCase","count_","keyMap_","encodedQuery_","goog.Uri.QueryData.prototype.ensureKeyMapInitialized_","goog.Uri.QueryData.prototype","goog.Uri.QueryData.prototype.add","ensureKeyMapInitialized_","invalidateCache_","getKeyName_","goog.Uri.QueryData.prototype.remove","has","delete","goog.Uri.QueryData.prototype.clear","goog.Uri.QueryData.prototype.isEmpty","goog.Uri.QueryData.prototype.containsKey","goog.Uri.QueryData.prototype.forEach","goog.Uri.QueryData.prototype.getKeys","vals","goog.Uri.QueryData.prototype.getValues","opt_key","goog.Uri.QueryData.prototype.set","goog.Uri.QueryData.prototype.get","goog.Uri.QueryData.prototype.setValues","goog.Uri.QueryData.prototype.toString","encodedKey","param","goog.Uri.QueryData.prototype.clone","goog.Uri.QueryData.prototype.getKeyName_","keyName","goog.Uri.QueryData.prototype.setIgnoreCase","lowerCase","setValues","goog.Uri.QueryData.prototype.extend","module$exports$google3$ipc$invalidation$typescript$jspb_client.XhrError","code","concatPaths","basePath","pathSuffix","endsWith","startsWith","module$exports$google3$ipc$invalidation$typescript$jspb_client.JspbClient","baseUri","post","responseCtor","module$exports$google3$ipc$invalidation$typescript$jspb_client.JspbClient.concatPaths","key__tsickle_destructured_1","value__tsickle_destructured_2","entries","assign","body","executor","timeoutMs","getResponseText","parse","CUSTOM_ERROR","DEFAULT_TIMEOUT_MS","eventTargetInternal","getStatEventTargetInternal","ServerReachabilityEvent","module$contents$goog$labs$net$webChannel$requestStats_Event.SERVER_REACHABILITY_EVENT","notifyServerReachabilityEvent","reachabilityType","StatEvent","eventTarget","stat","module$contents$goog$labs$net$webChannel$requestStats_Event.STAT_EVENT","notifyStatEvent","TimingEvent","rtt","module$contents$goog$labs$net$webChannel$requestStats_Event.TIMING_EVENT","notifyTimingEvent","retries","ms","FreeList","create_","reset_","occupants_","head_","put","module$contents$goog$async$WorkQueue_WorkQueue.DEFAULT_MAX_UNUSED","WorkQueue","workTail_","workHead_","scope","module$contents$goog$async$WorkQueue_WorkQueue.freelist_get","module$contents$goog$async$WorkQueue_WorkQueue.freelist_","WorkItem","workQueueScheduled","workQueue","initializeRunner","processWorkQueueInternal","module$contents$goog$async$WorkQueue_WorkQueue.freelist_put","goog.Timer.callOnce","opt_delay","goog.Timer.MAX_TIMEOUT_","goog.Timer.INVALID_TIMEOUT_ID_","doAction_","timer_","onTimer_","shouldFire_","pauseCount_","interval_","args_","listener_","Throttle","interval","fire","stop","goog.globalclearTimeout","pause","resume","WebChannelDebug","redactEnabled_","disableRedact","WebChannelDebug.prototype.disableRedact","WebChannelDebug.prototype.xmlHttpChannelRequest","verb","attempt","postData","info","keyParts","WebChannelDebug.prototype.xmlHttpChannelResponseMetaData","statusCode","WebChannelDebug.prototype.xmlHttpChannelResponseText","opt_desc","redactResponse_","WebChannelDebug.prototype.timeoutResponse","debug","WebChannelDebug.prototype.debug","WebChannelDebug.prototype.info","warning","WebChannelDebug.prototype.warning","WebChannelDebug.prototype.redactResponse_","responseArray","dataPart","ChannelRequest","channelDebug","opt_sessionId","opt_requestId","opt_retryId","channelDebug_","sid_","rid_","retryId_","eventHandler_","module$contents$goog$labs$net$webChannel$ChannelRequest_ChannelRequest.TIMEOUT_MS_","extraHeaders_","successful_","postData_","requestUri_","baseUri_","type_","requestStartTime_","watchDogTimeoutTime_","watchDogTimerId_","pendingMessages_","xmlHttp_","xmlHttpChunkStart_","verb_","lastStatusCode_","cancelled_","readyStateChangeThrottleMs_","readyStateChangeThrottle_","firstByteReceived_","initialResponseDecoded_","decodeInitialResponse_","decodeChunks_","fetchResponseState_","goog.labs.net.webChannel.FetchResponseState","textDecoder","responseBuffer","responseArrivedForFetch","ChannelRequest.errorStringFromCode","errorCode","STATUS","NO_DATA","module$contents$goog$labs$net$webChannel$ChannelRequest_ChannelRequest.INVALID_CHUNK_","module$contents$goog$labs$net$webChannel$ChannelRequest_ChannelRequest.INCOMPLETE_CHUNK_","ChannelRequest.prototype","setExtraHeaders","ChannelRequest.prototype.setExtraHeaders","ChannelRequest.prototype.setTimeout","timeout","setReadyStateChangeThrottle","ChannelRequest.prototype.setReadyStateChangeThrottle","throttle","getPendingMessages","ChannelRequest.prototype.getPendingMessages","ChannelRequest.prototype.xmlHttpPost","XML_HTTP","makeUnique","decodeChunks","sendXmlHttp_","ChannelRequest.prototype.sendXmlHttp_","hostPrefix","ensureWatchDogTimer_","useSecondaryDomains","supportsCrossDomainXhrs_","createXhrIo","xmlHttpHandler_","readyStateChangeHandler_","REQUEST_MADE","xmlHttpChannelRequest","ChannelRequest.prototype.readyStateChangeHandler_","evt","INTERACTIVE","ChannelRequest.prototype.xmlHttpHandler_","xmlhttp","onXmlHttpReadyStateChanged_","ex","ChannelRequest.prototype.onXmlHttpReadyStateChanged_","hasResponseBody_","REQUEST_FAILED","REQUEST_SUCCEEDED","cancelWatchDogTimer_","decodeXmlHttpResponse_","channelRequest","xmlHttpChannelResponseMetaData","shouldCheckInitialResponse_","initialResponse","getInitialResponse_","xmlHttpChannelResponseText","safeOnRequestData_","UNKNOWN_SESSION_ID","REQUEST_UNKNOWN_SESSION_ID","cleanup_","dispatchFailure_","decodeNextChunks_","onRequestComplete","getResponseHeaders","REQUEST_BAD_STATUS","ChannelRequest.prototype.getInitialResponse_","module$contents$goog$net$WebChannel_WebChannel.X_HTTP_INITIAL_RESPONSE","ChannelRequest.prototype.decodeXmlHttpResponse_","useFetchStreamsForResponse_","responseChunks","getResponse","responseLength","requestCompleted","TextDecoder","goog.globalTextDecoder","decode","stream","ChannelRequest.prototype.hasResponseBody_","ChannelRequest.prototype.useFetchStreamsForResponse_","CLOSE_REQUEST","usesFetchStreams_","ChannelRequest.prototype.decodeNextChunks_","decodeNextChunksSuccessful","chunkText","getNextChunk_","BAD_DATA","REQUEST_INCOMPLETE_DATA","REQUEST_BAD_DATA","REQUEST_NO_DATA","backChannelRequest_","detectBufferingProxy_","bpDetectionDone_","clearBpDetectionTimer_","NOPROXY","ChannelRequest.prototype.getNextChunk_","sizeStartIndex","sizeEndIndex","sizeAsString","chunkStartIndex","cancel","ChannelRequest.prototype.cancel","ChannelRequest.prototype.ensureWatchDogTimer_","startWatchDogTimer_","ChannelRequest.prototype.startWatchDogTimer_","time","onWatchDogTimeout_","ChannelRequest.prototype.cancelWatchDogTimer_","ChannelRequest.prototype.onWatchDogTimeout_","timeoutResponse","handleTimeout_","REQUEST_TIMEOUT","ChannelRequest.prototype.dispatchFailure_","state_","ChannelRequest.prototype.cleanup_","ChannelRequest.prototype.getLastError","ChannelRequest.prototype.getLastStatusCode","ChannelRequest.prototype.safeOnRequestData_","hasRequest","forwardChannelRequestPool_","OPENED","wireCodec_","parser_","responseValues","handlePostResponse_","backChannelTimerId_","module$contents$goog$labs$net$webChannel$WebChannelBase_WebChannelBase.RTT_ESTIMATE","clearDeadBackchannelTimer_","cancelBackChannelRequest_","maybeRetryBackChannel_","BACKCHANNEL_MISSING","lastPostResponseArrayId_","outstandingArrays","lastArrayId_","numOutstandingBackchannelBytes","module$contents$goog$labs$net$webChannel$WebChannelBase_WebChannelBase.OUTSTANDING_DATA_BACKCHANNEL_RETRY_CUTOFF","enableStreaming_","backChannelRetryCount_","deadBackChannelTimerId_","onBackChannelDead_","getRequestCount","onForwardChannelFlushed_","forwardChannelFlushedCallback_","signalError_","BAD_RESPONSE","respArray","nextArray","incomingArrayId","onInput_","OPENING","hostPrefix_","correctHostPrefix","negotiatedVersion","channelVersion_","negotiatedServerVersion","serverVersion_","serverKeepaliveMs","backChannelRequestTimeoutMs_","applyControlHeaders_","clientProtocol","module$contents$goog$net$WebChannel_WebChannel.X_CLIENT_WIRE_PROTOCOL","requestPool_","maxSize_","maxPoolSizeConfigured_","request_","addRequest","getHttpSessionIdParam","httpSessionIdParam_","httpSessionIdHeader","module$contents$goog$net$WebChannel_WebChannel.X_HTTP_SESSION_ID","setHttpSessionId","httpSessionId_","forwardChannelUri_","channelOpened","handshakeRttMs_","startBackchannelAfterHandshake_","getBackChannelUri","createDataUri","shouldUseSecondaryDomains","backChannelUri_","removeRequest","opt_timeout","ensureBackChannel_","outgoingMaps_","ensureForwardChannel_","STOP","disconnect","channelHandleArray","BACK_CHANNEL_ACTIVITY","module$contents$goog$labs$net$webChannel$Wire_Wire.QueuedMap","mapId","context","ForwardChannelRequestPool","opt_maxPoolSize","module$contents$goog$labs$net$webChannel$ForwardChannelRequestPool_ForwardChannelRequestPool.MAX_POOL_SIZE_","goog.globalPerformanceNavigationTiming","PerformanceNavigationTiming","entrys","goog.globalperformancegetEntriesByType","performance","getEntriesByType","nextHopProtocol","goog.globalchrome","chrome","goog.globalchromeloadTimes","loadTimes","wasFetchedViaSpdy","ForwardChannelRequestPool.prototype.isFull","ForwardChannelRequestPool.prototype.getRequestCount","ForwardChannelRequestPool.prototype.hasRequest","req","ForwardChannelRequestPool.prototype.addRequest","ForwardChannelRequestPool.prototype.removeRequest","ForwardChannelRequestPool.prototype.cancel","ForwardChannelRequestPool.prototype.getPendingMessages","ForwardChannelRequestPool.prototype.addPendingMessages","messages","testLoadImage","goog.globalImage","Image","img","onload","networkTestCallback","onerror","onabort","ontimeout","NETWORK_TIMEOUT","testPingServer","controller","AbortController","timeoutId","fetch","signal","ok","debugText","opt_img","goog.json.NativeJsonProcessor","opt_reviver","WireV8","goog.net.FetchXmlHttpFactory","worker_","worker","streamBinaryChunks_","streamBinaryChunks","cacheMode_","credentialsMode_","goog.net.FetchXmlHttpFactory.prototype.createInstance","instance","goog.net.FetchXmlHttp","setCredentialsMode","setCacheMode","goog.net.FetchXmlHttpFactory.prototype.setCredentialsMode","credentialsMode","goog.net.FetchXmlHttpFactory.prototype.setCacheMode","cacheMode","goog.net.FetchXmlHttp.base","UNSENT","responseURL","responseXML","requestHeaders_","Headers","responseHeaders_","method_","url_","inProgress_","textDecoder_","currentReader_","fetchResponse_","abortController_","goog.net.FetchXmlHttp.prototype","goog.net.FetchXmlHttp.prototype.open","dispatchCallback_","goog.net.FetchXmlHttp.prototype.send","opt_data","aborted","requestInit","credentials","cache","Request","handleResponse_","handleSendFailure_","goog.net.FetchXmlHttp.prototype.abort","DONE","requestDone_","goog.net.FetchXmlHttp.prototype.handleResponse_","HEADER_RECEIVED","LOADING","arrayBuffer","handleResponseArrayBuffer_","goog.globalReadableStream","ReadableStream","getReader","readInputFromFetch_","text","handleResponseText_","goog.net.FetchXmlHttp.prototype.readInputFromFetch_","read","handleDataFromStream_","goog.net.FetchXmlHttp.prototype.handleDataFromStream_","dataPacket","newText","goog.net.FetchXmlHttp.prototype.handleResponseText_","goog.net.FetchXmlHttp.prototype.handleResponseArrayBuffer_","responseArrayBuffer","goog.net.FetchXmlHttp.prototype.handleSendFailure_","goog.net.FetchXmlHttp.prototype.requestDone_","goog.net.FetchXmlHttp.prototype.setRequestHeader","append","goog.net.FetchXmlHttp.prototype.getResponseHeader","goog.net.FetchXmlHttp.prototype.getAllResponseHeaders","lines","iter","entry","pair","goog.net.FetchXmlHttp.prototype.setCredentialsMode","goog.net.FetchXmlHttp.prototype.setCacheMode","goog.net.FetchXmlHttp.prototype.dispatchCallback_","getCredentialsMode","exports.generateHttpHeadersOverwriteParam","exports.setHttpHeadersWithOverwriteParam","urlParam","httpHeaders","module$exports$goog$net$rpc$HttpCors.generateHttpHeadersOverwriteParam","hashIndex","getInternalChannelParam","paramName","internalChannelParams","WebChannelBase","extraParams_","httpHeadersOverwriteParam_","initHeaders_","nextMapId_","nextRid_","failFast_","forwardChannelTimerId_","allowStreamingMode_","errorResponseStatusCode_","backChannelAttemptId_","forwardChannelRetryCount_","baseRetryDelayMs_","retryDelaySeedMs_","forwardChannelMaxRetries_","forwardChannelRequestTimeoutMs_","xmlHttpFactory","networkTestUrl_","networkTestUrl","concurrentRequestLimit","maxMapsPerRequest_","maxMessagesPerRequest","fastHandshake_","fastHandshake","encodeInitMessageHeaders_","encodeInitMessageHeaders","blockingHandshake_","blockingHandshake","forceLongPolling","longPollingTimeout_","longPollingTimeout","nonAckedMapsAtChannelClose_","bpDetectionTimerId_","WebChannelBase.prototype","module$contents$goog$labs$net$webChannel$Wire_Wire.LATEST_CHANNEL_VERSION","connect","WebChannelBase.prototype.connect","channelPath","opt_extraParams","opt_oldSessionId","opt_oldArrayId","CONNECT_ATTEMPT","connectChannel_","WebChannelBase.prototype.disconnect","cancelRequests_","rid","addAdditionalParams_","requestSent","goog.globalnavigatorsendBeacon","sendBeacon","eltImg","onClose_","WebChannelBase.prototype.cancelBackChannelRequest_","WebChannelBase.prototype.cancelRequests_","clearForwardChannelTimer_","WebChannelBase.prototype.setExtraHeaders","getHttpSessionId","WebChannelBase.prototype.getHttpSessionId","WebChannelBase.prototype.setReadyStateChangeThrottle","getState","WebChannelBase.prototype.getState","WebChannelBase.prototype.getLastStatusCode","WebChannelBase.prototype.ensureForwardChannel_","isFull","onStartForwardChannelTimer_","WebChannelBase.prototype.maybeRetryForwardChannel_","getForwardChannelMaxRetries","getRetryTime_","WebChannelBase.prototype.onStartForwardChannelTimer_","opt_retryRequest","startForwardChannel_","module$contents$goog$labs$net$webChannel$Wire_Wire.RAW_DATA_KEY","module$contents$goog$labs$net$webChannel$WebChannelBase_WebChannelBase.MAX_CHARS_PER_GET_","requestText","dequeueOutgoingMaps_","module$contents$goog$net$WebChannelTransport_WebChannelTransport.CLIENT_VERSION","encodedHeaders","module$exports$goog$net$rpc$HttpCors.setHttpHeadersWithOverwriteParam","xmlHttpPost","makeForwardChannelRequest_","WebChannelBase.prototype.makeForwardChannelRequest_","requeuePendingMaps_","round","WebChannelBase.prototype.addAdditionalParams_","WebChannelBase.prototype.dequeueOutgoingMaps_","maxNum","badMapHandler","badMapError","messageQueue","collection","encodedValue","pendingMessages","WebChannelBase.prototype.ensureBackChannel_","onStartBackChannelTimer_","WebChannelBase.prototype.maybeRetryBackChannel_","module$contents$goog$labs$net$webChannel$WebChannelBase_WebChannelBase.BACK_CHANNEL_MAX_RETRIES","WebChannelBase.prototype.onStartBackChannelTimer_","startBackChannel_","bpDetectionTimeout","onBpDetectionTimer_","WebChannelBase.prototype.onBpDetectionTimer_","responseData","PROXY","WebChannelBase.prototype.clearBpDetectionTimer_","WebChannelBase.prototype.startBackChannel_","WebChannelBase.prototype.correctHostPrefix","serverHostPrefix","WebChannelBase.prototype.onBackChannelDead_","BACKCHANNEL_DEAD","WebChannelBase.prototype.clearDeadBackchannelTimer_","WebChannelBase.prototype.onRequestComplete","BACK_CHANNEL","FORWARD_CHANNEL","lastStatusCode","lastError","module$contents$goog$labs$net$webChannel$ChannelRequest_ChannelRequest.errorStringFromCode","maybeRetryForwardChannel_","addPendingMessages","WebChannelBase.prototype.getRetryTime_","retryCount","retryTime","module$contents$goog$labs$net$webChannel$WebChannelBase_WebChannelBase.INACTIVE_CHANNEL_RETRY_FACTOR","WebChannelBase.prototype.signalError_","testNetworkCallback_","useImageLoader","opt_baseUrl","goog.globallocation","goog.globallocationprotocol","ERROR_OTHER","onError_","channelError","WebChannelBase.prototype.testNetworkCallback_","networkUp","ERROR_NETWORK","WebChannelBase.prototype.onClose_","channelClosed","WebChannelBase.prototype.createDataUri","locationPage","hostName","hostname","opt_scheme","opt_port","WebChannelBase.prototype.createXhrIo","isStreaming","WebChannelBase.prototype.isActive","WebChannelBase.Handler","module$contents$goog$labs$net$webChannel$WebChannelBase_WebChannelBase.Handler.prototype","WebChannelBase.Handler.prototype.channelOpened","WebChannelBase.Handler.prototype.channelHandleArray","WebChannelBase.Handler.prototype.channelError","WebChannelBase.Handler.prototype.channelClosed","WebChannelBase.Handler.prototype.isActive","WebChannelBase.Handler.prototype.badMapError","WebChannelBase.Handler.prototype.correctHostPrefix","WebChannelBaseTransport","WebChannelBaseTransport.prototype.createWebChannel","module$contents$goog$labs$net$webChannel$WebChannelBaseTransport_WebChannelBaseTransport.Channel","WebChannelBaseTransport.Channel","WebChannelBaseTransport.Channel.base","messageUrlParams_","clientProtocolHeaderRequired","module$contents$goog$net$WebChannel_WebChannel.X_CLIENT_PROTOCOL","module$contents$goog$net$WebChannel_WebChannel.X_CLIENT_PROTOCOL_WEB_CHANNEL","initHeaders","initMessageHeaders","module$contents$goog$net$WebChannel_WebChannel.X_WEBCHANNEL_CONTENT_TYPE","clientProfile","module$contents$goog$net$WebChannel_WebChannel.X_WEBCHANNEL_CLIENT_PROFILE","httpHeadersOverwriteParam","supportsCrossDomainXhr_","sendRawJson_","channelHandler_","module$contents$goog$labs$net$webChannel$WebChannelBaseTransport_WebChannelBaseTransport.Channel.Handler_","WebChannelBaseTransport.Channel.prototype.open","supportCrossDomain","WebChannelBaseTransport.Channel.prototype.close","WebChannelBaseTransport.Channel.prototype.send","rawJson","messageToMapObject_","WebChannelBaseTransport.Channel.prototype.disposeInternal","module$contents$goog$labs$net$webChannel$WebChannelBaseTransport_WebChannelBaseTransport.ChannelsuperClass_disposeInternalcall","WebChannelBaseTransport.Channel.prototype.disposeInternal.base","WebChannelBaseTransport.Channel.MessageEvent","module$contents$goog$net$WebChannel_WebChannel.MessageEventcall","WebChannelBaseTransport.Channel.MessageEvent.base","metadata","module$contents$goog$labs$net$webChannel$WebChannelBaseTransport_WebChannelBaseTransport.Channel.MessageEvent","WebChannelBaseTransport.Channel.ErrorEvent","module$contents$goog$net$WebChannel_WebChannel.ErrorEventcall","WebChannelBaseTransport.Channel.ErrorEvent.base","NETWORK_ERROR","module$contents$goog$labs$net$webChannel$WebChannelBaseTransport_WebChannelBaseTransport.Channel.ErrorEvent","WebChannelBaseTransport.Channel.Handler_","module$contents$goog$labs$net$webChannel$WebChannelBase_WebChannelBase.Handler","WebChannelBaseTransport.Channel.Handler_.prototype.channelOpened","WebChannelBaseTransport.Channel.Handler_.prototype.channelHandleArray","WebChannelBaseTransport.Channel.Handler_.prototype.channelError","WebChannelBaseTransport.Channel.Handler_.prototype.channelClosed","WebChannelBaseTransport.ChannelProperties","WebChannelBaseTransport.ChannelProperties.prototype.getHttpSessionId","commit","WebChannelBaseTransport.ChannelProperties.prototype.commit","WebChannelBaseTransport.ChannelProperties.prototype.getLastStatusCode","catchError","selector","innerSub","syncUnsub","handledResult","debounce","durationSelector","hasValue","durationSubscriber","emit","defaultIfEmpty","take","seen","throwIfEmpty","errorFactory","defaultErrorFactory","first","hasDefaultValue","raceWith","otherSources","ChangeBatchResponse","changeList","timer","delayMs","timerId","module$exports$google3$ipc$invalidation$punctual$typescript$impl$client_impl.ServerTimeEstimator","clock","clientStartMicros","choose","watchRequest","consecutiveThrottledConnections","previousTimeEstimator","timeEstimator","setWatchRequest","ChooseServerRequest","setConsecutiveThrottledConnections","rttMicros","clockOffsetMicros","setEstimatedServerClockMicros","jspbClient","CHOOSE_SERVER_PATH_SUFFIX","ChooseServerResponse","clientFinishMicros","serverProcessingMicros","serverFinishMicros","serverStartMicros","affinitization","initialConnectionDelayMillis","module$exports$google3$ipc$invalidation$punctual$typescript$impl$client_impl.ServerChooserImpl","refreshCreds","channelId","RefreshCredentialsRequest","REFRESH_CREDENTIALS_PATH_SUFFIX","RefreshCredentialsResponse","module$exports$google3$ipc$invalidation$punctual$typescript$impl$client_impl.CredentialRefresherImpl","RecentResync","interestSet","knowledgeTimestamp","hasRecurred","resyncMillis","env","authMethodPromise","channelDeps","YOUTUBE","firstPartyUri","thirdPartyUri","channelUri","WEBCHANNEL_PATH_SUFFIX","channelConfig","serverChooser","credentialRefresher","onMessage","onStatus","module$exports$google3$ipc$invalidation$punctual$typescript$impl$client_impl.ClientImpl","getNextRefreshDelayMs","nowMs","lastRefreshTimeMs","startMs","module$exports$google3$ipc$invalidation$punctual$typescript$impl$client_impl.REFRESH_CREDENTIALS_MIN_DELAY_MS","randomness","getNextDelay","delayGenerator","reconnectHint","skipBackoff","deps","chooseServer","chosenServer","serverTimeEstimator","hasConnected","openChannelInternal","errStatus","INTERNAL","scheduleRefreshCredentials","lastRefreshTime","refreshCredsTimerScheduled","module$exports$google3$ipc$invalidation$punctual$typescript$impl$client_impl.ClientImpl.getNextRefreshDelayMs","findMatchingResync","recentResyncs","resync","set1","set2","buildWatchRequest","setHeader","WatchRequest","module$exports$google3$ipc$invalidation$punctual$typescript$impl$header.HEADER","idToReturn","ObjectId","projectProto","objectIdToPathProto","objectIdPrefix","ObjectIdPrefix","root","sendOpenMultiWatchRequest","streamId","streamInfo","NonCausalStream","setStartTimeChosenByPunctual","knowledgeTimestampChosenByPunctual","streamInitiationReason","REASON_UNSPECIFIED","requestBatch","MultiWatchRequestBatch","setOpen","choice","chooseWatchSpecForAffinity","project__tsickle_destructured_1","watchSpec__tsickle_destructured_2","resp","jspb_internal_adapters.getRepeatedWrapperField","handleMessage","hasReceivedMessage","streamIdString","causalStreams","limboStreams","nonCausalStreams","watchResponse","START","causalStream","start","ADVANCE","advance","limboStream","advanceTime","CHANGES","change","changes","objectPath","changePayload","asUint8Array","validatedObjectId","objectIdFromContextualProto","watchSpec","RESYNC","deleteOldResyncs","module$exports$google3$ipc$invalidation$punctual$typescript$impl$client_impl.TRACK_RECENT_RESYNC_MS","earlierResync","RECONNECT","handleStatus","REASON_FORCED_RECONNECT","streamsToReopen","sort","entry1","entry2","key__tsickle_destructured_3","value__tsickle_destructured_4","value__tsickle_destructured_5","expectedChannelState","module$exports$google3$ipc$invalidation$punctual$typescript$impl$client_impl.GENERATOR_RESET_DELAY_MS","streamMaps","streamMap","newStreamSubject","watch","streamNumber","projectOverride","defaultProject","CausalStream","Close","closeStream","channelStatHandler","event","this.channelEventCallback","statEvent","currentStatus","module$exports$google3$ipc$invalidation$punctual$typescript$impl$client_impl.ERROR_STATUS_THROTTLE_PERIOD_MS","REASON_TRANSIENT_ERROR","REASON_WATCH_SESSION_START","LimboStream","advanceTimeMicros","projectName","setName","Project","ObjectPath","partToAdd","Part","NullPart","long_1","module$exports$google3$ipc$invalidation$punctual$typescript$public$object_id.ObjectId.of","partCase","SIGNED_NUM_DECREASING","jspb_internal_adapters.getOneofInt64StringFieldOrUndefined_asString","SIGNED_NUM_INCREASING","NUM_INCREASING","DOUBLE_INCREASING","NUM_DECREASING","DOUBLE_DECREASING","STRING_DECREASING","STRING","BYTES","BYTES_DECREASING","TIMESTAMP_INCREASING","module$exports$google3$ipc$invalidation$punctual$typescript$public$time.Time.fromTimestamp","TIMESTAMP_DECREASING","NULL_PART","PART_NOT_SET","module$exports$google3$ipc$invalidation$punctual$typescript$impl$project_path.PROD_ENV","module$exports$google3$ipc$invalidation$punctual$typescript$impl$project_path.PROD_UP_ENV","module$exports$google3$ipc$invalidation$punctual$typescript$impl$project_path.DEV_ENV","STANDARD_ENVS","getEnvironmentFor","getChatDomainShardEnv","releaseStage","shortDomainShardName","module$exports$google3$ipc$invalidation$punctual$typescript$public$factory.ClientBuilder","authParams","fetchApi","getPunctualStreamIdForChangeUpdates","repo","changeNumber","restApi","console","module$exports$google3$java$com$google$devtools$gerritcodereview$plugins$punctual$resources$static$plugin.PunctualUpdatePublisher","setApiKey","PUNCTUAL_API_KEY","PUNCTUAL_PROJECT_PATH","PATH_PREFIX","restParts","rest","envSpec__tsickle_destructured_1","projectName__tsickle_destructured_2","CUSTOM_ENV_PREFIX","encodedUri","module$exports$google3$ipc$invalidation$punctual$typescript$impl$client_impl.ClientImpl.create","punctualClient","Gerrit","install","plugin","changeUpdates","register"]
}
